2006-07-01 09:35:15 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-10-30 13:51:50 +00:00
|
|
|
# $Id$
|
2006-07-01 09:35:15 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=uclibc++
|
2007-08-30 12:47:24 +00:00
|
|
|
PKG_VERSION:=0.2.2
|
2006-07-01 09:35:15 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2006-10-14 16:10:11 +00:00
|
|
|
PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.bz2
|
2006-07-23 13:11:19 +00:00
|
|
|
PKG_SOURCE_URL:=http://cxx.uclibc.org/src/
|
2007-08-30 12:47:24 +00:00
|
|
|
PKG_MD5SUM:=1ceef3209cca88be8f1bd9de99735954
|
2006-07-01 09:35:15 +00:00
|
|
|
PKG_CAT:=bzcat
|
|
|
|
|
2007-01-08 11:19:08 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/uClibc++-$(PKG_VERSION)
|
|
|
|
|
2006-07-01 09:35:15 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/uclibcxx
|
2006-07-23 13:11:19 +00:00
|
|
|
NAME:=uclibc++
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=C++ library for embedded systems
|
|
|
|
URL:=http://cxx.uclibc.org/src/
|
2006-07-01 09:35:15 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
|
2007-01-08 11:19:08 +00:00
|
|
|
-e 's/i.86/i386/' \
|
|
|
|
-e 's/sparc.*/sparc/' \
|
|
|
|
-e 's/m68k.*/m68k/' \
|
|
|
|
-e 's/ppc/powerpc/g' \
|
|
|
|
-e 's/v850.*/v850/g' \
|
|
|
|
-e 's/sh64/sh/' \
|
|
|
|
-e 's/sh[234].*/sh/' \
|
|
|
|
-e 's/mips.*/mips/' \
|
|
|
|
-e 's/mipsel.*/mips/' \
|
|
|
|
-e 's/cris.*/cris/' \
|
2006-07-01 09:35:15 +00:00
|
|
|
)
|
|
|
|
|
2007-09-03 15:58:55 +00:00
|
|
|
MAKE_FLAGS:= \
|
|
|
|
TOPDIR="$(PKG_BUILD_DIR)/" \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
ARCH_CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CROSS="$(TARGET_CROSS)" \
|
|
|
|
CP="$(CP)" \
|
|
|
|
|
2006-07-01 09:35:15 +00:00
|
|
|
define Build/Configure
|
2007-01-22 00:03:38 +00:00
|
|
|
if [ -f ./files/config.$(UCLIBC_TARGET_ARCH) ]; then \
|
|
|
|
cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config; \
|
|
|
|
else \
|
|
|
|
cp ./files/config.default $(PKG_BUILD_DIR)/.config; \
|
|
|
|
fi
|
2006-07-01 09:35:15 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2007-09-03 15:58:55 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
$(MAKE_FLAGS) \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)/usr" \
|
|
|
|
all install
|
|
|
|
|
2006-07-01 09:35:15 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2007-09-03 15:58:55 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/g++-uc $(STAGING_DIR)/usr/bin/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include/uClibc++
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/uClibc++/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuClibc++*.{a,so*} $(STAGING_DIR)/usr/lib/
|
|
|
|
$(SED) 's,-I/include/,-I$(STAGING_DIR)/usr/include/uClibc++/,g' $(STAGING_DIR)/usr/bin/g++-uc
|
|
|
|
$(SED) 's,-L/lib/,-L$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/bin/g++-uc
|
|
|
|
$(if $(STAGING_DIR_HOST), \
|
|
|
|
ln -sf $(shell $(SCRIPT_DIR)/abs2rel.pl $(STAGING_DIR)/usr/bin/g++-uc $(STAGING_DIR_HOST)/bin/) $(STAGING_DIR_HOST)/bin/ \
|
|
|
|
)
|
2006-07-01 09:35:15 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2007-09-03 15:58:55 +00:00
|
|
|
rm -rf $(STAGING_DIR)/usr/bin/g++-uc \
|
|
|
|
$(STAGING_DIR)/usr/include/uClibc++ \
|
|
|
|
$(STAGING_DIR)/usr/lib/libuClibc++*.{a,so*}
|
|
|
|
$(if $(STAGING_DIR_HOST), \
|
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/g++-uc \
|
|
|
|
)
|
2006-07-01 09:35:15 +00:00
|
|
|
endef
|
|
|
|
|
2007-01-08 11:19:08 +00:00
|
|
|
define Package/uclibcxx/install
|
2007-09-03 15:58:55 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuClibc++.so.* $(1)/usr/lib/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuClibc++-*.so $(1)/usr/lib/
|
2007-01-08 11:19:08 +00:00
|
|
|
endef
|
|
|
|
|
2006-07-01 09:35:15 +00:00
|
|
|
$(eval $(call BuildPackage,uclibcxx))
|