blob: e3dc039a2b54e0803529bc4de8d97bb610891d63 [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Michael Stahlc74af0d2011-04-01 20:49:35 +00002#
Michael Meeks1e4422a2013-05-16 21:56:04 +01003# This file is part of the LibreOffice project.
Kohei Yoshidaa6639312012-07-27 22:14:39 -04004#
Michael Meeks1e4422a2013-05-16 21:56:04 +01005# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Michael Stahlc74af0d2011-04-01 20:49:35 +00008#
Michael Meeks1e4422a2013-05-16 21:56:04 +01009# This file incorporates work covered by the following license notice:
Michael Stahlc74af0d2011-04-01 20:49:35 +000010#
Michael Meeks1e4422a2013-05-16 21:56:04 +010011# Licensed to the Apache Software Foundation (ASF) under one or more
12# contributor license agreements. See the NOTICE file distributed
13# with this work for additional information regarding copyright
14# ownership. The ASF licenses this file to you under the Apache
15# License, Version 2.0 (the "License"); you may not use this file
16# except in compliance with the License. You may obtain a copy of
17# the License at http://www.apache.org/licenses/LICENSE-2.0 .
Michael Stahlc74af0d2011-04-01 20:49:35 +000018#
Michael Stahlc74af0d2011-04-01 20:49:35 +000019
20# this file describes all the external libraries
21# depending on the configure options these may be taken from the system,
22# or the internal/bundled copy may be built.
23
Zolnai Tamás62fd6302014-04-18 12:55:56 +020024# for every external, a function gb_LinkTarget__use_FOO is defined,
Michael Stahlc74af0d2011-04-01 20:49:35 +000025# once for the system case, once for the internal case.
26
27# in the system case, no libraries should be registered, but the target-local
28# variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
29
David Ostrovsky152e2a22014-11-30 18:26:01 +010030
31ifeq ($(CPUNAME),X86_64)
32wnt_arch_subdir_optional=x64/
33wnt_arch_subdir_mandatory=x64
34else ifeq ($(CPUNAME),INTEL)
35wnt_arch_subdir_mandatory=Win32
36endif
37
Matúš Kukan8e535df2012-04-07 13:59:33 +020038# External headers
39
Michael Stahl8555b372014-02-11 19:28:33 +010040ifneq ($(SYSTEM_MESA_HEADERS),)
Peter Foley1bd28842011-09-09 17:42:24 -040041
Matúš Kukan8e535df2012-04-07 13:59:33 +020042gb_LinkTarget__use_mesa_headers :=
Peter Foley1bd28842011-09-09 17:42:24 -040043
Michael Stahl8555b372014-02-11 19:28:33 +010044else # !SYSTEM_MESA_HEADERS
Peter Foley1bd28842011-09-09 17:42:24 -040045
Matúš Kukan8e535df2012-04-07 13:59:33 +020046define gb_LinkTarget__use_mesa_headers
Michael Stahl6b2ce082013-05-06 17:43:54 +020047$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny6c4b7e42013-11-03 20:54:23 +020048 -I$(SRCDIR)/external/Mesa/inc \
Michael Stahl6b2ce082013-05-06 17:43:54 +020049 $$(INCLUDE) \
50)
Matúš Kukan8e535df2012-04-07 13:59:33 +020051
Peter Foley1bd28842011-09-09 17:42:24 -040052endef
53
Michael Stahl8555b372014-02-11 19:28:33 +010054endif # SYSTEM_MESA_HEADERS
Peter Foley1bd28842011-09-09 17:42:24 -040055
Michael Stahl187194b2014-02-11 19:17:42 +010056ifneq ($(SYSTEM_NPAPI_HEADERS),)
Matúš Kukan8e535df2012-04-07 13:59:33 +020057
Michael Stahl96907bf2013-05-07 00:50:15 +020058# yes this uses internal headers too...
59# they are split across 2 dirs for this reason
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010060define gb_LinkTarget__use_npapi_headers
Matúš Kukan8f6510b2012-06-02 21:54:26 +020061$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010062 $(NPAPI_HEADERS_CFLAGS) \
Khaled Hosny622a6332013-11-03 20:58:47 +020063 -I$(SRCDIR)/external/np_sdk \
Matúš Kukan8e535df2012-04-07 13:59:33 +020064 $$(INCLUDE) \
Matúš Kukan8f6510b2012-06-02 21:54:26 +020065)
Matúš Kukan8e535df2012-04-07 13:59:33 +020066
67endef
68
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010069else #!SYSTEM_NPAPI_HEADERS
Matúš Kukan8e535df2012-04-07 13:59:33 +020070
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010071define gb_LinkTarget__use_npapi_headers
Matúš Kukan8f6510b2012-06-02 21:54:26 +020072$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny622a6332013-11-03 20:58:47 +020073 -I$(SRCDIR)/external/np_sdk/inc \
74 -I$(SRCDIR)/external/np_sdk \
Matúš Kukan8e535df2012-04-07 13:59:33 +020075 $$(INCLUDE) \
Matúš Kukan8f6510b2012-06-02 21:54:26 +020076)
Matúš Kukan8e535df2012-04-07 13:59:33 +020077
78endef
79
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010080endif #SYSTEM_NPAPI_HEADERS
Matúš Kukan8e535df2012-04-07 13:59:33 +020081
Michael Stahl5378dea2014-02-11 19:11:47 +010082ifneq ($(SYSTEM_ODBC_HEADERS),)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020083
84define gb_LinkTarget__use_odbc_headers
85$(call gb_LinkTarget_add_defs,$(1),\
86 -DSYSTEM_ODBC_HEADERS \
87)
88
89endef
90
Michael Stahl5378dea2014-02-11 19:11:47 +010091else # !SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020092
93define gb_LinkTarget__use_odbc_headers
Michael Stahlfea65aa2013-05-06 20:09:47 +020094$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny891bb7c2013-11-04 18:40:17 +020095 -I$(SRCDIR)/external/unixODBC/inc \
Michael Stahlfea65aa2013-05-06 20:09:47 +020096 $$(INCLUDE) \
97)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020098
99endef
100
Michael Stahl5378dea2014-02-11 19:11:47 +0100101endif # SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +0200102
Michael Stahlff69e722014-02-11 19:08:10 +0100103ifneq ($(SYSTEM_VIGRA),)
Matúš Kukan54a06c62012-08-25 01:29:00 +0200104
105gb_LinkTarget__use_vigra_headers :=
106
107else
108
109define gb_LinkTarget__use_vigra_headers
110$(call gb_LinkTarget_use_unpacked,$(1),vigra)
111$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200112 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
Matúš Kukan54a06c62012-08-25 01:29:00 +0200113 $$(INCLUDE) \
114)
115
116endef
117
118endif
119
Michael Stahle3abec32014-02-11 15:57:18 +0100120ifneq ($(SYSTEM_MDDS),)
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200121
David Tardond5d39272014-03-03 15:29:27 +0100122gb_ExternalProject__use_mdds_headers :=
123
David Tardon93aff252014-03-03 16:23:27 +0100124define gb_LinkTarget__use_mdds_headers
125$(call gb_LinkTarget_set_include,$(1),\
126 $(MDDS_CFLAGS) \
127 $$(INCLUDE) \
128)
129
130endef
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200131
Michael Stahle3abec32014-02-11 15:57:18 +0100132else # !SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200133
David Tardond5d39272014-03-03 15:29:27 +0100134define gb_ExternalProject__use_mdds_headers
135$(call gb_ExternalProject_use_external_project,$(1),mdds)
136
137endef
138
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200139define gb_LinkTarget__use_mdds_headers
140$(call gb_LinkTarget_use_unpacked,$(1),mdds)
141$(call gb_LinkTarget_set_include,$(1),\
David Tardon93aff252014-03-03 16:23:27 +0100142 $(MDDS_CFLAGS) \
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200143 $$(INCLUDE) \
144)
145
146endef
147
Michael Stahle3abec32014-02-11 15:57:18 +0100148endif # SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200149
Michael Stahlff69e722014-02-11 19:08:10 +0100150ifneq ($(SYSTEM_GLM),)
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000151
152gb_LinkTarget__use_glm_headers :=
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200153gb_ExternalProject__use_glm_headers :=
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000154
155else
156
157define gb_LinkTarget__use_glm_headers
158$(call gb_LinkTarget_use_unpacked,$(1),glm)
159$(call gb_LinkTarget_set_include,$(1),\
160 -I$(call gb_UnpackedTarball_get_dir,glm) \
161 $$(INCLUDE) \
162)
163
164endef
165
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200166define gb_ExternalProject__use_glm_headers
167$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
168
169endef
170
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000171endif
172
Michael Stahl674e7912013-05-06 20:23:49 +0200173ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100174
175define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200176$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosnya62e7732013-11-04 18:33:52 +0200177 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
Michael Stahl72279ea2013-05-06 20:14:35 +0200178 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100179)
180
181endef
182
183else
184
185gb_LinkTarget__use_sane_headers :=
186
187endif
188
Michael Stahl8555b372014-02-11 19:28:33 +0100189ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100190
191gb_LinkTarget__use_bluez_bluetooth_headers :=
192
193else # !SYSTEM_BLUEZ
194
195define gb_LinkTarget__use_bluez_bluetooth_headers
196$(call gb_LinkTarget_set_include,$(1),\
197 -I$(SRCDIR)/external/bluez_bluetooth/inc \
198 $$(INCLUDE) \
199)
200
201endef
202
203endif # SYSTEM_BLUEZ
204
Matúš Kukan8e535df2012-04-07 13:59:33 +0200205# External libraries
206
Michael Stahle3abec32014-02-11 15:57:18 +0100207ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200208
209define gb_LinkTarget__use_cppunit
210$(call gb_LinkTarget_set_include,$(1),\
211 $$(INCLUDE) \
212 $(CPPUNIT_CFLAGS) \
213)
214
215$(call gb_LinkTarget_add_libs,$(1),\
216 $(CPPUNIT_LIBS) \
217)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100218
David Tardon785e1d92011-07-25 10:34:22 +0200219endef
220
Michael Stahle3abec32014-02-11 15:57:18 +0100221else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200222
David Tardon785e1d92011-07-25 10:34:22 +0200223define gb_LinkTarget__use_cppunit
Michael Stahl32a001d2013-10-23 23:41:58 +0200224$(call gb_LinkTarget_use_external_project,$(1),cppunit)
Peter Foley143835b2012-11-25 16:37:40 -0500225
Peter Foley143835b2012-11-25 16:37:40 -0500226$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200227 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500228 $$(INCLUDE) \
229)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100230
Michael Stahl77fe50b2013-10-23 23:35:16 +0200231ifeq ($(COM),MSC)
232$(call gb_LinkTarget_add_libs,$(1),\
233 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
234)
235else
236$(call gb_LinkTarget_add_libs,$(1),\
237 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
238)
239endif
240
David Tardon785e1d92011-07-25 10:34:22 +0200241endef
242
Michael Stahle3abec32014-02-11 15:57:18 +0100243endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000244
Tor Lillqvist65b27f82014-04-08 13:36:30 +0300245ifneq ($(SYSTEM_GLEW),)
David Tardon864f7752014-02-09 21:19:07 +0100246
247define gb_LinkTarget__use_glew
248$(call gb_LinkTarget_set_include,$(1),\
249 $$(INCLUDE) \
250 $(GLEW_CFLAGS) \
251)
252$(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
253
254endef
255
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200256gb_ExternalProject__use_glew :=
257
Michael Stahle3abec32014-02-11 15:57:18 +0100258else # !SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100259
Michael Stahl0c94f232014-03-18 17:17:04 +0100260$(eval $(call gb_Helper_register_packages_for_install,ooo,\
261 glew \
262))
263
David Tardon864f7752014-02-09 21:19:07 +0100264define gb_LinkTarget__use_glew
Matúš Kukan532e8cc2014-04-08 10:30:47 +0200265$(call gb_LinkTarget_use_package,$(1),glew)
David Tardon864f7752014-02-09 21:19:07 +0100266$(call gb_LinkTarget_set_include,$(1),\
267 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
Stephan Bergmannfa50ede2015-03-02 20:22:42 +0100268 -DGLEW_NO_GLU \
David Tardon864f7752014-02-09 21:19:07 +0100269 $$(INCLUDE) \
270)
271
272ifeq ($(COM),MSC)
273$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +0100274 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/$(wnt_arch_subdir_mandatory)/glew32d.lib,Release/$(wnt_arch_subdir_mandatory)/glew32.lib) \
David Tardon864f7752014-02-09 21:19:07 +0100275)
276else
277$(call gb_LinkTarget_add_libs,$(1),\
278 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
279)
280endif
281
282endef
283
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200284define gb_ExternalProject__use_glew
285$(call gb_ExternalProject_use_external_project,$(1),glew)
286
287endef
288
Michael Stahle3abec32014-02-11 15:57:18 +0100289endif # SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100290
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200291define gb_LinkTarget__use_iconv
292$(call gb_LinkTarget_add_libs,$(1),-liconv)
293
294endef
295
Michael Stahl379f9782014-02-11 16:49:19 +0100296ifneq ($(SYSTEM_MARIADB),)
Peter Foleyc322d502013-01-23 16:29:08 -0500297
David Tardon217eae42013-11-05 06:49:33 +0100298define gb_LinkTarget__use_mariadb
299$(call gb_LinkTarget_set_include,$(1),\
300 $$(INCLUDE) \
301 $(MARIADB_CFLAGS) \
302)
303$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
304
305endef
306gb_ExternalProject__use_mariadb :=
307
308else # !SYSTEM_MARIADB
309
310define gb_LinkTarget__use_mariadb
311$(call gb_LinkTarget_set_include,$(1),\
312 $$(INCLUDE) \
313 $(MARIADB_CFLAGS) \
314)
315$(call gb_LinkTarget_use_static_libraries,$(1),\
316 mariadblib \
317)
318
319endef
320define gb_ExternalProject__use_mariadb
321$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
322
323endef
324
325endif # SYSTEM_MARIADB
326
327
Michael Stahl379f9782014-02-11 16:49:19 +0100328ifneq ($(SYSTEM_MARIADB),)
David Tardon217eae42013-11-05 06:49:33 +0100329
Peter Foleyc322d502013-01-23 16:29:08 -0500330define gb_LinkTarget__use_mysql
331
332$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100333 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500334)
335
336$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100337 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500338)
339
340$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100341 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500342 $$(INCLUDE) \
343)
344endef
345
346else
347
348define gb_LinkTarget__use_mysql
349
350$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500351 $$(INCLUDE) \
352)
353
354endef
355
356endif
357
Michael Stahl0443d0a2014-02-11 16:57:35 +0100358ifneq ($(SYSTEM_MYSQL_CPPCONN),)
Peter Foleyc322d502013-01-23 16:29:08 -0500359
360define gb_LinkTarget__use_mysqlcppconn
361$(call gb_LinkTarget_add_libs,$(1),\
362 -lmysqlcppconn \
363)
364
365$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500366 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500367)
368endef
369
370else
371
Michael Stahl5f356bd2013-01-28 23:53:30 +0100372$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
Peter Foleyc322d502013-01-23 16:29:08 -0500373 mysqlcppconn \
374))
375
Michael Stahl5f356bd2013-01-28 23:53:30 +0100376# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500377define gb_LinkTarget__use_mysqlcppconn
378
Michael Stahl5f356bd2013-01-28 23:53:30 +0100379$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
380
Peter Foleyb02d7992013-01-24 15:43:52 -0500381$(call gb_LinkTarget_add_defs,$(1),\
382 -DCPPCONN_LIB_BUILD \
383)
384
Peter Foleyc322d502013-01-23 16:29:08 -0500385$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200386 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
387 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500388 $$(INCLUDE) \
389)
390
391endef
392
393endif
394
Michael Stahl04ff5352014-02-11 16:21:04 +0100395ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000396
397define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000398$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000399 -DSYSTEM_ZLIB \
400)
401$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100402
Michael Stahlc74af0d2011-04-01 20:49:35 +0000403endef
404
David Tardoncb276232012-10-26 15:33:26 +0200405# nothing on system
406define gb_LinkTarget__use_zlib_x64
407
408endef
409
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100410gb_ExternalProject__use_zlib :=
411
Michael Stahlc74af0d2011-04-01 20:49:35 +0000412else # !SYSTEM_ZLIB
413
David Tardoncb276232012-10-26 15:33:26 +0200414define gb_LinkTarget__use_zlib_multiarch
415$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
416
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200417$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200418 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200419 $$(INCLUDE) \
420)
David Tardoncb276232012-10-26 15:33:26 +0200421
Michael Stahlc923f7d2012-04-07 23:22:08 +0200422$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200423 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000424)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100425
Michael Stahlc74af0d2011-04-01 20:49:35 +0000426endef
427
David Tardoncb276232012-10-26 15:33:26 +0200428define gb_LinkTarget__use_zlib
429$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
430
431endef
432
433define gb_LinkTarget__use_zlib_x64
434$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
435
436endef
437
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100438define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100439$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
440
441endef
442
Michael Stahlc74af0d2011-04-01 20:49:35 +0000443endif # SYSTEM_ZLIB
444
445
Michael Stahl46648152014-02-11 16:33:18 +0100446ifneq ($(SYSTEM_JPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000447
448define gb_LinkTarget__use_jpeg
449$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
450$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000451 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000452)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100453
Michael Stahlc74af0d2011-04-01 20:49:35 +0000454endef
455
Stephan Bergmann2d6ee4e2014-12-03 08:26:17 +0100456else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100457
458define gb_LinkTarget__use_jpeg
459$(call gb_LinkTarget_set_include,$(1),\
460 -I$(call gb_UnpackedTarball_get_dir,jpeg-turbo) \
461 $$(INCLUDE) \
462)
463$(call gb_LinkTarget_add_libs,$(1),\
464 $(call gb_UnpackedTarball_get_dir,jpeg-turbo)/.libs/libjpeg$(gb_StaticLibrary_PLAINEXT) \
465)
466$(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo)
467
468endef
469
Michael Stahlc74af0d2011-04-01 20:49:35 +0000470else # !SYSTEM_JPEG
471
Michael Stahlc74af0d2011-04-01 20:49:35 +0000472define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100473$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlb65859c2013-05-08 17:30:40 +0200474 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100475 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100476)
477
Michael Stahlc923f7d2012-04-07 23:22:08 +0200478$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200479 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000480)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100481
Michael Stahlc74af0d2011-04-01 20:49:35 +0000482endef
483
484endif # SYSTEM_JPEG
485
Michael Stahlab586f12014-02-11 19:25:30 +0100486ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400487
488define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100489$(call gb_LinkTarget_set_include,$(1),\
490 $$(INCLUDE) \
491 $(MYTHES_CFLAGS) \
492)
493$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
494
Peter Foley1d1bab42012-10-28 12:00:06 -0400495endef
496
497else # !SYSTEM_MYTHES
498
Peter Foley1d1bab42012-10-28 12:00:06 -0400499define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200500$(call gb_LinkTarget_set_include,$(1),\
501 -I$(call gb_UnpackedTarball_get_dir,mythes) \
502 $$(INCLUDE) \
503)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200504
505ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100506$(call gb_LinkTarget_use_static_libraries,$(1),\
507 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400508)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200509else
510$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
511$(call gb_LinkTarget_use_external_project,$(1),mythes)
512endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100513
Peter Foley1d1bab42012-10-28 12:00:06 -0400514endef
515
516endif # SYSTEM_MYTHES
517
Michael Stahlc74af0d2011-04-01 20:49:35 +0000518
Michael Stahl46648152014-02-11 16:33:18 +0100519ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000520
David Tardon51149802013-04-09 09:22:20 +0200521define gb_LinkTarget__use_expat_impl
522$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000523
Michael Stahla88ef232011-04-13 16:11:41 +0000524$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000525 -DSYSTEM_EXPAT \
526)
527
528$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100529
Michael Stahlc74af0d2011-04-01 20:49:35 +0000530endef
531
Michael Stahl77289672012-11-17 00:36:29 +0100532gb_ExternalProject__use_expat :=
533
Michael Stahlc74af0d2011-04-01 20:49:35 +0000534else # !SYSTEM_EXPAT
535
David Tardon51149802013-04-09 09:22:20 +0200536define gb_LinkTarget__use_expat_impl
537$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000538
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700539$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200540 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700541 $$(INCLUDE) \
542)
543
Michael Stahlc923f7d2012-04-07 23:22:08 +0200544$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000545 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000546)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100547
Michael Stahlc74af0d2011-04-01 20:49:35 +0000548endef
549
Michael Stahl77289672012-11-17 00:36:29 +0100550define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100551$(call gb_ExternalProject_use_static_libraries,$(1),expat)
552
553endef
554
Michael Stahlc74af0d2011-04-01 20:49:35 +0000555endif # SYSTEM_EXPAT
556
David Tardon51149802013-04-09 09:22:20 +0200557define gb_LinkTarget__use_expat
558$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100559
Michael Stahlc74af0d2011-04-01 20:49:35 +0000560endef
561
David Tardon51149802013-04-09 09:22:20 +0200562define gb_LinkTarget__use_expat_x64
563$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100564
Michael Stahlc74af0d2011-04-01 20:49:35 +0000565endef
566
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100567ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400568
569define gb_LinkTarget__use_hyphen
570$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
571
572endef
573
574else # !SYSTEM_HYPH
575
Peter Foleydd584cb2012-11-03 13:54:46 -0400576define gb_LinkTarget__use_hyphen
577$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
578$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200579 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400580 $$(INCLUDE) \
581)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200582
583ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400584$(call gb_LinkTarget_use_static_libraries,$(1),\
585 hyphen \
586)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200587else
588$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
589$(call gb_LinkTarget_use_external_project,$(1),hyphen)
590endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400591
592endef
593
594endif # SYSTEM_HYPH
595
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100596ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100597
598define gb_LinkTarget__use_hunspell
599$(call gb_LinkTarget_set_include,$(1),\
600 $$(INCLUDE) \
601 $(HUNSPELL_CFLAGS) \
602)
603$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
604
605endef
606
Michael Stahl2f6261f2013-09-19 19:28:36 +0200607gb_ExternalProject__use_hunspell :=
608
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100609else # !SYSTEM_HUNSPELL
610
611define gb_LinkTarget__use_hunspell
612$(call gb_LinkTarget_add_defs,$(1),\
613 -DHUNSPELL_STATIC \
614)
Matúš Kukan7a030392012-10-29 23:29:37 +0100615$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100616$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200617 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100618 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100619)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200620
621ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200622$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100623 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100624)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200625else
626$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
627$(call gb_LinkTarget_use_external_project,$(1),hunspell)
628endif
629
630endef
631
632define gb_ExternalProject__use_hunspell
633$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100634
635endef
636
637endif # SYSTEM_HUNSPELL
638
639
Michael Stahladddbbc2014-02-11 18:40:09 +0100640ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200641
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200642define gb_LinkTarget__use_boostdatetime
David Tardon0f6919c2012-06-06 17:04:01 +0200643$(call gb_LinkTarget_set_include,$(1),\
644 $$(INCLUDE) \
645 $(BOOST_CPPFLAGS) \
646)
647
648$(call gb_LinkTarget_add_ldflags,$(1),\
649 $(BOOST_LDFLAGS) \
650)
651
652$(call gb_LinkTarget_add_libs,$(1),\
653 $(BOOST_DATE_TIME_LIB) \
654)
655
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200656endef
657
Markus Mohrhard36788e92014-01-08 13:17:28 +0100658define gb_LinkTarget__use_boost_iostreams
659$(call gb_LinkTarget_set_include,$(1),\
660 $$(INCLUDE) \
661 $(BOOST_CPPFLAGS) \
662)
663
664$(call gb_LinkTarget_add_ldflags,$(1),\
665 $(BOOST_LDFLAGS) \
666)
667
668$(call gb_LinkTarget_add_libs,$(1),\
669 $(BOOST_IOSTREAMS_LIB) \
670)
671
672endef
673
David Tardon6d9de6b2014-03-03 20:39:13 +0100674gb_ExternalProject__use_boost_iostreams :=
675
Markus Mohrhard36788e92014-01-08 13:17:28 +0100676define gb_LinkTarget__use_boost_system
Tor Lillqvist503b2482013-05-22 19:50:22 +0300677$(call gb_LinkTarget_set_include,$(1),\
678 $$(INCLUDE) \
679 $(BOOST_CPPFLAGS) \
680)
681
682$(call gb_LinkTarget_add_ldflags,$(1),\
683 $(BOOST_LDFLAGS) \
684)
685
686$(call gb_LinkTarget_add_libs,$(1),\
687 $(BOOST_SYSTEM_LIB) \
688)
689
690endef
691
Markus Mohrhard36788e92014-01-08 13:17:28 +0100692gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300693
Stephan Bergmann93208022013-02-16 22:56:19 +0100694define gb_LinkTarget__use_boost_headers
695$(call gb_LinkTarget_set_include,$(1),\
696 $$(INCLUDE) \
697 $(BOOST_CPPFLAGS) \
698)
699
700endef
701
Peter Foleycdb6eca2012-11-10 08:56:12 -0500702gb_ExternalProject__use_boost_headers:=
703
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200704else # !SYSTEM_BOOST
705
Kohei Yoshida0454b732012-09-06 15:10:19 -0400706ifeq ($(OS),WNT)
Michael Stahl7f2e1682012-09-06 20:22:11 +0200707define gb_LinkTarget__use_boostthread
708$(call gb_LinkTarget_add_defs,$(1),\
709 -DBOOST_ALL_NO_LIB \
710)
711
712$(call gb_LinkTarget_use_static_libraries,$(1),\
713 boostthread \
714)
715endef
Matúš Kukanddb5edc2013-05-30 14:39:38 +0200716endif
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200717
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200718define gb_LinkTarget__use_boostdatetime
Michael Stahl7f2e1682012-09-06 20:22:11 +0200719$(call gb_LinkTarget_add_defs,$(1),\
720 -DBOOST_ALL_NO_LIB \
721)
722
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200723$(call gb_LinkTarget_use_static_libraries,$(1),\
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200724 boostdatetime \
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200725)
726
727endef
728
Markus Mohrhard36788e92014-01-08 13:17:28 +0100729define gb_LinkTarget__use_boost_iostreams
Tor Lillqvist503b2482013-05-22 19:50:22 +0300730$(call gb_LinkTarget_add_defs,$(1),\
731 -DBOOST_ALL_NO_LIB \
732)
733
734$(call gb_LinkTarget_use_static_libraries,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +0100735 boost_iostreams \
Tor Lillqvist503b2482013-05-22 19:50:22 +0300736)
737
738endef
739
Markus Mohrhard36788e92014-01-08 13:17:28 +0100740define gb_ExternalProject__use_boost_iostreams
741$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
742endef
743
744define gb_LinkTarget__use_boost_system
745$(call gb_LinkTarget_add_defs,$(1),\
746 -DBOOST_ALL_NO_LIB \
747)
748
749$(call gb_LinkTarget_use_static_libraries,$(1),\
750 boost_system \
751)
752
753endef
754
755define gb_ExternalProject__use_boost_system
756$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300757endef
758
Peter Foleye1f742a2012-11-12 18:37:10 -0500759define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100760$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100761$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200762 -I$(call gb_UnpackedTarball_get_dir,boost) \
Michael Stahla53586f2013-01-26 21:19:13 +0100763 $$(INCLUDE) \
764)
Peter Foleye1f742a2012-11-12 18:37:10 -0500765
766endef
767
Peter Foleycdb6eca2012-11-10 08:56:12 -0500768define gb_ExternalProject__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100769$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500770
771endef
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200772endif # SYSTEM_BOOST
773
774
Michael Stahle3abec32014-02-11 15:57:18 +0100775ifneq ($(SYSTEM_CMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100776
777define gb_LinkTarget__use_cmis
778$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100779 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200780 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100781)
Matúš Kukan707194e2012-09-06 18:19:34 +0200782$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100783
784endef
785
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100786else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100787
Matúš Kukan464b4332012-01-15 02:12:49 +0100788define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200789$(call gb_LinkTarget_set_include,$(1),\
790 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
791 $$(INCLUDE) \
792)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200793$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100794 cmislib \
795)
796
797endef
798
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100799endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100800
David Tardon32cd12c2014-04-26 19:46:40 +0200801ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200802
Peter Foleye5ccda42012-12-25 11:23:58 -0500803ifeq ($(OS)$(COM),WNTGCC)
804
805define gb_LinkTarget__use_jawt
David Tardon943dedc2014-04-26 15:50:10 +0200806$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
807
808$(call gb_LinkTarget_add_ldflags,$(1),\
809 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
810)
811
812$(call gb_LinkTarget_add_libs,$(1),\
David Tardon2a71e152014-04-26 16:08:07 +0200813 $(JAWTLIB) \
Peter Foleye5ccda42012-12-25 11:23:58 -0500814)
815
816endef
817
818else # $(OS)$(COM) != WNTGCC
819
David Tardon2a71e152014-04-26 16:08:07 +0200820define gb_LinkTarget__use_jawt
821$(call gb_LinkTarget_add_libs,$(1),\
822 $(JAWTLIB) \
823)
824
825endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500826
827endif # $(OS)$(COM) = WNTGCC
828
David Tardon2a71e152014-04-26 16:08:07 +0200829else # !ENABLE_JAVA
830
831gb_LinkTarget__use_jawt :=
832
833endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100834
Michael Stahl23647592014-02-11 19:04:20 +0100835ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100836
837define gb_LinkTarget__use_libatomic_ops
838$(call gb_LinkTarget_set_include,$(1),\
839 $$(INCLUDE) \
840 $(LIBATOMIC_OPS_CFLAGS) \
841)
842$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
843
844endef
845gb_ExternalProject__use_libatomic_ops :=
846
847else # !SYSTEM_LIBATOMIC_OPS
848
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100849define gb_LinkTarget__use_libatomic_ops
850$(call gb_LinkTarget_set_include,$(1),\
851$(LIBATOMIC_OPS_CFLAGS) \
852 $$(INCLUDE) \
853 $(LIBATOMIC_OPS_CFLAGS) \
854)
Michael Stahlb3085262013-10-24 12:22:58 +0200855$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100856 libatomic_ops \
857)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100858
Michael Stahlb3085262013-10-24 12:22:58 +0200859$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100860 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100861)
862
863endef
864
865define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200866$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100867
868endef
869
870endif # SYSTEM_LIBATOMIC_OPS
871
872
Michael Stahle3abec32014-02-11 15:57:18 +0100873ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100874
875define gb_LinkTarget__use_libexttextcat
876$(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 $(LIBEXTTEXTCAT_CFLAGS) \
879)
Peter Foley31219f02012-11-09 17:25:56 -0500880$(call gb_LinkTarget_add_defs,$(1),\
881 -DSYSTEM_LIBEXTTEXTCAT \
882)
Matúš Kukanbd030302011-12-03 15:06:52 +0100883$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
884
885endef
886
887else # !SYSTEM_LIBEXTTEXTCAT
888
Matúš Kukanbd030302011-12-03 15:06:52 +0100889define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500890$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200891 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500892 $$(INCLUDE) \
893)
Matúš Kukanbd030302011-12-03 15:06:52 +0100894
Michael Stahl2f6261f2013-09-19 19:28:36 +0200895ifeq ($(COM),MSC)
896$(call gb_LinkTarget_use_static_libraries,$(1),\
897 exttextcat \
898)
899else
900$(call gb_LinkTarget_add_libs,$(1),\
901 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
902)
David Tardon523a3042013-10-12 18:22:55 +0200903$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200904endif
905
906
Matúš Kukanbd030302011-12-03 15:06:52 +0100907endef
908
909endif # SYSTEM_LIBEXTTEXTCAT
910
911
Michael Stahl379f9782014-02-11 16:49:19 +0100912ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000913
914define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000915$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000916 -DSYSTEM_LIBXML \
917)
918$(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
920 $(LIBXML_CFLAGS) \
921)
922$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100923
Michael Stahlc74af0d2011-04-01 20:49:35 +0000924endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500925gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000926
927else # !SYSTEM_LIBXML
928
Michael Stahl64ea9942014-03-14 11:48:24 +0100929$(eval $(call gb_Helper_register_packages_for_install,ure,\
930 xml2 \
931))
932
Michael Stahlc74af0d2011-04-01 20:49:35 +0000933define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500934$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500935$(call gb_LinkTarget_set_include,$(1),\
936 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200937 $(LIBXML_CFLAGS) \
938)
939
940$(call gb_LinkTarget_add_libs,$(1),\
941 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500942)
943
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200944ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200945$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200946endif
947
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500948endef
949define gb_ExternalProject__use_libxml2
950$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100951
David Tardon7515b1a2014-07-17 17:27:05 +0200952ifeq ($(COM),MSC)
953$(call gb_ExternalProject_use_external_project,$(1),icu)
954endif
955
Michael Stahlc74af0d2011-04-01 20:49:35 +0000956endef
957
958endif # SYSTEM_LIBXML
959
960
Michael Stahle3abec32014-02-11 15:57:18 +0100961ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000962
963define gb_LinkTarget__use_libxslt
964$(call gb_LinkTarget_set_include,$(1),\
965 $$(INCLUDE) \
966 $(LIBXSLT_CFLAGS) \
967)
968$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100969
Michael Stahlc74af0d2011-04-01 20:49:35 +0000970endef
971
David Tardonab03e872012-08-15 07:20:13 +0200972define gb_LinkTarget__use_libexslt
973$(call gb_LinkTarget_set_include,$(1),\
974 $$(INCLUDE) \
975 $(LIBEXSLT_CFLAGS) \
976)
977
978$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
979
980endef
981
Michael Stahlc74af0d2011-04-01 20:49:35 +0000982else # !SYSTEM_LIBXSLT
983
Michael Stahl32a617d2014-02-17 11:23:19 +0100984$(eval $(call gb_Helper_register_packages_for_install,ooo,\
985 xslt \
986))
987
Michael Stahlc74af0d2011-04-01 20:49:35 +0000988define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500989$(call gb_LinkTarget_use_package,$(1),xslt)
990$(call gb_LinkTarget_set_include,$(1),\
991 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200992 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500993)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200994
995ifeq ($(COM),MSC)
996$(call gb_LinkTarget_add_libs,$(1),\
997 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000998)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200999else
1000$(call gb_LinkTarget_add_libs,$(1),\
1001 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
1002)
1003endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001004
Michael Stahlc74af0d2011-04-01 20:49:35 +00001005endef
1006
David Tardonab03e872012-08-15 07:20:13 +02001007define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -05001008$(call gb_LinkTarget_use_package,$(1),xslt)
1009$(call gb_LinkTarget_set_include,$(1),\
1010 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +02001011 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -05001012)
1013
Michael Stahlc03ff5e2013-10-22 18:02:28 +02001014ifeq ($(COM),MSC)
1015$(call gb_LinkTarget_add_libs,$(1),\
1016 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +02001017)
Michael Stahlc03ff5e2013-10-22 18:02:28 +02001018else
1019$(call gb_LinkTarget_add_libs,$(1),\
1020 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
1021)
1022endif
David Tardonab03e872012-08-15 07:20:13 +02001023
1024endef
1025
Michael Stahlc74af0d2011-04-01 20:49:35 +00001026endif # SYSTEM_LIBXSLT
1027
Norbert Thiebaud587d9692013-08-29 10:38:00 -05001028ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001029
Michael Stahl49dde4c2014-02-11 19:42:28 +01001030ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +02001031
1032define gb_LinkTarget__use_liblangtag
1033$(call gb_LinkTarget_set_include,$(1),\
1034 $$(INCLUDE) \
1035 $(LIBLANGTAG_CFLAGS) \
1036)
1037
1038$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1039
1040endef
1041
1042else # !SYSTEM_LIBLANGTAG
1043
Michael Stahl01adcd82014-03-18 17:38:06 +01001044$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1045 liblangtag_data \
1046))
1047
Eike Rathkea774a482012-08-06 19:22:43 +02001048define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001049$(call gb_LinkTarget_use_unpacked,$(1),langtag)
1050$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001051 -I$(call gb_UnpackedTarball_get_dir,langtag) \
Peter Foley782151a2012-11-11 16:02:36 -05001052 $$(INCLUDE) \
1053)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001054$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1055$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001056
1057endef
1058
1059endif # SYSTEM_LIBLANGTAG
1060
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001061else
1062
1063gb_LinkTarget__use_liblangtag :=
1064
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001065endif # ENABLE_LIBLANGTAG
1066
Matúš Kukandcae0502014-02-25 21:47:33 +01001067gb_ExternalProject__use_apr :=
1068
1069ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001070
1071define gb_LinkTarget__use_apr
1072$(call gb_LinkTarget_set_include,$(1),\
1073 $$(INCLUDE) \
1074 $(APR_CFLAGS) \
1075)
1076$(call gb_LinkTarget_add_libs,$(1),\
1077 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001078 $(if $(filter $(OS),LINUX),-lpthread) \
1079 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001080)
1081
1082ifeq ($(SYSTEM_APR),)
1083$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1084 mswsock \
1085 rpcrt4 \
1086 shell32 \
1087)
1088$(call gb_LinkTarget_add_defs,$(1),\
1089 -DAPR_DECLARE_STATIC \
1090 -DAPU_DECLARE_STATIC \
1091)
1092$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1093endif
1094
1095endef
1096
1097define gb_ExternalProject__use_apr
1098ifeq ($(SYSTEM_APR),)
1099$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1100endif
1101
1102endef
1103
1104define gb_LinkTarget__use_serf
1105$(call gb_LinkTarget_set_include,$(1),\
1106 $(SERF_CFLAGS) \
1107 $$(INCLUDE) \
1108)
1109$(call gb_LinkTarget_add_libs,$(1),\
1110 $(SERF_LIBS) \
1111)
1112
1113ifeq ($(SYSTEM_SERF),)
1114$(call gb_LinkTarget_use_external_project,$(1),serf)
1115endif
1116
1117endef
1118
Matúš Kukandcae0502014-02-25 21:47:33 +01001119else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001120
Michael Stahle3abec32014-02-11 15:57:18 +01001121ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001122
1123define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001124$(call gb_LinkTarget_add_defs,$(1),\
1125 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001126 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001127)
Matúš Kukan464b4332012-01-15 02:12:49 +01001128$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001129 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001130 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001131)
1132
1133$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1134
1135endef
1136
1137else # !SYSTEM_NEON
1138
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001139$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001140 neon \
1141))
1142
1143define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001144$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001145$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001146 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001147 $$(INCLUDE) \
1148)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001149$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001150 neon \
1151)
1152
1153endef
1154
1155endif # SYSTEM_NEON
1156
Matúš Kukandcae0502014-02-25 21:47:33 +01001157endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001158
Michael Stahle3abec32014-02-11 15:57:18 +01001159ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001160
1161define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001162$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001163 -DSYSTEM_REDLAND \
1164)
1165$(call gb_LinkTarget_set_include,$(1),\
1166 $$(INCLUDE) \
1167 $(REDLAND_CFLAGS) \
1168)
1169$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001170
Michael Stahlc74af0d2011-04-01 20:49:35 +00001171endef
1172
Peter Foley18bd1e72012-12-27 18:04:21 -05001173gb_LinkTarget__use_redland_headers:=
1174
1175gb_LinkTarget__use_raptor_headers:=
1176
1177gb_LinkTarget__use_rasqal_headers:=
1178
Michael Stahlc74af0d2011-04-01 20:49:35 +00001179else # !SYSTEM_REDLAND
1180
Peter Foley18bd1e72012-12-27 18:04:21 -05001181define gb_LinkTarget__use_redland_headers
1182$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001183 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001184 $$(INCLUDE) \
1185)
1186
1187endef
1188
1189define gb_LinkTarget__use_raptor_headers
1190$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001191 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001192 $$(INCLUDE) \
1193)
1194
1195endef
1196
1197define gb_LinkTarget__use_rasqal_headers
1198$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001199 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001200 $$(INCLUDE) \
1201)
1202
1203endef
1204
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001205ifneq ($(OS),ANDROID)
1206
Michael Stahl5f9cda22013-11-01 15:43:47 +01001207ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001208$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001209 raptor2 \
1210 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001211 rdf \
1212))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001213else
1214$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1215 raptor \
1216 rasqal \
1217 redland \
1218))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001219endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001220
1221define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001222ifeq ($(COM),MSC)
1223$(call gb_LinkTarget_use_libraries,$(1),\
1224 raptor2 \
1225 rdf \
1226)
1227else
Matúš Kukan85d1e392013-12-14 11:17:30 +01001228$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1229
Michael Stahl2793c542013-10-23 21:18:24 +02001230$(call gb_LinkTarget_add_libs,$(1),\
1231 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1232 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001233)
Michael Stahl831aaef2013-10-24 01:09:35 +02001234endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001235
Michael Stahlc74af0d2011-04-01 20:49:35 +00001236endef
1237
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001238else # ANDROID
1239
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001240define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001241$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001242
1243endef
1244
1245endif # ANDROID
1246
Michael Stahlc74af0d2011-04-01 20:49:35 +00001247endif # SYSTEM_REDLAND
1248
1249
Michael Stahl32a617d2014-02-17 11:23:19 +01001250ifneq ($(filter unx,$(GUIBASE))$(ENABLE_CAIRO_CANVAS),) # or
1251
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001252ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001253
Michael Stahlc74af0d2011-04-01 20:49:35 +00001254define gb_LinkTarget__use_cairo
1255$(call gb_LinkTarget_set_include,$(1),\
1256 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001257 $(CAIRO_CFLAGS) \
1258)
David Tardon962771f2013-05-24 14:35:18 +02001259$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001260$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001261
Michael Stahlc74af0d2011-04-01 20:49:35 +00001262endef
1263
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001264else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001265
Michael Stahl32a617d2014-02-17 11:23:19 +01001266$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1267 cairo \
1268 $(if $(filter $(OS),WNT),,pixman) \
1269))
1270
Michael Stahlc74af0d2011-04-01 20:49:35 +00001271define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001272$(call gb_LinkTarget_use_package,$(1),cairo)
1273$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001274$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001275$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001276 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1277 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001278 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001279)
Michael Stahld89f48b2013-10-23 21:27:05 +02001280$(call gb_LinkTarget_add_libs,$(1),\
1281 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001282 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001283 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001284 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001285)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001286
Michael Stahlc74af0d2011-04-01 20:49:35 +00001287endef
1288
1289endif # SYSTEM_CAIRO
1290
Michael Stahl32a617d2014-02-17 11:23:19 +01001291endif # CAIRO
1292
Michael Stahl379f9782014-02-11 16:49:19 +01001293ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001294
1295define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001296$(call gb_LinkTarget_set_include,$(1),\
1297 $$(INCLUDE) \
1298 $(FREETYPE_CFLAGS) \
1299)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001300
David Tardon962771f2013-05-24 14:35:18 +02001301endef
1302
1303define gb_LinkTarget__use_freetype
1304$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001305$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1306
1307endef
1308
Michael Stahle568d2a2013-09-30 14:10:22 +02001309gb_ExternalProject__use_freetype :=
1310
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02001311else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001312
1313define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001314$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001315$(call gb_LinkTarget_set_include,$(1),\
1316 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1317 $$(INCLUDE) \
1318)
1319
David Tardon61695f12013-05-24 17:15:20 +02001320endef
1321
David Tardon962771f2013-05-24 14:35:18 +02001322define gb_LinkTarget__use_freetype
1323$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Jan Holesovskyfe5dbe32014-04-22 00:41:57 +02001324$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
David Tardon962771f2013-05-24 14:35:18 +02001325
1326endef
1327
Michael Stahle568d2a2013-09-30 14:10:22 +02001328define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001329$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001330
1331endef
1332
David Tardon962771f2013-05-24 14:35:18 +02001333endif # SYSTEM_FREETYPE
1334
Michael Stahl04ff5352014-02-11 16:21:04 +01001335ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001336
Caolán McNamarab41ae462011-07-25 22:24:27 +01001337define gb_LinkTarget__use_fontconfig
1338$(call gb_LinkTarget_set_include,$(1),\
1339 $$(INCLUDE) \
1340 $(FONTCONFIG_CFLAGS) \
1341)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001342
Caolán McNamarab41ae462011-07-25 22:24:27 +01001343$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1344
1345endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001346
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001347else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001348
David Tardon4eb68422013-05-24 14:16:03 +02001349define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001350$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001351$(call gb_LinkTarget_set_include,$(1),\
1352 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1353 $$(INCLUDE) \
1354)
1355
David Tardon4eb68422013-05-24 14:16:03 +02001356endef
1357
1358endif # SYSTEM_FONTCONFIG
1359
David Tardon026dc562014-05-30 19:50:24 +02001360ifeq ($(ENABLE_GRAPHITE),TRUE)
1361
Michael Stahle3abec32014-02-11 15:57:18 +01001362ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001363
Michael Stahl87e44332011-04-13 16:11:39 +00001364define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001365$(call gb_LinkTarget_set_include,$(1),\
1366 $$(INCLUDE) \
1367 $(GRAPHITE_CFLAGS) \
1368)
1369$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001370
Michael Stahl87e44332011-04-13 16:11:39 +00001371endef
1372
Michael Stahle3abec32014-02-11 15:57:18 +01001373else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001374
Michael Stahl87e44332011-04-13 16:11:39 +00001375define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001376$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001377$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001378 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001379 $$(INCLUDE) \
1380)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001381$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001382 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001383)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001384
Michael Stahl87e44332011-04-13 16:11:39 +00001385endef
1386
1387endif # SYSTEM_GRAPHITE
1388
David Tardon026dc562014-05-30 19:50:24 +02001389else # !ENABLE_GRAPHITE
1390
1391gb_LinkTarget__use_graphite :=
1392
1393endif # ENABLE_GRAPHITE
1394
Michael Stahl187194b2014-02-11 19:17:42 +01001395ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001396
Peter Foleyb92a0d92012-12-25 17:39:43 -05001397gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001398gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001399
Matúš Kukan6fad1752011-08-11 12:42:39 +02001400define gb_LinkTarget__use_icudata
1401$(call gb_LinkTarget_add_libs,$(1),-licudata)
1402
1403endef
David Tardon1a852392011-07-26 09:58:54 +02001404define gb_LinkTarget__use_icui18n
1405$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001406
David Tardon1a852392011-07-26 09:58:54 +02001407endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001408define gb_LinkTarget__use_icuuc
1409$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001410
Michael Stahlc74af0d2011-04-01 20:49:35 +00001411endef
1412
1413else # !SYSTEM_ICU
1414
Michael Stahl057613c2014-07-24 00:22:51 +02001415$(eval $(call gb_Helper_register_packages_for_install,ure, \
1416 icu_ure \
1417))
1418
Michael Stahle7592692014-03-14 11:23:52 +01001419$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1420 icu \
1421))
1422
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001423ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001424gb_ICU_suffix:=lo
1425else
1426gb_ICU_suffix:=
1427endif
1428
Peter Foleyb92a0d92012-12-25 17:39:43 -05001429define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001430$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001431$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001432 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1433 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1434 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001435 $$(INCLUDE) \
1436)
1437
1438endef
1439
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001440define gb_ExternalProject__use_icu
1441$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001442
1443endef
1444
Peter Foleyf7452122012-11-04 08:46:44 -05001445# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001446define gb_LinkTarget__use_icudata
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001447$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001448
1449ifeq ($(OS),WNT)
1450$(call gb_LinkTarget_add_libs,$(1),\
1451 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001452)
Michael Stahla92f80f2013-10-23 15:00:29 +02001453else
1454$(call gb_LinkTarget_add_libs,$(1),\
1455 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1456)
1457endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001458
1459endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001460
1461define gb_LinkTarget__use_icui18n
1462$(call gb_LinkTarget_use_package,$(1),icu)
1463
1464ifeq ($(OS),WNT)
1465$(call gb_LinkTarget_add_libs,$(1),\
1466 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1467)
1468else
1469$(call gb_LinkTarget_add_libs,$(1),\
1470 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1471)
1472endif
1473
1474endef
1475
Michael Stahlc74af0d2011-04-01 20:49:35 +00001476define gb_LinkTarget__use_icuuc
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001477$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001478
1479ifeq ($(OS),WNT)
1480$(call gb_LinkTarget_add_libs,$(1),\
1481 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001482)
Michael Stahla92f80f2013-10-23 15:00:29 +02001483else
1484$(call gb_LinkTarget_add_libs,$(1),\
1485 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1486)
1487endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001488
Michael Stahlc74af0d2011-04-01 20:49:35 +00001489endef
1490
1491endif # SYSTEM_ICU
1492
Fridrich Štrba9a943e52013-04-23 11:23:17 +02001493ifeq ($(ENABLE_HARFBUZZ),TRUE)
Michael Stahle3abec32014-02-11 15:57:18 +01001494ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001495
1496define gb_LinkTarget__use_harfbuzz
1497$(call gb_LinkTarget_set_include,$(1),\
1498 $$(INCLUDE) \
1499 $(HARFBUZZ_CFLAGS) \
1500)
1501$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1502
1503endef
1504
Michael Stahle3abec32014-02-11 15:57:18 +01001505else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001506
Khaled Hosny7e389f42013-04-20 13:00:56 +02001507define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001508$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001509 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001510 $$(INCLUDE) \
1511)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001512$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1513$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001514
1515endef
1516
1517endif # SYSTEM_HARFBUZZ
1518else # ENABLE_HARFBUZZ != YES
1519
1520gb_LinkTarget__use_harfbuzz :=
1521
1522endif # ENABLE_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001523
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001524ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001525
1526gb_ExternalProject__use_openssl:=
1527gb_LinkTarget__use_openssl_headers:=
1528gb_LinkTarget__use_openssl:=
1529
1530else # !DISABLE_OPENSSL
1531
Michael Stahle3abec32014-02-11 15:57:18 +01001532ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001533
Peter Foley9ddba662012-12-28 11:19:06 -05001534gb_LinkTarget__use_openssl_headers:=
1535gb_ExternalProject__use_openssl:=
1536
Michael Stahl4a8919f2011-04-18 11:13:57 +00001537define gb_LinkTarget__use_openssl
1538$(call gb_LinkTarget_set_include,$(1),\
1539 $$(INCLUDE) \
1540 $(OPENSSL_CFLAGS) \
1541)
1542$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001543
Michael Stahl4a8919f2011-04-18 11:13:57 +00001544endef
1545
1546else # !SYSTEM_OPENSSL
1547
Michael Stahlf921e262014-03-13 19:36:48 +01001548$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1549 openssl \
1550))
1551
Peter Foley9ddba662012-12-28 11:19:06 -05001552define gb_ExternalProject__use_openssl
1553$(call gb_ExternalProject_use_package,$(1),openssl)
1554
1555endef
1556
1557define gb_LinkTarget__use_openssl_headers
1558$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001559 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001560 $$(INCLUDE) \
1561)
1562
1563endef
1564
Michael Stahl4a8919f2011-04-18 11:13:57 +00001565define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001566$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001567ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001568$(call gb_LinkTarget_add_libs,$(1),\
1569 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1570 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001571)
1572else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001573$(call gb_LinkTarget_add_libs,$(1),\
1574 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1575 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001576)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001577$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001578ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001579$(call gb_LinkTarget_add_libs,$(1),\
1580 -lnsl \
1581 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001582)
1583endif
1584endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001585
Michael Stahl4a8919f2011-04-18 11:13:57 +00001586endef
1587
1588endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001589endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001590
Matúš Kukanc4560482011-07-28 01:03:23 +02001591
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001592ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001593
1594define gb_LinkTarget__use_gnutls
1595$(call gb_LinkTarget_set_include,$(1),\
1596 $$(INCLUDE) \
1597 $(GNUTLS_CFLAGS) \
1598)
1599
1600$(call gb_LinkTarget_add_defs,$(1),\
1601 -DDISABLE_OPENSSL \
1602)
1603
1604$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1605
1606endef
1607
1608define gb_LinkTarget__use_libgcrypt
1609$(call gb_LinkTarget_set_include,$(1),\
1610 $$(INCLUDE) \
1611 $(LIBGCRYPT_CFLAGS) \
1612)
1613
1614$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1615
1616endef
1617
1618else # !DISABLE_OPENSSL
1619
1620gb_LinkTarget__use_gnutls:=
1621gb_LinkTarget__use_libgcrypt:=
1622
1623endif # DISABLE_OPENSSL
1624
1625
Michael Stahle3abec32014-02-11 15:57:18 +01001626ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001627
1628define gb_LinkTarget__use_cdr
1629$(call gb_LinkTarget_set_include,$(1),\
1630 $$(INCLUDE) \
1631 $(CDR_CFLAGS) \
1632)
1633$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1634
1635endef
1636
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001637else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001638
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001639define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001640$(call gb_LinkTarget_set_include,$(1),\
1641 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1642 $$(INCLUDE) \
1643)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001644$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001645 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001646)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001647$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001648endef
1649
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001650endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001651
1652
Michael Stahle3abec32014-02-11 15:57:18 +01001653ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001654
1655define gb_LinkTarget__use_ebook
1656$(call gb_LinkTarget_set_include,$(1),\
1657 $$(INCLUDE) \
1658 $(EBOOK_CFLAGS) \
1659)
1660$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1661
1662endef
1663
1664gb_ExternalProject__use_ebook :=
1665
1666else # !SYSTEM_EBOOK
1667
1668define gb_LinkTarget__use_ebook
1669$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001670 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001671 $$(INCLUDE) \
1672)
1673$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001674 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001675)
1676$(call gb_LinkTarget_use_external_project,$(1),libebook)
1677
1678endef
1679
1680define gb_ExternalProject__use_ebook
1681$(call gb_ExternalProject_use_external_project,$(1),libebook)
1682
1683endef
1684
1685endif # SYSTEM_EBOOK
1686
1687
Michael Stahle3abec32014-02-11 15:57:18 +01001688ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001689
1690define gb_LinkTarget__use_etonyek
1691$(call gb_LinkTarget_set_include,$(1),\
1692 $$(INCLUDE) \
1693 $(ETONYEK_CFLAGS) \
1694)
1695$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1696
1697endef
1698
1699gb_ExternalProject__use_etonyek :=
1700
1701else # !SYSTEM_ETONYEK
1702
1703define gb_LinkTarget__use_etonyek
1704$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001705 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon08ca3e42013-10-24 16:46:49 +02001706 $$(INCLUDE) \
1707)
1708$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001709 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon08ca3e42013-10-24 16:46:49 +02001710)
1711$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1712
1713endef
1714
1715define gb_ExternalProject__use_etonyek
1716$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1717
1718endef
1719
1720endif # SYSTEM_ETONYEK
1721
1722
Michael Stahle3abec32014-02-11 15:57:18 +01001723ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001724
1725define gb_LinkTarget__use_freehand
1726$(call gb_LinkTarget_set_include,$(1),\
1727 $$(INCLUDE) \
1728 $(FREEHAND_CFLAGS) \
1729)
1730$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1731
1732endef
1733
1734gb_ExternalProject__use_freehand :=
1735
1736else # !SYSTEM_FREEHAND
1737
1738define gb_LinkTarget__use_freehand
1739$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001740 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001741 $$(INCLUDE) \
1742)
1743$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001744 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001745)
1746$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1747
1748endef
1749
1750define gb_ExternalProject__use_freehand
1751$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1752
1753endef
1754
1755endif # SYSTEM_FREEHAND
1756
1757
Michael Stahle3abec32014-02-11 15:57:18 +01001758ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001759
1760define gb_LinkTarget__use_odfgen
1761$(call gb_LinkTarget_set_include,$(1),\
1762 $$(INCLUDE) \
1763 $(ODFGEN_CFLAGS) \
1764)
1765$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1766
1767endef
1768
1769else # !SYSTEM_ODFGEN
1770
David Tardon36c3f912014-05-24 09:13:33 +02001771ifeq ($(COM),MSC)
1772
1773$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1774 odfgen \
1775))
1776
Fridrich Štrba93848e12013-05-02 20:25:51 +02001777define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001778$(call gb_LinkTarget_set_include,$(1),\
1779 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1780 $$(INCLUDE) \
1781)
David Tardon36c3f912014-05-24 09:13:33 +02001782$(call gb_LinkTarget_use_libraries,$(1),\
1783 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001784)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001785
1786endef
1787
David Tardon36c3f912014-05-24 09:13:33 +02001788else # !MSC
1789
1790$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1791 libodfgen \
1792))
1793
1794define gb_LinkTarget__use_odfgen
1795$(call gb_LinkTarget_use_package,$(1),libodfgen)
1796
1797$(call gb_LinkTarget_set_include,$(1),\
1798 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001799 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001800 $$(INCLUDE) \
1801)
1802$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001803 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001804)
1805
1806endef
1807
1808endif
1809
Fridrich Štrba93848e12013-05-02 20:25:51 +02001810endif # SYSTEM_ODFGEN
1811
1812
David Tardonb421ce72014-05-24 08:39:54 +02001813ifneq ($(SYSTEM_REVENGE),)
1814
1815define gb_LinkTarget__use_revenge
1816$(call gb_LinkTarget_set_include,$(1),\
1817 $$(INCLUDE) \
1818 $(REVENGE_CFLAGS) \
1819)
1820$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1821
1822endef
1823
David Tardon7c9c7792014-05-25 13:06:57 +02001824gb_ExternalProject__use_revenge :=
1825
David Tardonb421ce72014-05-24 08:39:54 +02001826else # !SYSTEM_REVENGE
1827
1828ifeq ($(COM),MSC)
1829
1830$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1831 revenge \
1832))
1833
1834define gb_LinkTarget__use_revenge
1835$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001836 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001837 $$(INCLUDE) \
1838)
1839$(call gb_LinkTarget_use_libraries,$(1),\
1840 revenge \
1841)
1842
1843endef
1844
David Tardon7c9c7792014-05-25 13:06:57 +02001845define gb_ExternalProject__use_revenge
1846$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1847
1848endef
1849
David Tardonb421ce72014-05-24 08:39:54 +02001850else # !MSC
1851
1852$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1853 librevenge \
1854))
1855
1856define gb_LinkTarget__use_revenge
1857$(call gb_LinkTarget_use_package,$(1),librevenge)
1858
1859$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001860 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001861 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001862 $$(INCLUDE) \
1863)
1864$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001865 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001866)
1867endef
1868
David Tardon7c9c7792014-05-25 13:06:57 +02001869define gb_ExternalProject__use_revenge
1870$(call gb_ExternalProject_use_package,$(1),librevenge)
1871
1872endef
1873
David Tardonb421ce72014-05-24 08:39:54 +02001874endif # MSC
1875
1876endif # SYSTEM_REVENGE
1877
1878
Michael Stahle3abec32014-02-11 15:57:18 +01001879ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001880
1881define gb_LinkTarget__use_abw
1882$(call gb_LinkTarget_set_include,$(1),\
1883 $$(INCLUDE) \
1884 $(ABW_CFLAGS) \
1885)
1886$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1887
1888endef
1889gb_ExternalProject__use_abw :=
1890
1891else # !SYSTEM_ABW
1892
1893define gb_LinkTarget__use_abw
1894$(call gb_LinkTarget_set_include,$(1),\
1895 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1896 $$(INCLUDE) \
1897)
1898$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001899 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001900)
1901$(call gb_LinkTarget_use_external_project,$(1),libabw)
1902
1903endef
1904define gb_ExternalProject__use_abw
1905$(call gb_ExternalProject_use_external_project,$(1),libabw)
1906
1907endef
1908
1909endif # SYSTEM_ABW
1910
1911
Michael Stahle3abec32014-02-11 15:57:18 +01001912ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001913
1914define gb_LinkTarget__use_mspub
1915$(call gb_LinkTarget_set_include,$(1),\
1916 $$(INCLUDE) \
1917 $(MSPUB_CFLAGS) \
1918)
1919$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1920
1921endef
1922
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001923else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001924
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001925define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001926$(call gb_LinkTarget_set_include,$(1),\
1927 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1928 $$(INCLUDE) \
1929)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001930$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001931 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001932)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001933$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001934
1935endef
1936
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001937endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001938
1939
David Tardon516fb342014-06-26 21:26:11 +02001940ifneq ($(SYSTEM_PAGEMAKER),)
1941
1942define gb_LinkTarget__use_pagemaker
1943$(call gb_LinkTarget_set_include,$(1),\
1944 $$(INCLUDE) \
1945 $(PAGEMAKER_CFLAGS) \
1946)
1947$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1948
1949endef
1950gb_ExternalProject__use_pagemaker :=
1951
1952else # !SYSTEM_PAGEMAKER
1953
1954define gb_LinkTarget__use_pagemaker
1955$(call gb_LinkTarget_set_include,$(1),\
1956 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1957 $$(INCLUDE) \
1958)
1959$(call gb_LinkTarget_add_libs,$(1),\
1960 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1961)
1962$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1963
1964endef
1965define gb_ExternalProject__use_pagemaker
1966$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1967
1968endef
1969
1970endif # SYSTEM_PAGEMAKER
1971
1972
Michael Stahle3abec32014-02-11 15:57:18 +01001973ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001974
1975define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001976$(call gb_LinkTarget_set_include,$(1),\
1977 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001978 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001979)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001980$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001981
1982endef
1983
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001984else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001985
Matúš Kukanc6a63952011-07-28 17:29:44 +02001986define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02001987$(call gb_LinkTarget_set_include,$(1),\
1988 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1989 $$(INCLUDE) \
1990)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001991$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001992 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01001993)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001994$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001995
1996endef
1997
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001998endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001999
2000
Michael Stahle3abec32014-02-11 15:57:18 +01002001ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002002
2003define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002004$(call gb_LinkTarget_set_include,$(1),\
2005 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002006 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002007)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002008$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002009
2010endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002011gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002012
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002013else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002014
David Tardonc868a0c2014-12-23 18:37:54 +01002015ifeq ($(COM),MSC)
2016
2017$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2018 wpd \
2019))
2020
Fridrich Štrba4425db62012-09-24 13:17:45 +02002021define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002022$(call gb_LinkTarget_set_include,$(1),\
2023 $(WPD_CFLAGS) \
2024 $$(INCLUDE) \
2025)
David Tardonc868a0c2014-12-23 18:37:54 +01002026$(call gb_LinkTarget_use_libraries,$(1),\
2027 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002028)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002029
2030endef
David Tardonc868a0c2014-12-23 18:37:54 +01002031
Michael Stahl2b7536a2012-10-05 21:17:25 +02002032define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002033$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002034
2035endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002036
David Tardonc868a0c2014-12-23 18:37:54 +01002037else # !MSC
2038
2039$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2040 libwpd \
2041))
2042
2043define gb_LinkTarget__use_wpd
2044$(call gb_LinkTarget_use_package,$(1),libwpd)
2045
2046$(call gb_LinkTarget_set_include,$(1),\
2047 $(WPD_CFLAGS) \
2048 $$(INCLUDE) \
2049)
2050$(call gb_LinkTarget_add_libs,$(1),\
2051 $(WPD_LIBS) \
2052)
2053
2054endef
2055
2056define gb_ExternalProject__use_wpd
2057$(call gb_ExternalProject_use_package,$(1),libwpd)
2058
2059endef
2060
2061endif # MSC
2062
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002063endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002064
2065
Michael Stahle3abec32014-02-11 15:57:18 +01002066ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002067
2068define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002069$(call gb_LinkTarget_set_include,$(1),\
2070 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002071 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002072)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002073$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002074
2075endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002076gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002077
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002078else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002079
David Tardonc868a0c2014-12-23 18:37:54 +01002080ifeq ($(COM),MSC)
2081
2082$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2083 wpg \
2084))
2085
Matúš Kukanc6a63952011-07-28 17:29:44 +02002086define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002087$(call gb_LinkTarget_set_include,$(1),\
2088 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2089 $$(INCLUDE) \
2090)
David Tardonc868a0c2014-12-23 18:37:54 +01002091$(call gb_LinkTarget_use_libraries,$(1),\
2092 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002093)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002094
2095endef
David Tardonc868a0c2014-12-23 18:37:54 +01002096
2097else # !MSC
2098
2099$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2100 libwpg \
2101))
2102
2103define gb_LinkTarget__use_wpg
2104$(call gb_LinkTarget_use_package,$(1),libwpg)
2105
2106$(call gb_LinkTarget_set_include,$(1),\
2107 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2108 $$(INCLUDE) \
2109)
2110$(call gb_LinkTarget_add_libs,$(1),\
2111 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2112)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002113
2114endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002115
David Tardonc868a0c2014-12-23 18:37:54 +01002116endif # MSC
2117
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002118endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002119
2120
Michael Stahle3abec32014-02-11 15:57:18 +01002121ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002122
2123define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002124$(call gb_LinkTarget_set_include,$(1),\
2125 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002126 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002127)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002128$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002129
2130endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002131gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002132
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002133else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002134
David Tardonf85d10f2014-05-30 15:35:48 +02002135ifeq ($(COM),MSC)
2136
2137$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2138 wps \
2139))
2140
Matúš Kukanc6a63952011-07-28 17:29:44 +02002141define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002142$(call gb_LinkTarget_set_include,$(1),\
2143 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2144 $$(INCLUDE) \
2145)
David Tardonf85d10f2014-05-30 15:35:48 +02002146
2147$(call gb_LinkTarget_use_libraries,$(1),\
2148 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002149)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002150
2151endef
David Tardonf85d10f2014-05-30 15:35:48 +02002152
2153else # !MSC
2154
2155$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2156 libwps \
2157))
2158
2159define gb_LinkTarget__use_wps
2160$(call gb_LinkTarget_use_package,$(1),libwps)
2161
2162$(call gb_LinkTarget_set_include,$(1),\
2163 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2164 $$(INCLUDE) \
2165)
2166$(call gb_LinkTarget_add_libs,$(1),\
2167 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
2168)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002169
2170endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002171
David Tardonf85d10f2014-05-30 15:35:48 +02002172endif # MSC
2173
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002174endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002175
2176
Michael Stahle3abec32014-02-11 15:57:18 +01002177ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002178
2179define gb_LinkTarget__use_mwaw
2180$(call gb_LinkTarget_set_include,$(1),\
2181 $$(INCLUDE) \
2182 $(MWAW_CFLAGS) \
2183)
2184$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2185
2186endef
2187
2188else # !SYSTEM_MWAW
2189
David Tardon79211c12014-05-30 13:55:20 +02002190ifeq ($(COM),MSC)
2191
2192$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2193 mwaw \
2194))
2195
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002196define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002197$(call gb_LinkTarget_set_include,$(1),\
2198 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2199 $$(INCLUDE) \
2200)
David Tardon79211c12014-05-30 13:55:20 +02002201
2202$(call gb_LinkTarget_use_libraries,$(1),\
2203 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002204)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002205
2206endef
2207
David Tardon79211c12014-05-30 13:55:20 +02002208else # !MSC
2209
2210$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2211 libmwaw \
2212))
2213
2214define gb_LinkTarget__use_mwaw
2215$(call gb_LinkTarget_use_package,$(1),libmwaw)
2216
2217$(call gb_LinkTarget_set_include,$(1),\
2218 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2219 $$(INCLUDE) \
2220)
2221$(call gb_LinkTarget_add_libs,$(1),\
2222 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2223)
2224
2225endef
2226
2227endif # MSC
2228
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002229endif # SYSTEM_MWAW
2230
2231
Michael Stahle3abec32014-02-11 15:57:18 +01002232ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002233
2234define gb_LinkTarget__use_lcms2
2235$(call gb_LinkTarget_set_include,$(1),\
2236 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002237 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002238)
2239$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2240
2241endef
2242
Peter Foley8905c0e2012-11-08 21:00:30 -05002243gb_ExternalProject__use_lcms2 :=
2244
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002245else # !SYSTEM_LCMS2
2246
Michael Stahl32a617d2014-02-17 11:23:19 +01002247$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2248 lcms2 \
2249))
2250
Peter Foley8905c0e2012-11-08 21:00:30 -05002251define gb_ExternalProject__use_lcms2
2252$(call gb_ExternalProject_use_package,$(1),lcms2)
2253
2254endef
2255
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002256ifeq ($(OS),ANDROID)
2257
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002258define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002259$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002260$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002261 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002262 $$(INCLUDE) \
2263)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002264
2265endef
2266
2267else
2268
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002269define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002270$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002271$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002272 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002273 $$(INCLUDE) \
2274)
Michael Stahl25f65f22013-10-23 22:04:36 +02002275$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002276
2277endef
2278
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002279endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002280endif # SYSTEM_LCMS2
2281
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002282ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002283
Michael Stahlab586f12014-02-11 19:25:30 +01002284ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002285
Peter Foley085346f2012-11-03 19:19:30 -04002286define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002287$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002288$(call gb_LinkTarget_add_defs,$(1),\
2289 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002290)
Matúš Kukanc4560482011-07-28 01:03:23 +02002291
2292endef
2293
2294else # !SYSTEM_LPSOLVE
2295
Peter Foley085346f2012-11-03 19:19:30 -04002296define gb_LinkTarget__use_lpsolve
2297$(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002298ifeq ($(COM),MSC)
2299$(call gb_LinkTarget_add_libs,$(1),\
2300 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2301)
2302else
Michael Stahlb177b302013-10-23 21:33:51 +02002303$(call gb_LinkTarget_add_libs,$(1),\
2304 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002305)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002306endif
Peter Foley085346f2012-11-03 19:19:30 -04002307$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002308 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002309 $$(INCLUDE) \
2310)
Matúš Kukanc4560482011-07-28 01:03:23 +02002311
2312endef
2313
Matúš Kukan083fa762014-02-27 17:08:09 +01002314$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2315 lpsolve \
2316))
2317
Matúš Kukanc4560482011-07-28 01:03:23 +02002318endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002319
Matúš Kukan077bdc72014-03-27 14:51:46 +01002320else
2321
2322gb_LinkTarget__use_lpsolve :=
2323
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002324endif # ENABLE_LPSOLVE
2325
2326ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002327
Rene Engelhardd85f5132014-08-06 00:03:21 +02002328ifneq ($(SYSTEM_COINMP),TRUE)
2329
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002330define gb_LinkTarget__use_coinmp
2331$(call gb_LinkTarget_use_package,$(1),coinmp)
2332ifeq ($(COM),MSC)
2333$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002334 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002335)
2336else
2337$(call gb_LinkTarget_add_libs,$(1),\
2338 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2339 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2340 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2341 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2342 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2343 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2344 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2345)
2346endif
2347$(call gb_LinkTarget_set_include,$(1),\
2348 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002349 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002350 $$(INCLUDE) \
2351)
2352
2353endef
2354
2355$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2356 coinmp \
2357))
2358
Rene Engelhardd85f5132014-08-06 00:03:21 +02002359else # SYSTEM_COINMP
2360
2361define gb_LinkTarget__use_coinmp
2362$(call gb_LinkTarget_set_include,$(1),\
2363 $$(INCLUDE) \
2364 $(COINMP_CFLAGS) \
2365)
2366$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2367
2368endef
2369
2370endif
2371
Matúš Kukan077bdc72014-03-27 14:51:46 +01002372else
2373
2374gb_LinkTarget__use_coinmp :=
2375
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002376endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002377
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002378ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002379
Matúš Kukan464b4332012-01-15 02:12:49 +01002380define gb_LinkTarget__use_gio
2381$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002382 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002383 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002384)
2385
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002386$(call gb_LinkTarget_add_defs,$(1),\
Siqid0419802013-07-24 11:16:31 +02002387 -DENABLE_GIO \
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002388)
2389
Matúš Kukan464b4332012-01-15 02:12:49 +01002390$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2391
2392endef
2393
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002394else # ENABLE_GIO
2395
2396define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002397
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002398endef
2399
2400endif # ENABLE_GIO
2401
Siqid0419802013-07-24 11:16:31 +02002402ifeq ($(ENABLE_AVAHI),TRUE)
2403
2404define gb_LinkTarget__use_avahi
2405$(call gb_LinkTarget_set_include,$(1),\
2406 $$(INCLUDE) \
2407 $(AVAHI_CFLAGS) \
2408)
2409
2410$(call gb_LinkTarget_add_defs,$(1),\
2411 -DENABLE_AVAHI \
2412)
2413
2414$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2415
2416endef
2417
2418else # ENABLE_AVAHI
2419
David Tardon9ce38ef2013-11-05 07:03:08 +01002420gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002421
2422endif # ENABLE_AVAHI
2423
2424
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002425define gb_LinkTarget__use_gtk
2426$(call gb_LinkTarget_set_include,$(1),\
2427 $$(INCLUDE) \
2428 $(GTK_CFLAGS) \
2429)
2430
2431$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2432
David Tardonadb11052011-12-01 13:39:09 +01002433ifeq ($(ENABLE_GTK_PRINT),TRUE)
2434
2435$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2436
2437$(call gb_LinkTarget_set_include,$(1),\
2438 $$(INCLUDE) \
2439 $(GTK_PRINT_CFLAGS) \
2440)
2441
2442$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2443
2444endif
2445
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002446endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002447
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002448define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002449$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002450endef
2451
Caolán McNamara68ffb332012-09-14 11:31:50 +01002452ifeq ($(ENABLE_CUPS),TRUE)
2453
2454define gb_LinkTarget__use_cups
2455$(call gb_LinkTarget_add_defs,$(1),\
2456 -DENABLE_CUPS \
2457)
2458
2459$(call gb_LinkTarget_add_libs,$(1),\
2460 -lcups \
2461)
2462
2463endef
2464
2465else # ENABLE_CUPS
2466
2467define gb_LinkTarget__use_cups
2468
2469endef
2470
2471endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01002472
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002473ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002474
2475define gb_LinkTarget__use_dbus
2476$(call gb_LinkTarget_set_include,$(1),\
2477 $$(INCLUDE) \
2478 $(DBUS_CFLAGS) \
2479)
2480
Matúš Kukan464b4332012-01-15 02:12:49 +01002481$(call gb_LinkTarget_add_defs,$(1),\
David Tardon1b717ce2011-11-02 13:00:48 +01002482 -DENABLE_DBUS \
2483)
2484
Norbert Thiebaud7c88b252013-08-30 23:05:04 -05002485ifeq ($(ENABLE_PACKAGEKIT),TRUE)
Rene Engelhardbea61492012-09-11 02:30:09 +02002486$(call gb_LinkTarget_add_defs,$(1),\
2487 -DENABLE_PACKAGEKIT \
2488)
2489endif # ENABLE_PACKAGEKIT
2490
David Tardon1b717ce2011-11-02 13:00:48 +01002491$(call gb_LinkTarget_add_libs,$(1),\
2492 $(DBUS_LIBS) \
2493)
2494
2495endef
2496
2497else # ENABLE_DBUS
2498
2499define gb_LinkTarget__use_dbus
2500
2501endef
2502
2503endif # ENABLE_DBUS
2504
2505
Bjoern Michaelsendd321062011-07-26 16:04:15 +02002506define gb_LinkTarget__use_dbusmenugtk
2507$(call gb_LinkTarget_set_include,$(1),\
2508 $$(INCLUDE) \
2509 $(DBUSMENUGTK_CFLAGS) \
2510)
2511
2512$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2513
2514endef
2515
Eike Rathkea3a8b802012-03-16 22:14:54 +01002516
2517ifeq ($(ENABLE_TELEPATHY),TRUE)
2518
2519define gb_LinkTarget__use_telepathy
2520$(call gb_LinkTarget_set_include,$(1),\
2521 $$(INCLUDE) \
2522 $(TELEPATHY_CFLAGS) \
2523)
2524
Eike Rathkea3a8b802012-03-16 22:14:54 +01002525$(call gb_LinkTarget_add_libs,$(1),\
2526 $(TELEPATHY_LIBS) \
2527)
2528
2529endef
2530
2531else # !ENABLE_TELEPATHY
2532
Matúš Kukanfe327622012-08-09 00:15:52 +02002533gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01002534
2535endif # ENABLE_TELEPATHY
2536
Michael Stahle3abec32014-02-11 15:57:18 +01002537ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002538
2539define gb_LinkTarget__use_png
2540$(call gb_LinkTarget_set_include,$(1),\
2541 $$(INCLUDE) \
2542 $(LIBPNG_CFLAGS) \
2543)
2544
2545$(call gb_LinkTarget_add_libs,$(1),\
2546 $(LIBPNG_LIBS) \
2547)
2548
2549endef
2550
2551else # !SYSTEM_LIBPNG
2552
David Tardon6df9c472011-09-15 14:44:34 +02002553define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002554$(call gb_LinkTarget_set_include,$(1),\
2555 $(LIBPNG_CFLAGS) \
2556 $$(INCLUDE) \
2557)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002558$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002559 png \
2560)
Michael Stahl398ce442012-09-28 21:47:29 +02002561$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002562
2563endef
2564
2565endif # !SYSTEM_LIBPNG
2566
Michael Stahl50471a82011-12-06 19:17:52 +01002567
Michael Stahle3abec32014-02-11 15:57:18 +01002568ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002569
2570define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002571$(call gb_LinkTarget_add_defs,$(1),\
2572 -DSYSTEM_CURL \
2573)
Michael Stahl50471a82011-12-06 19:17:52 +01002574$(call gb_LinkTarget_set_include,$(1),\
2575 $$(INCLUDE) \
2576 $(CURL_CFLAGS) \
2577)
2578$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2579
2580endef
2581
2582else # !SYSTEM_CURL
2583
Michael Stahl32a617d2014-02-17 11:23:19 +01002584$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2585 curl \
2586))
2587
Michael Stahl50471a82011-12-06 19:17:52 +01002588define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002589$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002590$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002591 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002592 $$(INCLUDE) \
2593)
Michael Stahl936a1a92013-10-23 22:37:11 +02002594
2595ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002596$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl548da052014-06-02 01:35:41 +02002597 $(call gb_UnpackedTarball_get_dir,curl)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002598)
Michael Stahl936a1a92013-10-23 22:37:11 +02002599else
2600$(call gb_LinkTarget_add_libs,$(1),\
2601 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2602)
2603endif
Michael Stahl50471a82011-12-06 19:17:52 +01002604
2605endef
2606
2607endif # SYSTEM_CURL
2608
Stephan Bergmann49313b02012-11-27 15:35:02 +01002609ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002610
2611define gb_LinkTarget__use_valgrind
2612$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002613 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002614)
2615
2616$(call gb_LinkTarget_set_include,$(1),\
2617 $$(INCLUDE) \
2618 $(VALGRIND_CFLAGS) \
2619)
2620
2621endef
2622
Stephan Bergmann49313b02012-11-27 15:35:02 +01002623else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002624
2625define gb_LinkTarget__use_valgrind
2626
2627endef
2628
Stephan Bergmann49313b02012-11-27 15:35:02 +01002629endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002630
Michael Stahl32db4992014-02-11 19:35:22 +01002631ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002632
2633define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002634$(call gb_LinkTarget_set_include,$(1),\
2635 $(POPPLER_CFLAGS) \
2636 $$(INCLUDE) \
2637)
2638
2639$(call gb_LinkTarget_add_libs,$(1),\
2640 $(POPPLER_LIBS) \
2641)
2642
2643endef
2644
2645else # !SYSTEM_POPPLER
2646
David Tardondba2d322012-02-18 18:54:35 +01002647define gb_LinkTarget__use_poppler
Michael Stahl2f6261f2013-09-19 19:28:36 +02002648$(call gb_LinkTarget_use_external_project,$(1),poppler)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002649
David Tardon548b61a2012-02-21 06:58:02 +01002650$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002651 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2652 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2653 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002654 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002655)
2656
Michael Stahl2f6261f2013-09-19 19:28:36 +02002657$(call gb_LinkTarget_add_libs,$(1),\
2658 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2659 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2660 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002661)
2662
2663ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002664$(call gb_LinkTarget_add_libs,$(1),\
2665 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002666)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002667else ifeq ($(OS),LINUX)
2668$(call gb_LinkTarget_add_libs,$(1),\
2669 -pthread \
2670)
David Tardon548b61a2012-02-21 06:58:02 +01002671else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002672$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002673 advapi32 \
2674 gdi32 \
2675)
2676endif
2677
David Tardondba2d322012-02-18 18:54:35 +01002678endef
2679
2680endif # SYSTEM_POPPLER
2681
David Tardon3446cda2011-12-23 12:21:19 +01002682
Michael Stahl46648152014-02-11 16:33:18 +01002683ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002684
2685define gb_LinkTarget__use_clucene
2686$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002687 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002688)
2689
2690$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002691 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002692 $$(INCLUDE) \
2693)
2694
2695$(call gb_LinkTarget_add_libs,$(1),\
2696 $(CLUCENE_LIBS) \
2697)
2698
2699endef
2700
2701else # !SYSTEM_CLUCENE
2702
2703define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002704$(call gb_LinkTarget_set_include,$(1),\
2705 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2706 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2707 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2708 $$(INCLUDE) \
2709)
2710
Michael Stahlc923f7d2012-04-07 23:22:08 +02002711$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002712 clucene \
2713)
2714
2715endef
2716
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002717$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002718 clucene \
2719))
2720
2721endif # SYSTEM_CLUCENE
2722
Peter Foley64402842011-12-22 16:34:35 -05002723define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002724$(call gb_LinkTarget_add_libs,$(1),\
2725 $(GOBJECT_LIBS) \
2726)
2727
2728$(call gb_LinkTarget_set_include,$(1),\
2729 $$(INCLUDE) \
2730 $(GOBJECT_CFLAGS) \
2731)
Peter Foley64402842011-12-22 16:34:35 -05002732endef
2733
Michael Stahl5866b332014-02-11 18:56:33 +01002734ifneq ($(SYSTEM_HSQLDB),)
David Tardon579f52d2012-03-27 16:36:31 +02002735
2736define gb_LinkTarget__use_hsqldb
2737
2738$(call gb_LinkTarget_add_defs,$(1),\
2739 -DSYSTEM_HSQLDB \
2740 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2741)
2742
2743endef
2744
2745else # !SYSTEM_HSQLDB
2746
2747define gb_LinkTarget__use_hsqldb
2748
2749endef
2750
2751endif # SYSTEM_HSQLDB
2752
David Tardon8bc7afb2012-04-05 10:53:08 +02002753
Michael Stahl5378dea2014-02-11 19:11:47 +01002754ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002755
2756define gb_LinkTarget__use_openldap
2757
2758$(call gb_LinkTarget_add_libs,$(1),\
2759 -lldap \
2760 -llber \
2761)
2762
2763endef
2764
Michael Stahl2f6261f2013-09-19 19:28:36 +02002765gb_ExternalProject__use_openldap :=
2766
Michael Stahl5378dea2014-02-11 19:11:47 +01002767else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002768
Michael Stahle0ee0d42012-07-16 19:00:07 +02002769define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002770$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002771$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002772 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002773 $$(INCLUDE) \
2774)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002775$(call gb_LinkTarget_use_external_project,$(1),openldap)
2776$(call gb_LinkTarget_add_libs,$(1), \
2777 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2778 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002779)
2780
2781endef
2782
Michael Stahl2f6261f2013-09-19 19:28:36 +02002783define gb_ExternalProject__use_openldap
2784$(call gb_ExternalProject_use_external_project,$(1),openldap)
2785
2786endef
2787
Michael Stahle0ee0d42012-07-16 19:00:07 +02002788endif # SYSTEM_OPENLDAP
2789
2790
Javier Fernandezf53228c2013-05-10 18:21:30 +00002791ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2792
Michael Stahl23647592014-02-11 19:04:20 +01002793ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002794
Rene Engelhard0b68d702013-07-16 21:50:14 +02002795define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002796$(call gb_LinkTarget_set_include,$(1),\
2797 $(FIREBIRD_CFLAGS) \
2798 $$(INCLUDE) \
2799)
2800$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2801
2802endef
2803
2804# gb_LinkTarget__use_atomic_ops :=
2805# gb_LinkTarget__use_tommath :=
2806
2807else # !SYSTEM_FIREBIRD
2808
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002809#$(call gb_LinkTarget__use_libatomic_ops,$(1))
2810
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002811define gb_LinkTarget__use_libfbembed
2812$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002813$(call gb_LinkTarget_set_include,$(1),\
Javier Fernandezf53228c2013-05-10 18:21:30 +00002814 $$(INCLUDE) \
Andrzej J.R. Hunt7309fda2013-07-16 22:40:47 +02002815 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002816)
Michael Stahl37563db2013-10-22 22:22:49 +02002817ifeq ($(COM),MSC)
2818$(call gb_LinkTarget_add_libs,$(1),\
2819 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002820)
Michael Stahl37563db2013-10-22 22:22:49 +02002821else
2822$(call gb_LinkTarget_add_libs,$(1),\
2823 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2824)
2825endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002826
2827endef
2828
Javier Fernandezf53228c2013-05-10 18:21:30 +00002829# define gb_LinkTarget__use_tommath
2830# $(call gb_LinkTarget_set_include,$(1),\
2831# $(TOMMATH_CFLAGS) \
2832# $$(INCLUDE) \
2833# )
2834
2835# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2836
2837# endef
2838
2839endif # SYSTEM_FIREBIRD
2840
2841else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01002842
Javier Fernandezf53228c2013-05-10 18:21:30 +00002843gb_LinkTarget__use_firebird :=
2844# gb_LinkTarget__use_atomic_ops :=
2845# gb_LinkTarget__use_tommath :=
2846
2847endif # ENABLE_FIREBIRD_SDBC
2848
2849
Michael Stahl5866b332014-02-11 18:56:33 +01002850ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02002851
2852define gb_LinkTarget__use_postgresql
2853
David Tardon8bc7afb2012-04-05 10:53:08 +02002854$(call gb_LinkTarget_set_include,$(1),\
2855 $(POSTGRESQL_INC) \
2856 $$(INCLUDE) \
2857)
2858
2859$(call gb_LinkTarget_add_libs,$(1),\
2860 -lpq \
2861)
2862
2863$(call gb_LinkTarget_add_ldflags,$(1),\
2864 $(POSTGRESQL_LIB) \
2865)
2866
2867endef
2868
2869else # !SYSTEM_POSTGRESQL
2870
2871define gb_LinkTarget__use_postgresql
2872
Michael Stahl2f6261f2013-09-19 19:28:36 +02002873$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002874
David Tardon8bc7afb2012-04-05 10:53:08 +02002875$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002876 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2877 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002878 $$(INCLUDE) \
2879)
2880
Michael Stahl2f6261f2013-09-19 19:28:36 +02002881$(call gb_LinkTarget_add_libs,$(1),\
2882 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002883)
2884
Tor Lillqvistc2909892012-12-12 01:07:09 +02002885ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002886$(call gb_LinkTarget_use_external,$(1),openssl)
2887
Michael Stahldc397aae2012-09-28 15:31:46 +02002888$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02002889 secur32 \
2890 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02002891)
David Tardon8af6aa62012-05-30 12:06:42 +02002892
David Tardon8bc7afb2012-04-05 10:53:08 +02002893endif
2894
2895endef
2896
David Tardon8bc7afb2012-04-05 10:53:08 +02002897endif # SYSTEM_POSTGRESQL
2898
Michael Stahl589d6342014-03-18 17:56:10 +01002899ifneq ($(WITH_MOZAB4WIN),)
2900
2901$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2902 moz_runtime \
2903))
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002904
David Tardonc678a4c2012-04-05 17:59:36 +02002905define gb_LinkTarget__use_mozilla
2906
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002907$(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2908$(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2909
David Tardonc678a4c2012-04-05 17:59:36 +02002910$(call gb_LinkTarget_add_defs,$(1),\
2911 -DMOZILLA_INTERNAL_API \
2912)
2913
2914$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002915 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2916 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2917 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2918 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2919 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2920 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2921 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2922 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2923 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2924 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2925 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2926 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2927 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2928 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2929 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2930 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
David Tardonc678a4c2012-04-05 17:59:36 +02002931 $$(INCLUDE) \
David Tardonc678a4c2012-04-05 17:59:36 +02002932)
2933
Michael Stahld2f62c32013-10-23 00:14:01 +02002934$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002935 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
Michael Stahl3dadfa52013-10-29 14:34:56 +01002936 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2937 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002938)
2939
David Tardonc678a4c2012-04-05 17:59:36 +02002940$(call gb_LinkTarget_add_defs,$(1),\
2941 -DMOZILLA_CLIENT \
2942 -DMOZ_REFLOW_PERF \
2943 -DMOZ_REFLOW_PERF_DSP \
2944 -DMOZ_XUL \
2945 -DOJI \
2946 -DWIN32 \
2947 -DXP_PC \
2948 -DXP_WIN \
2949 -DXP_WIN32 \
2950 -D_WINDOWS \
2951)
2952
2953ifeq ($(COM),GCC)
2954
2955$(call gb_LinkTarget_add_cxxflags,$(1),\
2956 -Wall \
2957 -Wcast-align \
2958 -Wconversion \
2959 -Wno-long-long \
2960 -Woverloaded-virtual \
2961 -Wpointer-arith \
2962 -Wsynth \
2963 -fno-rtti \
2964)
2965
2966else
2967
2968ifneq ($(DBG_LEVEL),0)
2969$(call gb_LinkTarget_add_defs,$(1),\
2970 -D_STL_NOFORCE_MANIFEST \
2971)
2972endif
2973
2974$(call gb_LinkTarget_add_libs,$(1),\
Christian Lohmaierc18dc122013-10-10 18:31:27 +02002975 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2976 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002977)
2978
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002979endif # !GCC
David Tardonc678a4c2012-04-05 17:59:36 +02002980
David Tardonc678a4c2012-04-05 17:59:36 +02002981endef
2982
Michael Stahl589d6342014-03-18 17:56:10 +01002983endif # WITH_MOZAB4WIN
David Tardonc678a4c2012-04-05 17:59:36 +02002984
David Tardond4efa8b2012-04-28 20:48:14 +02002985ifeq ($(ENABLE_KDE),TRUE)
2986
2987define gb_LinkTarget__use_kde
2988$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002989 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002990 $$(INCLUDE) \
2991)
2992
2993$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002994 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002995)
2996
2997$(call gb_LinkTarget_add_libs,$(1),\
2998 $(KDE_LIBS) \
2999)
3000
3001ifeq ($(COM),GCC)
3002$(call gb_LinkTarget_add_cxxflags,$(1),\
3003 -Wno-shadow \
3004)
3005endif
3006
3007endef
3008
3009else # !ENABLE_KDE
3010
3011define gb_LinkTarget__use_kde
3012
3013endef
3014
3015endif # ENABLE_KDE
3016
3017
3018ifeq ($(ENABLE_KDE4),TRUE)
3019
3020define gb_LinkTarget__use_kde4
3021$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003022 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003023 $$(INCLUDE) \
3024)
3025
3026$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003027 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003028)
3029
3030$(call gb_LinkTarget_add_libs,$(1),\
3031 $(KDE4_LIBS) \
3032)
3033
3034ifeq ($(COM),GCC)
3035$(call gb_LinkTarget_add_cxxflags,$(1),\
3036 -Wno-shadow \
3037)
3038endif
3039
3040endef
3041
3042else # !ENABLE_KDE4
3043
3044define gb_LinkTarget__use_kde4
3045
3046endef
3047
3048endif # ENABLE_KDE4
3049
3050
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01003051ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02003052
3053define gb_LinkTarget__use_tde
3054$(call gb_LinkTarget_add_libs,$(1),\
3055 $(TDE_LIBS) \
3056)
3057
3058$(call gb_LinkTarget_set_include,$(1),\
3059 $$(INCLUDE) \
3060 $(TDE_CFLAGS) \
3061)
3062endef
3063
3064else # ! ENABLE_TDE
3065
3066define gb_LinkTarget__use_tde
3067
3068endef
3069
3070endif # ENABLE_TDE
3071
3072
3073ifeq ($(ENABLE_GCONF),TRUE)
3074
3075define gb_LinkTarget__use_gconf
3076$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003077 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003078 $$(INCLUDE) \
3079)
3080
3081$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003082 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02003083)
3084
3085$(call gb_LinkTarget_add_libs,$(1),\
3086 $(GCONF_LIBS) \
3087)
3088
3089endef
3090
3091else # !ENABLE_GCONF
3092
3093define gb_LinkTarget__use_gconf
3094
3095endef
3096
3097endif # ENABLE_GCONF
3098
3099
David Ostrovskye16ac692012-05-27 22:50:41 +02003100# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01003101# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01003102ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02003103
Michael Stahl91926332012-11-27 15:50:53 +01003104define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02003105$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003106 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003107)
3108
3109$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02003110 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003111 $$(INCLUDE) \
3112)
3113
Michael Stahl91926332012-11-27 15:50:53 +01003114endef
3115
3116define gb_LinkTarget__use_python
3117$(call gb_LinkTarget__use_python_headers,$(1))
3118
David Ostrovskye16ac692012-05-27 22:50:41 +02003119$(call gb_LinkTarget_add_libs,$(1),\
3120 $(PYTHON_LIBS) \
3121)
3122
3123endef
3124
3125else # !SYSTEM_PYTHON
3126
Michael Stahl720ca8e2014-03-18 18:24:15 +01003127$(eval $(call gb_Helper_register_packages_for_install,python,\
3128 python3 \
3129))
3130
Michael Stahl75a2c502012-12-04 13:47:22 +01003131# depend on external project because on MACOSX the Package is disabled...
Michael Stahl91926332012-11-27 15:50:53 +01003132define gb_LinkTarget__use_python_headers
Michael Stahl75a2c502012-12-04 13:47:22 +01003133$(call gb_LinkTarget_use_external_project,$(1),python3)
Michael Stahl91926332012-11-27 15:50:53 +01003134$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003135 -I$(call gb_UnpackedTarball_get_dir,python3) \
3136 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3137 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003138 $$(INCLUDE) \
3139)
3140
3141endef
3142
David Ostrovskye16ac692012-05-27 22:50:41 +02003143define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003144$(call gb_LinkTarget__use_python_headers,$(1))
David Ostrovskye16ac692012-05-27 22:50:41 +02003145
3146ifeq ($(OS),WNT)
3147$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl5b7ccf32013-06-04 17:16:47 +02003148 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02003149)
3150else ifeq ($(OS),MACOSX)
3151$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003152 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003153)
3154else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003155$(call gb_LinkTarget_add_libs,$(1),\
3156 -L$(call gb_UnpackedTarball_get_dir,python3) \
3157 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003158)
3159endif
3160
David Ostrovskye16ac692012-05-27 22:50:41 +02003161endef
3162
David Ostrovskye16ac692012-05-27 22:50:41 +02003163endif # SYSTEM_PYTHON
3164
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003165# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003166ifeq ($(ENABLE_ORCUS),TRUE)
3167
Michael Stahle3abec32014-02-11 15:57:18 +01003168ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003169
3170define gb_LinkTarget__use_orcus
3171$(call gb_LinkTarget_set_include,$(1),\
3172 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003173 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003174)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003175$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003176endef
3177
3178define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003179
3180endef
3181
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003182else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003183
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003184define gb_LinkTarget__use_orcus
Michael Stahl2f6261f2013-09-19 19:28:36 +02003185$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Matúš Kukan1ee76032012-09-09 15:29:43 +02003186$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003187 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003188 $$(INCLUDE) \
3189)
Michael Stahl2f6261f2013-09-19 19:28:36 +02003190$(call gb_LinkTarget_add_libs,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +01003191 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl2f6261f2013-09-19 19:28:36 +02003192)
David Tardonf1035c12012-11-23 06:49:21 +01003193
Michael Stahladddbbc2014-02-11 18:40:09 +01003194$(if $(SYSTEM_BOOST), \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003195 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3196 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3197)
David Tardonf1035c12012-11-23 06:49:21 +01003198
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003199endef
3200
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003201define gb_LinkTarget__use_orcus-parser
Michael Stahl2f6261f2013-09-19 19:28:36 +02003202$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003203$(call gb_LinkTarget_set_include,$(1),\
3204 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3205 $$(INCLUDE) \
3206)
Michael Stahl2f6261f2013-09-19 19:28:36 +02003207$(call gb_LinkTarget_add_libs,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +01003208 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003209)
3210
3211endef
3212
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003213endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003214
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003215else # ENABLE_ORCUS != TRUE
3216
3217gb_LinkTarget__use_orcus :=
3218gb_LinkTarget__use_orcus-parser :=
3219
3220endif
Michael Stahl78b59b82012-09-27 21:45:47 +02003221
David Tardon49a4d362013-11-12 16:44:40 +01003222ifeq ($(ENABLE_EOT),TRUE)
3223
Michael Stahle3abec32014-02-11 15:57:18 +01003224ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003225
3226define gb_LinkTarget__use_libeot
3227$(call gb_LinkTarget_set_include,$(1),\
3228 $$(INCLUDE) \
3229 $(LIBEOT_CFLAGS) \
3230)
3231$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3232
3233endef
3234
3235gb_ExternalProject__use_libeot :=
3236
3237else # !SYSTEM_LIBEOT
3238
3239define gb_LinkTarget__use_libeot
3240$(call gb_LinkTarget_set_include,$(1),\
3241 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3242 $$(INCLUDE) \
3243)
3244$(call gb_LinkTarget_add_libs,$(1),\
3245 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3246)
3247$(call gb_LinkTarget_use_external_project,$(1),libeot)
3248
3249endef
3250
3251define gb_ExternalProject__use_libeot
3252$(call gb_ExternalProject_use_external_project,$(1),libeot)
3253
3254endef
3255
3256endif # SYSTEM_LIBEOT
3257
3258else # !ENABLE_EOT
3259
3260gb_LinkTarget__use_libeot :=
3261gb_ExternalProject__use_libeot :=
3262
3263endif # ENABLE_EOT
3264
Michael Stahl78b59b82012-09-27 21:45:47 +02003265### X11 stuff ###
3266
3267ifeq ($(GUIBASE),unx)
3268
Michael Stahl78b59b82012-09-27 21:45:47 +02003269ifeq ($(XRANDR_DLOPEN),FALSE)
3270
3271define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003272$(call gb_LinkTarget_set_include,$(1),\
3273 $$(INCLUDE) \
3274 $(XRANDR_CFLAGS) \
3275)
3276
3277$(call gb_LinkTarget_add_libs,$(1),\
3278 $(XRANDR_LIBS) \
3279)
3280endef
3281
3282else # XRANDR_DLOPEN
3283
3284define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003285$(call gb_LinkTarget_add_defs,$(1),\
3286 -DXRANDR_DLOPEN \
3287)
3288endef
3289
3290endif # XRANDR_DLOPEN
3291
3292define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003293$(call gb_LinkTarget_set_include,$(1),\
3294 $$(INCLUDE) \
3295 $(XRENDER_CFLAGS) \
3296)
3297
3298$(call gb_LinkTarget_add_libs,$(1),\
3299 $(XRENDER_LIBS) \
3300)
3301endef
3302
3303endif # GUIBASE=unx
3304
Tor Lillqvist35491072011-08-02 21:22:35 +03003305
Michael Meeksb440cfc2013-02-28 12:05:07 +00003306gb_ExternalProject__use_nss3:=
3307
Tor Lillqvist3442b002014-08-12 16:50:17 +03003308ifeq ($(OS),ANDROID)
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003309
Peter Foleyc003d252013-01-01 09:39:36 -05003310gb_LinkTarget__use_nss3:=
Tor Lillqvist801408c2014-12-12 23:51:17 +02003311gb_LinkTarget__use_plc4:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003312
3313else
3314
Michael Stahle3abec32014-02-11 15:57:18 +01003315ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003316
David Tardon2b9dbc82012-08-13 06:57:51 +02003317define gb_LinkTarget__use_nss3
3318$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003319 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003320)
3321
David Tardonb6aa4842011-08-11 13:10:14 +02003322$(call gb_LinkTarget_set_include,$(1),\
3323 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003324 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003325)
3326
3327$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003328 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003329)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003330
David Tardonb6aa4842011-08-11 13:10:14 +02003331endef
3332
David Tardon2b9dbc82012-08-13 06:57:51 +02003333define gb_LinkTarget__use_plc4
3334$(call gb_LinkTarget__use_nss3,$(1))
3335
3336endef
3337
David Tardon6ef46562013-02-04 10:04:07 +01003338define gb_LinkTarget__use_ssl3
3339$(call gb_LinkTarget__use_nss3,$(1))
3340
3341endef
3342
Michael Stahle3abec32014-02-11 15:57:18 +01003343else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003344
Michael Stahlffae67c2014-03-13 19:51:19 +01003345$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3346 nss \
3347))
3348
David Tardon2b9dbc82012-08-13 06:57:51 +02003349define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003350$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003351$(call gb_LinkTarget_set_include,$(1),\
3352 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003353 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3354 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003355)
3356
Michael Stahld2f62c32013-10-23 00:14:01 +02003357ifeq ($(COM),MSC)
3358$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003359 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3360 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3361 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003362)
Michael Stahld2f62c32013-10-23 00:14:01 +02003363else
3364$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003365 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003366 -lnspr4 \
3367 -lnss3 \
3368 -lsmime3 \
3369)
3370endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003371
3372endef
3373
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003374define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003375$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003376ifeq ($(COM),MSC)
3377$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003378 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003379)
Michael Stahld2f62c32013-10-23 00:14:01 +02003380else
3381$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003382 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003383)
3384endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003385
David Tardonb6aa4842011-08-11 13:10:14 +02003386endef
3387
David Tardon6ef46562013-02-04 10:04:07 +01003388define gb_LinkTarget__use_ssl3
3389$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003390ifeq ($(COM),MSC)
3391$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003392 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003393)
Michael Stahld2f62c32013-10-23 00:14:01 +02003394else
3395$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003396 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003397)
3398endif
David Tardon6ef46562013-02-04 10:04:07 +01003399
3400endef
3401
Michael Meeksb440cfc2013-02-28 12:05:07 +00003402define gb_ExternalProject__use_nss3
3403$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003404
3405endef
3406
Michael Stahle3abec32014-02-11 15:57:18 +01003407endif # SYSTEM_NSS
3408
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003409endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02003410
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003411ifeq ($(ENABLE_GLTF),TRUE)
3412
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003413ifneq ($(SYSTEM_LIBGLTF),TRUE)
3414
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003415define gb_LinkTarget__use_libgltf
3416$(call gb_LinkTarget_set_include,$(1),\
3417 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3418 $$(INCLUDE) \
3419)
3420
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003421ifeq ($(COM),MSC)
3422$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskyac06ab22015-02-18 22:17:49 +01003423 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003424)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003425else
3426$(call gb_LinkTarget_add_libs,$(1),\
3427 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3428)
3429endif
3430
3431$(call gb_LinkTarget_use_external_project,$(1),libgltf)
3432
3433endef
3434
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003435else # SYSTEM_LIBGLTF
3436
3437define gb_LinkTarget__use_libgltf
3438$(call gb_LinkTarget_set_include,$(1),\
3439 $$(INCLUDE) \
3440 $(LIBGLTF_CFLAGS) \
3441)
3442$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003443
3444endef
3445
3446endif # SYSTEN_LIBGLTF
3447
Zolnai Tamás191f0942014-08-07 15:21:41 +02003448ifeq ($(ENABLE_COLLADA),TRUE)
3449
David Tardonf24c6082014-10-20 14:21:22 +02003450ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3451
3452define gb_LinkTarget__use_opencollada_parser
3453$(call gb_LinkTarget_set_include,$(1),\
3454 $$(INCLUDE) \
3455 $(OPENCOLLADA_CFLAGS) \
3456)
3457
3458$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3459
3460endef
3461
3462else # !SYSTEM_OPENCOLLADA
3463
Zolnai Tamásaa5fe792014-04-10 13:33:58 +02003464define gb_LinkTarget__use_opencollada_parser
3465$(call gb_LinkTarget_set_include,$(1),\
3466 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3467 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3468 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3469 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3470 $$(INCLUDE) \
3471)
3472
3473$(call gb_LinkTarget_use_static_libraries,$(1),\
3474 opencollada_parser \
3475)
3476endef
3477
David Tardonf24c6082014-10-20 14:21:22 +02003478endif # SYSTEM_OPENCOLLADA
3479
Zolnai Tamásd57591702014-04-10 13:37:38 +02003480define gb_LinkTarget__use_collada2gltf
3481$(call gb_LinkTarget_set_include,$(1),\
3482 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3483 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3484 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3485 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3486 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3487 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3488 $$(INCLUDE) \
3489)
3490
3491$(call gb_LinkTarget_use_static_libraries,$(1),\
3492 collada2gltf \
3493)
3494endef
3495
Zolnai Tamás191f0942014-08-07 15:21:41 +02003496endif # ENABLE_COLLADA
3497
3498endif # ENABLE_GLTF
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003499
Michael Stahl2ee5f242011-09-15 14:01:27 +02003500### Jars ############################################################
3501
Michael Stahl5866b332014-02-11 18:56:33 +01003502ifneq ($(SYSTEM_HSQLDB),)
Michael Stahl666173b2012-08-15 20:24:59 +02003503
3504define gb_Jar__use_hsqldb
3505$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3506endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003507define gb_JunitTest__use_hsqldb
3508$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3509endef
Michael Stahl666173b2012-08-15 20:24:59 +02003510
3511else # !SYSTEM_HSQLDB
3512
David Tardon2dec0672014-05-19 10:20:37 +02003513ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl376d1b52014-03-18 20:25:04 +01003514$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003515 hsqldb \
3516))
David Tardon2dec0672014-05-19 10:20:37 +02003517endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003518
Michael Stahl666173b2012-08-15 20:24:59 +02003519define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003520$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02003521endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003522define gb_JunitTest__use_hsqldb
3523$(call gb_JunitTest_use_jar,$(1),hsqldb)
3524endef
Michael Stahl666173b2012-08-15 20:24:59 +02003525
3526endif # SYSTEM_HSQLDB
3527
Michael Stahl2ee5f242011-09-15 14:01:27 +02003528
Rene Engelhard40facc42014-05-23 07:43:19 +02003529ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3530
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003531ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003532
Michael Stahla4551262012-08-15 17:41:25 +02003533define gb_Jar__use_bsh
3534$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003535endef
3536
3537else # !SYSTEM_BSH
3538
David Tardon2dec0672014-05-19 10:20:37 +02003539ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003540$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003541 bsh \
3542))
David Tardon2dec0672014-05-19 10:20:37 +02003543endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003544
Michael Stahla4551262012-08-15 17:41:25 +02003545define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003546$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003547endef
3548
3549endif # SYSTEM_BSH
3550
Rene Engelhard40facc42014-05-23 07:43:19 +02003551endif
3552
3553ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003554
Michael Stahl49dde4c2014-02-11 19:42:28 +01003555ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003556
Michael Stahla4551262012-08-15 17:41:25 +02003557define gb_Jar__use_rhino
3558$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003559endef
3560
3561else # !SYSTEM_RHINO
3562
David Tardon2dec0672014-05-19 10:20:37 +02003563ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003564$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003565 js \
3566))
David Tardon2dec0672014-05-19 10:20:37 +02003567endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003568
Michael Stahla4551262012-08-15 17:41:25 +02003569define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003570$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003571endef
3572
3573endif # SYSTEM_RHINO
3574
Rene Engelhard40facc42014-05-23 07:43:19 +02003575endif
3576
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003577ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003578
Michael Stahla4551262012-08-15 17:41:25 +02003579define gb_Jar__use_commons-codec
3580$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003581endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003582gb_ExternalProject__use_commons-codec :=
David Tardon9b530e12012-04-07 10:07:35 +02003583
Michael Stahla4551262012-08-15 17:41:25 +02003584define gb_Jar__use_commons-httpclient
3585$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003586endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003587gb_ExternalProject__use_commons-httpclient :=
David Tardon9b530e12012-04-07 10:07:35 +02003588
Michael Stahla4551262012-08-15 17:41:25 +02003589define gb_Jar__use_commons-lang
3590$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003591endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003592gb_ExternalProject__use_commons-lang :=
David Tardon9b530e12012-04-07 10:07:35 +02003593
Michael Stahla4551262012-08-15 17:41:25 +02003594define gb_Jar__use_commons-logging
3595$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003596endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003597gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003598
3599else # !SYSTEM_APACHE_COMMONS
3600
David Tardon2dec0672014-05-19 10:20:37 +02003601ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003602$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003603 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003604))
David Tardon2dec0672014-05-19 10:20:37 +02003605endif
Michael Stahl87a723d2012-08-17 12:43:37 +02003606$(eval $(call gb_Helper_register_jars,OXT,\
Douglas Mencken7e470872014-05-20 12:55:56 -04003607 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003608 commons-httpclient-3.1 \
Douglas Mencken7e470872014-05-20 12:55:56 -04003609 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003610))
3611
Michael Stahla4551262012-08-15 17:41:25 +02003612define gb_Jar__use_commons-codec
Michael Stahl461d8302013-10-25 18:40:48 +02003613$(call gb_Jar_use_external_project,$(1),apache_commons_codec)
Douglas Mencken7e470872014-05-20 12:55:56 -04003614$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3615$(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3616$(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3617)
David Tardon9b530e12012-04-07 10:07:35 +02003618endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003619define gb_ExternalProject__use_commons-codec
3620$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3621endef
David Tardon9b530e12012-04-07 10:07:35 +02003622
Michael Stahla4551262012-08-15 17:41:25 +02003623define gb_Jar__use_commons-httpclient
Michael Stahl461d8302013-10-25 18:40:48 +02003624$(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3625$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
David Tardon9b530e12012-04-07 10:07:35 +02003626endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003627define gb_ExternalProject__use_commons-httpclient
3628$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3629endef
David Tardon9b530e12012-04-07 10:07:35 +02003630
Michael Stahla4551262012-08-15 17:41:25 +02003631define gb_Jar__use_commons-lang
Michael Stahl461d8302013-10-25 18:40:48 +02003632$(call gb_Jar_use_external_project,$(1),apache_commons_lang)
Douglas Mencken7e470872014-05-20 12:55:56 -04003633$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3634$(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3635$(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3636)
David Tardon9b530e12012-04-07 10:07:35 +02003637endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003638define gb_ExternalProject__use_commons-lang
3639$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3640endef
David Tardon9b530e12012-04-07 10:07:35 +02003641
Michael Stahla4551262012-08-15 17:41:25 +02003642define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003643$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003644$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003645endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003646define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003647$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003648endef
David Tardon9b530e12012-04-07 10:07:35 +02003649
3650endif # SYSTEM_APACHE_COMMONS
3651
3652
Michael Stahl32db4992014-02-11 19:35:22 +01003653ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003654
Michael Stahla4551262012-08-15 17:41:25 +02003655define gb_Jar__use_flow-engine
3656$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003657endef
3658
Michael Stahla4551262012-08-15 17:41:25 +02003659define gb_Jar__use_flute
3660$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003661endef
3662
Michael Stahla4551262012-08-15 17:41:25 +02003663define gb_Jar__use_libbase
3664$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003665endef
3666
Michael Stahla4551262012-08-15 17:41:25 +02003667define gb_Jar__use_libfonts
3668$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003669endef
3670
Michael Stahla4551262012-08-15 17:41:25 +02003671define gb_Jar__use_libformula
3672$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003673endef
3674
Michael Stahla4551262012-08-15 17:41:25 +02003675define gb_Jar__use_liblayout
3676$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003677endef
3678
Michael Stahla4551262012-08-15 17:41:25 +02003679define gb_Jar__use_libloader
3680$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003681endef
3682
Michael Stahla4551262012-08-15 17:41:25 +02003683define gb_Jar__use_librepository
3684$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003685endef
3686
Michael Stahla4551262012-08-15 17:41:25 +02003687define gb_Jar__use_libserializer
3688$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003689endef
3690
Michael Stahla4551262012-08-15 17:41:25 +02003691define gb_Jar__use_libxml
3692$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003693endef
3694
Michael Stahla4551262012-08-15 17:41:25 +02003695define gb_Jar__use_sac
3696$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003697endef
3698
3699else # !SYSTEM_JFREEREPORT
3700
David Tardon2dec0672014-05-19 10:20:37 +02003701ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003702$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003703 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003704 flute-1.1.6 \
3705 libbase-1.1.6 \
3706 libfonts-1.1.6 \
3707 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003708 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003709 libloader-1.1.6 \
3710 librepository-1.1.6 \
3711 libserializer-1.1.6 \
3712 libxml-1.1.7 \
3713 sac \
3714))
David Tardon2dec0672014-05-19 10:20:37 +02003715endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003716
Michael Stahla4551262012-08-15 17:41:25 +02003717define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003718$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003719endef
3720
Michael Stahla4551262012-08-15 17:41:25 +02003721define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003722$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003723endef
3724
Michael Stahla4551262012-08-15 17:41:25 +02003725define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003726$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003727endef
3728
Michael Stahla4551262012-08-15 17:41:25 +02003729define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003730$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003731endef
3732
Michael Stahla4551262012-08-15 17:41:25 +02003733define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003734$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003735endef
3736
Michael Stahla4551262012-08-15 17:41:25 +02003737define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003738$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003739endef
3740
Michael Stahla4551262012-08-15 17:41:25 +02003741define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003742$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003743endef
3744
Michael Stahla4551262012-08-15 17:41:25 +02003745define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003746$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003747endef
3748
Michael Stahla4551262012-08-15 17:41:25 +02003749define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003750$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003751endef
3752
Michael Stahla4551262012-08-15 17:41:25 +02003753define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003754$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003755endef
3756
Michael Stahla4551262012-08-15 17:41:25 +02003757define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003758$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003759endef
3760
3761endif # SYSTEM_JFREEREPORT
3762
David Tardonc2eca352012-12-02 10:51:37 +01003763
3764# Executables
3765
David Tardonedf67302012-12-30 12:27:04 +01003766# FIXME: the library target should be for build too
3767define gb_Executable__register_bestreversemap
3768$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3769 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3770)
3771endef
3772
David Tardonceb0d062012-12-30 13:11:43 +01003773# TODO depending on the whole URE might be overkill, but I do not have a
3774# Windows machine to debug it...
3775# FIXME: the library target should be for build too
3776define gb_Executable__register_climaker
3777$(call gb_Executable_add_runtime_dependencies,climaker,\
3778 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003779 $(call gb_Rdb_get_target_for_build,ure/services) \
Stephan Bergmann982f1992014-12-01 15:10:19 +01003780 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003781 $(call gb_UnoApi_get_target,udkapi) \
David Tardonc7b4aa22014-12-24 18:27:48 +01003782 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003783)
3784endef
3785
David Tardon6c1614a2014-01-08 13:49:46 +01003786define gb_Executable__register_cppumaker
3787$(call gb_Executable_add_runtime_dependencies,cppumaker,\
3788 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3789)
3790endef
3791
Matúš Kukane1b51e72013-09-27 09:41:09 +02003792gb_Gallery__UNO_COMPONENTS := \
3793 comphelper/util/comphelp \
3794 configmgr/source/configmgr \
3795 drawinglayer/drawinglayer \
Matúš Kukane1b51e72013-09-27 09:41:09 +02003796 framework/util/fwk \
3797 i18npool/util/i18npool \
3798 package/source/xstor/xstor \
3799 package/util/package2 \
3800 sax/source/expatwrap/expwrap \
3801 sfx2/util/sfx \
3802 svgio/svgio \
3803 svx/util/svx \
3804 svx/util/svxcore \
3805 ucb/source/core/ucb1 \
3806 ucb/source/ucp/file/ucpfile1 \
3807 unoxml/source/service/unoxml
3808
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003809# This is used to determine what we need for 'build' platform.
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003810define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003811$(call gb_Executable_add_runtime_dependencies,gengal,\
Matúš Kukane1b51e72013-09-27 09:41:09 +02003812 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
Matúš Kukan85c6f802013-05-23 23:01:05 +02003813 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
David Tardon1546c292013-05-07 20:41:41 +02003814 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003815 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardone59420d2014-08-04 17:23:54 +02003816 $(call gb_Package_get_target_for_build,postprocess_images) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003817 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003818 $(call gb_Rdb_get_target_for_build,ure/services) \
Stephan Bergmann982f1992014-12-01 15:10:19 +01003819 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003820 $(call gb_UnoApi_get_target,offapi) \
3821 $(call gb_UnoApi_get_target,udkapi) \
3822)
3823endef
3824
Michael Stahl187194b2014-02-11 19:17:42 +01003825ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003826
3827define gb_Executable__register_gendict
3828$(call gb_Executable_add_runtime_dependencies,gendict,\
3829 $(call gb_Package_get_target_for_build,icu) \
3830)
3831endef
3832
3833endif
3834
David Tardonceb0d062012-12-30 13:11:43 +01003835define gb_Executable__register_idlc
3836$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003837 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003838)
3839endef
3840
David Tardonedf67302012-12-30 12:27:04 +01003841define gb_Executable__register_localize
3842$(call gb_Executable_add_runtime_dependencies,localize,\
3843 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3844 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3845 ) \
3846)
3847endef
3848
Michael Stahl4c51feb2013-09-21 01:39:41 +02003849# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003850# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003851# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3852# FIXME: the library target should be for build too
3853define gb_Executable__register_saxparser
3854$(call gb_Executable_add_runtime_dependencies,saxparser,\
3855 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003856 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003857 $(call gb_Rdb_get_target_for_build,saxparser) \
3858 $(call gb_Rdb_get_target_for_build,ure/services) \
Stephan Bergmann982f1992014-12-01 15:10:19 +01003859 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003860 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003861)
3862endef
3863
Stephan Bergmannab149c72013-04-24 10:42:40 +02003864# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003865# required due to the settings for URE_SERVICES and URE_TYPES in
3866# cppuhelper/source/unorc
3867# FIXME: the library target should be for build too
3868define gb_Executable__register_uno
3869$(call gb_Executable_add_runtime_dependencies,uno,\
3870 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003871 $(call gb_Rdb_get_target_for_build,ure/services) \
Stephan Bergmann982f1992014-12-01 15:10:19 +01003872 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003873 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003874)
3875endef
3876
3877
3878# External executables
3879
Michael Stahl379f9782014-02-11 16:49:19 +01003880ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003881
3882gb_ExternalExecutable__register_xmllint :=
3883
3884else # ! SYSTEM_LIBXML_FOR_BUILD
3885
3886define gb_ExternalExecutable__register_xmllint
David Tardondbac8f52014-04-18 18:34:40 +02003887$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),xml2)
David Tardon5b660242014-07-28 10:38:49 +02003888$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3889 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3890 $(call gb_Package_get_target,xml2) \
3891)
David Tardonc2eca352012-12-02 10:51:37 +01003892
3893endef
3894
3895endif # SYSTEM_LIBXML_FOR_BUILD
3896
Michael Stahle3abec32014-02-11 15:57:18 +01003897ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003898
3899gb_ExternalExecutable__register_xsltproc :=
3900
3901else # ! SYSTEM_LIBXSLT_FOR_BUILD
3902
3903define gb_ExternalExecutable__register_xsltproc
David Tardondbac8f52014-04-18 18:34:40 +02003904$(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt)
David Tardon5b660242014-07-28 10:38:49 +02003905$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3906 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3907 $(call gb_Package_get_target,xslt) \
3908)
David Tardonc2eca352012-12-02 10:51:37 +01003909
3910endef
3911
3912endif # SYSTEM_LIBXSLT_FOR_BUILD
3913
David Tardonce038cf2013-10-20 20:43:46 +02003914ifneq (,$(SYSTEM_UCPP))
3915
3916gb_ExternalExecutable__register_ucpp :=
3917
3918else # ! SYSTEM_UCPP
3919
3920define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003921$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003922
3923endef
3924
3925endif # SYSTEM_UCPP
3926
Matúš Kukane4826722013-03-05 22:03:38 +01003927ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003928
3929define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003930ifeq ($(OS),MACOSX)
3931
3932# use set_external, to avoid having the command added as prerequisite for the
3933# targets that make use of it. (Otherwise make will choke as it doesn't have a
3934# matching rule to build that specific file)
3935$(call gb_ExternalExecutable_set_external,python,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR))
3936# the Zip ensures that internal python has been built (cannot use the Package
3937# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003938$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003939
3940else
3941
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003942$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
Stephan Bergmann233610f2014-03-19 11:24:13 +01003943$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003944$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3945
3946endif
David Tardonc2eca352012-12-02 10:51:37 +01003947
3948endef
3949
Matúš Kukane4826722013-03-05 22:03:38 +01003950else
3951
3952define gb_ExternalExecutable__register_python
3953$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3954
3955endef
3956
3957endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003958
David Tardon63069262012-12-29 12:56:24 +01003959ifneq ($(SYSTEM_GENBRK),)
3960
3961define gb_ExternalExecutable__register_genbrk
3962$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3963
3964endef
3965
3966else # ! SYSTEM_GENBRK
3967
3968define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02003969$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01003970$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003971$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3972 $(call gb_Package_get_target_for_build,icu) \
3973)
3974
3975endef
3976
3977endif
3978
3979ifneq ($(SYSTEM_GENCCODE),)
3980
3981define gb_ExternalExecutable__register_genccode
3982$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3983
3984endef
3985
3986else # ! SYSTEM_GENCCODE
3987
3988define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02003989$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01003990$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003991$(call gb_ExternalExecutable_add_dependencies,genccode,\
3992 $(call gb_Package_get_target_for_build,icu) \
3993)
3994
3995endef
3996
3997endif
3998
3999ifneq ($(SYSTEM_GENCMN),)
4000
4001define gb_ExternalExecutable__register_gencmn
4002$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4003
4004endef
4005
4006else # ! SYSTEM_GENCMN
4007
4008define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02004009$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01004010$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01004011$(call gb_ExternalExecutable_add_dependencies,gencmn,\
4012 $(call gb_Package_get_target_for_build,icu) \
4013)
4014
4015endef
4016
4017endif
4018
Michael Stahlc74af0d2011-04-01 20:49:35 +00004019# vim: set noet sw=4 ts=4: