source: trunk/emx/Makefile.kmk@ 2562

Last change on this file since 2562 was 2478, checked in by bird, 20 years ago

Initial config.

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