[packages] massive: use $(INSTALL_DIR) instead of 'mkdir -p' in install and InstallDev
[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_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 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 $(INSTALL_DIR) $(1)/usr/include
60 $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(1)/usr/include/
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.{a,so*} $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,ustl))