256857c1a11907e9a2723481300b3b48022ae576
[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 PKG_BUILD_DEPENDS:=boost-jam/host
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/boost
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Boost provides free peer-reviewed portable C++ source libraries
30 URL:=http://www.boost.org/
31 endef
32
33 define Build/Configure
34 endef
35
36 # bjam does not support anything like DESTDIR
37 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
38
39 LIBRARIES:= \
40 serialization \
41
42 define Build/Compile
43 (cd $(PKG_BUILD_DIR) ; \
44 echo "using gcc : : $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
45 $(STAGING_DIR_HOST)/usr/bin/bjam \
46 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
47 --toolset=gcc \
48 $(foreach c, $(LIBRARIES), \
49 --with-$(c) \
50 ) \
51 $(CONFIGURE_ARGS) \
52 install \
53 )
54 endef
55
56 define Package/boost/description
57 Boost provides free peer-reviewed portable C++ source libraries
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include/boost $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/include/boost-*/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above
63 $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/
64 endef
65
66 define Package/boost/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/
69 endef
70
71 # TODO: Split libboost into several smaller packages
72
73 #define Package/boost-serialization/install
74 # $(INSTALL_DIR) $(1)/usr/lib
75 # $(CP) $(PKG_INSTALL_DIR)/lib/*serialization*.so* $(1)/usr/lib/
76 #endef
77
78 $(eval $(call BuildPackage,boost))