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