Oops, commited just one part :/
[openwrt.git] / tools / Makefile
index 741fd48..f8f0878 100644 (file)
@@ -7,15 +7,18 @@
 # Main makefile for the host tools
 #
 include $(TOPDIR)/rules.mk
-TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage
+TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils
 
 TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
+TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y))
 TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
 
 all: install
 download: $(TARGETS_DOWNLOAD)
-install: $(TARGETS_INSTALL)
+install: 
+       $(MAKE) install-targets
+install-targets: $(TARGETS_INSTALL)
 clean: $(TARGETS_CLEAN)
 
 squashfs-compile: lzma-install
@@ -25,13 +28,9 @@ TOOL_STAMP_DIR:=$(STAGING_DIR)/stampfiles
 $(TOOL_STAMP_DIR):
        mkdir -p $@
 
-$(STAGING_DIR):
-       @mkdir -p $@/lib
-       @mkdir -p $@/include
-       @mkdir -p $@/include-host
-       $(CP) ./include/*.h $@/include-host/
-       @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
-       @mkdir -p $@/$(REAL_GNU_TARGET_NAME)
+$(STAGING_DIR)/include-host:
+       @mkdir -p $@
+       @$(CP) ./include/*.h $@/
 
 $(TOOL_BUILD_DIR):
        @mkdir -p $@
@@ -39,7 +38,7 @@ $(TOOL_BUILD_DIR):
 %-download: FORCE
        $(MAKE) -C $(patsubst %-download,%,$@) download
 
-%-prepare: $(TOOL_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
+%-prepare: $(TOOL_STAMP_DIR) $(STAGING_DIR)/include-host $(TOOL_BUILD_DIR) FORCE
        @[ -f $(TOOL_STAMP_DIR)/.tool_$@ ] || { \
                $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
        }
@@ -61,3 +60,8 @@ $(TOOL_BUILD_DIR):
        @$(MAKE) -C $(patsubst %-clean,%,$@) clean
        @rm -f $(TOOL_STAMP_DIR)/.tool_$(patsubst %-clean,%,$@)-*
 
+ifeq ($(MAKECMDGOALS),install-targets)
+MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
+else
+.NOTPARALLEL:
+endif
This page took 0.022984 seconds and 4 git commands to generate.