X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/7a1a2ed509f01fd1310d233be8ed4c4c93d49d83..05d9e9fa59e39af282154d36b51d9e524b964e20:/tools/Makefile diff --git a/tools/Makefile b/tools/Makefile index 31b0becc3..68e7dab53 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -7,7 +7,7 @@ # Main makefile for the host tools # include $(TOPDIR)/rules.mk -TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils +TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline TARGETS-$(CONFIG_CCACHE) += ccache TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) @@ -32,18 +32,19 @@ 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 $@ -%-prereq %-download %-clean: FORCE +%-prereq %-download %-clean %-refresh %-update: FORCE $(MAKE) -C $* $(patsubst $*-%,%,$@) -%-prepare: $(STAGING_DIR)/include-host $(TOOL_BUILD_DIR) FORCE +%-prepare: $(TOOL_HOST_INCLUDES) $(TOOL_BUILD_DIR) FORCE $(MAKE) -C $* $(patsubst $*-%,%,$@) %-compile: %-prepare FORCE