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