1 | #
|
---|
2 | # Copyright (c) 2005 Martin Decky
|
---|
3 | # All rights reserved.
|
---|
4 | #
|
---|
5 | # Redistribution and use in source and binary forms, with or without
|
---|
6 | # modification, are permitted provided that the following conditions
|
---|
7 | # are met:
|
---|
8 | #
|
---|
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.
|
---|
16 | #
|
---|
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.
|
---|
27 | #
|
---|
28 |
|
---|
29 | -include ../Makefile.common
|
---|
30 | -include ../Makefile.config
|
---|
31 |
|
---|
32 | ## Common binaries
|
---|
33 | #
|
---|
34 |
|
---|
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/kill \
|
---|
45 | app/killall \
|
---|
46 | app/klog \
|
---|
47 | app/locinfo \
|
---|
48 | app/lsusb \
|
---|
49 | app/mkfat \
|
---|
50 | app/mkexfat \
|
---|
51 | app/mkmfs \
|
---|
52 | app/redir \
|
---|
53 | app/sbi \
|
---|
54 | app/sportdmp \
|
---|
55 | app/stats \
|
---|
56 | app/taskdump \
|
---|
57 | app/tester \
|
---|
58 | app/testread \
|
---|
59 | app/tetris \
|
---|
60 | app/trace \
|
---|
61 | app/top \
|
---|
62 | app/usbinfo \
|
---|
63 | app/vuhid \
|
---|
64 | app/netecho \
|
---|
65 | app/nettest1 \
|
---|
66 | app/nettest2 \
|
---|
67 | app/nettest3 \
|
---|
68 | app/ping \
|
---|
69 | app/websrv \
|
---|
70 | app/sysinfo \
|
---|
71 | app/mkbd \
|
---|
72 | srv/clip \
|
---|
73 | srv/loc \
|
---|
74 | srv/devman \
|
---|
75 | srv/loader \
|
---|
76 | srv/ns \
|
---|
77 | srv/taskmon \
|
---|
78 | srv/vfs \
|
---|
79 | srv/bd/ata_bd \
|
---|
80 | srv/bd/file_bd \
|
---|
81 | srv/bd/gxe_bd \
|
---|
82 | srv/bd/rd \
|
---|
83 | srv/bd/part/guid_part \
|
---|
84 | srv/bd/part/mbr_part \
|
---|
85 | srv/fs/exfat \
|
---|
86 | srv/fs/fat \
|
---|
87 | srv/fs/cdfs \
|
---|
88 | srv/fs/tmpfs \
|
---|
89 | srv/fs/mfs \
|
---|
90 | srv/fs/locfs \
|
---|
91 | srv/fs/ext2fs \
|
---|
92 | srv/hid/console \
|
---|
93 | srv/hid/s3c24xx_ts \
|
---|
94 | srv/hid/fb \
|
---|
95 | srv/hid/input \
|
---|
96 | srv/hid/remcons \
|
---|
97 | srv/hw/char/s3c24xx_uart \
|
---|
98 | srv/net/il/arp \
|
---|
99 | srv/net/il/ip \
|
---|
100 | srv/net/tl/icmp \
|
---|
101 | srv/net/tl/udp \
|
---|
102 | srv/net/tl/tcp \
|
---|
103 | srv/net/nil/eth \
|
---|
104 | srv/net/nil/nildummy \
|
---|
105 | srv/net/net \
|
---|
106 | drv/infrastructure/root \
|
---|
107 | drv/infrastructure/rootvirt \
|
---|
108 | drv/char/i8042 \
|
---|
109 | drv/char/ps2mouse \
|
---|
110 | drv/char/xtkbd \
|
---|
111 | drv/test/test1 \
|
---|
112 | drv/test/test2 \
|
---|
113 | drv/test/test3 \
|
---|
114 | drv/bus/usb/ehci \
|
---|
115 | drv/bus/usb/ohci \
|
---|
116 | drv/bus/usb/uhci \
|
---|
117 | drv/bus/usb/uhcirh \
|
---|
118 | drv/bus/usb/usbflbk \
|
---|
119 | drv/bus/usb/usbhid \
|
---|
120 | drv/bus/usb/usbhub \
|
---|
121 | drv/bus/usb/usbmast \
|
---|
122 | drv/bus/usb/usbmid \
|
---|
123 | drv/bus/usb/vhc \
|
---|
124 | drv/nic/lo \
|
---|
125 | drv/nic/ne2k \
|
---|
126 | drv/nic/e1k \
|
---|
127 | drv/nic/rtl8139
|
---|
128 |
|
---|
129 | ifeq ($(CONFIG_PCC),y)
|
---|
130 | DIRS += \
|
---|
131 | app/cc \
|
---|
132 | app/ccom \
|
---|
133 | app/ccom/mkext \
|
---|
134 | app/cpp
|
---|
135 | endif
|
---|
136 |
|
---|
137 | ifeq ($(CONFIG_BINUTILS),y)
|
---|
138 | DIRS += \
|
---|
139 | app/binutils
|
---|
140 | endif
|
---|
141 |
|
---|
142 | ifeq ($(CONFIG_MSIM),y)
|
---|
143 | DIRS += \
|
---|
144 | app/msim
|
---|
145 | endif
|
---|
146 |
|
---|
147 | ## Platform-specific hardware support
|
---|
148 | #
|
---|
149 |
|
---|
150 | ifeq ($(UARCH),amd64)
|
---|
151 | DIRS += \
|
---|
152 | drv/infrastructure/rootpc \
|
---|
153 | drv/bus/pci/pciintel \
|
---|
154 | drv/bus/isa \
|
---|
155 | drv/char/ns8250 \
|
---|
156 | srv/hw/irc/apic \
|
---|
157 | srv/hw/irc/i8259
|
---|
158 | endif
|
---|
159 |
|
---|
160 | ifeq ($(UARCH),ia32)
|
---|
161 | DIRS += \
|
---|
162 | drv/infrastructure/rootpc \
|
---|
163 | drv/bus/pci/pciintel \
|
---|
164 | drv/bus/isa \
|
---|
165 | drv/char/ns8250 \
|
---|
166 | srv/hw/irc/apic \
|
---|
167 | srv/hw/irc/i8259
|
---|
168 | endif
|
---|
169 |
|
---|
170 | ifeq ($(UARCH),ppc32)
|
---|
171 | DIRS += \
|
---|
172 | drv/infrastructure/rootmac \
|
---|
173 | srv/hw/bus/cuda_adb
|
---|
174 | endif
|
---|
175 |
|
---|
176 | ifeq ($(UARCH),sparc64)
|
---|
177 | DIRS += \
|
---|
178 | srv/hw/irc/obio
|
---|
179 | endif
|
---|
180 |
|
---|
181 | ## System libraries
|
---|
182 | #
|
---|
183 |
|
---|
184 | LIBC = lib/c
|
---|
185 | LIBS = \
|
---|
186 | lib/fs \
|
---|
187 | lib/block \
|
---|
188 | lib/clui \
|
---|
189 | lib/fmtutil \
|
---|
190 | lib/scsi \
|
---|
191 | lib/softint \
|
---|
192 | lib/softfloat \
|
---|
193 | lib/drv \
|
---|
194 | lib/fb \
|
---|
195 | lib/net \
|
---|
196 | lib/nic \
|
---|
197 | lib/ext2 \
|
---|
198 | lib/usb \
|
---|
199 | lib/usbhost \
|
---|
200 | lib/usbdev \
|
---|
201 | lib/usbhid \
|
---|
202 | lib/usbvirt \
|
---|
203 | lib/posix
|
---|
204 |
|
---|
205 | LIBC_BUILD = $(addsuffix .build,$(LIBC))
|
---|
206 | LIBS_BUILD = $(addsuffix .build,$(LIBS))
|
---|
207 | LIBN_BUILD = $(addsuffix .build,$(LIBN))
|
---|
208 | BUILDS := $(addsuffix .build,$(DIRS))
|
---|
209 |
|
---|
210 | CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
|
---|
211 |
|
---|
212 | .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean
|
---|
213 |
|
---|
214 | all: $(BUILDS)
|
---|
215 |
|
---|
216 | clean: $(CLEANS)
|
---|
217 |
|
---|
218 | $(CLEANS):
|
---|
219 | -$(MAKE) -C $(basename $@) clean
|
---|
220 |
|
---|
221 | $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD)
|
---|
222 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|
223 |
|
---|
224 | $(LIBN_BUILD): $(LIBC_BUILD) $(LIBS_BUILD)
|
---|
225 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|
226 |
|
---|
227 | $(LIBS_BUILD): $(LIBC_BUILD)
|
---|
228 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|
229 |
|
---|
230 | $(LIBC_BUILD):
|
---|
231 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|