added libboost (serialization only for now)
[openwrt/svn-archive/archive.git] / libs / boost / 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: Makefile 12228 2009-03-12 22:43:15Z mirko $
8
9 # Dude, this "boost" is really one of the most crude stuff I ported yet.
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=boost
14 PKG_VERSION:=1_38_0
15 PKG_RELEASE:=1
16
17 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=@SF/boost \
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/boost
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Boost provides free peer-reviewed portable C++ source libraries
28 URL:=http://www.boost.org/
29 DEPENDS:=+boost-jam
30 endef
31
32 define Build/Configure
33 endef
34
35 # bjam does not support anything like DESTDIR
36 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
37
38 LIBRARIES:= \
39 serialization \
40
41 define Build/Compile
42 (cd $(PKG_BUILD_DIR) ; \
43 echo "using gcc : : $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
44 $(STAGING_DIR_HOST)/usr/bin/bjam \
45 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
46 --toolset=gcc \
47 $(foreach c, $(LIBRARIES), \
48 --with-$(c) \
49 ) \
50 $(CONFIGURE_ARGS) \
51 install \
52 )
53 endef
54
55 define Package/boost/description
56 Boost provides free peer-reviewed portable C++ source libraries
57 endef
58
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/include/boost $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/include/boost-*/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above
62 $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/
63 endef
64
65 define Package/boost/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/
68 endef
69
70 # TODO: Split libboost into several smaller packages
71
72 #define Package/boost-serialization/install
73 # $(INSTALL_DIR) $(1)/usr/lib
74 # $(CP) $(PKG_INSTALL_DIR)/lib/*serialization*.so* $(1)/usr/lib/
75 #endef
76
77 $(eval $(call BuildPackage,boost))