pre-merge coding style cleanup and code review
[helenos.git] / uspace / Makefile
blob530b40eccc6206f4291314db01079c4be8ecc0a8
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/corecfg \
42 app/devctl \
43 app/dnscfg \
44 app/dnsres \
45 app/download \
46 app/edit \
47 app/fontviewer \
48 app/getterm \
49 app/hdisk \
50 app/init \
51 app/inet \
52 app/kill \
53 app/killall \
54 app/kio \
55 app/loc \
56 app/logset \
57 app/mixerctl \
58 app/mkfat \
59 app/mkexfat \
60 app/mkmfs \
61 app/modplay \
62 app/nterm \
63 app/redir \
64 app/rcutest \
65 app/rcubench \
66 app/sbi \
67 app/sportdmp \
68 app/stats \
69 app/taskdump \
70 app/tester \
71 app/testread \
72 app/testwrit \
73 app/tetris \
74 app/trace \
75 app/top \
76 app/untar \
77 app/usbinfo \
78 app/vuhid \
79 app/netecho \
80 app/netspeed \
81 app/nettest1 \
82 app/nettest2 \
83 app/nettest3 \
84 app/nic \
85 app/ping \
86 app/sysinfo \
87 app/mkbd \
88 app/date \
89 app/vdemo \
90 app/viewer \
91 app/vlaunch \
92 app/vterm \
93 app/df \
94 app/wavplay \
95 app/websrv \
96 app/wifi_supplicant \
97 srv/audio/hound \
98 srv/clipboard \
99 srv/locsrv \
100 srv/logger \
101 srv/klog \
102 srv/devman \
103 srv/loader \
104 srv/net/dhcp \
105 srv/net/dnsrsrv \
106 srv/net/ethip \
107 srv/net/inetsrv \
108 srv/net/loopip \
109 srv/net/nconfsrv \
110 srv/net/slip \
111 srv/net/tcp \
112 srv/net/udp \
113 srv/ns \
114 srv/taskmon \
115 srv/vfs \
116 srv/bd/sata_bd \
117 srv/bd/file_bd \
118 srv/bd/rd \
119 srv/bd/part/guid_part \
120 srv/bd/part/mbr_part \
121 srv/fs/exfat \
122 srv/fs/udf \
123 srv/fs/fat \
124 srv/fs/cdfs \
125 srv/fs/tmpfs \
126 srv/fs/mfs \
127 srv/fs/locfs \
128 srv/fs/ext4fs \
129 srv/hid/compositor \
130 srv/hid/console \
131 srv/hid/s3c24xx_ts \
132 srv/hid/isdv4_tablet \
133 srv/hid/input \
134 srv/hid/output \
135 srv/hid/remcons \
136 srv/hw/char/s3c24xx_uart \
137 srv/hid/rfb \
138 drv/audio/hdaudio \
139 drv/audio/sb16 \
140 drv/root/root \
141 drv/root/virt \
142 drv/block/ahci \
143 drv/block/ata_bd \
144 drv/block/ddisk \
145 drv/char/i8042 \
146 drv/char/pl050 \
147 drv/char/ps2mouse \
148 drv/char/xtkbd \
149 drv/test/test1 \
150 drv/test/test2 \
151 drv/test/test3 \
152 drv/fb/kfb \
153 drv/bus/usb/ehci \
154 drv/bus/usb/ohci \
155 drv/bus/usb/uhci \
156 drv/bus/usb/uhcirh \
157 drv/bus/usb/usbflbk \
158 drv/bus/usb/usbhid \
159 drv/bus/usb/usbhub \
160 drv/bus/usb/usbmast \
161 drv/bus/usb/usbmid \
162 drv/bus/usb/vhc \
163 drv/nic/ne2k \
164 drv/nic/e1k \
165 drv/nic/rtl8139 \
166 drv/nic/rtl8169 \
167 drv/nic/ar9271 \
168 drv/platform/icp
170 ## Platform-specific hardware support
173 ifeq ($(UARCH), $(filter $(UARCH),amd64 ia32 ia64))
174 DIRS += \
175 drv/platform/pc \
176 drv/bus/pci/pciintel \
177 drv/bus/isa \
178 drv/char/ns8250 \
179 drv/time/cmos-rtc \
180 srv/hw/irc/apic \
181 srv/hw/irc/i8259
182 endif
184 ifeq ($(UARCH), $(filter $(UARCH),mips32 mips32eb))
185 ifeq ($(MACHINE),msim)
186 DIRS += \
187 drv/platform/msim
188 else
189 DIRS += \
190 drv/platform/malta \
191 drv/bus/pci/pciintel \
192 drv/bus/isa
193 endif
194 endif
196 ifeq ($(UARCH),ppc32)
197 DIRS += \
198 drv/platform/mac \
199 drv/bus/pci/pciintel \
200 srv/hw/bus/cuda_adb
201 endif
203 ifeq ($(UARCH),sparc64)
204 DIRS += \
205 srv/hw/irc/obio
206 endif
208 ifeq ($(UARCH),arm32)
209 DIRS += \
210 drv/platform/amdm37x \
211 drv/fb/amdm37x_dispc \
212 srv/hw/irc/icp-ic
213 endif
215 ## System libraries
218 LIBC = lib/c
219 LIBS = \
220 lib/fs \
221 lib/block \
222 lib/crypto \
223 lib/clui \
224 lib/fmtutil \
225 lib/scsi \
226 lib/compress \
227 lib/softint \
228 lib/softfloat \
229 lib/drv \
230 lib/graph \
231 lib/gui \
232 lib/hound \
233 lib/http \
234 lib/softrend \
235 lib/draw \
236 lib/math \
237 lib/net \
238 lib/nic \
239 lib/ext4 \
240 lib/trackmod \
241 lib/uri \
242 lib/urcu \
243 lib/usb \
244 lib/usbhost \
245 lib/usbdev \
246 lib/usbhid \
247 lib/usbvirt \
248 lib/pcm \
249 lib/pcut \
250 lib/bithenge \
251 lib/posix \
252 lib/mbr \
253 lib/gpt \
254 lib/ieee80211
256 LIBC_BUILD = $(addsuffix .build,$(LIBC))
257 LIBS_BUILD = $(addsuffix .build,$(LIBS))
258 LIBN_BUILD = $(addsuffix .build,$(LIBN))
259 BUILDS := $(addsuffix .build,$(DIRS))
260 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) lib/c)
262 CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
264 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean
266 all: $(BUILDS) $(BUILDS_TESTS)
268 $(BUILDS_TESTS): $(BUILDS)
269 $(MAKE) -C $(basename $@) all-test PRECHECK=$(PRECHECK)
271 clean: $(CLEANS)
273 $(CLEANS):
274 -$(MAKE) -C $(basename $@) clean
276 $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD)
277 $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
279 $(LIBN_BUILD): $(LIBC_BUILD) $(LIBS_BUILD)
280 $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
282 $(LIBS_BUILD): $(LIBC_BUILD)
283 $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
285 $(LIBC_BUILD):
286 $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)