2005-07-21 11:45:36 +00:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-07-21 14:02:53 +00:00
|
|
|
PKG_NAME := base-files-arch
|
2005-10-22 19:51:51 +00:00
|
|
|
PKG_RELEASE := 2
|
2005-07-25 10:16:56 +00:00
|
|
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
2005-07-21 11:45:36 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/package/rules.mk
|
|
|
|
|
2005-07-24 19:58:14 +00:00
|
|
|
IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg
|
2005-09-10 17:57:49 +00:00
|
|
|
IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)-$(KERNEL)_$(PKG_RELEASE)_$(ARCH).ipk
|
2005-07-21 11:45:36 +00:00
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.prepared:
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
touch $@
|
2005-07-21 14:02:53 +00:00
|
|
|
|
2006-02-12 06:00:38 +00:00
|
|
|
ifeq ($(BOARD),ar7)
|
|
|
|
$(PKG_BUILD_DIR)/adam2patcher: src/adam2patcher.c
|
|
|
|
$(TARGET_CC) -o $@ $<
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/adam2patcher
|
|
|
|
|
|
|
|
$(IDIR_OPENWRT)/sbin/adam2patcher: $(PKG_BUILD_DIR)/adam2patcher
|
|
|
|
mkdir -p $(IDIR_OPENWRT)/sbin
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/adam2patcher $(IDIR_OPENWRT)/sbin
|
|
|
|
|
|
|
|
$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/adam2patcher
|
|
|
|
endif
|
|
|
|
|
2005-07-21 14:02:53 +00:00
|
|
|
ifeq ($(BOARD),brcm)
|
2006-02-12 06:00:38 +00:00
|
|
|
$(PKG_BUILD_DIR)/jffs2root: src/jffs2root.c
|
2005-07-21 11:45:36 +00:00
|
|
|
$(TARGET_CC) -o $@ $<
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root
|
|
|
|
|
2005-07-28 21:35:41 +00:00
|
|
|
$(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root
|
2005-07-21 11:45:36 +00:00
|
|
|
mkdir -p $(IDIR_OPENWRT)/sbin
|
2006-02-01 23:53:19 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin
|
2005-07-21 14:02:53 +00:00
|
|
|
|
|
|
|
$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built:
|
|
|
|
touch $@
|
2005-07-24 19:58:14 +00:00
|
|
|
|
|
|
|
$(IDIR_OPENWRT):
|
|
|
|
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH)
|
2005-09-10 17:57:49 +00:00
|
|
|
$(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control
|
2005-07-21 14:02:53 +00:00
|
|
|
|
2005-07-25 10:16:56 +00:00
|
|
|
$(IPKG_OPENWRT): $(IDIR_OPENWRT)
|
2006-02-01 23:53:19 +00:00
|
|
|
[ -d files/$(BOARD)-$(KERNEL) ] && $(CP) -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/
|
2005-08-26 15:52:12 +00:00
|
|
|
find $(IDIR_OPENWRT) -name CVS | xargs rm -rf
|
|
|
|
find $(IDIR_OPENWRT) -name .svn | xargs rm -rf
|
2005-07-21 11:45:36 +00:00
|
|
|
$(RSTRIP) $(IDIR_OPENWRT)
|
|
|
|
$(IPKG_BUILD) $(IDIR_OPENWRT) $(PACKAGE_DIR)
|
|
|
|
|
2005-10-22 15:10:20 +00:00
|
|
|
install-targets: compile openwrt-install
|
2005-10-22 01:40:50 +00:00
|
|
|
|
|
|
|
openwrt-install:
|
2005-07-25 10:16:56 +00:00
|
|
|
$(IPKG) install $(IPKG_OPENWRT)
|
2005-10-22 01:40:50 +00:00
|
|
|
|
2005-10-22 12:54:17 +00:00
|
|
|
compile-targets: install-dev $(IPKG_OPENWRT)
|
2005-07-21 11:45:36 +00:00
|
|
|
install-dev:
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
2006-02-01 23:53:19 +00:00
|
|
|
$(CP) ./include/[a-z]* $(STAGING_DIR)/usr/include/
|