#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
$(CP) $(PACKAGE_DIR) $(PKG_BUILD_DIR)/packages
$(CP) $(TOOLCHAIN_DIR)/bin $(PKG_BUILD_DIR)/staging_dir/host/
$(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/
- $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
+ mkdir -p $(PKG_BUILD_DIR)/target/linux
+ $(CP) $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux/
rm -rf \
+ $(PKG_BUILD_DIR)/target/linux/*/files \
$(PKG_BUILD_DIR)/target/linux/*/patches \
$(PKG_BUILD_DIR)/target/linux/*/*/patches
-cp $(KERNEL_BUILD_DIR)/* $(IB_KDIR)/ # don't copy subdirectories here
find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
- find $(PKG_BUILD_DIR) -name CVS | $(XARGS) rm -rf
find $(PKG_BUILD_DIR) -name .git | $(XARGS) rm -rf
+ echo -e 'KERNEL:=$(KERNEL)\nLINUX_VERSION:=$(LINUX_VERSION)\nREVISION:=$(REVISION)' \
+ >$(PKG_BUILD_DIR)/include/version.mk
$(TAR) c -C $(BUILD_DIR) $(IB_NAME) | bzip2 -c > $@
download:
# Makefile for OpenWrt
#
-# Copyright (C) 2007-2008 OpenWrt.org
+# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include rules.mk
include $(INCLUDE_DIR)/debug.mk
include $(INCLUDE_DIR)/depends.mk
+include $(INCLUDE_DIR)/version.mk
define Helptext
Available Commands:
@echo 'src packages file:$(PACKAGE_DIR)' >> $@
BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(PACKAGES) $($(PROFILE)_PACKAGES) kernel)
-ifeq ($(KERNEL),2.4)
-BUILD_PACKAGES:=$(patsubst base-files,base-files-$(BOARD)-$(KERNEL),$(BUILD_PACKAGES))
-else
BUILD_PACKAGES:=$(patsubst base-files,base-files-$(BOARD),$(BUILD_PACKAGES))
-endif
# "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))