merge mainline changes
[helenos.git] / uspace / Makefile
blob0cb0389d2c9c879a9a9c646e67b655a94f5a2e79
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/bdsh \
37 app/bithenge \
38 app/blkdump \
39 app/bnchmark \
40 app/corecfg \
41 app/devctl \
42 app/dnscfg \
43 app/dnsres \
44 app/download \
45 app/edit \
46 app/getterm \
47 app/hdisk \
48 app/init \
49 app/inet \
50 app/kill \
51 app/killall \
52 app/kio \
53 app/loc \
54 app/logset \
55 app/mixerctl \
56 app/mkfat \
57 app/mkexfat \
58 app/mkmfs \
59 app/nterm \
60 app/redir \
61 app/sbi \
62 app/sportdmp \
63 app/stats \
64 app/taskdump \
65 app/tester \
66 app/testread \
67 app/testwrit \
68 app/tetris \
69 app/trace \
70 app/top \
71 app/untar \
72 app/usbinfo \
73 app/vuhid \
74 app/netecho \
75 app/netspeed \
76 app/nettest1 \
77 app/nettest2 \
78 app/nettest3 \
79 app/ping \
80 app/sysinfo \
81 app/mkbd \
82 app/date \
83 app/vdemo \
84 app/viewer \
85 app/vlaunch \
86 app/vterm \
87 app/df \
88 app/wavplay \
89 app/websrv \
90 srv/audio/hound \
91 srv/clipboard \
92 srv/locsrv \
93 srv/logger \
94 srv/klog \
95 srv/devman \
96 srv/loader \
97 srv/net/dhcp \
98 srv/net/dnsrsrv \
99 srv/net/ethip \
100 srv/net/inetsrv \
101 srv/net/loopip \
102 srv/net/nconfsrv \
103 srv/net/slip \
104 srv/net/tcp \
105 srv/net/udp \
106 srv/ns \
107 srv/taskmon \
108 srv/vfs \
109 srv/bd/sata_bd \
110 srv/bd/file_bd \
111 srv/bd/rd \
112 srv/bd/part/guid_part \
113 srv/bd/part/mbr_part \
114 srv/fs/exfat \
115 srv/fs/udf \
116 srv/fs/fat \
117 srv/fs/cdfs \
118 srv/fs/tmpfs \
119 srv/fs/mfs \
120 srv/fs/locfs \
121 srv/fs/ext4fs \
122 srv/hid/compositor \
123 srv/hid/console \
124 srv/hid/s3c24xx_ts \
125 srv/hid/isdv4_tablet \
126 srv/hid/input \
127 srv/hid/output \
128 srv/hid/remcons \
129 srv/hw/char/s3c24xx_uart \
130 srv/hid/rfb \
131 drv/audio/sb16 \
132 drv/infrastructure/root \
133 drv/infrastructure/rootvirt \
134 drv/block/ahci \
135 drv/block/ata_bd \
136 drv/char/i8042 \
137 drv/char/ps2mouse \
138 drv/char/xtkbd \
139 drv/test/test1 \
140 drv/test/test2 \
141 drv/test/test3 \
142 drv/fb/kfb \
143 drv/bus/usb/ehci \
144 drv/bus/usb/ohci \
145 drv/bus/usb/uhci \
146 drv/bus/usb/uhcirh \
147 drv/bus/usb/usbflbk \
148 drv/bus/usb/usbhid \
149 drv/bus/usb/usbhub \
150 drv/bus/usb/usbmast \
151 drv/bus/usb/usbmid \
152 drv/bus/usb/vhc \
153 drv/nic/ne2k \
154 drv/nic/e1k \
155 drv/nic/rtl8139
157 ifeq ($(CONFIG_PCC),y)
158 DIRS += \
159 app/cc \
160 app/ccom \
161 app/ccom/mkext \
162 app/cpp
163 endif
165 ifeq ($(CONFIG_BINUTILS),y)
166 DIRS += \
167 app/binutils
168 endif
170 ifeq ($(CONFIG_MSIM),y)
171 DIRS += \
172 app/msim
173 endif
175 ## Platform-specific hardware support
178 ifeq ($(UARCH),amd64)
179 DIRS += \
180 drv/infrastructure/rootpc \
181 drv/bus/pci/pciintel \
182 drv/bus/isa \
183 drv/char/ns8250 \
184 drv/time/cmos-rtc \
185 srv/hw/irc/apic \
186 srv/hw/irc/i8259
187 endif
189 ifeq ($(UARCH),ia32)
190 DIRS += \
191 drv/infrastructure/rootpc \
192 drv/bus/pci/pciintel \
193 drv/bus/isa \
194 drv/char/ns8250 \
195 drv/time/cmos-rtc \
196 srv/hw/irc/apic \
197 srv/hw/irc/i8259
198 endif
200 ifeq ($(UARCH), $(filter $(UARCH),mips32 mips32eb))
201 DIRS += \
202 drv/infrastructure/rootmalta \
203 drv/bus/pci/pciintel \
204 drv/bus/isa
205 endif
207 ifeq ($(UARCH),ppc32)
208 DIRS += \
209 drv/infrastructure/rootmac \
210 drv/bus/pci/pciintel \
211 srv/hw/bus/cuda_adb
212 endif
214 ifeq ($(UARCH),sparc64)
215 DIRS += \
216 srv/hw/irc/obio
217 endif
219 ifeq ($(UARCH),arm32)
220 DIRS += \
221 drv/infrastructure/rootamdm37x \
222 drv/fb/amdm37x_dispc
223 endif
225 ## System libraries
228 LIBC = lib/c
229 LIBS = \
230 lib/fs \
231 lib/block \
232 lib/clui \
233 lib/fmtutil \
234 lib/scsi \
235 lib/softint \
236 lib/softfloat \
237 lib/drv \
238 lib/graph \
239 lib/gui \
240 lib/hound \
241 lib/http \
242 lib/softrend \
243 lib/draw \
244 lib/math \
245 lib/net \
246 lib/nic \
247 lib/ext4 \
248 lib/uri \
249 lib/usb \
250 lib/usbhost \
251 lib/usbdev \
252 lib/usbhid \
253 lib/usbvirt \
254 lib/pcm \
255 lib/bithenge \
256 lib/posix \
257 lib/mbr \
258 lib/gpt
260 LIBC_BUILD = $(addsuffix .build,$(LIBC))
261 LIBS_BUILD = $(addsuffix .build,$(LIBS))
262 LIBN_BUILD = $(addsuffix .build,$(LIBN))
263 BUILDS := $(addsuffix .build,$(DIRS))
265 CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
267 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean
269 all: $(BUILDS)
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)