| 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/barber \ | 
|---|
| 37 | app/bdsh \ | 
|---|
| 38 | app/bithenge \ | 
|---|
| 39 | app/blkdump \ | 
|---|
| 40 | app/bnchmark \ | 
|---|
| 41 | app/corecfg \ | 
|---|
| 42 | app/devctl \ | 
|---|
| 43 | app/dnscfg \ | 
|---|
| 44 | app/dnsres \ | 
|---|
| 45 | app/download \ | 
|---|
| 46 | app/edit \ | 
|---|
| 47 | app/fdisk \ | 
|---|
| 48 | app/fontviewer \ | 
|---|
| 49 | app/getterm \ | 
|---|
| 50 | app/gunzip \ | 
|---|
| 51 | app/init \ | 
|---|
| 52 | app/inet \ | 
|---|
| 53 | app/kill \ | 
|---|
| 54 | app/killall \ | 
|---|
| 55 | app/kio \ | 
|---|
| 56 | app/loc \ | 
|---|
| 57 | app/logset \ | 
|---|
| 58 | app/mixerctl \ | 
|---|
| 59 | app/mkfat \ | 
|---|
| 60 | app/mkexfat \ | 
|---|
| 61 | app/mkmfs \ | 
|---|
| 62 | app/modplay \ | 
|---|
| 63 | app/netecho \ | 
|---|
| 64 | app/nterm \ | 
|---|
| 65 | app/redir \ | 
|---|
| 66 | app/rcutest \ | 
|---|
| 67 | app/rcubench \ | 
|---|
| 68 | app/sbi \ | 
|---|
| 69 | app/sportdmp \ | 
|---|
| 70 | app/stats \ | 
|---|
| 71 | app/taskdump \ | 
|---|
| 72 | app/tester \ | 
|---|
| 73 | app/testread \ | 
|---|
| 74 | app/testwrit \ | 
|---|
| 75 | app/tetris \ | 
|---|
| 76 | app/trace \ | 
|---|
| 77 | app/top \ | 
|---|
| 78 | app/untar \ | 
|---|
| 79 | app/usbinfo \ | 
|---|
| 80 | app/vuhid \ | 
|---|
| 81 | app/nic \ | 
|---|
| 82 | app/ping \ | 
|---|
| 83 | app/pkg \ | 
|---|
| 84 | app/sysinfo \ | 
|---|
| 85 | app/sysinst \ | 
|---|
| 86 | app/mkbd \ | 
|---|
| 87 | app/date \ | 
|---|
| 88 | app/vcalc \ | 
|---|
| 89 | app/vdemo \ | 
|---|
| 90 | app/viewer \ | 
|---|
| 91 | app/vlaunch \ | 
|---|
| 92 | app/vterm \ | 
|---|
| 93 | app/df \ | 
|---|
| 94 | app/wavplay \ | 
|---|
| 95 | app/websrv \ | 
|---|
| 96 | app/wifi_supplicant \ | 
|---|
| 97 | srv/audio/hound \ | 
|---|
| 98 | srv/clipboard \ | 
|---|
| 99 | srv/locsrv \ | 
|---|
| 100 | srv/logger \ | 
|---|
| 101 | srv/klog \ | 
|---|
| 102 | srv/devman \ | 
|---|
| 103 | srv/loader \ | 
|---|
| 104 | srv/net/dhcp \ | 
|---|
| 105 | srv/net/dnsrsrv \ | 
|---|
| 106 | srv/net/ethip \ | 
|---|
| 107 | srv/net/inetsrv \ | 
|---|
| 108 | srv/net/loopip \ | 
|---|
| 109 | srv/net/nconfsrv \ | 
|---|
| 110 | srv/net/slip \ | 
|---|
| 111 | srv/net/tcp \ | 
|---|
| 112 | srv/net/udp \ | 
|---|
| 113 | srv/ns \ | 
|---|
| 114 | srv/taskmon \ | 
|---|
| 115 | srv/vfs \ | 
|---|
| 116 | srv/bd/sata_bd \ | 
|---|
| 117 | srv/bd/file_bd \ | 
|---|
| 118 | srv/bd/rd \ | 
|---|
| 119 | srv/bd/vbd \ | 
|---|
| 120 | srv/fs/exfat \ | 
|---|
| 121 | srv/fs/udf \ | 
|---|
| 122 | srv/fs/fat \ | 
|---|
| 123 | srv/fs/cdfs \ | 
|---|
| 124 | srv/fs/tmpfs \ | 
|---|
| 125 | srv/fs/mfs \ | 
|---|
| 126 | srv/fs/locfs \ | 
|---|
| 127 | srv/fs/ext4fs \ | 
|---|
| 128 | srv/volsrv \ | 
|---|
| 129 | srv/hid/compositor \ | 
|---|
| 130 | srv/hid/console \ | 
|---|
| 131 | srv/hid/s3c24xx_ts \ | 
|---|
| 132 | srv/hid/isdv4_tablet \ | 
|---|
| 133 | srv/hid/input \ | 
|---|
| 134 | srv/hid/output \ | 
|---|
| 135 | srv/hid/remcons \ | 
|---|
| 136 | srv/hw/bus/cuda_adb \ | 
|---|
| 137 | srv/hw/char/s3c24xx_uart \ | 
|---|
| 138 | srv/hw/irc/apic \ | 
|---|
| 139 | srv/hw/irc/i8259 \ | 
|---|
| 140 | srv/hw/irc/icp-ic \ | 
|---|
| 141 | srv/hw/irc/obio \ | 
|---|
| 142 | srv/hid/rfb \ | 
|---|
| 143 | drv/audio/hdaudio \ | 
|---|
| 144 | drv/audio/sb16 \ | 
|---|
| 145 | drv/root/root \ | 
|---|
| 146 | drv/root/virt \ | 
|---|
| 147 | drv/block/ahci \ | 
|---|
| 148 | drv/block/ata_bd \ | 
|---|
| 149 | drv/block/ddisk \ | 
|---|
| 150 | drv/bus/isa \ | 
|---|
| 151 | drv/bus/pci/pciintel \ | 
|---|
| 152 | drv/bus/usb/ehci \ | 
|---|
| 153 | drv/bus/usb/ohci \ | 
|---|
| 154 | drv/bus/usb/uhci \ | 
|---|
| 155 | drv/bus/usb/usbflbk \ | 
|---|
| 156 | drv/bus/usb/usbhid \ | 
|---|
| 157 | drv/bus/usb/usbhub \ | 
|---|
| 158 | drv/bus/usb/usbmast \ | 
|---|
| 159 | drv/bus/usb/usbmid \ | 
|---|
| 160 | drv/bus/usb/vhc \ | 
|---|
| 161 | drv/char/i8042 \ | 
|---|
| 162 | drv/char/ns8250 \ | 
|---|
| 163 | drv/char/pl050 \ | 
|---|
| 164 | drv/char/ps2mouse \ | 
|---|
| 165 | drv/char/atkbd \ | 
|---|
| 166 | drv/char/xtkbd \ | 
|---|
| 167 | drv/test/test1 \ | 
|---|
| 168 | drv/test/test2 \ | 
|---|
| 169 | drv/test/test3 \ | 
|---|
| 170 | drv/fb/amdm37x_dispc \ | 
|---|
| 171 | drv/fb/kfb \ | 
|---|
| 172 | drv/nic/ne2k \ | 
|---|
| 173 | drv/nic/e1k \ | 
|---|
| 174 | drv/nic/rtl8139 \ | 
|---|
| 175 | drv/nic/rtl8169 \ | 
|---|
| 176 | drv/nic/ar9271 \ | 
|---|
| 177 | drv/platform/amdm37x \ | 
|---|
| 178 | drv/platform/icp \ | 
|---|
| 179 | drv/platform/mac \ | 
|---|
| 180 | drv/platform/malta \ | 
|---|
| 181 | drv/platform/msim \ | 
|---|
| 182 | drv/platform/pc \ | 
|---|
| 183 | drv/time/cmos-rtc | 
|---|
| 184 |  | 
|---|
| 185 | ## sun4u driver won't compile on 32-bit targets | 
|---|
| 186 | ifeq ($(UARCH),sparc64) | 
|---|
| 187 | DIRS += \ | 
|---|
| 188 | drv/platform/sun4u | 
|---|
| 189 | endif | 
|---|
| 190 |  | 
|---|
| 191 | ## Dynamic linking tests | 
|---|
| 192 | # | 
|---|
| 193 | ifeq ($(CONFIG_BUILD_SHARED_LIBS),y) | 
|---|
| 194 | DIRS += \ | 
|---|
| 195 | app/dltest \ | 
|---|
| 196 | app/dltests | 
|---|
| 197 | endif | 
|---|
| 198 |  | 
|---|
| 199 | ## System libraries | 
|---|
| 200 | # | 
|---|
| 201 |  | 
|---|
| 202 | LIBC = lib/c | 
|---|
| 203 | LIBS = \ | 
|---|
| 204 | lib/fs \ | 
|---|
| 205 | lib/block \ | 
|---|
| 206 | lib/crypto \ | 
|---|
| 207 | lib/clui \ | 
|---|
| 208 | lib/dltest \ | 
|---|
| 209 | lib/fdisk \ | 
|---|
| 210 | lib/fmtutil \ | 
|---|
| 211 | lib/scsi \ | 
|---|
| 212 | lib/compress \ | 
|---|
| 213 | lib/softint \ | 
|---|
| 214 | lib/softfloat \ | 
|---|
| 215 | lib/drv \ | 
|---|
| 216 | lib/graph \ | 
|---|
| 217 | lib/gui \ | 
|---|
| 218 | lib/hound \ | 
|---|
| 219 | lib/http \ | 
|---|
| 220 | lib/softrend \ | 
|---|
| 221 | lib/draw \ | 
|---|
| 222 | lib/label \ | 
|---|
| 223 | lib/math \ | 
|---|
| 224 | lib/nettl \ | 
|---|
| 225 | lib/nic \ | 
|---|
| 226 | lib/ext4 \ | 
|---|
| 227 | lib/trackmod \ | 
|---|
| 228 | lib/uri \ | 
|---|
| 229 | lib/usb \ | 
|---|
| 230 | lib/usbhost \ | 
|---|
| 231 | lib/usbdev \ | 
|---|
| 232 | lib/usbhid \ | 
|---|
| 233 | lib/usbvirt \ | 
|---|
| 234 | lib/pcm \ | 
|---|
| 235 | lib/pcut \ | 
|---|
| 236 | lib/bithenge \ | 
|---|
| 237 | lib/posix \ | 
|---|
| 238 | lib/ieee80211 | 
|---|
| 239 |  | 
|---|
| 240 | LIBC_BUILD = $(addsuffix .build,$(LIBC)) | 
|---|
| 241 | LIBS_BUILD = $(addsuffix .build,$(LIBS)) | 
|---|
| 242 | LIBN_BUILD = $(addsuffix .build,$(LIBN)) | 
|---|
| 243 | BUILDS := $(addsuffix .build,$(DIRS)) | 
|---|
| 244 | BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) lib/c) | 
|---|
| 245 |  | 
|---|
| 246 | CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC)) | 
|---|
| 247 |  | 
|---|
| 248 | .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean | 
|---|
| 249 |  | 
|---|
| 250 | all: $(BUILDS) $(BUILDS_TESTS) | 
|---|
| 251 |  | 
|---|
| 252 | $(BUILDS_TESTS): $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) | 
|---|
| 253 | $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK) | 
|---|
| 254 |  | 
|---|
| 255 | clean: $(CLEANS) | 
|---|
| 256 |  | 
|---|
| 257 | $(CLEANS): | 
|---|
| 258 | -$(MAKE) -r -C $(basename $@) clean | 
|---|
| 259 |  | 
|---|
| 260 | $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) | 
|---|
| 261 | $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK) | 
|---|
| 262 |  | 
|---|
| 263 | $(LIBN_BUILD): $(LIBC_BUILD) $(LIBS_BUILD) | 
|---|
| 264 | $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK) | 
|---|
| 265 |  | 
|---|
| 266 | $(LIBS_BUILD): $(LIBC_BUILD) | 
|---|
| 267 | $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK) | 
|---|
| 268 |  | 
|---|
| 269 | $(LIBC_BUILD): | 
|---|
| 270 | $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK) | 
|---|