Convert grub-update.sh script to using git
[helenos.git] / uspace / Makefile
blob68456a20b77c0816a146ea9ed2ff3e974e628700
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/fdisk \
48 app/fontviewer \
49 app/getterm \
50 app/gunzip \
51 app/init \
52 app/inet \
53 app/kill \
54 app/killall \
55 app/kio \
56 app/loc \
57 app/logset \
58 app/mixerctl \
59 app/mkfat \
60 app/mkexfat \
61 app/mkmfs \
62 app/modplay \
63 app/netecho \
64 app/nterm \
65 app/redir \
66 app/rcutest \
67 app/rcubench \
68 app/sbi \
69 app/sportdmp \
70 app/stats \
71 app/taskdump \
72 app/tester \
73 app/testread \
74 app/testwrit \
75 app/tetris \
76 app/trace \
77 app/top \
78 app/untar \
79 app/usbinfo \
80 app/vuhid \
81 app/nic \
82 app/ping \
83 app/pkg \
84 app/sysinfo \
85 app/sysinst \
86 app/mkbd \
87 app/date \
88 app/vcalc \
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/vbd \
120 srv/fs/exfat \
121 srv/fs/udf \
122 srv/fs/fat \
123 srv/fs/cdfs \
124 srv/fs/tmpfs \
125 srv/fs/mfs \
126 srv/fs/locfs \
127 srv/fs/ext4fs \
128 srv/volsrv \
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 srv/test/chardev-test \
139 drv/audio/hdaudio \
140 drv/audio/sb16 \
141 drv/root/root \
142 drv/root/virt \
143 drv/block/ahci \
144 drv/block/ata_bd \
145 drv/block/ddisk \
146 drv/block/usbmast \
147 drv/bus/adb/cuda_adb \
148 drv/bus/isa \
149 drv/bus/pci/pciintel \
150 drv/bus/usb/ehci \
151 drv/bus/usb/ohci \
152 drv/bus/usb/uhci \
153 drv/bus/usb/usbflbk \
154 drv/bus/usb/usbhub \
155 drv/bus/usb/usbmid \
156 drv/bus/usb/vhc \
157 drv/char/i8042 \
158 drv/char/msim-con \
159 drv/char/ns8250 \
160 drv/char/pl050 \
161 drv/char/ski-con \
162 drv/char/sun4v-con \
163 drv/fb/amdm37x_dispc \
164 drv/fb/kfb \
165 drv/hid/adb-kbd \
166 drv/hid/adb-mouse \
167 drv/hid/atkbd \
168 drv/hid/ps2mouse \
169 drv/hid/usbhid \
170 drv/hid/xtkbd \
171 drv/intctl/apic \
172 drv/intctl/i8259 \
173 drv/intctl/icp-ic \
174 drv/intctl/obio \
175 drv/nic/ne2k \
176 drv/nic/e1k \
177 drv/nic/rtl8139 \
178 drv/nic/rtl8169 \
179 drv/nic/ar9271 \
180 drv/platform/amdm37x \
181 drv/platform/icp \
182 drv/platform/mac \
183 drv/platform/malta \
184 drv/platform/msim \
185 drv/platform/pc \
186 drv/platform/ski \
187 drv/platform/sun4v \
188 drv/test/test1 \
189 drv/test/test2 \
190 drv/test/test3 \
191 drv/time/cmos-rtc
193 ## sun4u driver won't compile on 32-bit targets
194 ifeq ($(UARCH),sparc64)
195 DIRS += \
196 drv/platform/sun4u
197 endif
199 ## Dynamic linking tests
201 ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
202 DIRS += \
203 app/dltest \
204 app/dltests
205 endif
207 ## System libraries
210 BASE_LIBS = \
211 lib/c \
212 lib/softint \
213 lib/softfloat
215 LIBS = \
216 lib/fs \
217 lib/block \
218 lib/crypto \
219 lib/clui \
220 lib/dltest \
221 lib/fdisk \
222 lib/fmtutil \
223 lib/scsi \
224 lib/compress \
225 lib/drv \
226 lib/graph \
227 lib/gui \
228 lib/hound \
229 lib/http \
230 lib/softrend \
231 lib/draw \
232 lib/label \
233 lib/math \
234 lib/minix \
235 lib/nettl \
236 lib/nic \
237 lib/ext4 \
238 lib/trackmod \
239 lib/uri \
240 lib/usb \
241 lib/usbhost \
242 lib/usbdev \
243 lib/usbhid \
244 lib/usbvirt \
245 lib/pcm \
246 lib/pcut \
247 lib/bithenge \
248 lib/posix \
249 lib/ieee80211
251 BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
252 BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
253 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
254 DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
255 CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
257 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean
259 all: $(BUILDS) $(BUILDS_TESTS)
261 $(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
262 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
264 clean: $(CLEANS)
265 find lib app drv srv -name '*.o' -follow -exec rm \{\} \;
266 find lib app drv srv -name '*.lo' -follow -exec rm \{\} \;
267 find lib app drv srv -name '*.d' -follow -exec rm \{\} \;
269 $(CLEANS):
270 -$(MAKE) -r -C $(basename $@) fasterclean
272 $(BASE_BUILDS) $(BUILDS):
273 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
275 $(DEPS): %/deps.mk: %/Makefile
276 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
278 # Special case for base libraries.
279 lib/c.build: lib/softfloat.build lib/softint.build
281 $(BUILDS): $(BASE_BUILDS)
283 -include $(DEPS)