Add can_cast_size_t_to_int
[helenos.git] / uspace / Makefile
blob89c44bb81bb1a7aa9d3a735c9bac97d2073f88a1
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/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/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/perf \
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/bus/adb/cuda_adb \
155 drv/bus/isa \
156 drv/bus/pci/pciintel \
157 drv/bus/usb/ehci \
158 drv/bus/usb/ohci \
159 drv/bus/usb/uhci \
160 drv/bus/usb/usbdiag \
161 drv/bus/usb/usbflbk \
162 drv/bus/usb/usbhub \
163 drv/bus/usb/usbmid \
164 drv/bus/usb/vhc \
165 drv/bus/usb/xhci \
166 drv/char/i8042 \
167 drv/char/msim-con \
168 drv/char/ns8250 \
169 drv/char/pc-lpt \
170 drv/char/pl050 \
171 drv/char/ski-con \
172 drv/char/sun4v-con \
173 drv/fb/amdm37x_dispc \
174 drv/fb/kfb \
175 drv/hid/adb-kbd \
176 drv/hid/adb-mouse \
177 drv/hid/atkbd \
178 drv/hid/ps2mouse \
179 drv/hid/usbhid \
180 drv/hid/xtkbd \
181 drv/intctl/apic \
182 drv/intctl/i8259 \
183 drv/intctl/icp-ic \
184 drv/intctl/obio \
185 drv/nic/ne2k \
186 drv/nic/e1k \
187 drv/nic/rtl8139 \
188 drv/nic/rtl8169 \
189 drv/nic/ar9271 \
190 drv/nic/virtio-net \
191 drv/platform/amdm37x \
192 drv/platform/icp \
193 drv/platform/mac \
194 drv/platform/malta \
195 drv/platform/msim \
196 drv/platform/pc \
197 drv/platform/ski \
198 drv/platform/sun4v \
199 drv/test/test1 \
200 drv/test/test2 \
201 drv/test/test3 \
202 drv/time/cmos-rtc
204 ## sun4u driver won't compile on 32-bit targets
205 ifeq ($(UARCH),sparc64)
206 DIRS += \
207 drv/platform/sun4u
208 endif
210 ## Dynamic linking tests
212 ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
213 DIRS += \
214 app/dltest \
215 app/dltests
216 endif
218 ## System libraries
221 BASE_LIBS = \
222 lib/c \
223 lib/cpp \
224 lib/untar
226 LIBS = \
227 lib/fs \
228 lib/block \
229 lib/crypto \
230 lib/clui \
231 lib/dltest \
232 lib/fdisk \
233 lib/fmtutil \
234 lib/scsi \
235 lib/sif \
236 lib/compress \
237 lib/drv \
238 lib/graph \
239 lib/gui \
240 lib/hound \
241 lib/http \
242 lib/softrend \
243 lib/draw \
244 lib/label \
245 lib/math \
246 lib/minix \
247 lib/nettl \
248 lib/nic \
249 lib/ext4 \
250 lib/trackmod \
251 lib/uri \
252 lib/usb \
253 lib/usbhost \
254 lib/usbdev \
255 lib/usbhid \
256 lib/usbvirt \
257 lib/pcm \
258 lib/pcut \
259 lib/bithenge \
260 lib/posix \
261 lib/ieee80211 \
262 lib/virtio
264 BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
265 BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
266 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
267 DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
268 CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
270 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean export
272 all: $(BUILDS) $(BUILDS_TESTS)
274 $(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
275 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
277 export: $(BUILDS)
278 mkdir -p $(EXPORT_DIR)
279 $(MAKE) -r -C lib/posix export EXPORT_DIR=$(EXPORT_DIR)
281 clean: $(CLEANS)
282 find lib app drv srv -name '*.o' -follow -exec rm \{\} \;
283 find lib app drv srv -name '*.lo' -follow -exec rm \{\} \;
284 find lib app drv srv -name '*.d' -follow -exec rm \{\} \;
285 rm -fr export
287 $(CLEANS):
288 -$(MAKE) -r -C $(basename $@) fasterclean
290 $(BASE_BUILDS) $(BUILDS):
291 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
293 $(DEPS): %/deps.mk: %/Makefile
294 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
296 $(BUILDS): $(BASE_BUILDS)
298 -include $(DEPS)