Update dmapd and libdmapsharing to new upstream versions
[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 PKG_BUILD_PARALLEL:=1
23
24 PKG_CONFIG_DEPENDS := \
25 CONFIG_PACKAGE_boost-date_time \
26 CONFIG_PACKAGE_boost-filesystem \
27 CONFIG_PACKAGE_boost-graph \
28 CONFIG_PACKAGE_boost-iostreams \
29 CONFIG_PACKAGE_boost-math \
30 CONFIG_PACKAGE_boost-program_options \
31 CONFIG_PACKAGE_boost-python \
32 CONFIG_PACKAGE_boost-regex \
33 CONFIG_PACKAGE_boost-serialization \
34 CONFIG_PACKAGE_boost-signals \
35 CONFIG_PACKAGE_boost-system \
36 CONFIG_PACKAGE_boost-test \
37 CONFIG_PACKAGE_boost-thread \
38 CONFIG_PACKAGE_boost-wave \
39
40 include $(INCLUDE_DIR)/package.mk
41
42 define Package/boost/Default
43 SECTION:=libs
44 CATEGORY:=Libraries
45 TITLE:=Boost C++ source libraries
46 URL:=http://www.boost.org
47 DEPENDS:=+libstdcpp
48 endef
49
50 define Package/boost/Default/description
51 Boost provides free peer-reviewed portable C++ source libraries
52 endef
53
54 define Package/boost-date_time
55 $(call Package/boost/Default)
56 TITLE+= (date_time)
57 endef
58
59 define Package/boost-filesystem
60 $(call Package/boost/Default)
61 TITLE+= (filesystem)
62 endef
63
64 define Package/boost-function_types
65 $(call Package/boost/Default)
66 TITLE+= (function_types)
67 BUILD_ONLY:=1
68 endef
69
70 define Package/boost-graph
71 $(call Package/boost/Default)
72 TITLE+= (graph)
73 endef
74
75 define Package/boost-iostreams
76 $(call Package/boost/Default)
77 TITLE+= (iostreams)
78 DEPENDS+= +zlib
79 endef
80
81 define Package/boost-math
82 $(call Package/boost/Default)
83 TITLE+= (math)
84 endef
85
86 #define Package/boost-mpi
87 # $(call Package/boost/Default)
88 # TITLE+= (mpi)
89 #endef
90
91 define Package/boost-program_options
92 $(call Package/boost/Default)
93 TITLE+= (program_options)
94 endef
95
96 define Package/boost-python
97 $(call Package/boost/Default)
98 TITLE+= (python)
99 DEPENDS+= +python
100 endef
101
102 define Package/boost-regex
103 $(call Package/boost/Default)
104 TITLE+= (regex)
105 endef
106
107 define Package/boost-serialization
108 $(call Package/boost/Default)
109 TITLE+= (serialization)
110 endef
111
112 define Package/boost-signals
113 $(call Package/boost/Default)
114 TITLE+= (signals)
115 endef
116
117 define Package/boost-system
118 $(call Package/boost/Default)
119 TITLE+= (system)
120 endef
121
122 define Package/boost-test
123 $(call Package/boost/Default)
124 TITLE+= (test)
125 endef
126
127 define Package/boost-thread
128 $(call Package/boost/Default)
129 TITLE+= (thread)
130 endef
131
132 define Package/boost-wave
133 $(call Package/boost/Default)
134 TITLE+= (wave)
135 endef
136
137 define Package/boost
138 $(call Package/boost/Default)
139 TITLE+= (header-only)
140 BUILDONLY:=1
141 endef
142
143 define Build/Configure
144 endef
145
146 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
147 define Build/Compile
148 ( cd $(PKG_BUILD_DIR) ; \
149 echo "using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(TARGET_CFLAGS) <cxxflags>$(TARGET_CXXFLAGS) <linkflags>$(TARGET_LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
150 $(if $(CONFIG_PACKAGE_boost-python), \
151 echo "using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.6/ ;" >> \
152 tools/build/v2/site-config.jam; \
153 ) \
154 bjam \
155 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
156 $(filter -j%,$(PKG_JOBS)) \
157 --toolset=gcc --build-type=minimal --layout=system \
158 --disable-long-double \
159 $(CONFIGURE_ARGS) \
160 $(if $(CONFIG_PACKAGE_boost-date_time),--with-date_time) \
161 $(if $(CONFIG_PACKAGE_boost-filesystem),--with-filesystem) \
162 $(if $(CONFIG_PACKAGE_boost-function_types),--with-function_types) \
163 $(if $(CONFIG_PACKAGE_boost-graph),--with-graph) \
164 $(if $(CONFIG_PACKAGE_boost-iostreams),--with-iostreams) \
165 $(if $(CONFIG_PACKAGE_boost-math),--with-math) \
166 $(if $(CONFIG_PACKAGE_boost-mpi),--with-mpi) \
167 $(if $(CONFIG_PACKAGE_boost-program_options),--with-program_options) \
168 $(if $(CONFIG_PACKAGE_boost-python),--with-python) \
169 $(if $(CONFIG_PACKAGE_boost-regex),--with-regex) \
170 $(if $(CONFIG_PACKAGE_boost-serialization),--with-serialization) \
171 $(if $(CONFIG_PACKAGE_boost-signals),--with-signals) \
172 $(if $(CONFIG_PACKAGE_boost-system),--with-system) \
173 $(if $(CONFIG_PACKAGE_boost-test),--with-test) \
174 $(if $(CONFIG_PACKAGE_boost-thread),--with-thread) \
175 $(if $(CONFIG_PACKAGE_boost-wave),--with-wave) \
176 \
177 $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
178 -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
179 install \
180 )
181 endef
182
183 define Build/InstallDev
184 $(INSTALL_DIR) $(1)/usr/include/boost/
185 $(CP) $(PKG_INSTALL_DIR)/include/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above
186
187 if [ -d $(PKG_INSTALL_DIR)/lib ]; then \
188 $(INSTALL_DIR) $(1)/usr/lib; \
189 $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/; \
190 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/; \
191 fi
192 endef
193
194 define Package/boost/Default/install
195 $(INSTALL_DIR) $(1)/usr/lib
196 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/
197 endef
198
199 define Package/boost-date_time/install
200 $(call Package/boost/Default/install,$(1),date_time)
201 endef
202
203 define Package/boost-filesystem/install
204 $(call Package/boost/Default/install,$(1),filesystem)
205 endef
206
207 define Package/boost-graph/install
208 $(call Package/boost/Default/install,$(1),graph)
209 endef
210
211 define Package/boost-iostreams/install
212 $(call Package/boost/Default/install,$(1),iostreams)
213 endef
214
215 define Package/boost-math/install
216 $(call Package/boost/Default/install,$(1),math)
217 endef
218
219 #define Package/boost-mpi/install
220 # $(call Package/boost/Default/install,$(1),mpi)
221 #endef
222
223 define Package/boost-program_options/install
224 $(call Package/boost/Default/install,$(1),program_options)
225 endef
226
227 define Package/boost-python/install
228 $(call Package/boost/Default/install,$(1),python)
229 endef
230
231 define Package/boost-regex/install
232 $(call Package/boost/Default/install,$(1),regex)
233 endef
234
235 define Package/boost-serialization/install
236 $(call Package/boost/Default/install,$(1),serialization)
237 endef
238
239 define Package/boost-signals/install
240 $(call Package/boost/Default/install,$(1),signals)
241 endef
242
243 define Package/boost-system/install
244 $(call Package/boost/Default/install,$(1),system)
245 endef
246
247 define Package/boost-test/install
248 $(INSTALL_DIR) $(1)/usr/lib
249 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/
250 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/
251 endef
252
253 define Package/boost-thread/install
254 $(call Package/boost/Default/install,$(1),thread)
255 endef
256
257 define Package/boost-wave/install
258 $(call Package/boost/Default/install,$(1),wave)
259 endef
260
261 $(eval $(call BuildPackage,boost))
262 $(eval $(call BuildPackage,boost-date_time))
263 $(eval $(call BuildPackage,boost-filesystem))
264 $(eval $(call BuildPackage,boost-function_types))
265 $(eval $(call BuildPackage,boost-graph))
266 $(eval $(call BuildPackage,boost-iostreams))
267 $(eval $(call BuildPackage,boost-math))
268 #$(eval $(call BuildPackage,boost-mpi))
269 $(eval $(call BuildPackage,boost-program_options))
270 $(eval $(call BuildPackage,boost-python))
271 $(eval $(call BuildPackage,boost-regex))
272 $(eval $(call BuildPackage,boost-serialization))
273 $(eval $(call BuildPackage,boost-signals))
274 $(eval $(call BuildPackage,boost-system))
275 $(eval $(call BuildPackage,boost-test))
276 $(eval $(call BuildPackage,boost-thread))
277 $(eval $(call BuildPackage,boost-wave))