X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=tools%2FMakefile;h=265c6aebf5c997b154eaf86e25656e21ad07223f;hb=0b4143b387d7f6226b6eb54fd5865881609f8c6b;hp=9c315549e5d2f9c42443e6795470db5b37703a27;hpb=23a2f742c069076850dca0cc1b966a073a9f4b83;p=openwrt-10.03%2F.git diff --git a/tools/Makefile b/tools/Makefile index 9c315549e..265c6aebf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -32,17 +32,26 @@ endif $(STAMP): $(TOPDIR)/.config mkdir -p $(shell dirname $@) touch $@ - -$(STAGING_DIR)/include-host: - @mkdir -p $@ - @$(CP) ./include/*.h $@/ + +TOOL_HOST_INCLUDES:=$(patsubst ./include/%.h,$(STAGING_DIR)/include-host/%.h,$(wildcard ./include/*.h)) +$(TOOL_HOST_INCLUDES): $(STAGING_DIR)/include-host/%.h: ./include/%.h + @mkdir -p $(STAGING_DIR)/include-host + $(CP) $< $@ $(TOOL_BUILD_DIR): @mkdir -p $@ -$(TARGETS_COMPILE) $(TARGETS_INSTALL): $(STAGING_DIR)/include-host $(TOOL_BUILD_DIR) +%-prereq %-download %-clean %-refresh: FORCE + $(MAKE) -C $* $(patsubst $*-%,%,$@) -$(eval $(call default_subtargets,)) +%-prepare: $(TOOL_HOST_INCLUDES) $(TOOL_BUILD_DIR) FORCE + $(MAKE) -C $* $(patsubst $*-%,%,$@) + +%-compile: %-prepare FORCE + $(MAKE) -C $* $(patsubst $*-%,%,$@) + +%-install: %-compile FORCE + $(MAKE) -C $* $(patsubst $*-%,%,$@) ifeq ($(MAKECMDGOALS),install-targets) MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)