build system fixes, more cleanup
[openwrt-10.03/.git] / toolchain / Makefile
1
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # Main makefile for the toolchain
8 #
9
10 # subdirectories to descend into
11 toolchain/builddirs := kernel-headers $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_NATIVE_TOOLCHAIN),,binutils gcc uClibc)
12
13 # builddir dependencies
14 toolchain/uClibc/prepare:=toolchain/kernel-headers/prepare
15 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
16   toolchain/binutils/prepare:=toolchain/uClibc/prepare
17   toolchain/gcc/prepare:=toolchain/binutils/install
18   toolchain/uClibc/compile:=toolchain/gcc/compile
19 endif
20 toolchain/gcc/install:=toolchain/uClibc/install
21
22 # prerequisites for the individual targets
23 toolchain/ := .config $(tools/stamp)
24 toolchain//prepare = $(STAGING_DIR)/include-host/.done
25 toolchain//compile = $(1)/prepare
26 toolchain//install = $(1)/compile
27
28 $(eval $(call stampfile,toolchain,toolchain))
29 $(eval $(call subdir,toolchain))
30