summaryrefslogtreecommitdiffstats
path: root/openwrt/target/linux/linux-2.4/Makefile
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-15 10:43:09 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-15 10:43:09 +0000
commit15096df2835b013c4d45d47da4443fa16721e4a9 (patch)
tree64b0e1c80fca3ab7a88ee4a86470d9e79fd61cd1 /openwrt/target/linux/linux-2.4/Makefile
parentbc4db61582edb9dd84c98c0908fdb89d38fe2595 (diff)
add fixes from whiterussian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1683 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/target/linux/linux-2.4/Makefile')
-rw-r--r--openwrt/target/linux/linux-2.4/Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile
index 0fcf441a8..36e18e705 100644
--- a/openwrt/target/linux/linux-2.4/Makefile
+++ b/openwrt/target/linux/linux-2.4/Makefile
@@ -19,11 +19,6 @@ LINUX_KCONFIG:=./config/$(BOARD)
LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD)
LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
-LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
- -e 's/mipsel/mips/' \
- -e 's/powerpc/ppc/' \
- -e 's/sh[234]/sh/' \
- )
LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/
LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
@@ -226,6 +221,15 @@ $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
+$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
+ @mkdir -p $(STAMP_DIR)
+ @$(MAKE) $(TARGETS)
+ ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
+ $(MAKE) -C $(TOPDIR)/target/linux/package \
+ $(KPKG_MAKEOPTS) \
+ compile
+ touch $@
+
$(TARGET_MODULES_DIR):
-mkdir -p $(TARGET_MODULES_DIR)
@@ -241,11 +245,7 @@ $(KERNEL_IPKG):
source: $(DL_DIR)/$(LINUX_SOURCE)
prepare: $(LINUX_DIR)/.configured
-compile: $(LINUX_DIR)/.modules_done $(TARGETS)
- ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
- $(MAKE) -C $(TOPDIR)/target/linux/package \
- $(KPKG_MAKEOPTS) \
- compile
+compile: $(STAMP_DIR)/.linux-compile
install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
rm -rf $(LINUX_BUILD_DIR)/root*
@@ -261,6 +261,7 @@ install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
[ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true
mostlyclean:
+ rm -f $(STAMP_DIR)/.linux-compile
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
$(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean
@@ -274,5 +275,6 @@ rebuild:
$(MAKE) compile
clean:
+ rm -f $(STAMP_DIR)/.linux-compile
rm -rf $(LINUX_BUILD_DIR)
rm -f $(TARGETS)