libuntar should not be a base lib
[helenos.git] / uspace / Makefile
blobf2e1c90b3f4e51bfc06c3108ee8d2493b9ab899c
2 # Copyright (c) 2005 Martin Decky
3 # All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
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.
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.
29 -include ../Makefile.common
30 -include ../Makefile.config
32 ## Common binaries
35 DIRS = \
36 app/barber \
37 app/bdsh \
38 app/bithenge \
39 app/blkdump \
40 app/contacts \
41 app/corecfg \
42 app/cpptest \
43 app/devctl \
44 app/dnscfg \
45 app/dnsres \
46 app/download \
47 app/edit \
48 app/fdisk \
49 app/fontviewer \
50 app/getterm \
51 app/gunzip \
52 app/hbench \
53 app/init \
54 app/inet \
55 app/kill \
56 app/killall \
57 app/kio \
58 app/loc \
59 app/logset \
60 app/lprint \
61 app/mixerctl \
62 app/mkfat \
63 app/mkexfat \
64 app/mkext4 \
65 app/mkmfs \
66 app/modplay \
67 app/netecho \
68 app/nterm \
69 app/pci \
70 app/redir \
71 app/sbi \
72 app/sportdmp \
73 app/stats \
74 app/taskdump \
75 app/tester \
76 app/testread \
77 app/testrunner \
78 app/testwrit \
79 app/tetris \
80 app/tmon \
81 app/trace \
82 app/top \
83 app/untar \
84 app/usbinfo \
85 app/vol \
86 app/vuhid \
87 app/nic \
88 app/ping \
89 app/pkg \
90 app/sysinfo \
91 app/sysinst \
92 app/mkbd \
93 app/date \
94 app/vcalc \
95 app/vdemo \
96 app/viewer \
97 app/vlaunch \
98 app/vterm \
99 app/df \
100 app/wavplay \
101 app/websrv \
102 app/wifi_supplicant \
103 srv/audio/hound \
104 srv/clipboard \
105 srv/locsrv \
106 srv/logger \
107 srv/klog \
108 srv/devman \
109 srv/loader \
110 srv/net/dhcp \
111 srv/net/dnsrsrv \
112 srv/net/ethip \
113 srv/net/inetsrv \
114 srv/net/loopip \
115 srv/net/nconfsrv \
116 srv/net/slip \
117 srv/net/tcp \
118 srv/net/udp \
119 srv/ns \
120 srv/taskmon \
121 srv/vfs \
122 srv/bd/sata_bd \
123 srv/bd/file_bd \
124 srv/bd/rd \
125 srv/bd/vbd \
126 srv/fs/exfat \
127 srv/fs/udf \
128 srv/fs/fat \
129 srv/fs/cdfs \
130 srv/fs/tmpfs \
131 srv/fs/mfs \
132 srv/fs/locfs \
133 srv/fs/ext4fs \
134 srv/volsrv \
135 srv/hid/compositor \
136 srv/hid/console \
137 srv/hid/s3c24xx_ts \
138 srv/hid/isdv4_tablet \
139 srv/hid/input \
140 srv/hid/output \
141 srv/hid/remcons \
142 srv/hw/char/s3c24xx_uart \
143 srv/hid/rfb \
144 srv/test/chardev-test \
145 srv/test/ipc-test \
146 drv/audio/hdaudio \
147 drv/audio/sb16 \
148 drv/root/root \
149 drv/root/virt \
150 drv/block/ahci \
151 drv/block/ata_bd \
152 drv/block/ddisk \
153 drv/block/usbmast \
154 drv/block/virtio-blk \
155 drv/bus/adb/cuda_adb \
156 drv/bus/isa \
157 drv/bus/pci/pciintel \
158 drv/bus/usb/ehci \
159 drv/bus/usb/ohci \
160 drv/bus/usb/uhci \
161 drv/bus/usb/usbdiag \
162 drv/bus/usb/usbflbk \
163 drv/bus/usb/usbhub \
164 drv/bus/usb/usbmid \
165 drv/bus/usb/vhc \
166 drv/bus/usb/xhci \
167 drv/char/i8042 \
168 drv/char/msim-con \
169 drv/char/ns8250 \
170 drv/char/pc-lpt \
171 drv/char/pl011 \
172 drv/char/pl050 \
173 drv/char/ski-con \
174 drv/char/sun4v-con \
175 drv/fb/amdm37x_dispc \
176 drv/fb/kfb \
177 drv/hid/adb-kbd \
178 drv/hid/adb-mouse \
179 drv/hid/atkbd \
180 drv/hid/ps2mouse \
181 drv/hid/usbhid \
182 drv/hid/xtkbd \
183 drv/intctl/apic \
184 drv/intctl/gicv2 \
185 drv/intctl/i8259 \
186 drv/intctl/icp-ic \
187 drv/intctl/obio \
188 drv/nic/ne2k \
189 drv/nic/e1k \
190 drv/nic/rtl8139 \
191 drv/nic/rtl8169 \
192 drv/nic/ar9271 \
193 drv/nic/virtio-net \
194 drv/platform/amdm37x \
195 drv/platform/arm64virt \
196 drv/platform/icp \
197 drv/platform/mac \
198 drv/platform/malta \
199 drv/platform/msim \
200 drv/platform/pc \
201 drv/platform/ski \
202 drv/platform/sun4v \
203 drv/test/test1 \
204 drv/test/test2 \
205 drv/test/test3 \
206 drv/time/cmos-rtc
208 ## sun4u driver won't compile on 32-bit targets
209 ifeq ($(UARCH),sparc64)
210 DIRS += \
211 drv/platform/sun4u
212 endif
214 ## Dynamic linking tests
216 ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
217 DIRS += \
218 app/dltest \
219 app/dltests
220 endif
222 ## System libraries
225 BASE_LIBS = \
226 lib/c \
227 lib/cpp
229 LIBS = \
230 lib/fs \
231 lib/block \
232 lib/crypto \
233 lib/clui \
234 lib/dltest \
235 lib/fdisk \
236 lib/fmtutil \
237 lib/scsi \
238 lib/sif \
239 lib/compress \
240 lib/drv \
241 lib/graph \
242 lib/gui \
243 lib/hound \
244 lib/http \
245 lib/softrend \
246 lib/draw \
247 lib/label \
248 lib/math \
249 lib/minix \
250 lib/nettl \
251 lib/nic \
252 lib/ext4 \
253 lib/trackmod \
254 lib/untar \
255 lib/uri \
256 lib/usb \
257 lib/usbhost \
258 lib/usbdev \
259 lib/usbhid \
260 lib/usbvirt \
261 lib/pcm \
262 lib/pcut \
263 lib/bithenge \
264 lib/posix \
265 lib/ieee80211 \
266 lib/virtio
268 BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
269 BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
270 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
271 DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
272 CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
274 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean export
276 all: $(BUILDS) $(BUILDS_TESTS)
278 $(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
279 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
281 export: $(BUILDS)
282 mkdir -p $(EXPORT_DIR)
283 $(MAKE) -r -C lib/posix export EXPORT_DIR=$(EXPORT_DIR)
285 clean: $(CLEANS)
286 find lib app drv srv -name '*.o' -follow -exec rm \{\} \;
287 find lib app drv srv -name '*.lo' -follow -exec rm \{\} \;
288 find lib app drv srv -name '*.d' -follow -exec rm \{\} \;
289 rm -fr export
291 $(CLEANS):
292 -$(MAKE) -r -C $(basename $@) fasterclean
294 $(BASE_BUILDS) $(BUILDS):
295 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
297 $(DEPS): %/deps.mk: %/Makefile
298 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
300 $(BUILDS): $(BASE_BUILDS)
302 -include $(DEPS)