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 |
|
---|
11 | LIBRARIES = \
|
---|
12 | libmoddef \
|
---|
13 | libomflib \
|
---|
14 | libend
|
---|
15 |
|
---|
16 | PROGRAMS = \
|
---|
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 |
|
---|
37 | INSTALLS = \
|
---|
38 | os2stub.bin \
|
---|
39 | scripts \
|
---|
40 | headers.sys
|
---|
41 |
|
---|
42 | #
|
---|
43 | # Globals
|
---|
44 | #
|
---|
45 | INCS = include
|
---|
46 | DEFS = VERSION=\"x\" INNOTEK_VERSION=\"y\"
|
---|
47 |
|
---|
48 |
|
---|
49 | #
|
---|
50 | # libmoddef
|
---|
51 | #
|
---|
52 | libmoddef_TEMPLATE = usr.lib
|
---|
53 | libmoddef_SOURCES = \
|
---|
54 | src/libmoddef/moddef1.c \
|
---|
55 | src/libmoddef/moddef2.c \
|
---|
56 | src/libmoddef/moddef3.c
|
---|
57 |
|
---|
58 | #
|
---|
59 | # libomflib
|
---|
60 | #
|
---|
61 | libomflib_TEMPLATE = usr.lib
|
---|
62 | libomflib_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 | #
|
---|
78 | libend_TEMPLATE = usr.lib.nasm
|
---|
79 | libend_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 | #
|
---|
89 | emxbind_TEMPLATE = usr.bin
|
---|
90 | emxbind_DEFS = _BSD_NAMESPACE_POLLUTION
|
---|
91 | emxbind_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
|
---|
100 | emxbind_LIBS = \
|
---|
101 | $(TARGET_libmoddef)
|
---|
102 |
|
---|
103 | #
|
---|
104 | # The MZ stub.
|
---|
105 | #
|
---|
106 | os2stub.bin_TEMPLATE = usr.bin
|
---|
107 | os2stub.bin_SOURCES = \
|
---|
108 | src/emxbind/os2stub.bin
|
---|
109 |
|
---|
110 | #
|
---|
111 | # emxcat
|
---|
112 | #
|
---|
113 | emxcat_TEMPLATE = usr.bin
|
---|
114 | emxcat_SOURCES = \
|
---|
115 | src/emxcat/emxcat.c
|
---|
116 |
|
---|
117 | #
|
---|
118 | # emxdoc - skipped
|
---|
119 | #
|
---|
120 |
|
---|
121 | #
|
---|
122 | # emxexp
|
---|
123 | #
|
---|
124 | emxexp_TEMPLATE = usr.bin
|
---|
125 | emxexp_SOURCES = \
|
---|
126 | src/emxexp/emxexp.c
|
---|
127 | emxexp_LIBS = \
|
---|
128 | $(TARGET_libomflib) \
|
---|
129 | iberty
|
---|
130 |
|
---|
131 | #
|
---|
132 | # emximp
|
---|
133 | #
|
---|
134 | emximp_TEMPLATE = usr.bin
|
---|
135 | emximp_SOURCES = \
|
---|
136 | src/emximp/emximp.c
|
---|
137 | emximp_LIBS = \
|
---|
138 | $(TARGET_libomflib) \
|
---|
139 | $(TARGET_libmoddef)
|
---|
140 |
|
---|
141 | #
|
---|
142 | # emxload
|
---|
143 | #
|
---|
144 | emxload_TEMPLATE = usr.bin
|
---|
145 | emxload_SOURCES = \
|
---|
146 | src/emxload/emxload.c
|
---|
147 |
|
---|
148 | #
|
---|
149 | # emxomf
|
---|
150 | #
|
---|
151 | emxomf_TEMPLATE = usr.bin
|
---|
152 | emxomf_SOURCES = \
|
---|
153 | src/emxomf/emxomf.c \
|
---|
154 | src/emxomf/stabshll.c \
|
---|
155 | src/emxomf/grow.c
|
---|
156 | emxomf_LIBS = \
|
---|
157 | $(TARGET_libomflib) \
|
---|
158 | iberty
|
---|
159 |
|
---|
160 | #
|
---|
161 | # emxomfar
|
---|
162 | #
|
---|
163 | emxomfar_TEMPLATE = usr.bin
|
---|
164 | emxomfar_SOURCES = \
|
---|
165 | src/emxomf/emxomfar.c
|
---|
166 | emxomfar_LIBS = \
|
---|
167 | $(TARGET_libomflib)
|
---|
168 |
|
---|
169 | #
|
---|
170 | # emxomfld
|
---|
171 | #
|
---|
172 | emxomfld_TEMPLATE = usr.bin
|
---|
173 | emxomfld_SOURCES = \
|
---|
174 | src/emxomf/emxomfld.c \
|
---|
175 | src/emxomf/weakld.c \
|
---|
176 | src/emxomf/grow.c
|
---|
177 | emxomfld_LIBS = \
|
---|
178 | $(TARGET_libmoddef)
|
---|
179 |
|
---|
180 | #
|
---|
181 | # listomf
|
---|
182 | #
|
---|
183 | listomf_TEMPLATE = usr.bin
|
---|
184 | listomf_SOURCES = \
|
---|
185 | src/emxomf/listomf.c
|
---|
186 |
|
---|
187 | #
|
---|
188 | # stripomf
|
---|
189 | #
|
---|
190 | stripomf_TEMPLATE = usr.bin
|
---|
191 | stripomf_SOURCES = \
|
---|
192 | src/emxomf/stripomf.c
|
---|
193 |
|
---|
194 | #
|
---|
195 | # emxaout
|
---|
196 | #
|
---|
197 | emxaout_TEMPLATE = usr.bin
|
---|
198 | emxaout_SOURCES = \
|
---|
199 | src/emxomf/emxaout.c \
|
---|
200 | src/emxomf/grow.c
|
---|
201 |
|
---|
202 | #
|
---|
203 | # emxstack
|
---|
204 | #
|
---|
205 | emxstack_TEMPLATE = usr.bin
|
---|
206 | emxstack_SOURCES = \
|
---|
207 | src/emxstack/emxstack.c
|
---|
208 |
|
---|
209 | #
|
---|
210 | # emxtsf
|
---|
211 | #
|
---|
212 | emxtsf_TEMPLATE = usr.bin
|
---|
213 | emxtsf_SOURCES = \
|
---|
214 | src/emxtsf/emxtsf.c
|
---|
215 | emxtsf_LIBS = \
|
---|
216 | $(TARGET_libmoddef)
|
---|
217 |
|
---|
218 | #
|
---|
219 | # emxupd
|
---|
220 | #
|
---|
221 | emxupd_TEMPLATE = usr.bin
|
---|
222 | emxupd_SOURCES = \
|
---|
223 | src/emxupd/emxupd.c
|
---|
224 |
|
---|
225 | #
|
---|
226 | # ld (good old one)
|
---|
227 | #
|
---|
228 | ld_TEMPLATE = usr.bin
|
---|
229 | ld_DEFS = EMX USE_ALLOCA
|
---|
230 | ld_SOURCES = \
|
---|
231 | src/ld/ld.c
|
---|
232 | ld_LDFLAGS = -Zstack 24575
|
---|
233 | ld_LIBS = \
|
---|
234 | iberty
|
---|
235 |
|
---|
236 | #
|
---|
237 | # ldstub
|
---|
238 | #
|
---|
239 | if 0
|
---|
240 | ldstub_TEMPLATE = usr.bin.alp
|
---|
241 | ldstub_SOURCES = \
|
---|
242 | src/ld/ldstub.asm \
|
---|
243 | src/ld/ldstub.def
|
---|
244 | ldstub_LDFLAGS = -nostdlib -s #-Wl,-O,Option,-O,alignment=1
|
---|
245 | ldstub_LIBS = os2 end
|
---|
246 | else
|
---|
247 | ldstub_TEMPLATE = usr.bin.nasm
|
---|
248 | ldstub_SOURCES = \
|
---|
249 | src/ld/ldstub-nasm.asm \
|
---|
250 | src/ld/ldstub.def
|
---|
251 | ldstub_ASFLAGS = -Ox
|
---|
252 | ldstub_LDFLAGS = -nostdlib -s
|
---|
253 | ldstub_LIBS = os2
|
---|
254 | endif
|
---|
255 | ldstub_EXESUFF =
|
---|
256 |
|
---|
257 | #
|
---|
258 | # Scripts
|
---|
259 | #
|
---|
260 | scripts_TEMPLATE = usr.bin.script
|
---|
261 | scripts_SOURCES = \
|
---|
262 | src/misc/dllar.cmd \
|
---|
263 | src/misc/gccenv.cmd \
|
---|
264 | src/misc/MakeOmfLibs.cmd
|
---|
265 |
|
---|
266 | #
|
---|
267 | # Headers - include/sys
|
---|
268 | #
|
---|
269 | headers.sys_TEMPLATE = usr.include.sys
|
---|
270 | headers.sys_SOURCES = \
|
---|
271 | include/sys/moddef.h \
|
---|
272 | include/sys/omflib.h
|
---|
273 |
|
---|
274 |
|
---|
275 | DEPTH = ..
|
---|
276 | include $(PATH_KBUILD)/rules.kmk
|
---|
277 |
|
---|