source: mainline/uspace/Makefile@ 3e35fd7

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 3e35fd7 was 41f7564, checked in by Martin Decky <martin@…>, 19 years ago

cleanup and unify the build system

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[c2ee1c5c]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
[ecfd7e5]29## Include configuration
[c2ee1c5c]30#
31
[41f7564]32-include ../version
[ecfd7e5]33-include Makefile.config
[c2ee1c5c]34
[ecfd7e5]35DIRS = \
[29a9f62]36 libc \
[4241683]37 softint \
38 softfloat \
[5106e98]39 init \
[afa6e74]40 ns \
[51c1b003]41 fb \
[d7eafd8]42 kbd \
[d6cc453]43 console \
[51dbadf3]44 tetris \
45 ipcc \
46 klog
[c2ee1c5c]47
[5a4c754]48ifeq ($(ARCH), amd64)
[d7eafd8]49 DIRS += pci
[5a4c754]50endif
[41f7564]51
[5a4c754]52ifeq ($(ARCH), ia32)
[d7eafd8]53 DIRS += pci
[37458472]54endif
[5a4c754]55
[41f7564]56ifeq ($(ARCH), mips32)
57 CFLAGS += -DCONFIG_MIPS_FPU
58endif
59
60ifeq ($(ARCH), mips32eb)
61 CFLAGS += -DCONFIG_MIPS_FPU
62endif
[07d7870]63
[ecfd7e5]64BUILDS := $(addsuffix .build,$(DIRS))
65CLEANS := $(addsuffix .clean,$(DIRS))
[c2ee1c5c]66
[ecfd7e5]67.PHONY: all config build $(BUILDS) $(CLEANS) clean distclean
[c2ee1c5c]68
[ecfd7e5]69all:
[41f7564]70 ../tools/config.py uspace.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG)
[ecfd7e5]71 $(MAKE) -C . build
72
73config:
[41f7564]74 ../tools/config.py uspace.config
[ecfd7e5]75
76build: $(BUILDS)
[c2ee1c5c]77
[25b0e6a]78clean: $(CLEANS)
79 find $(SOURCES) -name '*.o' -follow -exec rm \{\} \;
[a2ae4f4]80 find libc -name "_link.ld" -exec rm \{\} \;
[c2ee1c5c]81
[ecfd7e5]82distclean: clean
83 -rm Makefile.config
84
[25b0e6a]85$(CLEANS):
86 $(MAKE) -C $(basename $@) clean ARCH=$(ARCH)
[c2ee1c5c]87
[ecfd7e5]88$(BUILDS):
[a3b3b05e]89 $(MAKE) -C $(basename $@) all ARCH=$(ARCH) COMPILER=$(COMPILER)
Note: See TracBrowser for help on using the repository browser.