jffs2 eof detect: mark erased blocks after erasing them
[openwrt.git] / toolchain / Makefile
1 # Main makefile for the toolchain
2 include $(TOPDIR)/rules.mk
3 TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma
4 TARGETS-$(CONFIG_GDB) += gdb
5
6 TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y))
7 TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
8 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
9
10 all: install
11 download: $(TARGETS_DOWNLOAD)
12 install: $(TARGETS_INSTALL)
13 clean: $(TARGETS_CLEAN)
14
15 kernel-headers-prepare: sed-install
16 uClibc-prepare: kernel-headers-prepare sstrip-install
17 binutils-prepare: uClibc-prepare
18 gcc-prepare: binutils-install
19 uClibc-compile: gcc-compile
20 gcc-install: uClibc-install
21 squashfs-compile: lzma-install
22
23 TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
24
25 $(TOOLCHAIN_STAMP_DIR):
26 mkdir -p $@
27
28 $(STAGING_DIR):
29 @mkdir -p $@/lib
30 @mkdir -p $@/include
31 @mkdir -p $@/$(REAL_GNU_TARGET_NAME)
32 @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
33
34 $(TOOL_BUILD_DIR):
35 @mkdir -p $@
36
37 %-source: FORCE
38 $(MAKE) -C $(patsubst %-source,%,$@) source
39
40 %-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
41 @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
42 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
43 }
44 @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
45
46 %-compile: %-prepare
47 @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
48 $(MAKE) -C $(patsubst %-compile,%,$@) compile; \
49 }
50 @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
51
52 %-install: %-compile
53 @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
54 $(MAKE) -C $(patsubst %-install,%,$@) install; \
55 }
56 @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
57
58 %-clean: FORCE
59 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
60 @rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*
61
This page took 0.038989 seconds and 5 git commands to generate.