2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 # Original Boost 1.51 Makefile by Mirko Vogt <mirko@openwrt.org>
10 # Dude, this "boost" is really one of the most crude stuff I ported yet.
14 include $(TOPDIR
)/rules.mk
15 include $(INCLUDE_DIR
)/nls.mk
16 include $(INCLUDE_DIR
)/target.mk
22 PKG_SOURCE
:=$(PKG_NAME
)_
$(PKG_VERSION
).
tar.gz
23 PKG_SOURCE_URL
:=@SF
/boost
24 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)
25 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/$(PKG_NAME
)_
$(PKG_VERSION
)
26 PKG_MD5SUM
:=5a5d5614d9a07672e1ab2a250b5defc5
27 PKG_LICENSE
:=Boost Software License
<http
://www.boost.org
/users
/license.html
>
28 PKG_MAINTAINER
:=Carlos M. Ferreira
<carlosmf.pt@gmail.com
>
30 PKG_BUILD_DEPENDS
+= boost
/host
34 include $(INCLUDE_DIR
)/package.mk
35 include $(INCLUDE_DIR
)/host-build.mk
38 define Package
/boost
/Default
41 TITLE
:=Boost C
++ source library
42 URL
:=http
://www.boost.org
43 DEPENDS
:=+libstdcpp
+libpthread
+librt
46 define Package
/boost
/description
/Default
47 Boost provides free peer-reviewed portable C
++ source libraries
52 define Package
/boost-libs
53 $(call Package
/boost
/Default
)
55 DEPENDS
+= $(BOOST_DEPENDS
)
59 define Package
/boost-libs
/description
60 $(call Package
/boost
/description
/Default
)
62 This meta package contains only dependencies to the other libraries from
63 the boost libraries collection.
66 # Create a meta-package of dependent libraries (for ALL)
67 define Package
/boost-libs
/install
72 $(call Package
/boost
/Default
)
74 DEPENDS
:=+ALL
:boost-libs
+ALL
:boost-test
77 define Package
/boost
/config
78 menu
"Select Boost libraries"
79 depends on PACKAGE_boost
82 bool
"Include all Boost libraries"
83 select PACKAGE_boost-libs
86 bool
"Boost test package"
87 select PACKAGE_boost-test
91 $(foreach lib
,$(BOOST_LIBS
), \
92 config PACKAGE_boost-
$(lib
)
93 prompt
"Boost $(lib) library"
101 PKG_CONFIG_DEPENDS
:= CONFIG_PACKAGE_boost-test
103 define Package
/boost-test
104 $(call Package
/boost
/Default
)
109 define Build
/Configure
113 # 2: dependencies on other boost libraries (short name)
114 # 3: dependencies on other packages
115 define DefineBoostLibrary
117 BOOST_DEPENDS
+= +boost-
$(1)
120 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_boost-
$(1)
122 define Package
/boost-
$(1)
123 $(call Package
/boost
/Default
)
125 DEPENDS
+= $$(foreach lib
,$(2),+boost-
$$(lib
)) $(3)
129 define Package
/boost-
$(1)/description
130 $(call Package
/boost
/description
/Default
)
132 This package contains the Boost
$(1) library.
136 $(eval
$(call DefineBoostLibrary
,atomic
,system
,))
137 $(eval
$(call DefineBoostLibrary
,chrono
,system
,))
138 $(eval
$(call DefineBoostLibrary
,container
,,))
139 $(eval
$(call DefineBoostLibrary
,context
,chrono system thread
,))
140 $(eval
$(call DefineBoostLibrary
,coroutine
,system chrono context thread
,))
141 $(eval
$(call DefineBoostLibrary
,date_time
,,))
142 #$(eval $(call DefineBoostLibrary,exception,,))
143 $(eval
$(call DefineBoostLibrary
,filesystem
,system
,))
144 $(eval
$(call DefineBoostLibrary
,graph
,regex
,))
145 #$(eval $(call DefineBoostLibrary,graph_parallel,,))
146 $(eval
$(call DefineBoostLibrary
,iostreams
,,+zlib
))
147 $(eval
$(call DefineBoostLibrary
,locale
,system
,$(ICONV_DEPENDS
)))
148 $(eval
$(call DefineBoostLibrary
,log
,system chrono date_time thread filesystem regex
,))
149 $(eval
$(call DefineBoostLibrary
,math
,,))
150 #$(eval $(call DefineBoostLibrary,mpi,,))
151 $(eval
$(call DefineBoostLibrary
,program_options
,,))
152 $(eval
$(call DefineBoostLibrary
,random
,system
,))
154 # We need a beter way to provide this package, information regarding the Python packages
155 # such as Python version and directories locations.
156 # Python 2.7 version is for now hard-coded. Python 3 is (until this date) broken in the trunk tree.
157 $(eval
$(call DefineBoostLibrary
,python
,,+PACKAGE_boost-python
:python
))
158 $(eval
$(call DefineBoostLibrary
,regex
,,))
159 $(eval
$(call DefineBoostLibrary
,serialization
,,))
160 $(eval
$(call DefineBoostLibrary
,signals
,,))
161 $(eval
$(call DefineBoostLibrary
,system
,,))
162 $(eval
$(call DefineBoostLibrary
,thread
,system chrono atomic
,))
163 $(eval
$(call DefineBoostLibrary
,timer
,chrono
))
164 $(eval
$(call DefineBoostLibrary
,wave
,date_time thread filesystem
,))
167 # bjam does not provide a configure-script nor a Makefile
168 ( cd
$(HOST_BUILD_DIR
)/tools
/build
/src
/engine
; .
/build.sh gcc
)
171 CONFIGURE_PREFIX
:=$(PKG_INSTALL_DIR
)
172 TARGET_LDFLAGS
+= -pthread
-lrt
175 ifneq ($(findstring mips
,$(ARCH
)),)
177 ifneq ($(findstring 64,$(ARCH
)),)
180 else ifneq ($(findstring arm
,$(ARCH
)),)
182 else ifeq ($(ARCH
),aarch64
)
190 $(info Selected Boost API
$(BOOST_ABI
) for architecture
$(ARCH
) and cpu
$(CPU_TYPE
) $(CPU_SUBTYPE
))
191 ( cd
$(PKG_BUILD_DIR
) ; \
192 echo
"using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools
/build
/src
/user-config.jam
; \
193 $(if
$(CONFIG_PACKAGE_boost-python
), \
194 echo
"using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.7/ ;" >> \
195 tools
/build
/src
/user-config.jam
; \
198 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
199 --toolset
=gcc-
$(ARCH
) --build-type
=minimal
--layout
=system abi
=$(BOOST_ABI
) \
200 --disable-long-double \
203 $(if
$(CONFIG_PACKAGE_boost-test
),,--without-test
) \
204 $(foreach lib
,$(BOOST_LIBS
), \
205 $(if
$(CONFIG_PACKAGE_boost-
$(lib
)),,--without-
$(lib
)) \
207 $(if
$(CONFIG_PACKAGE_boost-locale
),boost.locale.iconv
=on
-sICONV_PATH
=$(ICONV_PREFIX
) boost.locale.posix
=$(if
$(USE_UCLIBC
),on
,off
), \
208 boost.locale.iconv
=off
) \
210 $(if
$(CONFIG_PACKAGE_boost-iostreams
),-sNO_BZIP2
=1 -sZLIB_INCLUDE
=$(STAGING_DIR
)/usr
/include \
211 -sZLIB_LIBPATH
=$(STAGING_DIR
)/usr
/lib
) \
216 define Build
/InstallDev
218 $(1)/usr
/include/boost
/
221 $(PKG_INSTALL_DIR
)/include/boost
/* \
222 $(1)/usr
/include/boost
/ \
223 # copies _all_ header files - independent of <--with-library>-argument above
225 if
[ -d
$(PKG_INSTALL_DIR
)/lib
]; then \
229 $(PKG_INSTALL_DIR
)/lib
/*.a \
232 $(PKG_INSTALL_DIR
)/lib
/*.so
* \
239 $(STAGING_DIR_HOST
)/bin
242 $(HOST_BUILD_DIR
)/tools
/build
/src
/engine
/bin.
*/bjam \
243 $(STAGING_DIR_HOST
)/bin
/
246 define Package
/boost
/Default
/install
251 $(PKG_INSTALL_DIR
)/lib
/libboost_
$(2)*.so
* \
255 define Package
/boost-test
/install
260 $(PKG_INSTALL_DIR
)/lib
/libboost_unit_test_framework
*.so
* \
264 $(PKG_INSTALL_DIR
)/lib
/libboost_prg_exec_monitor
*.so
* \
268 define BuildBoostLibrary
269 define Package
/boost-
$(1)/install
270 $(call Package
/boost
/Default
/install,$$(1),$(1))
273 $$(eval
$$(call BuildPackage
,boost-
$(1)))
276 $(eval
$(call HostBuild
))
278 $(foreach lib
,$(BOOST_LIBS
),$(eval
$(call BuildBoostLibrary
,$(lib
))))
279 $(eval
$(call BuildPackage
,boost-test
))
281 $(eval
$(call BuildPackage
,boost-libs
))
282 $(eval
$(call BuildPackage
,boost
))