source: mainline/uspace/Makefile@ 25b853c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 25b853c was 4f674d7, checked in by jzr <zarevucky.jiri@…>, 8 years ago

Build uspace modules in correct dependency order (including dependencies
between libraries).

  • Property mode set to 100644
File size: 5.7 KB
RevLine 
[c2ee1c5c]1#
[df4ed85]2# Copyright (c) 2005 Martin Decky
[c2ee1c5c]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
[177e4ea]29-include ../Makefile.common
[9a0367f]30-include ../Makefile.config
[c2ee1c5c]31
[1b1164e8]32## Common binaries
33#
34
[ecfd7e5]35DIRS = \
[a047aaa]36 app/barber \
[b3d513f]37 app/bdsh \
[a54bd98]38 app/bithenge \
[32d3ebf]39 app/blkdump \
[423f64f]40 app/bnchmark \
[92c1680]41 app/corecfg \
[7beb220]42 app/devctl \
[5d1cb8a]43 app/dnscfg \
[31e9fe0]44 app/dnsres \
[d7b7f5e]45 app/download \
[b3d513f]46 app/edit \
[e96047c]47 app/fdisk \
[a9763c6]48 app/fontviewer \
[b3d513f]49 app/getterm \
[b93ea46a]50 app/gunzip \
[b3d513f]51 app/init \
[b4ec1ea]52 app/inet \
[1e9f8ab]53 app/kill \
[c4faa0c]54 app/killall \
[6fa9a99d]55 app/kio \
[32d96e1]56 app/loc \
[669f5cae]57 app/logset \
[a6bdccc]58 app/mixerctl \
[dccf721]59 app/mkfat \
[e872326]60 app/mkexfat \
[7a46bfe]61 app/mkmfs \
[7e69e0e]62 app/modplay \
[5147ff1]63 app/netecho \
[01a7aa1]64 app/nterm \
[b3d513f]65 app/redir \
[94b39ba]66 app/rcutest \
[a440a0f]67 app/rcubench \
[09ababb7]68 app/sbi \
[c0e53ff]69 app/sportdmp \
[3d482e0]70 app/stats \
[336db295]71 app/taskdump \
[b3d513f]72 app/tester \
[6b3e7f7f]73 app/testread \
[2966122]74 app/testwrit \
[b3d513f]75 app/tetris \
76 app/trace \
[5c058d50]77 app/top \
[ff042c0]78 app/untar \
[07b9203e]79 app/usbinfo \
[57c7050]80 app/vuhid \
[6bcecc2]81 app/nic \
[a79d88d]82 app/ping \
[9621c7d]83 app/pkg \
[a3eeef45]84 app/sysinfo \
[3a34852]85 app/sysinst \
[4880210]86 app/mkbd \
[fd37139d]87 app/date \
[bdfdc51c]88 app/vcalc \
[6d5e378]89 app/vdemo \
[3e896e1]90 app/viewer \
[6d5e378]91 app/vlaunch \
92 app/vterm \
[66366470]93 app/df \
[a6bdccc]94 app/wavplay \
95 app/websrv \
[864762a]96 app/wifi_supplicant \
[a6bdccc]97 srv/audio/hound \
[d3a8e47]98 srv/clipboard \
[32d96e1]99 srv/locsrv \
[1f2dd20]100 srv/logger \
[0caa075e]101 srv/klog \
[e4c4247]102 srv/devman \
[b3d513f]103 srv/loader \
[695b6ff]104 srv/net/dhcp \
[31e9fe0]105 srv/net/dnsrsrv \
[69a93df7]106 srv/net/ethip \
[b4ec1ea]107 srv/net/inetsrv \
[606c369]108 srv/net/loopip \
[7af0cc5]109 srv/net/nconfsrv \
[2093fbe]110 srv/net/slip \
[69a93df7]111 srv/net/tcp \
112 srv/net/udp \
[b3d513f]113 srv/ns \
[a074b4f]114 srv/taskmon \
[b3d513f]115 srv/vfs \
[9904eb90]116 srv/bd/sata_bd \
[2a18193c]117 srv/bd/file_bd \
[e7645de]118 srv/bd/rd \
[1356f85a]119 srv/bd/vbd \
[db9aa04e]120 srv/fs/exfat \
[48e3190]121 srv/fs/udf \
[c0cdcaf]122 srv/fs/fat \
[a26895d]123 srv/fs/cdfs \
[d5cdffe]124 srv/fs/tmpfs \
[7a46bfe]125 srv/fs/mfs \
[15f3c3f]126 srv/fs/locfs \
[d3a9ae74]127 srv/fs/ext4fs \
[bfcde8d]128 srv/volsrv \
[6d5e378]129 srv/hid/compositor \
[c6f08726]130 srv/hid/console \
[527298a]131 srv/hid/s3c24xx_ts \
[f66ca57f]132 srv/hid/isdv4_tablet \
[5f88293]133 srv/hid/input \
[6d5e378]134 srv/hid/output \
[21a9869]135 srv/hid/remcons \
[a9b5b5f]136 srv/hw/char/s3c24xx_uart \
[bd0e6a1]137 srv/hid/rfb \
[b229062]138 drv/audio/hdaudio \
[2fc487f]139 drv/audio/sb16 \
[2a37b9f]140 drv/root/root \
141 drv/root/virt \
[9904eb90]142 drv/block/ahci \
[66cb7a2]143 drv/block/ata_bd \
[f2e78b0]144 drv/block/ddisk \
[e27e36e]145 drv/bus/adb/cuda_adb \
[4c363fa2]146 drv/bus/isa \
147 drv/bus/pci/pciintel \
[5203e256]148 drv/bus/usb/ehci \
149 drv/bus/usb/ohci \
150 drv/bus/usb/uhci \
151 drv/bus/usb/usbflbk \
152 drv/bus/usb/usbhid \
153 drv/bus/usb/usbhub \
154 drv/bus/usb/usbmast \
155 drv/bus/usb/usbmid \
[00d7e1b]156 drv/bus/usb/vhc \
[6d15572]157 drv/char/atkbd \
[4c363fa2]158 drv/char/i8042 \
159 drv/char/ns8250 \
160 drv/char/pl050 \
161 drv/char/ps2mouse \
[6d15572]162 drv/char/ski-con \
[4c363fa2]163 drv/char/xtkbd \
164 drv/test/test1 \
165 drv/test/test2 \
166 drv/test/test3 \
167 drv/fb/amdm37x_dispc \
168 drv/fb/kfb \
[b446b02]169 drv/intctl/apic \
170 drv/intctl/i8259 \
[a416d070]171 drv/intctl/icp-ic \
[be1b1e68]172 drv/intctl/obio \
[9916841]173 drv/nic/ne2k \
[f0b74b2]174 drv/nic/e1k \
[fef725d]175 drv/nic/rtl8139 \
[312e5ff]176 drv/nic/rtl8169 \
[864762a]177 drv/nic/ar9271 \
[4c363fa2]178 drv/platform/amdm37x \
179 drv/platform/icp \
180 drv/platform/mac \
181 drv/platform/malta \
182 drv/platform/msim \
183 drv/platform/pc \
[6d15572]184 drv/platform/ski \
[4c363fa2]185 drv/time/cmos-rtc
[3a2f8aa]186
[4c363fa2]187## sun4u driver won't compile on 32-bit targets
[3e5a814]188ifeq ($(UARCH),sparc64)
[42742c5a]189 DIRS += \
[4c363fa2]190 drv/platform/sun4u
[09a0a8f0]191endif
192
[7c4b26c]193## Dynamic linking tests
194#
195ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
196 DIRS += \
197 app/dltest \
198 app/dltests
199endif
200
[1b1164e8]201## System libraries
202#
203
[4f674d7]204BASE_LIBS = \
205 lib/c \
206 lib/softint \
207 lib/softfloat
208
[e035612]209LIBS = \
[63f8966]210 lib/fs \
211 lib/block \
[1dcc0b9]212 lib/crypto \
[36a75a2]213 lib/clui \
[9182e86f]214 lib/dltest \
[e96047c]215 lib/fdisk \
[22cf42d9]216 lib/fmtutil \
[0feaae4]217 lib/scsi \
[a047aaa]218 lib/compress \
[c47e1a8]219 lib/drv \
[6d5e378]220 lib/graph \
221 lib/gui \
[a6bdccc]222 lib/hound \
[d7b7f5e]223 lib/http \
[6d5e378]224 lib/softrend \
225 lib/draw \
[1356f85a]226 lib/label \
[8620b2f]227 lib/math \
[cecba66e]228 lib/minix \
[2989c7e]229 lib/nettl \
[00d7e1b]230 lib/nic \
[eb91db7]231 lib/ext4 \
[7e69e0e]232 lib/trackmod \
[d7b7f5e]233 lib/uri \
[8d6c1f1]234 lib/usb \
235 lib/usbhost \
236 lib/usbdev \
237 lib/usbhid \
[2af29ed]238 lib/usbvirt \
[ea6c838]239 lib/pcm \
[865b981]240 lib/pcut \
[681a985]241 lib/bithenge \
[d3a92c87]242 lib/posix \
[8a64320e]243 lib/ieee80211
[e035612]244
[4f674d7]245BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
246BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
247BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
248DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
249CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
[e035612]250
[4f674d7]251.PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean
[c2ee1c5c]252
[01579ad]253all: $(BUILDS) $(BUILDS_TESTS)
254
[4f674d7]255$(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
[e540bc87]256 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
[c2ee1c5c]257
[25b0e6a]258clean: $(CLEANS)
[68825c3]259 find lib app drv srv -name '*.o' -follow -exec rm \{\} \;
260 find lib app drv srv -name '*.lo' -follow -exec rm \{\} \;
261 find lib app drv srv -name '*.d' -follow -exec rm \{\} \;
[cecba66e]262 find lib app drv srv -name 'tag' -follow -exec rm \{\} \;
[c2ee1c5c]263
[25b0e6a]264$(CLEANS):
[e540bc87]265 -$(MAKE) -r -C $(basename $@) clean
[c2ee1c5c]266
[4f674d7]267$(BASE_BUILDS) $(BUILDS):
[e540bc87]268 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
[e035612]269
[4f674d7]270$(DEPS): %/deps.mk: %/Makefile
271 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
272
273# Special case for base libraries.
274lib/c.build: lib/softfloat.build lib/softint.build
275
276$(BUILDS): $(BASE_BUILDS)
277
278-include $(DEPS)
[e035612]279
Note: See TracBrowser for help on using the repository browser.