packages: libxslt: moved to github
[packages.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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ustl
11 PKG_VERSION:=0.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-0.8-0.tar.bz2
15 PKG_SOURCE_URL:=@SF/ustl
16 PKG_MD5SUM:=dd59483c327f1bd1356273bc5ae4dde0
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ustl
21   SECTION:=libs
22   CATEGORY:=Libraries
23   TITLE:=C++ STL for embedded systems
24   DEPENDS:=@!TARGET_avr32
25   URL:=http://ustl.sourceforge.net/
26 endef
27
28 define Package/ustl/description
29         C++ Standard Template Library (STL) for embedded systems.\\\
30     uSTL is a partial implementation of the STL (Standard Template \\\
31     Library) that reduces code size by factoring memory management \\\
32     code into a non-template base class and deriving containers \\\
33     from it.
34 endef
35
36 define Build/Configure
37         $(CP) ./files/config.h $(PKG_BUILD_DIR)/
38         $(CP) ./files/Common.mk $(PKG_BUILD_DIR)/
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 CROSS="$(TARGET_CROSS)" \
46                 OPTFLAGS="$(TARGET_CFLAGS)" \
47                 DESTDIR="$(PKG_INSTALL_DIR)" \
48                 all install
49 endef
50
51 define Package/ustl/install
52         $(INSTALL_DIR) $(1)/usr/lib
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(1)/usr/lib/
54 endef
55
56 define Build/InstallDev
57         $(INSTALL_DIR) $(1)/usr/include
58         $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(1)/usr/include/
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.{a,so*} $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,ustl))