ustl does not work on avr32
[openwrt/svn-archive/archive.git] / libs / ustl / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ustl
12 PKG_VERSION:=0.8
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-0.8-0.tar.bz2
17 PKG_SOURCE_URL:=@SF/ustl
18 PKG_MD5SUM:=dd59483c327f1bd1356273bc5ae4dde0
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/ustl
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=C++ STL for embedded systems
26 DEPENDS:=@!TARGET_avr32
27 URL:=http://ustl.sourceforge.net/
28 endef
29
30 define Package/ustl/description
31 C++ Standard Template Library (STL) for embedded systems.\\\
32 uSTL is a partial implementation of the STL (Standard Template \\\
33 Library) that reduces code size by factoring memory management \\\
34 code into a non-template base class and deriving containers \\\
35 from it.
36 endef
37
38 define Build/Configure
39 $(CP) ./files/config.h $(PKG_BUILD_DIR)/
40 $(CP) ./files/Common.mk $(PKG_BUILD_DIR)/
41 endef
42
43 define Build/Compile
44 rm -rf $(PKG_INSTALL_DIR)
45 mkdir -p $(PKG_INSTALL_DIR)
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CROSS="$(TARGET_CROSS)" \
48 OPTFLAGS="$(TARGET_CFLAGS)" \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Package/ustl/install
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(1)/usr/lib/
56 endef
57
58 define Build/InstallDev
59 mkdir -p $(1)/usr/include
60 $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(1)/usr/include/
61 mkdir -p $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.{a,so*} $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,ustl))