boost: Build non-versioned libraries
[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
8 # Dude, this "boost" is really one of the most crude stuff I ported yet.
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=boost
13 PKG_VERSION:=1_38_0
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/boost \
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
20
21 PKG_BUILD_DEPENDS:=boost-jam/host
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/boost
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Boost provides free peer-reviewed portable C++ source libraries
29 URL:=http://www.boost.org/
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 : : $(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
44 bjam \
45 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
46 --toolset=gcc --build-type=minimal --layout=system \
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/* $(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 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(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))