source: trunk/emx/Makefile.kmk@ 2687

Last change on this file since 2687 was 2675, checked in by bird, 20 years ago

ldstub

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 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/endlink386.asm
82
83#
84# emxbind
85#
86emxbind_TEMPLATE = usr.bin
87emxbind_DEFS = _BSD_NAMESPACE_POLLUTION
88emxbind_SOURCES = \
89 src/emxbind/cmd.c \
90 src/emxbind/emxbind.c \
91 src/emxbind/exec.c \
92 src/emxbind/export.c \
93 src/emxbind/fixup.c \
94 src/emxbind/map.c \
95 src/emxbind/resource.c \
96 src/emxbind/utils.c
97emxbind_LIBS = \
98 $(TARGET_libmoddef)
99
100#
101# The MZ stub.
102#
103os2stub.bin_TEMPLATE = usr.bin
104os2stub.bin_SOURCES = \
105 src/emxbind/os2stub.bin
106
107#
108# emxcat
109#
110emxcat_TEMPLATE = usr.bin
111emxcat_SOURCES = \
112 src/emxcat/emxcat.c
113
114#
115# emxdoc - skipped
116#
117
118#
119# emxexp
120#
121emxexp_TEMPLATE = usr.bin
122emxexp_SOURCES = \
123 src/emxexp/emxexp.c
124emxexp_LIBS = \
125 $(TARGET_libomflib) \
126 iberty
127
128#
129# emximp
130#
131emximp_TEMPLATE = usr.bin
132emximp_SOURCES = \
133 src/emximp/emximp.c
134emximp_LIBS = \
135 $(TARGET_libomflib) \
136 $(TARGET_libmoddef)
137
138#
139# emxload
140#
141emxload_TEMPLATE = usr.bin
142emxload_SOURCES = \
143 src/emxload/emxload.c
144
145#
146# emxomf
147#
148emxomf_TEMPLATE = usr.bin
149emxomf_SOURCES = \
150 src/emxomf/emxomf.c \
151 src/emxomf/stabshll.c \
152 src/emxomf/grow.c
153emxomf_LIBS = \
154 $(TARGET_libomflib) \
155 iberty
156
157#
158# emxomfar
159#
160emxomfar_TEMPLATE = usr.bin
161emxomfar_SOURCES = \
162 src/emxomf/emxomfar.c
163emxomfar_LIBS = \
164 $(TARGET_libomflib)
165
166#
167# emxomfld
168#
169emxomfld_TEMPLATE = usr.bin
170emxomfld_SOURCES = \
171 src/emxomf/emxomfld.c \
172 src/emxomf/weakld.c \
173 src/emxomf/grow.c
174emxomfld_LIBS = \
175 $(TARGET_libmoddef)
176
177#
178# listomf
179#
180listomf_TEMPLATE = usr.bin
181listomf_SOURCES = \
182 src/emxomf/listomf.c
183
184#
185# stripomf
186#
187stripomf_TEMPLATE = usr.bin
188stripomf_SOURCES = \
189 src/emxomf/stripomf.c
190
191#
192# emxaout
193#
194emxaout_TEMPLATE = usr.bin
195emxaout_SOURCES = \
196 src/emxomf/emxaout.c \
197 src/emxomf/grow.c
198
199#
200# emxstack
201#
202emxstack_TEMPLATE = usr.bin
203emxstack_SOURCES = \
204 src/emxstack/emxstack.c
205
206#
207# emxtsf
208#
209emxtsf_TEMPLATE = usr.bin
210emxtsf_SOURCES = \
211 src/emxtsf/emxtsf.c
212emxtsf_LIBS = \
213 $(TARGET_libmoddef)
214
215#
216# emxupd
217#
218emxupd_TEMPLATE = usr.bin
219emxupd_SOURCES = \
220 src/emxupd/emxupd.c
221
222#
223# ld (good old one)
224#
225ld_TEMPLATE = usr.bin
226ld_DEFS = EMX USE_ALLOCA
227ld_SOURCES = \
228 src/ld/ld.c
229ld_LDFLAGS = -Zstack 24575
230ld_LIBS = \
231 iberty
232
233#
234# ldstub
235#
236ldstub_TEMPLATE = usr.bin.alp
237ldstub_SOURCES = \
238 src/ld/ldstub.asm \
239 src/ld/ldstub.def
240ldstub_LDFLAGS = -nostdlib -s -Zlinker /align:1
241ldstub_LIBS = os2 end
242ldstub_EXESUFF =
243
244#
245# Scripts
246#
247scripts_TEMPLATE = usr.bin.script
248scripts_SOURCES = \
249 src/misc/dllar.cmd \
250 src/misc/gccenv.cmd \
251 src/misc/MakeOmfLibs.cmd
252
253#
254# Headers - include/sys
255#
256headers.sys_TEMPLATE = usr.include.sys
257headers.sys_SOURCES = \
258 include/sys/moddef.h \
259 include/sys/omflib.h
260
261
262DEPTH = ..
263include $(PATH_KBUILD)/rules.kmk
264
Note: See TracBrowser for help on using the repository browser.