remove my mirror
[openwrt.git] / toolchain / Makefile
1 # Main makefile for the toolchain
2 include $(TOPDIR)/rules.mk
3 TARGETS:=sed utils binutils gcc uClibc ipkg-utils
4
5 TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
6 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
7
8 all: install
9 install: $(TARGETS_INSTALL)
10 clean: $(TARGETS_CLEAN)
11
12 uClibc-prepare: kernel-headers-prepare sed-install utils-install
13 binutils-prepare: uClibc-prepare
14 gcc-prepare: binutils-install
15 uClibc-compile: gcc-prepare
16 gcc-compile: uClibc-install
17
18 $(STAMP_DIR):
19 mkdir -p $(STAMP_DIR)
20
21 $(STAGING_DIR):
22 @mkdir -p $(STAGING_DIR)/lib
23 @mkdir -p $(STAGING_DIR)/include
24 @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
25 @ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
26
27 $(TOOL_BUILD_DIR):
28 @mkdir -p $(TOOL_BUILD_DIR)
29
30 %-prepare: $(STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR)
31 @[ -f $(STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
32 @touch $(STAMP_DIR)/.toolchain_$@
33
34 %-compile: %-prepare
35 @[ -f $(STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-compile,%,$@) compile
36 @touch $(STAMP_DIR)/.toolchain_$@
37
38 %-install: %-compile
39 @[ -f $(STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-install,%,$@) install
40 @touch $(STAMP_DIR)/.toolchain_$@
41
42 %-clean:
43 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
44 @rm -f $(STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*
45
This page took 0.045872 seconds and 5 git commands to generate.