next round of cleanup, convert target/ - make -j works now ;)
[openwrt/openwrt.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 curdir:=toolchain
10
11 # subdirectories to descend into
12 $(curdir)/builddirs := kernel-headers $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_NATIVE_TOOLCHAIN),,binutils gcc uClibc)
13
14 # builddir dependencies
15 $(curdir)/uClibc/prepare:=$(curdir)/kernel-headers/prepare
16 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
17 $(curdir)/binutils/prepare:=$(curdir)/uClibc/prepare
18 $(curdir)/gcc/prepare:=$(curdir)/binutils/install
19 $(curdir)/uClibc/compile:=$(curdir)/gcc/compile
20 endif
21 $(curdir)/gcc/install:=$(curdir)/uClibc/install
22
23 # prerequisites for the individual targets
24 $(curdir)/ := .config prereq
25 $(curdir)//prepare = $(STAGING_DIR)/include-host/.done
26 $(curdir)//compile = $(1)/prepare
27 $(curdir)//install = $(1)/compile
28
29 $(eval $(call stampfile,$(curdir),toolchain,install))
30 $(eval $(call subdir,$(curdir)))
31