source: trunk/emx/Makefile.kmk@ 3669

Last change on this file since 3669 was 3665, checked in by bird, 15 years ago

emx: converted ldstub to nasm.

File size: 4.2 KB
Line 
1# $Id: $
2## @file
3#
4# kBuild Makefile for the EMX toolchain.
5#
6# Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
7#
8#
9
10
11LIBRARIES = \
12 libmoddef \
13 libomflib \
14 libend
15
16PROGRAMS = \
17 emxbind \
18 emxcat \
19 emxexp \
20 emximp \
21 emxload \
22 emxomf \
23 emxomfar \
24 emxomfld \
25 listomf \
26 stripomf \
27 emxaout \
28 emxstack \
29 emxtsf \
30 emxupd \
31 ld \
32 ldstub
33
34
35# ldstub - convert to nasm?
36
37INSTALLS = \
38 os2stub.bin \
39 scripts \
40 headers.sys
41
42#
43# Globals
44#
45INCS = include
46DEFS = VERSION=\"x\" INNOTEK_VERSION=\"y\"
47
48
49#
50# libmoddef
51#
52libmoddef_TEMPLATE = usr.lib
53libmoddef_SOURCES = \
54 src/libmoddef/moddef1.c \
55 src/libmoddef/moddef2.c \
56 src/libmoddef/moddef3.c
57
58#
59# libomflib
60#
61libomflib_TEMPLATE = usr.lib
62libomflib_SOURCES = \
63 src/libomflib/omflibam.c \
64 src/libomflib/omflibap.c \
65 src/libomflib/omflibcl.c \
66 src/libomflib/omflibcp.c \
67 src/libomflib/omflibcr.c \
68 src/libomflib/omflibdl.c \
69 src/libomflib/omflibex.c \
70 src/libomflib/omflibpb.c \
71 src/libomflib/omflibrd.c \
72 src/libomflib/omflibut.c \
73 src/libomflib/omflibwr.c
74
75#
76# libend
77#
78libend_TEMPLATE = usr.lib.nasm
79libend_SOURCES = \
80 src/libend/x86/end.asm \
81 src/libend/x86/endtext.asm \
82 src/libend/x86/enddata.asm \
83 src/libend/x86/endlink386.asm \
84 src/libend/x86/weakzero.asm
85
86#
87# emxbind
88#
89emxbind_TEMPLATE = usr.bin
90emxbind_DEFS = _BSD_NAMESPACE_POLLUTION
91emxbind_SOURCES = \
92 src/emxbind/cmd.c \
93 src/emxbind/emxbind.c \
94 src/emxbind/exec.c \
95 src/emxbind/export.c \
96 src/emxbind/fixup.c \
97 src/emxbind/map.c \
98 src/emxbind/resource.c \
99 src/emxbind/utils.c
100emxbind_LIBS = \
101 $(TARGET_libmoddef)
102
103#
104# The MZ stub.
105#
106os2stub.bin_TEMPLATE = usr.bin
107os2stub.bin_SOURCES = \
108 src/emxbind/os2stub.bin
109
110#
111# emxcat
112#
113emxcat_TEMPLATE = usr.bin
114emxcat_SOURCES = \
115 src/emxcat/emxcat.c
116
117#
118# emxdoc - skipped
119#
120
121#
122# emxexp
123#
124emxexp_TEMPLATE = usr.bin
125emxexp_SOURCES = \
126 src/emxexp/emxexp.c
127emxexp_LIBS = \
128 $(TARGET_libomflib) \
129 iberty
130
131#
132# emximp
133#
134emximp_TEMPLATE = usr.bin
135emximp_SOURCES = \
136 src/emximp/emximp.c
137emximp_LIBS = \
138 $(TARGET_libomflib) \
139 $(TARGET_libmoddef)
140
141#
142# emxload
143#
144emxload_TEMPLATE = usr.bin
145emxload_SOURCES = \
146 src/emxload/emxload.c
147
148#
149# emxomf
150#
151emxomf_TEMPLATE = usr.bin
152emxomf_SOURCES = \
153 src/emxomf/emxomf.c \
154 src/emxomf/stabshll.c \
155 src/emxomf/grow.c
156emxomf_LIBS = \
157 $(TARGET_libomflib) \
158 iberty
159
160#
161# emxomfar
162#
163emxomfar_TEMPLATE = usr.bin
164emxomfar_SOURCES = \
165 src/emxomf/emxomfar.c
166emxomfar_LIBS = \
167 $(TARGET_libomflib)
168
169#
170# emxomfld
171#
172emxomfld_TEMPLATE = usr.bin
173emxomfld_SOURCES = \
174 src/emxomf/emxomfld.c \
175 src/emxomf/weakld.c \
176 src/emxomf/grow.c
177emxomfld_LIBS = \
178 $(TARGET_libmoddef)
179
180#
181# listomf
182#
183listomf_TEMPLATE = usr.bin
184listomf_SOURCES = \
185 src/emxomf/listomf.c
186
187#
188# stripomf
189#
190stripomf_TEMPLATE = usr.bin
191stripomf_SOURCES = \
192 src/emxomf/stripomf.c
193
194#
195# emxaout
196#
197emxaout_TEMPLATE = usr.bin
198emxaout_SOURCES = \
199 src/emxomf/emxaout.c \
200 src/emxomf/grow.c
201
202#
203# emxstack
204#
205emxstack_TEMPLATE = usr.bin
206emxstack_SOURCES = \
207 src/emxstack/emxstack.c
208
209#
210# emxtsf
211#
212emxtsf_TEMPLATE = usr.bin
213emxtsf_SOURCES = \
214 src/emxtsf/emxtsf.c
215emxtsf_LIBS = \
216 $(TARGET_libmoddef)
217
218#
219# emxupd
220#
221emxupd_TEMPLATE = usr.bin
222emxupd_SOURCES = \
223 src/emxupd/emxupd.c
224
225#
226# ld (good old one)
227#
228ld_TEMPLATE = usr.bin
229ld_DEFS = EMX USE_ALLOCA
230ld_SOURCES = \
231 src/ld/ld.c
232ld_LDFLAGS = -Zstack 24575
233ld_LIBS = \
234 iberty
235
236#
237# ldstub
238#
239if 0
240ldstub_TEMPLATE = usr.bin.alp
241ldstub_SOURCES = \
242 src/ld/ldstub.asm \
243 src/ld/ldstub.def
244ldstub_LDFLAGS = -nostdlib -s #-Wl,-O,Option,-O,alignment=1
245ldstub_LIBS = os2 end
246else
247ldstub_TEMPLATE = usr.bin.nasm
248ldstub_SOURCES = \
249 src/ld/ldstub-nasm.asm \
250 src/ld/ldstub.def
251ldstub_ASFLAGS = -Ox
252ldstub_LDFLAGS = -nostdlib -s
253ldstub_LIBS = os2
254endif
255ldstub_EXESUFF =
256
257#
258# Scripts
259#
260scripts_TEMPLATE = usr.bin.script
261scripts_SOURCES = \
262 src/misc/dllar.cmd \
263 src/misc/gccenv.cmd \
264 src/misc/MakeOmfLibs.cmd
265
266#
267# Headers - include/sys
268#
269headers.sys_TEMPLATE = usr.include.sys
270headers.sys_SOURCES = \
271 include/sys/moddef.h \
272 include/sys/omflib.h
273
274
275DEPTH = ..
276include $(PATH_KBUILD)/rules.kmk
277
Note: See TracBrowser for help on using the repository browser.