1 # Main makefile for the toolchain
2 include $(TOPDIR
)/rules.mk
3 TARGETS
:=sed utils binutils gcc uClibc ipkg-utils
5 TARGETS_INSTALL
:=$(patsubst %,%-install,$(TARGETS
))
6 TARGETS_CLEAN
:=$(patsubst %,%-clean,$(TARGETS
))
9 install: $(TARGETS_INSTALL
)
10 clean: $(TARGETS_CLEAN
)
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-install
: uClibc-install
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
28 @mkdir
-p
$(TOOL_BUILD_DIR
)
30 %-prepare
: $(STAMP_DIR
) $(STAGING_DIR
) $(TOOL_BUILD_DIR
)
31 @
[ -f
$(STAMP_DIR
)/.toolchain_
$@
] ||
$(MAKE
) -C
$(patsubst %-prepare
,%,$@
) prepare
32 @touch
$(STAMP_DIR
)/.toolchain_
$@
35 @
[ -f
$(STAMP_DIR
)/.toolchain_
$@
] ||
$(MAKE
) -C
$(patsubst %-compile
,%,$@
) compile
36 @touch
$(STAMP_DIR
)/.toolchain_
$@
39 @
[ -f
$(STAMP_DIR
)/.toolchain_
$@
] ||
$(MAKE
) -C
$(patsubst %-install,%,$@
) install
40 @touch
$(STAMP_DIR
)/.toolchain_
$@
43 @
$(MAKE
) -C
$(patsubst %-clean,%,$@
) clean
44 @
rm -f
$(STAMP_DIR
)/.toolchain_
$(patsubst %-clean,%,$@
)-*