source: mainline/uspace/Makefile@ a02aa5c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since a02aa5c was b501de7, checked in by Jiri Svoboda <jiri@…>, 7 years ago

XCW should rely on export dir instead of touching the source tree. Allow specifying alternate export dir. Add more exported libraries (yes, I know).

  • Property mode set to 100644
File size: 5.9 KB
Line 
1#
2# Copyright (c) 2005 Martin Decky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29-include ../Makefile.common
30-include ../Makefile.config
31
32## Common binaries
33#
34
35DIRS = \
36 app/barber \
37 app/bdsh \
38 app/bithenge \
39 app/blkdump \
40 app/bnchmark \
41 app/contacts \
42 app/corecfg \
43 app/cpptest \
44 app/devctl \
45 app/dnscfg \
46 app/dnsres \
47 app/download \
48 app/edit \
49 app/fdisk \
50 app/fontviewer \
51 app/getterm \
52 app/gunzip \
53 app/init \
54 app/inet \
55 app/kill \
56 app/killall \
57 app/kio \
58 app/loc \
59 app/logset \
60 app/mixerctl \
61 app/mkfat \
62 app/mkexfat \
63 app/mkext4 \
64 app/mkmfs \
65 app/modplay \
66 app/netecho \
67 app/nterm \
68 app/perf \
69 app/redir \
70 app/sbi \
71 app/sportdmp \
72 app/stats \
73 app/taskdump \
74 app/tester \
75 app/testread \
76 app/testrunner \
77 app/testwrit \
78 app/tetris \
79 app/tmon \
80 app/trace \
81 app/top \
82 app/untar \
83 app/usbinfo \
84 app/vol \
85 app/vuhid \
86 app/nic \
87 app/ping \
88 app/pkg \
89 app/sysinfo \
90 app/sysinst \
91 app/mkbd \
92 app/date \
93 app/vcalc \
94 app/vdemo \
95 app/viewer \
96 app/vlaunch \
97 app/vterm \
98 app/df \
99 app/wavplay \
100 app/websrv \
101 app/wifi_supplicant \
102 srv/audio/hound \
103 srv/clipboard \
104 srv/locsrv \
105 srv/logger \
106 srv/klog \
107 srv/devman \
108 srv/loader \
109 srv/net/dhcp \
110 srv/net/dnsrsrv \
111 srv/net/ethip \
112 srv/net/inetsrv \
113 srv/net/loopip \
114 srv/net/nconfsrv \
115 srv/net/slip \
116 srv/net/tcp \
117 srv/net/udp \
118 srv/ns \
119 srv/taskmon \
120 srv/vfs \
121 srv/bd/sata_bd \
122 srv/bd/file_bd \
123 srv/bd/rd \
124 srv/bd/vbd \
125 srv/fs/exfat \
126 srv/fs/udf \
127 srv/fs/fat \
128 srv/fs/cdfs \
129 srv/fs/tmpfs \
130 srv/fs/mfs \
131 srv/fs/locfs \
132 srv/fs/ext4fs \
133 srv/volsrv \
134 srv/hid/compositor \
135 srv/hid/console \
136 srv/hid/s3c24xx_ts \
137 srv/hid/isdv4_tablet \
138 srv/hid/input \
139 srv/hid/output \
140 srv/hid/remcons \
141 srv/hw/char/s3c24xx_uart \
142 srv/hid/rfb \
143 srv/test/chardev-test \
144 srv/test/ipc-test \
145 drv/audio/hdaudio \
146 drv/audio/sb16 \
147 drv/root/root \
148 drv/root/virt \
149 drv/block/ahci \
150 drv/block/ata_bd \
151 drv/block/ddisk \
152 drv/block/usbmast \
153 drv/bus/adb/cuda_adb \
154 drv/bus/isa \
155 drv/bus/pci/pciintel \
156 drv/bus/usb/ehci \
157 drv/bus/usb/ohci \
158 drv/bus/usb/uhci \
159 drv/bus/usb/usbdiag \
160 drv/bus/usb/usbflbk \
161 drv/bus/usb/usbhub \
162 drv/bus/usb/usbmid \
163 drv/bus/usb/vhc \
164 drv/bus/usb/xhci \
165 drv/char/i8042 \
166 drv/char/msim-con \
167 drv/char/ns8250 \
168 drv/char/pl050 \
169 drv/char/ski-con \
170 drv/char/sun4v-con \
171 drv/fb/amdm37x_dispc \
172 drv/fb/kfb \
173 drv/hid/adb-kbd \
174 drv/hid/adb-mouse \
175 drv/hid/atkbd \
176 drv/hid/ps2mouse \
177 drv/hid/usbhid \
178 drv/hid/xtkbd \
179 drv/intctl/apic \
180 drv/intctl/i8259 \
181 drv/intctl/icp-ic \
182 drv/intctl/obio \
183 drv/nic/ne2k \
184 drv/nic/e1k \
185 drv/nic/rtl8139 \
186 drv/nic/rtl8169 \
187 drv/nic/ar9271 \
188 drv/nic/virtio-net \
189 drv/platform/amdm37x \
190 drv/platform/icp \
191 drv/platform/mac \
192 drv/platform/malta \
193 drv/platform/msim \
194 drv/platform/pc \
195 drv/platform/ski \
196 drv/platform/sun4v \
197 drv/test/test1 \
198 drv/test/test2 \
199 drv/test/test3 \
200 drv/time/cmos-rtc
201
202## sun4u driver won't compile on 32-bit targets
203ifeq ($(UARCH),sparc64)
204 DIRS += \
205 drv/platform/sun4u
206endif
207
208## Dynamic linking tests
209#
210ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
211 DIRS += \
212 app/dltest \
213 app/dltests
214endif
215
216## System libraries
217#
218
219BASE_LIBS = \
220 lib/c \
221 lib/cpp \
222 lib/untar
223
224LIBS = \
225 lib/fs \
226 lib/block \
227 lib/crypto \
228 lib/clui \
229 lib/dltest \
230 lib/fdisk \
231 lib/fmtutil \
232 lib/scsi \
233 lib/sif \
234 lib/compress \
235 lib/drv \
236 lib/graph \
237 lib/gui \
238 lib/hound \
239 lib/http \
240 lib/softrend \
241 lib/draw \
242 lib/label \
243 lib/math \
244 lib/minix \
245 lib/nettl \
246 lib/nic \
247 lib/ext4 \
248 lib/trackmod \
249 lib/uri \
250 lib/usb \
251 lib/usbhost \
252 lib/usbdev \
253 lib/usbhid \
254 lib/usbvirt \
255 lib/pcm \
256 lib/pcut \
257 lib/bithenge \
258 lib/posix \
259 lib/ieee80211 \
260 lib/virtio
261
262BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
263BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
264BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
265DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
266CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
267
268.PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean export
269
270all: $(BUILDS) $(BUILDS_TESTS)
271
272$(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
273 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
274
275export: $(BUILDS)
276 $(MAKE) -r -C lib/posix export EXPORT_DIR=$(EXPORT_DIR)
277
278clean: $(CLEANS)
279 find lib app drv srv -name '*.o' -follow -exec rm \{\} \;
280 find lib app drv srv -name '*.lo' -follow -exec rm \{\} \;
281 find lib app drv srv -name '*.d' -follow -exec rm \{\} \;
282 rm -fr export
283
284$(CLEANS):
285 -$(MAKE) -r -C $(basename $@) fasterclean
286
287$(BASE_BUILDS) $(BUILDS):
288 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
289
290$(DEPS): %/deps.mk: %/Makefile
291 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
292
293$(BUILDS): $(BASE_BUILDS)
294
295-include $(DEPS)
Note: See TracBrowser for help on using the repository browser.