2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # Main makefile for the host tools
9 include $(TOPDIR
)/rules.mk
10 TARGETS-y
:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage
12 TARGETS_DOWNLOAD
:=$(patsubst %,%-download
,$(TARGETS-y
))
13 TARGETS_PREPARE
:=$(patsubst %,%-prepare
,$(TARGETS-y
))
14 TARGETS_INSTALL
:=$(patsubst %,%-install,$(TARGETS-y
))
15 TARGETS_CLEAN
:=$(patsubst %,%-clean,$(TARGETS-y
))
18 download
: $(TARGETS_DOWNLOAD
)
19 install: $(TARGETS_INSTALL
)
20 clean: $(TARGETS_CLEAN
)
22 squashfs-compile
: lzma-install
24 TOOL_STAMP_DIR
:=$(STAGING_DIR
)/stampfiles
29 $(STAGING_DIR
)/include-host
:
31 @
$(CP
) .
/include/*.h
$@
/
37 $(MAKE
) -C
$(patsubst %-download
,%,$@
) download
39 %-prepare
: $(TOOL_STAMP_DIR
) $(STAGING_DIR
)/include-host
$(TOOL_BUILD_DIR
) FORCE
40 @
[ -f
$(TOOL_STAMP_DIR
)/.tool_
$@
] ||
{ \
41 $(MAKE
) -C
$(patsubst %-prepare
,%,$@
) prepare
; \
43 @touch
$(TOOL_STAMP_DIR
)/.tool_
$@
46 @
[ -f
$(TOOL_STAMP_DIR
)/.tool_
$@
] ||
{ \
47 $(MAKE
) -C
$(patsubst %-compile
,%,$@
) compile
; \
49 @touch
$(TOOL_STAMP_DIR
)/.tool_
$@
52 @
[ -f
$(TOOL_STAMP_DIR
)/.tool_
$@
] ||
{ \
53 $(MAKE
) -C
$(patsubst %-install,%,$@
) install; \
55 @touch
$(TOOL_STAMP_DIR
)/.tool_
$@
58 @
$(MAKE
) -C
$(patsubst %-clean,%,$@
) clean
59 @
rm -f
$(TOOL_STAMP_DIR
)/.tool_
$(patsubst %-clean,%,$@
)-*