f2c777708ee665d3f6e679011cd812b782a9ce2d
[openwrt/svn-archive/archive.git] / libs / boost / Makefile
1 #
2 # Copyright (C) 2009-2010 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 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
19 PKG_MD5SUM:=a4fc691c4e7c49b3b9b54a667d8f5529
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 Package/boost-serialization
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=Boost-serialization library
36 DEPENDS:=+boost
37 endef
38
39 define Package/boost-regex
40 SECTION:=libs
41 CATEGORY:=Libraries
42 TITLE:=Boost-regex library
43 DEPENDS:=+boost
44 endef
45
46 define Build/Configure
47 endef
48
49 # bjam does not support anything like DESTDIR
50 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
51
52 define Build/Compile
53 ( cd $(PKG_BUILD_DIR) ; \
54 echo "using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
55 bjam \
56 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
57 --toolset=gcc --build-type=minimal --layout=system \
58 $(patsubst %,--with-regex,$(filter y m,$(CONFIG_PACKAGE_boost-regex))) \
59 $(patsubst %,--with-serialization,$(filter y m,$(CONFIG_PACKAGE_boost-serialization))) \
60 $(CONFIGURE_ARGS) \
61 install \
62 )
63 endef
64
65 define Package/boost/description
66 Boost provides free peer-reviewed portable C++ source libraries
67 endef
68
69 define Build/InstallDev
70 $(INSTALL_DIR) $(1)/usr/include/boost $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/include/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above
72 $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/
73 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/
74 endef
75
76 define Package/boost/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,boost-serialization))
82 $(eval $(call BuildPackage,boost-regex))
83 $(eval $(call BuildPackage,boost))