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