| 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 configuration
|
|---|
| 30 | #
|
|---|
| 31 |
|
|---|
| 32 | -include ../Makefile.config
|
|---|
| 33 |
|
|---|
| 34 | DIRS = \
|
|---|
| 35 | app/bdsh \
|
|---|
| 36 | app/edit \
|
|---|
| 37 | app/getterm \
|
|---|
| 38 | app/init \
|
|---|
| 39 | app/klog \
|
|---|
| 40 | app/mkfat \
|
|---|
| 41 | app/redir \
|
|---|
| 42 | app/shutters \
|
|---|
| 43 | app/taskdump \
|
|---|
| 44 | app/tester \
|
|---|
| 45 | app/test_serial \
|
|---|
| 46 | app/tetris \
|
|---|
| 47 | app/trace \
|
|---|
| 48 | srv/clip \
|
|---|
| 49 | srv/devmap \
|
|---|
| 50 | srv/devman \
|
|---|
| 51 | srv/drivers/root \
|
|---|
| 52 | srv/loader \
|
|---|
| 53 | srv/ns \
|
|---|
| 54 | srv/taskmon \
|
|---|
| 55 | srv/vfs \
|
|---|
| 56 | srv/bd/ata_bd \
|
|---|
| 57 | srv/bd/file_bd \
|
|---|
| 58 | srv/bd/gxe_bd \
|
|---|
| 59 | srv/bd/rd \
|
|---|
| 60 | srv/bd/part/guid_part \
|
|---|
| 61 | srv/bd/part/mbr_part \
|
|---|
| 62 | srv/fs/fat \
|
|---|
| 63 | srv/fs/tmpfs \
|
|---|
| 64 | srv/fs/devfs \
|
|---|
| 65 | srv/hid/adb_mouse \
|
|---|
| 66 | srv/hid/console \
|
|---|
| 67 | srv/hid/char_mouse \
|
|---|
| 68 | srv/hid/fb \
|
|---|
| 69 | srv/hid/kbd \
|
|---|
| 70 | srv/hw/char/i8042
|
|---|
| 71 |
|
|---|
| 72 | ifeq ($(UARCH),amd64)
|
|---|
| 73 | DIRS += srv/dd
|
|---|
| 74 | # DIRS += srv/hw/bus/pci
|
|---|
| 75 | endif
|
|---|
| 76 |
|
|---|
| 77 | ifeq ($(UARCH),ia32)
|
|---|
| 78 | DIRS += srv/dd
|
|---|
| 79 | # DIRS += srv/hw/bus/pci
|
|---|
| 80 | endif
|
|---|
| 81 |
|
|---|
| 82 | ifeq ($(UARCH),ppc32)
|
|---|
| 83 | DIRS += srv/hw/bus/cuda_adb
|
|---|
| 84 | endif
|
|---|
| 85 |
|
|---|
| 86 | ifeq ($(UARCH),sparc64)
|
|---|
| 87 | DIRS += \
|
|---|
| 88 | srv/dd \
|
|---|
| 89 | srv/hw/cir/fhc \
|
|---|
| 90 | srv/hw/cir/obio
|
|---|
| 91 | endif
|
|---|
| 92 |
|
|---|
| 93 | LIBC = lib/libc
|
|---|
| 94 | LIBS = \
|
|---|
| 95 | lib/libfs \
|
|---|
| 96 | lib/libblock \
|
|---|
| 97 | lib/softint \
|
|---|
| 98 | lib/softfloat \
|
|---|
| 99 |
|
|---|
| 100 | ifeq ($(UARCH),amd64)
|
|---|
| 101 | LIBS += lib/libpci
|
|---|
| 102 | endif
|
|---|
| 103 |
|
|---|
| 104 | ifeq ($(UARCH),ia32)
|
|---|
| 105 | LIBS += lib/libpci
|
|---|
| 106 | endif
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 | LIBC_BUILD = $(addsuffix .build,$(LIBC))
|
|---|
| 110 | LIBS_BUILD = $(addsuffix .build,$(LIBS))
|
|---|
| 111 |
|
|---|
| 112 | BUILDS := $(addsuffix .build,$(DIRS))
|
|---|
| 113 | CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
|
|---|
| 114 |
|
|---|
| 115 | .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(BUILDS) $(CLEANS) clean
|
|---|
| 116 |
|
|---|
| 117 | all: $(BUILDS)
|
|---|
| 118 |
|
|---|
| 119 | clean: $(CLEANS)
|
|---|
| 120 |
|
|---|
| 121 | $(CLEANS):
|
|---|
| 122 | -$(MAKE) -C $(basename $@) clean
|
|---|
| 123 |
|
|---|
| 124 | $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD)
|
|---|
| 125 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
|---|
| 126 |
|
|---|
| 127 | $(LIBS_BUILD): $(LIBC_BUILD)
|
|---|
| 128 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
|---|
| 129 |
|
|---|
| 130 | $(LIBC_BUILD):
|
|---|
| 131 | $(MAKE) -C $(basename $@) all PRECHECK=$(PRECHECK)
|
|---|