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
:=25f9a8ac28beeb5ab84aa98510305299
27 PKG_LICENSE
:=Boost Software License
<http
://www.boost.org
/users
/license.html
>
28 PKG_MAINTAINER
:=Carlos M. Ferreira
<carlosmf.pt@gmail.com
> (Modified from Mirko Vogt
<mirko@openwrt.org
> Boost
1.51 Original Makefile and patches
)
31 PKG_BUILD_DEPENDS
+= boost
/host
35 PKG_CONFIG_DEPENDS
:= \
36 CONFIG_PACKAGE_boost-date_time \
37 CONFIG_PACKAGE_boost-filesystem \
38 CONFIG_PACKAGE_boost-graph \
39 CONFIG_PACKAGE_boost-iostreams \
40 CONFIG_PACKAGE_boost-math \
41 CONFIG_PACKAGE_boost-program_options \
42 CONFIG_PACKAGE_boost-python \
43 CONFIG_PACKAGE_boost-regex \
44 CONFIG_PACKAGE_boost-serialization \
45 CONFIG_PACKAGE_boost-signals \
46 CONFIG_PACKAGE_boost-system \
47 CONFIG_PACKAGE_boost-test \
48 CONFIG_PACKAGE_boost-thread \
49 CONFIG_PACKAGE_boost-wave \
50 CONFIG_PACKAGE_boost-atomic \
51 CONFIG_PACKAGE_boost-context \
52 CONFIG_PACKAGE_boost-container \
53 CONFIG_PACKAGE_boost-coroutine \
54 CONFIG_PACKAGE_boost-log \
58 include $(INCLUDE_DIR
)/package.mk
59 include $(INCLUDE_DIR
)/host-build.mk
61 define Package
/boost
/Default
64 TITLE
:=Boost C
++ source libraries
65 URL
:=http
://www.boost.org
66 DEPENDS
:=+libstdcpp
+libpthread
+librt
69 define Package
/boost
/Default
/description
70 Boost provides free peer-reviewed portable C
++ source libraries
73 define Package
/boost-atomic
74 $(call Package
/boost
/Default
)
76 DEPENDS
+= +boost-system
79 define Package
/boost-chrono
80 $(call Package
/boost
/Default
)
82 DEPENDS
+= +boost-system
85 define Package
/boost-date_time
86 $(call Package
/boost
/Default
)
90 define Package
/boost-exception
91 $(call Package
/boost
/Default
)
95 define Package
/boost-filesystem
96 $(call Package
/boost
/Default
)
98 DEPENDS
+= +boost-system
101 define Package
/boost-graph
102 $(call Package
/boost
/Default
)
104 DEPENDS
+= +boost-regex
107 define Package
/boost-graph_parallel
108 $(call Package
/boost
/Default
)
109 TITLE
+= (graph_parallel
)
112 define Package
/boost-iostreams
113 $(call Package
/boost
/Default
)
118 define Package
/boost-locale
119 $(call Package
/boost
/Default
)
121 DEPENDS
+= $(ICONV_DEPENDS
)
124 define Package
/boost-math
125 $(call Package
/boost
/Default
)
129 define Package
/boost-mpi
130 $(call Package
/boost
/Default
)
134 define Package
/boost-program_options
135 $(call Package
/boost
/Default
)
136 TITLE
+= (program_options
)
139 define Package
/boost-python
140 $(call Package
/boost
/Default
)
142 DEPENDS
+= +PACKAGE_boost-python
:python
145 define Package
/boost-random
146 $(call Package
/boost
/Default
)
148 DEPENDS
+= +boost-system
151 define Package
/boost-regex
152 $(call Package
/boost
/Default
)
156 define Package
/boost-serialization
157 $(call Package
/boost
/Default
)
158 TITLE
+= (serialization
)
161 define Package
/boost-signals
162 $(call Package
/boost
/Default
)
166 define Package
/boost-system
167 $(call Package
/boost
/Default
)
171 define Package
/boost-test
172 $(call Package
/boost
/Default
)
176 define Package
/boost-thread
177 $(call Package
/boost
/Default
)
179 DEPENDS
+= +boost-system
+boost-chrono
+boost-atomic
182 define Package
/boost-timer
183 $(call Package
/boost
/Default
)
185 DEPENDS
+= boost-chrono
188 define Package
/boost-wave
189 $(call Package
/boost
/Default
)
191 DEPENDS
+= +boost-date_time
+boost-thread
+boost-filesystem
194 define Package
/boost-context
195 $(call Package
/boost
/Default
)
199 define Package
/boost-container
200 $(call Package
/boost
/Default
)
204 define Package
/boost-coroutine
205 $(call Package
/boost
/Default
)
207 DEPENDS
+= +boost-system
+boost-chrono
+boost-context
+boost-thread
210 define Package
/boost-log
211 $(call Package
/boost
/Default
)
213 DEPENDS
+= +boost-system
+boost-chrono
+boost-date_time
+boost-thread
+boost-filesystem
+boost-regex
217 $(call Package
/boost
/Default
)
218 TITLE
+= (header-only
)
222 define Build
/Configure
226 # bjam does not provide a configure-script nor a Makefile
227 ( cd
$(HOST_BUILD_DIR
)/tools
/build
/src
/engine
; .
/build.sh gcc
)
230 CONFIGURE_PREFIX
:=$(PKG_INSTALL_DIR
)
231 TARGET_LDFLAGS
+= -pthread
-lrt
236 ifneq ($(findstring mips
,$(ARCH
)),)
237 ifeq ($(ARCH
),mips64
)
239 else ifeq ($(ARCH
),octeon
)
244 else ifeq ($(ARCH
),arm
)
253 echo
"Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE)";
254 ( cd
$(PKG_BUILD_DIR
) ; \
255 echo
"using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools
/build
/src
/user-config.jam
; \
256 $(if
$(CONFIG_PACKAGE_boost-python
), \
257 echo
"using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.7/ ;" >> \
258 tools
/build
/src
/user-config.jam
; \
261 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
262 --toolset
=gcc-
$(ARCH
) --build-type
=minimal
--layout
=system abi
=$(BOOST_ABI
) \
263 --disable-long-double \
265 $(if
$(CONFIG_PACKAGE_boost-atomic
),,--without-atomic
) \
266 $(if
$(CONFIG_PACKAGE_boost-chrono
),,--without-chrono
) \
267 $(if
$(CONFIG_PACKAGE_boost-date_time
),,--without-date_time
) \
268 $(if
$(CONFIG_PACKAGE_boost-exception
),,--without-exception
) \
269 $(if
$(CONFIG_PACKAGE_boost-filesystem
),,--without-filesystem
) \
270 $(if
$(CONFIG_PACKAGE_boost-graph
),,--without-graph
) \
271 $(if
$(CONFIG_PACKAGE_boost-graph_parallel
),,--without-graph_parallel
) \
272 $(if
$(CONFIG_PACKAGE_boost-iostreams
),,--without-iostreams
) \
273 $(if
$(CONFIG_PACKAGE_boost-locale
),boost.locale.iconv
=on
-sICONV_PATH
=$(ICONV_PREFIX
) boost.locale.posix
=$(if
$(USE_UCLIBC
),on
,off
), \
274 --without-locale boost.locale.iconv
=off
) \
275 $(if
$(CONFIG_PACKAGE_boost-math
),,--without-math
) \
276 $(if
$(CONFIG_PACKAGE_boost-mpi
),,--without-mpi
) \
277 $(if
$(CONFIG_PACKAGE_boost-program_options
),,--without-program_options
) \
278 $(if
$(CONFIG_PACKAGE_boost-python
),,--without-python
) \
279 $(if
$(CONFIG_PACKAGE_boost-random
),,--without-random
) \
280 $(if
$(CONFIG_PACKAGE_boost-regex
),,--without-regex
) \
281 $(if
$(CONFIG_PACKAGE_boost-serialization
),,--without-serialization
) \
282 $(if
$(CONFIG_PACKAGE_boost-signals
),,--without-signals
) \
283 $(if
$(CONFIG_PACKAGE_boost-system
),,--without-system
) \
284 $(if
$(CONFIG_PACKAGE_boost-test
),,--without-test
) \
285 $(if
$(CONFIG_PACKAGE_boost-thread
),,--without-thread
) \
286 $(if
$(CONFIG_PACKAGE_boost-timer
),,--without-timer
) \
287 $(if
$(CONFIG_PACKAGE_boost-wave
),,--without-wave
) \
288 $(if
$(CONFIG_PACKAGE_boost-context
),,--without-context
) \
289 $(if
$(CONFIG_PACKAGE_boost-container
),,--without-container
) \
290 $(if
$(CONFIG_PACKAGE_boost-coroutine
),,--without-coroutine
) \
291 $(if
$(CONFIG_PACKAGE_boost-log
),,--without-log
) \
293 $(if
$(CONFIG_PACKAGE_boost-iostreams
),-sNO_BZIP2
=1 -sZLIB_INCLUDE
=$(STAGING_DIR
)/usr
/include \
294 -sZLIB_LIBPATH
=$(STAGING_DIR
)/usr
/lib
) \
299 define Build
/InstallDev
301 $(1)/usr
/include/boost
/
304 $(PKG_INSTALL_DIR
)/include/boost
/* \
305 $(1)/usr
/include/boost
/ \
306 # copies _all_ header files - independent of <--with-library>-argument above
308 if
[ -d
$(PKG_INSTALL_DIR
)/lib
]; then \
312 $(PKG_INSTALL_DIR
)/lib
/*.a \
315 $(PKG_INSTALL_DIR
)/lib
/*.so
* \
322 $(STAGING_DIR_HOST
)/bin
325 $(HOST_BUILD_DIR
)/tools
/build
/src
/engine
/bin.
*/bjam \
326 $(STAGING_DIR_HOST
)/bin
/
329 define Package
/boost
/Default
/install
334 $(PKG_INSTALL_DIR
)/lib
/libboost_
$(2)*.so
* \
338 define Package
/boost-atomic
/install
339 $(call Package
/boost
/Default
/install,$(1),atomic
)
342 define Package
/boost-chrono
/install
343 $(call Package
/boost
/Default
/install,$(1),chrono
)
346 define Package
/boost-date_time
/install
347 $(call Package
/boost
/Default
/install,$(1),date_time
)
350 define Package
/boost-exception
/install
351 $(call Package
/boost
/Default
/install,$(1),exception
)
354 define Package
/boost-filesystem
/install
355 $(call Package
/boost
/Default
/install,$(1),filesystem
)
358 define Package
/boost-graph
/install
359 $(call Package
/boost
/Default
/install,$(1),graph
)
362 define Package
/boost-graph_parallel
/install
363 $(call Package
/boost
/Default
/install,$(1),graph_parallel
)
366 define Package
/boost-iostreams
/install
367 $(call Package
/boost
/Default
/install,$(1),iostreams
)
370 define Package
/boost-math
/install
371 $(call Package
/boost
/Default
/install,$(1),math
)
374 define Package
/boost-mpi
/install
375 $(call Package
/boost
/Default
/install,$(1),mpi
)
378 define Package
/boost-program_options
/install
379 $(call Package
/boost
/Default
/install,$(1),program_options
)
382 define Package
/boost-python
/install
383 $(call Package
/boost
/Default
/install,$(1),python
)
386 define Package
/boost-random
/install
387 $(call Package
/boost
/Default
/install,$(1),random
)
390 define Package
/boost-regex
/install
391 $(call Package
/boost
/Default
/install,$(1),regex
)
394 define Package
/boost-serialization
/install
395 $(call Package
/boost
/Default
/install,$(1),serialization
)
398 define Package
/boost-signals
/install
399 $(call Package
/boost
/Default
/install,$(1),signals
)
402 define Package
/boost-system
/install
403 $(call Package
/boost
/Default
/install,$(1),system
)
406 define Package
/boost-test
/install
411 $(PKG_INSTALL_DIR
)/lib
/libboost_unit_test_framework
*.so
* \
415 $(PKG_INSTALL_DIR
)/lib
/libboost_prg_exec_monitor
*.so
* \
419 define Package
/boost-thread
/install
420 $(call Package
/boost
/Default
/install,$(1),thread
)
423 define Package
/boost-timer
/install
424 $(call Package
/boost
/Default
/install,$(1),timer
)
427 define Package
/boost-wave
/install
428 $(call Package
/boost
/Default
/install,$(1),wave
)
431 define Package
/boost-context
/install
432 $(call Package
/boost
/Default
/install,$(1),context
)
435 define Package
/boost-container
/install
436 $(call Package
/boost
/Default
/install,$(1),container
)
439 define Package
/boost-coroutine
/install
440 $(call Package
/boost
/Default
/install,$(1),coroutine
)
443 define Package
/boost-log
/install
444 $(call Package
/boost
/Default
/install,$(1),log
)
449 $(eval
$(call HostBuild
))
450 $(eval
$(call BuildPackage
,boost
))
451 $(eval
$(call BuildPackage
,boost-atomic
))
452 $(eval
$(call BuildPackage
,boost-chrono
))
453 $(eval
$(call BuildPackage
,boost-date_time
))
454 #$(eval $(call BuildPackage,boost-exception))
455 $(eval
$(call BuildPackage
,boost-filesystem
))
456 $(eval
$(call BuildPackage
,boost-graph
))
457 #$(eval $(call BuildPackage,boost-graph_parallel))
458 $(eval
$(call BuildPackage
,boost-iostreams
))
459 $(eval
$(call BuildPackage
,boost-locale
))
460 $(eval
$(call BuildPackage
,boost-math
))
461 #$(eval $(call BuildPackage,boost-mpi))
462 $(eval
$(call BuildPackage
,boost-program_options
))
463 $(eval
$(call BuildPackage
,boost-random
))
464 $(eval
$(call BuildPackage
,boost-python
))
465 $(eval
$(call BuildPackage
,boost-regex
))
466 $(eval
$(call BuildPackage
,boost-serialization
))
467 $(eval
$(call BuildPackage
,boost-signals
))
468 $(eval
$(call BuildPackage
,boost-system
))
469 $(eval
$(call BuildPackage
,boost-test
))
470 $(eval
$(call BuildPackage
,boost-thread
))
471 $(eval
$(call BuildPackage
,boost-timer
))
472 $(eval
$(call BuildPackage
,boost-wave
))
473 $(eval
$(call BuildPackage
,boost-context
))
474 $(eval
$(call BuildPackage
,boost-container
))
475 $(eval
$(call BuildPackage
,boost-coroutine
))
476 $(eval
$(call BuildPackage
,boost-log
))