From 15096df2835b013c4d45d47da4443fa16721e4a9 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 15 Aug 2005 10:43:09 +0000 Subject: [PATCH] add fixes from whiterussian git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1683 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/package/base-files/Makefile | 7 +++++-- openwrt/target/linux/linux-2.4/Makefile | 22 ++++++++++++---------- openwrt/target/linux/rules.mk | 9 +++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index f0394f84b..af60bafac 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -50,9 +50,9 @@ $(IPKG_BASE): $(IPKG_LIBC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_LIBC)/lib - cp -fpR $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ + cp $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ for file in c crypt dl m nsl resolv rt uClibc util; do \ - cp -fpR $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ + cp $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ done -$(STRIP) $(IDIR_LIBC)/lib/* $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) @@ -64,6 +64,9 @@ $(IPKG_GCC): -$(STRIP) $(IDIR_GCC)/lib/* $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) +package-clean: + rm -f $(PACKAGES) +clean: package-clean prepare: compile: $(PACKAGES) install: compile 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) diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index 39afadb34..606efb6d9 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -1,3 +1,10 @@ +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/' \ +) + + define KMOD_template ifeq ($$(strip $(4)),) KDEPEND_$(1):=m @@ -39,3 +46,5 @@ endif $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) endef + + -- 2.20.1