From 991cba3cc9b6ebc5c06e39b4b12766452b3e0946 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 20 Jun 2006 23:56:49 +0000 Subject: [PATCH] add target/download SVN-Revision: 4030 --- openwrt/target/Makefile | 7 ++++++- openwrt/target/linux/Makefile | 4 ++++ openwrt/target/linux/ar7-2.4/Makefile | 1 + openwrt/target/linux/image/image.mk | 1 + openwrt/target/linux/image/jffs2.mk | 4 ++++ openwrt/target/linux/image/squashfs.mk | 3 +++ openwrt/target/lzma/Makefile | 2 +- openwrt/target/utils/Makefile | 1 + 8 files changed, 21 insertions(+), 2 deletions(-) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 709a2080a5..d64053cbd4 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -5,19 +5,24 @@ all: install $(BIN_DIR): mkdir -p $(BIN_DIR) +TARGETS:=linux utils lzma + linux-compile: utils-install lzma-install linux-install: $(BIN_DIR) +download: $(patsubst %,%-source,$(TARGETS)) prepare: linux-prepare compile: linux-compile install: image_clean linux-install -clean: linux-clean utils-clean lzma-clean image_clean +clean: $(patsubst %,%-clean,$(TARGETS)) image_clean image_clean: FORCE rm -f $(BIN_DIR)/openwrt-* %-clean: FORCE $(MAKE) -C $(patsubst %-clean,%,$@) clean +%-source: FORCE + $(MAKE) -C $(patsubst %-source,%,$@) source %-prepare: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index c08bb4c89c..2caee31b36 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -25,6 +25,10 @@ $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) export BOARD export KERNEL +source: + $(MAKE) -C $(BOARD)-$(KERNEL) source + $(MAKE) -C image/$(BOARD) source + prepare: $(MAKE) -C $(BOARD)-$(KERNEL) prepare diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 7775e88884..20ad3523ac 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -49,6 +49,7 @@ ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6 $(DL_DIR)/$(ATM_FIRMWARE_FILE): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(ATM_FIRMWARE_FILE) $(ATM_FIRMWARE_MD5SUM) $(DOWNLOAD_SITE) +source: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked $(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.drivers-unpacked diff --git a/openwrt/target/linux/image/image.mk b/openwrt/target/linux/image/image.mk index 1c9341dd76..92143d64e8 100644 --- a/openwrt/target/linux/image/image.mk +++ b/openwrt/target/linux/image/image.mk @@ -48,6 +48,7 @@ compile-targets: install-targets: clean-targets: +source: prepare: compile: compile-targets install: compile install-targets diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index dd5edd01c0..a0e14daa90 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -14,6 +14,9 @@ define Image/mkfs/jffs2 $(call Image/Build,jffs2-128k) endef +jffs2-source: FORCE + $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source + $(STAGING_DIR)/bin/mkfs.jffs2: $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile @@ -21,6 +24,7 @@ jffs2-clean: FORCE $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean rm -f $(KDIR)/root.jffs2* +source: jffs2-source compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2 clean-targets: jffs2-clean diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index 6890daec68..e01766c0ca 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -4,6 +4,9 @@ else ENDIAN := be endif +squashfs-source: FORCE + $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source + $(STAGING_DIR)/bin/mksquashfs-lzma: $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile diff --git a/openwrt/target/lzma/Makefile b/openwrt/target/lzma/Makefile index b358a9efce..214967a15d 100644 --- a/openwrt/target/lzma/Makefile +++ b/openwrt/target/lzma/Makefile @@ -34,7 +34,6 @@ $(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked lzma: $(TARGETS) $(CP) $^ $(LZMA_DIR) -lzma-source: $(DL_DIR)/$(LZMA_SOURCE) lzma-clean: FORCE -$(MAKE) -C $(LZMA_LIB_DIR) clean @@ -46,6 +45,7 @@ lzma-dirclean: FORCE ############################################################# +source: $(DL_DIR)/$(LZMA_SOURCE) prepare: $(LZMA_DIR)/.unpacked compile: lzma install: lzma FORCE diff --git a/openwrt/target/utils/Makefile b/openwrt/target/utils/Makefile index fe354754ce..bcd1e653e4 100644 --- a/openwrt/target/utils/Makefile +++ b/openwrt/target/utils/Makefile @@ -4,6 +4,7 @@ TARGETS := addpattern trx motorola-bin dgfirmware UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils +source: prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) FORCE mkdir -p $(STAGING_DIR)/bin -- 2.25.1