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
20 PKG_SOURCE
:=$(PKG_NAME
)_
$(PKG_VERSION
).
tar.gz
21 PKG_SOURCE_URL
:=@SF
/boost
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)
23 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/$(PKG_NAME
)_
$(PKG_VERSION
)
24 PKG_MD5SUM
:=25f9a8ac28beeb5ab84aa98510305299
25 PKG_LICENSE
:=Boost Software License
<http
://www.boost.org
/users
/license.html
>
26 PKG_MAINTAINER
:=Carlos M. Ferreira
<carlosmf.pt@gmail.com
> (Modified from Mirko Vogt
<mirko@openwrt.org
> Boost
1.51 Original Makefile and patches
)
29 PKG_BUILD_DEPENDS
:=boost
/host
33 PKG_CONFIG_DEPENDS
:= \
34 CONFIG_PACKAGE_boost-date_time \
35 CONFIG_PACKAGE_boost-filesystem \
36 CONFIG_PACKAGE_boost-graph \
37 CONFIG_PACKAGE_boost-iostreams \
38 CONFIG_PACKAGE_boost-math \
39 CONFIG_PACKAGE_boost-program_options \
40 CONFIG_PACKAGE_boost-python \
41 CONFIG_PACKAGE_boost-regex \
42 CONFIG_PACKAGE_boost-serialization \
43 CONFIG_PACKAGE_boost-signals \
44 CONFIG_PACKAGE_boost-system \
45 CONFIG_PACKAGE_boost-test \
46 CONFIG_PACKAGE_boost-thread \
47 CONFIG_PACKAGE_boost-wave \
48 CONFIG_PACKAGE_boost-atomic \
51 include $(INCLUDE_DIR
)/package.mk
52 include $(INCLUDE_DIR
)/host-build.mk
54 define Package
/boost
/Default
57 TITLE
:=Boost C
++ source libraries
58 URL
:=http
://www.boost.org
59 DEPENDS
:=+libstdcpp
+libpthread
+librt
62 define Package
/boost
/Default
/description
63 Boost provides free peer-reviewed portable C
++ source libraries
66 define Package
/boost-atomic
67 $(call Package
/boost
/Default
)
69 DEPENDS
+= +boost-system
72 define Package
/boost-chrono
73 $(call Package
/boost
/Default
)
75 DEPENDS
+= +boost-system
78 define Package
/boost-date_time
79 $(call Package
/boost
/Default
)
83 define Package
/boost-exception
84 $(call Package
/boost
/Default
)
88 define Package
/boost-filesystem
89 $(call Package
/boost
/Default
)
91 DEPENDS
+= +boost-system
94 define Package
/boost-graph
95 $(call Package
/boost
/Default
)
97 DEPENDS
+= +boost-regex
100 define Package
/boost-graph_parallel
101 $(call Package
/boost
/Default
)
102 TITLE
+= (graph_parallel
)
105 define Package
/boost-iostreams
106 $(call Package
/boost
/Default
)
111 define Package
/boost-locale
112 $(call Package
/boost
/Default
)
116 define Package
/boost-math
117 $(call Package
/boost
/Default
)
121 define Package
/boost-mpi
122 $(call Package
/boost
/Default
)
126 define Package
/boost-program_options
127 $(call Package
/boost
/Default
)
128 TITLE
+= (program_options
)
131 define Package
/boost-python
132 $(call Package
/boost
/Default
)
134 DEPENDS
+= +PACKAGE_boost-python
:python
137 define Package
/boost-random
138 $(call Package
/boost
/Default
)
140 DEPENDS
+= +boost-system
143 define Package
/boost-regex
144 $(call Package
/boost
/Default
)
148 define Package
/boost-serialization
149 $(call Package
/boost
/Default
)
150 TITLE
+= (serialization
)
153 define Package
/boost-signals
154 $(call Package
/boost
/Default
)
158 define Package
/boost-system
159 $(call Package
/boost
/Default
)
163 define Package
/boost-test
164 $(call Package
/boost
/Default
)
168 define Package
/boost-thread
169 $(call Package
/boost
/Default
)
171 DEPENDS
+= +boost-system
+boost-chrono
+boost-atomic
174 define Package
/boost-timer
175 $(call Package
/boost
/Default
)
177 DEPENDS
+= boost-chrono
180 define Package
/boost-wave
181 $(call Package
/boost
/Default
)
183 DEPENDS
+= +boost-date_time
+boost-thread
+boost-filesystem
187 $(call Package
/boost
/Default
)
188 TITLE
+= (header-only
)
192 define Build
/Configure
196 # bjam does not provide a configure-script nor a Makefile
197 ( cd
$(HOST_BUILD_DIR
)/tools
/build
/src
/engine
; .
/build.sh gcc
)
200 CONFIGURE_PREFIX
:=$(PKG_INSTALL_DIR
)
201 TARGET_LDFLAGS
+= -pthread
-lrt
204 ( cd
$(PKG_BUILD_DIR
) ; \
205 echo
"using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools
/build
/src
/user-config.jam
; \
206 $(if
$(CONFIG_PACKAGE_boost-python
), \
207 echo
"using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.7/ ;" >> \
208 tools
/build
/src
/user-config.jam
; \
211 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
212 --toolset
=gcc-
$(ARCH
) --build-type
=minimal
--layout
=system \
213 --disable-long-double \
215 $(if
$(CONFIG_PACKAGE_boost-atomic
),,--without-atomic
) \
216 $(if
$(CONFIG_PACKAGE_boost-chrono
),,--without-chrono
) \
217 $(if
$(CONFIG_PACKAGE_boost-date_time
),,--without-date_time
) \
218 $(if
$(CONFIG_PACKAGE_boost-exception
),,--without-exception
) \
219 $(if
$(CONFIG_PACKAGE_boost-filesystem
),,--without-filesystem
) \
220 $(if
$(CONFIG_PACKAGE_boost-graph
),,--without-graph
) \
221 $(if
$(CONFIG_PACKAGE_boost-graph_parallel
),,--without-graph_parallel
) \
222 $(if
$(CONFIG_PACKAGE_boost-iostreams
),,--without-iostreams
) \
223 $(if
$(CONFIG_PACKAGE_boost-locale
),,--without-locale
) \
224 $(if
$(CONFIG_PACKAGE_boost-math
),,--without-math
) \
225 $(if
$(CONFIG_PACKAGE_boost-mpi
),,--without-mpi
) \
226 $(if
$(CONFIG_PACKAGE_boost-program_options
),,--without-program_options
) \
227 $(if
$(CONFIG_PACKAGE_boost-python
),,--without-python
) \
228 $(if
$(CONFIG_PACKAGE_boost-random
),,--without-random
) \
229 $(if
$(CONFIG_PACKAGE_boost-regex
),,--without-regex
) \
230 $(if
$(CONFIG_PACKAGE_boost-serialization
),,--without-serialization
) \
231 $(if
$(CONFIG_PACKAGE_boost-signals
),,--without-signals
) \
232 $(if
$(CONFIG_PACKAGE_boost-system
),,--without-system
) \
233 $(if
$(CONFIG_PACKAGE_boost-test
),,--without-test
) \
234 $(if
$(CONFIG_PACKAGE_boost-thread
),,--without-thread
) \
235 $(if
$(CONFIG_PACKAGE_boost-timer
),,--without-timer
) \
236 $(if
$(CONFIG_PACKAGE_boost-wave
),,--without-wave
) \
238 $(if
$(CONFIG_PACKAGE_boost-iostreams
),-sNO_BZIP2
=1 -sZLIB_INCLUDE
=$(STAGING_DIR
)/usr
/include \
239 -sZLIB_LIBPATH
=$(STAGING_DIR
)/usr
/lib
) \
244 define Build
/InstallDev
246 $(1)/usr
/include/boost
/
249 $(PKG_INSTALL_DIR
)/include/boost
/* \
250 $(1)/usr
/include/boost
/ \
251 # copies _all_ header files - independent of <--with-library>-argument above
253 if
[ -d
$(PKG_INSTALL_DIR
)/lib
]; then \
257 $(PKG_INSTALL_DIR
)/lib
/*.a \
260 $(PKG_INSTALL_DIR
)/lib
/*.so
* \
267 $(STAGING_DIR_HOST
)/bin
270 $(HOST_BUILD_DIR
)/tools
/build
/src
/engine
/bin.
*/bjam \
271 $(STAGING_DIR_HOST
)/bin
/
274 define Package
/boost
/Default
/install
279 $(PKG_INSTALL_DIR
)/lib
/libboost_
$(2)*.so
* \
283 define Package
/boost-atomic
/install
284 $(call Package
/boost
/Default
/install,$(1),atomic
)
287 define Package
/boost-chrono
/install
288 $(call Package
/boost
/Default
/install,$(1),chrono
)
291 define Package
/boost-date_time
/install
292 $(call Package
/boost
/Default
/install,$(1),date_time
)
295 define Package
/boost-exception
/install
296 $(call Package
/boost
/Default
/install,$(1),exception
)
299 define Package
/boost-filesystem
/install
300 $(call Package
/boost
/Default
/install,$(1),filesystem
)
303 define Package
/boost-graph
/install
304 $(call Package
/boost
/Default
/install,$(1),graph
)
307 define Package
/boost-graph_parallel
/install
308 $(call Package
/boost
/Default
/install,$(1),graph_parallel
)
311 define Package
/boost-iostreams
/install
312 $(call Package
/boost
/Default
/install,$(1),iostreams
)
315 define Package
/boost-math
/install
316 $(call Package
/boost
/Default
/install,$(1),math
)
319 define Package
/boost-mpi
/install
320 $(call Package
/boost
/Default
/install,$(1),mpi
)
323 define Package
/boost-program_options
/install
324 $(call Package
/boost
/Default
/install,$(1),program_options
)
327 define Package
/boost-python
/install
328 $(call Package
/boost
/Default
/install,$(1),python
)
331 define Package
/boost-random
/install
332 $(call Package
/boost
/Default
/install,$(1),random
)
335 define Package
/boost-regex
/install
336 $(call Package
/boost
/Default
/install,$(1),regex
)
339 define Package
/boost-serialization
/install
340 $(call Package
/boost
/Default
/install,$(1),serialization
)
343 define Package
/boost-signals
/install
344 $(call Package
/boost
/Default
/install,$(1),signals
)
347 define Package
/boost-system
/install
348 $(call Package
/boost
/Default
/install,$(1),system
)
351 define Package
/boost-test
/install
356 $(PKG_INSTALL_DIR
)/lib
/libboost_unit_test_framework
*.so
* \
360 $(PKG_INSTALL_DIR
)/lib
/libboost_prg_exec_monitor
*.so
* \
364 define Package
/boost-thread
/install
365 $(call Package
/boost
/Default
/install,$(1),thread
)
368 define Package
/boost-timer
/install
369 $(call Package
/boost
/Default
/install,$(1),timer
)
372 define Package
/boost-wave
/install
373 $(call Package
/boost
/Default
/install,$(1),wave
)
376 $(eval
$(call HostBuild
))
377 $(eval
$(call BuildPackage
,boost
))
378 $(eval
$(call BuildPackage
,boost-atomic
))
379 $(eval
$(call BuildPackage
,boost-chrono
))
380 $(eval
$(call BuildPackage
,boost-date_time
))
381 #$(eval $(call BuildPackage,boost-exception))
382 $(eval
$(call BuildPackage
,boost-filesystem
))
383 $(eval
$(call BuildPackage
,boost-graph
))
384 #$(eval $(call BuildPackage,boost-graph_parallel))
385 $(eval
$(call BuildPackage
,boost-iostreams
))
386 $(eval
$(call BuildPackage
,boost-locale
))
387 $(eval
$(call BuildPackage
,boost-math
))
388 #$(eval $(call BuildPackage,boost-mpi))
389 $(eval
$(call BuildPackage
,boost-program_options
))
390 $(eval
$(call BuildPackage
,boost-random
))
391 $(eval
$(call BuildPackage
,boost-python
))
392 $(eval
$(call BuildPackage
,boost-regex
))
393 $(eval
$(call BuildPackage
,boost-serialization
))
394 $(eval
$(call BuildPackage
,boost-signals
))
395 $(eval
$(call BuildPackage
,boost-system
))
396 $(eval
$(call BuildPackage
,boost-test
))
397 $(eval
$(call BuildPackage
,boost-thread
))
398 $(eval
$(call BuildPackage
,boost-timer
))
399 $(eval
$(call BuildPackage
,boost-wave
))