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