remove hardcoded package names; use wildcard
[openwrt.git] / openwrt / target / linux / package / base-files / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := base-files-arch
6 PKG_RELEASE := 2
7 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
8
9 include $(TOPDIR)/package/rules.mk
10
11 IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg
12 IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)-$(KERNEL)_$(PKG_RELEASE)_$(ARCH).ipk
13
14 $(PKG_BUILD_DIR)/.prepared:
15 mkdir -p $(PKG_BUILD_DIR)
16 touch $@
17
18 ifeq ($(BOARD),brcm)
19 $(PKG_BUILD_DIR)/jffs2root: jffs2root.c
20 $(TARGET_CC) -o $@ $<
21
22 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root
23
24 $(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root
25 mkdir -p $(IDIR_OPENWRT)/sbin
26 cp $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin
27
28 $(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root
29 endif
30
31 $(PKG_BUILD_DIR)/.built:
32 touch $@
33
34 $(IDIR_OPENWRT):
35 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH)
36 $(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control
37
38 $(IPKG_OPENWRT): $(IDIR_OPENWRT)
39 [ -d files/$(BOARD)-$(KERNEL) ] && cp -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/
40 find $(IDIR_OPENWRT) -name CVS | xargs rm -rf
41 find $(IDIR_OPENWRT) -name .svn | xargs rm -rf
42 $(RSTRIP) $(IDIR_OPENWRT)
43 $(IPKG_BUILD) $(IDIR_OPENWRT) $(PACKAGE_DIR)
44
45 install-targets: compile openwrt-install
46
47 openwrt-install:
48 $(IPKG) install $(IPKG_OPENWRT)
49
50 compile-targets: install-dev $(IPKG_OPENWRT)
51 install-dev:
52 mkdir -p $(STAGING_DIR)/usr/include
53 cp -fpR ./include/[a-z]* $(STAGING_DIR)/usr/include/
This page took 0.048825 seconds and 5 git commands to generate.