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