DESCRIPTION:= is obselete
[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 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ustl
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=C++ STL for embedded systems
29 URL:=http://ustl.sourceforge.net/
30 endef
31
32 define Package/ustl/description
33 C++ Standard Template Library (STL) for embedded systems.\\\
34 uSTL is a partial implementation of the STL (Standard Template \\\
35 Library) that reduces code size by factoring memory management \\\
36 code into a non-template base class and deriving containers \\\
37 from it.
38 endef
39
40 define Build/Configure
41 $(CP) ./files/config.h $(PKG_BUILD_DIR)/
42 $(CP) ./files/Common.mk $(PKG_BUILD_DIR)/
43 endef
44
45 define Build/Compile
46 rm -rf $(PKG_INSTALL_DIR)
47 mkdir -p $(PKG_INSTALL_DIR)
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 CROSS="$(TARGET_CROSS)" \
50 OPTFLAGS="$(TARGET_CFLAGS)" \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Package/ustl/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(1)/usr/lib/
58 endef
59
60 define Build/InstallDev
61 mkdir -p $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(1)/usr/include/
63 mkdir -p $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.{a,so*} $(1)/usr/lib/
65 endef
66
67 define Build/UninstallDev
68 rm -rf \
69 $(STAGING_DIR)/usr/include/ustl* \
70 $(STAGING_DIR)/usr/lib/libustl.{a,so*}
71 endef
72
73 $(eval $(call BuildPackage,ustl))