switch to et source package, linksys 3.37.2 without robo_qos, but with patch from...
[openwrt.git] / package / uclibc++ / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=uClibc++
6 PKG_VERSION:=0.1.9
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=ebf58e04d72eab5c131c2c9118737024
9
10 PKG_SOURCE_URL:=http://cxx.uclibc.org/src/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
15
16 IPKG_LIBCXX:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
17 IDIR_LIBCXX:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
18 INFO_LIBCXX:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
19
20 UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
21 -e 's/i.86/i386/' \
22 -e 's/sparc.*/sparc/' \
23 -e 's/arm.*/arm/g' \
24 -e 's/m68k.*/m68k/' \
25 -e 's/ppc/powerpc/g' \
26 -e 's/v850.*/v850/g' \
27 -e 's/sh64/sh/' \
28 -e 's/sh[234].*/sh/' \
29 -e 's/mips.*/mips/' \
30 -e 's/mipsel.*/mips/' \
31 -e 's/cris.*/cris/' \
32 )
33
34
35 $(DL_DIR)/$(PKG_SOURCE):
36 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
37
38 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
39 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
40 $(PATCH) $(PKG_BUILD_DIR) ./patches
41 touch $(PKG_BUILD_DIR)/.prepared
42
43 $(PKG_BUILD_DIR)/.config: $(PKG_BUILD_DIR)/.prepared
44 cp ./uclibc++.config $(PKG_BUILD_DIR)/.config
45 $(SED) 's,^.*TARGET_ARCH.*,TARGET_ARCH="$(UCLIBC_TARGET_ARCH)",g' $(PKG_BUILD_DIR)/.config
46 $(SED) 's,^.*ARCH_CFLAGS.*,ARCH_CFLAGS="-mno-split-addresses $(TARGET_CFLAGS)",g' $(PKG_BUILD_DIR)/.config
47
48
49 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.config
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 $(TARGET_CONFIGURE_OPTS)
52 touch $(PKG_BUILD_DIR)/.built
53
54 $(STAGING_DIR)/lib/libuClibc++.so: $(PKG_BUILD_DIR)/.built
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 DESTDIR="$(STAGING_DIR)" \
57 install
58
59 $(IPKG_LIBCXX): $(STAGING_DIR)/lib/libuClibc++.so
60 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBCXX) ./$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
61 mkdir -p $(IDIR_LIBCXX)/usr/lib
62 cp -fpR $(STAGING_DIR)/lib/libuClibc++.so* $(IDIR_LIBCXX)/usr/lib/
63 $(STRIP) $(IDIR_LIBCXX)/usr/lib/*.so*
64 mkdir -p $(PACKAGE_DIR)
65 $(IPKG_BUILD) $(IDIR_LIBCXX) $(PACKAGE_DIR)
66
67 $(INFO_LIBCXX): $(IPKG_LIBCXX)
68 $(IPKG) install $(IPKG_LIBCXX)
69
70 source: $(DL_DIR)/$(PKG_SOURCE)
71 prepare: $(PKG_BUILD_DIR)/.prepared
72 compile: $(IPKG_LIBCXX)
73 install: $(INFO_LIBCXX)
74
75 clean:
76 rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBCXX)
77 rm -f $(STAGING_DIR)/lib/libuClibc++.so*
This page took 0.042617 seconds and 5 git commands to generate.