| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= uClibc++
|
|---|
| 10 | PKG_VERSION:= 0.1.11
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 8a8e0ee8fefef150c08a649fd7da04aa
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= http://cxx.uclibc.org/src/
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tbz2
|
|---|
| 16 |
|
|---|
| 17 | WRKSRC= ${WRKDIR}/$(PKG_NAME)
|
|---|
| 18 |
|
|---|
| 19 | include $(TOPDIR)/mk/package.mk
|
|---|
| 20 |
|
|---|
| 21 | $(eval $(call PKG_template,UCLIBCXX,uclibc++,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 22 |
|
|---|
| 23 | UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
|
|---|
| 24 | -e 's/i.86/i386/' \
|
|---|
| 25 | -e 's/sparc.*/sparc/' \
|
|---|
| 26 | -e 's/arm.*/arm/g' \
|
|---|
| 27 | -e 's/m68k.*/m68k/' \
|
|---|
| 28 | -e 's/ppc/powerpc/g' \
|
|---|
| 29 | -e 's/v850.*/v850/g' \
|
|---|
| 30 | -e 's/sh64/sh/' \
|
|---|
| 31 | -e 's/sh[234].*/sh/' \
|
|---|
| 32 | -e 's/mips.*/mips/' \
|
|---|
| 33 | -e 's/mipsel.*/mips/' \
|
|---|
| 34 | -e 's/cris.*/cris/' \
|
|---|
| 35 | )
|
|---|
| 36 |
|
|---|
| 37 | $(WRKBUILD)/.configured:
|
|---|
| 38 | $(CP) ./files/config.$(UCLIBC_TARGET_ARCH) $(WRKBUILD)/.config
|
|---|
| 39 | touch $@
|
|---|
| 40 |
|
|---|
| 41 | $(WRKBUILD)/.built:
|
|---|
| 42 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 43 | TOPDIR="$(WRKBUILD)/" \
|
|---|
| 44 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 45 | ARCH_CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 46 | CROSS="$(TARGET_CROSS)" \
|
|---|
| 47 | all
|
|---|
| 48 | touch $@
|
|---|
| 49 |
|
|---|
| 50 | $(IPKG_UCLIBCXX):
|
|---|
| 51 | install -d -m0755 $(IDIR_UCLIBCXX)/usr/lib
|
|---|
| 52 | $(CP) $(WRKBUILD)/src/libuClibc++*.so* $(IDIR_UCLIBCXX)/usr/lib/
|
|---|
| 53 | $(RSTRIP) $(IDIR_UCLIBCXX)
|
|---|
| 54 | $(IPKG_BUILD) $(IDIR_UCLIBCXX) $(PACKAGE_DIR)
|
|---|
| 55 |
|
|---|
| 56 | compile-targets: install-dev
|
|---|
| 57 | install-dev: $(WRKBUILD)/.built
|
|---|
| 58 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 59 | TOPDIR="$(WRKBUILD)/" \
|
|---|
| 60 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 61 | ARCH_CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 62 | CROSS="$(TARGET_CROSS)" \
|
|---|
| 63 | DESTDIR="$(STAGING_DIR)" \
|
|---|
| 64 | install
|
|---|