fix base-files build
[openwrt.git] / openwrt / package / base-files / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=base-files
6 PKG_RELEASE:=1
7
8 IDIR_BASE:=$(BUILD_DIR)/base-files
9 IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk
10
11 LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version}
12 IDIR_LIBC:=$(BUILD_DIR)/uclibc
13 IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
14
15 GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
16 IDIR_GCC:=$(BUILD_DIR)/libgcc
17 IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
18
19 PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC)
20
21 $(PACKAGES): $(PACKAGE_DIR)
22 $(PACKAGE_DIR):
23 mkdir -p $@
24
25 $(IPKG_BASE):
26 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH)
27 cp -a ./default/* $(IDIR_BASE)
28 mkdir -p $(IDIR_BASE)/jffs
29 mkdir -p $(IDIR_BASE)/dev
30 mkdir -p $(IDIR_BASE)/proc
31 mkdir -p $(IDIR_BASE)/tmp
32 mkdir -p $(IDIR_BASE)/lib
33 mkdir -p $(IDIR_BASE)/usr/lib
34 mkdir -p $(IDIR_BASE)/usr/bin
35 ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf
36 rm -rf $(IDIR_BASE)/var
37 ln -sf /tmp $(IDIR_BASE)/var
38 -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf
39 -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf
40 mkdir -p $(IDIR_BASE)/etc
41 -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf
42 $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR)
43
44 $(IPKG_LIBC):
45 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH)
46 mkdir -p $(IDIR_LIBC)/lib
47 cp -a $(STAGING_DIR)/lib/ld-uClibc*.so* $(IDIR_LIBC)/lib/
48 for file in c crypt dl m nsl resolv rt uClibc util; do \
49 cp -a $(STAGING_DIR)/lib/lib$$file*.so* $(IDIR_LIBC)/lib/; \
50 done
51 -$(STRIP) $(IDIR_LIBC)/lib/*
52 $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR)
53
54 $(IPKG_GCC):
55 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH)
56 mkdir -p $(IDIR_GCC)/lib
57 cp -a $(STAGING_DIR)/lib/libgcc*.so* $(IDIR_GCC)/lib/
58 -$(STRIP) $(IDIR_GCC)/lib/*
59 $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR)
60
61 prepare:
62 compile: $(PACKAGES)
63 install: compile
64 mkdir -p $(TARGET_DIR)
65 $(IPKG) install $(PACKAGES)
66 clean:
67 rm -rf $(IDIR_BASE) $(IDIR_LIBC) $(IDIR_GCC)
This page took 0.053004 seconds and 5 git commands to generate.