X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/062762e5d1f678d368554e092b3c816f26fc8db0..6596e28b2d106fd5ee597bc46dd5017e2c44cd0a:/openwrt/target/linux/linux-2.4/Makefile diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile index 263339f35..0c9021b1a 100644 --- a/openwrt/target/linux/linux-2.4/Makefile +++ b/openwrt/target/linux/linux-2.4/Makefile @@ -169,7 +169,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINUX_BINARY_WL_DR touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - $(PATCH) $(LINUX_DIR) ./patches + [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) + $(PATCH) $(LINUX_DIR) ./patches/generic touch $(LINUX_DIR)/.patched $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched @@ -186,7 +187,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured touch $(LINUX_DIR)/.depend_done $(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) CFLAGS_KERNEL="-fno-delayed-branch " $(LINUX_FORMAT) + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_FORMAT) $(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC) cp -fa $< $@ @@ -197,7 +198,7 @@ $(LINUX_IMAGE): $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE) rm -rf $(LINUX_BUILD_DIR)/modules - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) CFLAGS_KERNEL="-fno-delayed-branch " modules + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done @@ -212,6 +213,7 @@ $(TARGET_MODULES_DIR): 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 \ TARGET_DIR="$(LINUX_TARGET_DIR)" \ BUILD_DIR="$(LINUX_BUILD_DIR)" \ @@ -224,6 +226,18 @@ install: compile $(TARGET_MODULES_DIR) echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true +mostlyclean: + rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.{drivers-unpacked,modules_done} + $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean + rm -f $(LINUX_KERNEL) $(LINUX_IMAGE) + +rebuild: + -$(MAKE) mostlyclean + if [ -f $(LINUX_KERNEL) ]; then \ + $(MAKE) clean; \ + fi + $(MAKE) compile + clean: rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS)