source: trunk/emx/Makefile.kmk@ 3945

Last change on this file since 3945 was 3938, checked in by bird, 11 years ago

emx: Added emxomfstrip (untested).

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