[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] | 35 | DIRS = \
|
---|
[b3d513f] | 36 | app/bdsh \
|
---|
| 37 | app/edit \
|
---|
| 38 | app/getterm \
|
---|
| 39 | app/init \
|
---|
| 40 | app/klog \
|
---|
[dccf721] | 41 | app/mkfat \
|
---|
[b3d513f] | 42 | app/redir \
|
---|
[336db295] | 43 | app/taskdump \
|
---|
[b3d513f] | 44 | app/tester \
|
---|
| 45 | app/tetris \
|
---|
| 46 | app/trace \
|
---|
| 47 | srv/clip \
|
---|
| 48 | srv/devmap \
|
---|
| 49 | srv/loader \
|
---|
| 50 | srv/ns \
|
---|
[a074b4f] | 51 | srv/taskmon \
|
---|
[b3d513f] | 52 | srv/vfs \
|
---|
[f8ef660] | 53 | srv/bd/ata_bd \
|
---|
[2a18193c] | 54 | srv/bd/file_bd \
|
---|
[44a53fd] | 55 | srv/bd/gxe_bd \
|
---|
[e7645de] | 56 | srv/bd/rd \
|
---|
[975e7e9] | 57 | srv/bd/part/guid_part \
|
---|
[b3d513f] | 58 | srv/bd/part/mbr_part \
|
---|
[c0cdcaf] | 59 | srv/fs/fat \
|
---|
[d5cdffe] | 60 | srv/fs/tmpfs \
|
---|
[a095d20] | 61 | srv/fs/devfs \
|
---|
[b73c26d] | 62 | srv/hid/adb_mouse \
|
---|
| 63 | srv/hid/char_mouse \
|
---|
[b3d513f] | 64 | srv/hid/fb \
|
---|
| 65 | srv/hid/kbd \
|
---|
[1b1164e8] | 66 | srv/hw/char/i8042
|
---|
| 67 |
|
---|
| 68 | ## Platform-specific hardware support
|
---|
| 69 | #
|
---|
[c2ee1c5c] | 70 |
|
---|
[684f767] | 71 | ifneq ($(UARCH),abs32le)
|
---|
| 72 | DIRS += srv/hid/console
|
---|
| 73 | endif
|
---|
| 74 |
|
---|
[fcd7053] | 75 | ifeq ($(UARCH),amd64)
|
---|
[b3d513f] | 76 | DIRS += srv/hw/bus/pci
|
---|
[5a4c754] | 77 | endif
|
---|
[41f7564] | 78 |
|
---|
[fcd7053] | 79 | ifeq ($(UARCH),ia32)
|
---|
[b3d513f] | 80 | DIRS += srv/hw/bus/pci
|
---|
[37458472] | 81 | endif
|
---|
[5a4c754] | 82 |
|
---|
[3a2f8aa] | 83 | ifeq ($(UARCH),ppc32)
|
---|
| 84 | DIRS += srv/hw/bus/cuda_adb
|
---|
| 85 | endif
|
---|
| 86 |
|
---|
[3e5a814] | 87 | ifeq ($(UARCH),sparc64)
|
---|
[42742c5a] | 88 | DIRS += \
|
---|
[b3d513f] | 89 | srv/hw/cir/fhc \
|
---|
| 90 | srv/hw/cir/obio
|
---|
[3e5a814] | 91 | endif
|
---|
| 92 |
|
---|
[1b1164e8] | 93 | ## Networking
|
---|
| 94 | #
|
---|
| 95 |
|
---|
| 96 | ifeq ($(CONFIG_NETIF_DP8390),y)
|
---|
| 97 | DIRS += srv/net/netif/dp8390
|
---|
| 98 | endif
|
---|
| 99 |
|
---|
[63f8966] | 100 | NETWORKING_COMMON = \
|
---|
[1b1164e8] | 101 | srv/net/netif/lo \
|
---|
| 102 | srv/net/nil/eth \
|
---|
| 103 | srv/net/nil/nildummy \
|
---|
| 104 | srv/net/net \
|
---|
| 105 | srv/net/net/start \
|
---|
| 106 | srv/net/socket \
|
---|
| 107 | srv/net/app/echo \
|
---|
| 108 | srv/net/app/ping \
|
---|
| 109 | srv/net/app/nettest1 \
|
---|
| 110 | srv/net/app/nettest2
|
---|
| 111 |
|
---|
| 112 | NETWORKING_MODULAR = \
|
---|
| 113 | srv/net/il/arp \
|
---|
| 114 | srv/net/il/ip \
|
---|
| 115 | srv/net/tl/icmp \
|
---|
| 116 | srv/net/tl/udp \
|
---|
| 117 | srv/net/tl/tcp
|
---|
| 118 |
|
---|
| 119 | ## System libraries
|
---|
| 120 | #
|
---|
| 121 |
|
---|
[63f8966] | 122 | LIBC = lib/c
|
---|
[e035612] | 123 | LIBS = \
|
---|
[63f8966] | 124 | lib/fs \
|
---|
| 125 | lib/block \
|
---|
[36a75a2] | 126 | lib/clui \
|
---|
[e035612] | 127 | lib/softint \
|
---|
[e5773c6] | 128 | lib/softfloat \
|
---|
[e035612] | 129 |
|
---|
[15eeb93] | 130 | ifeq ($(UARCH),amd64)
|
---|
[63f8966] | 131 | LIBS += lib/pci
|
---|
[15eeb93] | 132 | endif
|
---|
| 133 |
|
---|
| 134 | ifeq ($(UARCH),ia32)
|
---|
[63f8966] | 135 | LIBS += lib/pci
|
---|
[15eeb93] | 136 | endif
|
---|
| 137 |
|
---|
| 138 |
|
---|
[e035612] | 139 | LIBC_BUILD = $(addsuffix .build,$(LIBC))
|
---|
| 140 | LIBS_BUILD = $(addsuffix .build,$(LIBS))
|
---|
| 141 |
|
---|
[1b1164e8] | 142 | ifeq ($(CONFIG_NETWORKING),modular)
|
---|
| 143 | BUILDS := $(addsuffix .build,$(DIRS)) $(addsuffix .build,$(NETWORKING_COMMON)) $(addsuffix .build,$(NETWORKING_MODULAR))
|
---|
| 144 | endif
|
---|
| 145 |
|
---|
| 146 | ifeq ($(CONFIG_NETWORKING),module)
|
---|
| 147 | BUILDS := $(addsuffix .build,$(DIRS)) $(addsuffix .build,$(NETWORKING_COMMON))
|
---|
| 148 | endif
|
---|
| 149 |
|
---|
| 150 | ifeq ($(CONFIG_NETWORKING),none)
|
---|
| 151 | BUILDS := $(addsuffix .build,$(DIRS))
|
---|
| 152 | endif
|
---|
| 153 |
|
---|
| 154 | CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(NETWORKING_COMMON)) $(addsuffix .clean,$(NETWORKING_MODULAR)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
|
---|
[c2ee1c5c] | 155 |
|
---|
[e035612] | 156 | .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(BUILDS) $(CLEANS) clean
|
---|
[c2ee1c5c] | 157 |
|
---|
[cc1f8d4] | 158 | all: $(BUILDS)
|
---|
[c2ee1c5c] | 159 |
|
---|
[25b0e6a] | 160 | clean: $(CLEANS)
|
---|
[c2ee1c5c] | 161 |
|
---|
[25b0e6a] | 162 | $(CLEANS):
|
---|
[24d6efc] | 163 | -$(MAKE) -C $(basename $@) clean
|
---|
[c2ee1c5c] | 164 |
|
---|
[e035612] | 165 | $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD)
|
---|
[8786aa5] | 166 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|
[e035612] | 167 |
|
---|
| 168 | $(LIBS_BUILD): $(LIBC_BUILD)
|
---|
[8786aa5] | 169 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|
[e035612] | 170 |
|
---|
| 171 | $(LIBC_BUILD):
|
---|
[8786aa5] | 172 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
---|