blob: 24bbab79fc2722d983c917377e34fcdea1802117 [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 Stahl5378dea2014-02-11 19:11:47 +010040ifneq ($(SYSTEM_ODBC_HEADERS),)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020041
42define gb_LinkTarget__use_odbc_headers
43$(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
45)
46
47endef
48
Michael Stahl5378dea2014-02-11 19:11:47 +010049else # !SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020050
51define gb_LinkTarget__use_odbc_headers
Michael Stahlfea65aa2013-05-06 20:09:47 +020052$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny891bb7c2013-11-04 18:40:17 +020053 -I$(SRCDIR)/external/unixODBC/inc \
Michael Stahlfea65aa2013-05-06 20:09:47 +020054 $$(INCLUDE) \
55)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020056
57endef
58
Michael Stahl5378dea2014-02-11 19:11:47 +010059endif # SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020060
Michael Stahle3abec32014-02-11 15:57:18 +010061ifneq ($(SYSTEM_MDDS),)
Matúš Kukan22f50fb2012-08-29 12:27:17 +020062
David Tardond5d39272014-03-03 15:29:27 +010063gb_ExternalProject__use_mdds_headers :=
64
David Tardon93aff252014-03-03 16:23:27 +010065define gb_LinkTarget__use_mdds_headers
66$(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
69)
70
71endef
Matúš Kukan22f50fb2012-08-29 12:27:17 +020072
Michael Stahle3abec32014-02-11 15:57:18 +010073else # !SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +020074
David Tardond5d39272014-03-03 15:29:27 +010075define gb_ExternalProject__use_mdds_headers
David Tardon7fffbdc2015-06-24 15:08:48 +020076$(call gb_ExternalProject_use_unpacked,$(1),mdds)
David Tardond5d39272014-03-03 15:29:27 +010077
78endef
79
Matúš Kukan22f50fb2012-08-29 12:27:17 +020080define gb_LinkTarget__use_mdds_headers
81$(call gb_LinkTarget_use_unpacked,$(1),mdds)
82$(call gb_LinkTarget_set_include,$(1),\
David Tardon93aff252014-03-03 16:23:27 +010083 $(MDDS_CFLAGS) \
Matúš Kukan22f50fb2012-08-29 12:27:17 +020084 $$(INCLUDE) \
85)
86
87endef
88
Michael Stahle3abec32014-02-11 15:57:18 +010089endif # SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +020090
Michael Stahlff69e722014-02-11 19:08:10 +010091ifneq ($(SYSTEM_GLM),)
Markus Mohrhardae9e6112013-12-23 17:31:55 +000092
93gb_LinkTarget__use_glm_headers :=
Zolnai Tamás6403f2b2014-06-25 15:19:41 +020094gb_ExternalProject__use_glm_headers :=
Markus Mohrhardae9e6112013-12-23 17:31:55 +000095
96else
97
98define gb_LinkTarget__use_glm_headers
99$(call gb_LinkTarget_use_unpacked,$(1),glm)
100$(call gb_LinkTarget_set_include,$(1),\
David Tardon13494912015-05-19 16:59:26 +0200101 $(GLM_CFLAGS) \
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000102 $$(INCLUDE) \
103)
104
105endef
106
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200107define gb_ExternalProject__use_glm_headers
David Tardon682e3592015-06-24 15:11:40 +0200108$(call gb_ExternalProject_use_unpacked,$(1),glm)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200109
110endef
111
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000112endif
113
Michael Stahl674e7912013-05-06 20:23:49 +0200114ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100115
116define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200117$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosnya62e7732013-11-04 18:33:52 +0200118 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
Michael Stahl72279ea2013-05-06 20:14:35 +0200119 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100120)
121
122endef
123
124else
125
126gb_LinkTarget__use_sane_headers :=
127
128endif
129
Michael Stahl8555b372014-02-11 19:28:33 +0100130ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100131
132gb_LinkTarget__use_bluez_bluetooth_headers :=
133
134else # !SYSTEM_BLUEZ
135
136define gb_LinkTarget__use_bluez_bluetooth_headers
137$(call gb_LinkTarget_set_include,$(1),\
138 -I$(SRCDIR)/external/bluez_bluetooth/inc \
139 $$(INCLUDE) \
140)
141
142endef
143
144endif # SYSTEM_BLUEZ
145
Matúš Kukan8e535df2012-04-07 13:59:33 +0200146# External libraries
147
Michael Stahle3abec32014-02-11 15:57:18 +0100148ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200149
150define gb_LinkTarget__use_cppunit
151$(call gb_LinkTarget_set_include,$(1),\
152 $$(INCLUDE) \
153 $(CPPUNIT_CFLAGS) \
154)
155
156$(call gb_LinkTarget_add_libs,$(1),\
157 $(CPPUNIT_LIBS) \
158)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100159
David Tardon785e1d92011-07-25 10:34:22 +0200160endef
161
Michael Stahle3abec32014-02-11 15:57:18 +0100162else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200163
David Tardon785e1d92011-07-25 10:34:22 +0200164define gb_LinkTarget__use_cppunit
Markus Mohrhardd63a9402016-02-23 11:28:31 +0100165$(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
Peter Foley143835b2012-11-25 16:37:40 -0500166
Peter Foley143835b2012-11-25 16:37:40 -0500167$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200168 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500169 $$(INCLUDE) \
170)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100171
Michael Stahl77fe50b2013-10-23 23:35:16 +0200172ifeq ($(COM),MSC)
173$(call gb_LinkTarget_add_libs,$(1),\
174 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
175)
176else
177$(call gb_LinkTarget_add_libs,$(1),\
178 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
179)
180endif
181
David Tardon785e1d92011-07-25 10:34:22 +0200182endef
183
Michael Stahle3abec32014-02-11 15:57:18 +0100184endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000185
Michael Stahlde299942016-09-27 21:27:03 +0200186ifneq ($(ENABLE_OPENGL)$(ENABLE_OPENGL_CANVAS)$(if $(filter ANDROID,$(OS)),TRUE),)
Tor Lillqvist65b27f82014-04-08 13:36:30 +0300187ifneq ($(SYSTEM_GLEW),)
David Tardon864f7752014-02-09 21:19:07 +0100188
189define gb_LinkTarget__use_glew
190$(call gb_LinkTarget_set_include,$(1),\
191 $$(INCLUDE) \
192 $(GLEW_CFLAGS) \
193)
194$(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
195
196endef
197
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200198gb_ExternalProject__use_glew :=
199
Michael Stahle3abec32014-02-11 15:57:18 +0100200else # !SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100201
Michael Stahl0c94f232014-03-18 17:17:04 +0100202$(eval $(call gb_Helper_register_packages_for_install,ooo,\
203 glew \
204))
205
David Tardon864f7752014-02-09 21:19:07 +0100206define gb_LinkTarget__use_glew
Matúš Kukan532e8cc2014-04-08 10:30:47 +0200207$(call gb_LinkTarget_use_package,$(1),glew)
David Tardon864f7752014-02-09 21:19:07 +0100208$(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
Stephan Bergmannfa50ede2015-03-02 20:22:42 +0100210 -DGLEW_NO_GLU \
David Tardon864f7752014-02-09 21:19:07 +0100211 $$(INCLUDE) \
212)
213
214ifeq ($(COM),MSC)
215$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +0100216 $(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 +0100217)
218else
219$(call gb_LinkTarget_add_libs,$(1),\
220 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
221)
222endif
223
224endef
225
Zolnai Tamás6403f2b2014-06-25 15:19:41 +0200226define gb_ExternalProject__use_glew
227$(call gb_ExternalProject_use_external_project,$(1),glew)
228
229endef
230
Michael Stahle3abec32014-02-11 15:57:18 +0100231endif # SYSTEM_GLEW
Oliver Specht96c1ae12016-03-23 13:40:13 +0100232endif # ENABLE_OPENGL
David Tardon864f7752014-02-09 21:19:07 +0100233
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200234ifneq ($(SYSTEM_GLYPHY),)
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200235
Tor Lillqviste461f7e2015-11-19 14:54:55 +0200236define gb_LinkTarget__use_glyphy
237$(call gb_LinkTarget_set_include,$(1),\
238 $$(INCLUDE) \
239 $(GLYPHY_CFLAGS) \
240)
241$(call gb_LinkTarget_add_libs,$(1),$(GLYPHY_LIBS))
242
243endef
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200244else # !SYSTEM_GLYPHY
245
Tor Lillqvistfdab1a62015-11-19 16:10:45 +0200246$(eval $(call gb_Helper_optional,GLYPHY,$(call gb_Helper_register_packages_for_install,ooo,\
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200247 glyphy \
Tor Lillqvistc4db7aa2015-11-19 16:06:49 +0200248)))
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200249
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200250define gb_LinkTarget__use_glyphy
251$(call gb_LinkTarget_use_package,$(1),glyphy)
252
253$(call gb_LinkTarget_set_include,$(1),\
Tor Lillqvist24beafd2015-11-16 20:16:32 +0200254 -I$(call gb_UnpackedTarball_get_dir,glyphy/src) \
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200255 $$(INCLUDE) \
256)
257
Tor Lillqvistc33a6352015-11-16 20:16:32 +0200258ifeq ($(COM),MSC)
259$(call gb_LinkTarget_add_libs,$(1),\
260 $(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs/libglyphy.lib \
261)
262else
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200263$(call gb_LinkTarget_add_libs,$(1),\
264 -L$(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs -lglyphy \
265)
Tor Lillqvistc33a6352015-11-16 20:16:32 +0200266endif
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200267endef
268
Tor Lillqvist4817f7f2015-11-02 18:14:10 +0200269endif # SYSTEM_GLYPHY
Markus Mohrhard8311c6e2015-10-14 15:06:55 +0200270
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200271define gb_LinkTarget__use_iconv
272$(call gb_LinkTarget_add_libs,$(1),-liconv)
273
274endef
275
Michael Stahl379f9782014-02-11 16:49:19 +0100276ifneq ($(SYSTEM_MARIADB),)
Peter Foleyc322d502013-01-23 16:29:08 -0500277
David Tardon217eae42013-11-05 06:49:33 +0100278define gb_LinkTarget__use_mariadb
279$(call gb_LinkTarget_set_include,$(1),\
280 $$(INCLUDE) \
281 $(MARIADB_CFLAGS) \
282)
283$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
284
285endef
286gb_ExternalProject__use_mariadb :=
287
288else # !SYSTEM_MARIADB
289
290define gb_LinkTarget__use_mariadb
291$(call gb_LinkTarget_set_include,$(1),\
292 $$(INCLUDE) \
293 $(MARIADB_CFLAGS) \
294)
295$(call gb_LinkTarget_use_static_libraries,$(1),\
296 mariadblib \
297)
298
299endef
300define gb_ExternalProject__use_mariadb
301$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
302
303endef
304
305endif # SYSTEM_MARIADB
306
307
Michael Stahl379f9782014-02-11 16:49:19 +0100308ifneq ($(SYSTEM_MARIADB),)
David Tardon217eae42013-11-05 06:49:33 +0100309
Peter Foleyc322d502013-01-23 16:29:08 -0500310define gb_LinkTarget__use_mysql
311
312$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100313 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500314)
315
316$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100317 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500318)
319
320$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100321 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500322 $$(INCLUDE) \
323)
324endef
325
326else
327
328define gb_LinkTarget__use_mysql
329
330$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500331 $$(INCLUDE) \
332)
333
334endef
335
336endif
337
Michael Stahl0443d0a2014-02-11 16:57:35 +0100338ifneq ($(SYSTEM_MYSQL_CPPCONN),)
Peter Foleyc322d502013-01-23 16:29:08 -0500339
340define gb_LinkTarget__use_mysqlcppconn
341$(call gb_LinkTarget_add_libs,$(1),\
342 -lmysqlcppconn \
343)
344
345$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500346 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500347)
348endef
349
350else
351
Stephan Bergmann5afa25c2015-06-12 16:26:25 +0200352$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
Peter Foleyc322d502013-01-23 16:29:08 -0500353 mysqlcppconn \
354))
355
Michael Stahl5f356bd2013-01-28 23:53:30 +0100356# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500357define gb_LinkTarget__use_mysqlcppconn
358
Michael Stahl5f356bd2013-01-28 23:53:30 +0100359$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
360
Peter Foleyb02d7992013-01-24 15:43:52 -0500361$(call gb_LinkTarget_add_defs,$(1),\
362 -DCPPCONN_LIB_BUILD \
363)
364
Peter Foleyc322d502013-01-23 16:29:08 -0500365$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200366 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
367 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500368 $$(INCLUDE) \
369)
370
371endef
372
373endif
374
Michael Stahl04ff5352014-02-11 16:21:04 +0100375ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000376
377define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000378$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000379 -DSYSTEM_ZLIB \
380)
381$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100382
Michael Stahlc74af0d2011-04-01 20:49:35 +0000383endef
384
David Tardoncb276232012-10-26 15:33:26 +0200385# nothing on system
386define gb_LinkTarget__use_zlib_x64
387
388endef
389
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100390gb_ExternalProject__use_zlib :=
391
Michael Stahlc74af0d2011-04-01 20:49:35 +0000392else # !SYSTEM_ZLIB
393
David Tardoncb276232012-10-26 15:33:26 +0200394define gb_LinkTarget__use_zlib_multiarch
395$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
396
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200397$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200398 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200399 $$(INCLUDE) \
400)
David Tardoncb276232012-10-26 15:33:26 +0200401
Michael Stahlc923f7d2012-04-07 23:22:08 +0200402$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200403 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000404)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100405
Michael Stahlc74af0d2011-04-01 20:49:35 +0000406endef
407
David Tardoncb276232012-10-26 15:33:26 +0200408define gb_LinkTarget__use_zlib
409$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
410
411endef
412
413define gb_LinkTarget__use_zlib_x64
414$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
415
416endef
417
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100418define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100419$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
420
421endef
422
Michael Stahlc74af0d2011-04-01 20:49:35 +0000423endif # SYSTEM_ZLIB
424
425
Michael Stahl46648152014-02-11 16:33:18 +0100426ifneq ($(SYSTEM_JPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000427
428define gb_LinkTarget__use_jpeg
Michael Stahl20655442016-11-02 14:13:54 +0100429$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000430$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000431 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000432)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100433
Michael Stahlc74af0d2011-04-01 20:49:35 +0000434endef
435
Michael Stahl20655442016-11-02 14:13:54 +0100436gb_ExternalProject__use_jpeg :=
437
Stephan Bergmann2d6ee4e2014-12-03 08:26:17 +0100438else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100439
440define gb_LinkTarget__use_jpeg
441$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl20655442016-11-02 14:13:54 +0100442 $(LIBJPEG_CFLAGS) \
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100443 $$(INCLUDE) \
444)
Michael Stahl20655442016-11-02 14:13:54 +0100445$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
Stephan Bergmann8d34d362016-02-18 12:51:41 +0100446$(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
Matúš Kukan71fae5d2014-11-17 09:16:34 +0100447
448endef
449
Michael Stahl20655442016-11-02 14:13:54 +0100450define gb_ExternalProject__use_jpeg
451$(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
452
453endef
454
Michael Stahlc74af0d2011-04-01 20:49:35 +0000455else # !SYSTEM_JPEG
456
Michael Stahlc74af0d2011-04-01 20:49:35 +0000457define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100458$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl20655442016-11-02 14:13:54 +0100459 $(LIBJPEG_CFLAGS) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100460 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100461)
462
Michael Stahlc923f7d2012-04-07 23:22:08 +0200463$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200464 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000465)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100466
Jan-Marek Glogowski47fbca72016-11-03 13:14:42 +0100467endef
468
Michael Stahl20655442016-11-02 14:13:54 +0100469define gb_ExternalProject__use_jpeg
470$(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
471
472endef
473
Michael Stahlc74af0d2011-04-01 20:49:35 +0000474endif # SYSTEM_JPEG
475
Michael Stahlab586f12014-02-11 19:25:30 +0100476ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400477
478define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100479$(call gb_LinkTarget_set_include,$(1),\
480 $$(INCLUDE) \
481 $(MYTHES_CFLAGS) \
482)
483$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
484
Peter Foley1d1bab42012-10-28 12:00:06 -0400485endef
486
487else # !SYSTEM_MYTHES
488
Peter Foley1d1bab42012-10-28 12:00:06 -0400489define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200490$(call gb_LinkTarget_set_include,$(1),\
491 -I$(call gb_UnpackedTarball_get_dir,mythes) \
492 $$(INCLUDE) \
493)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200494
495ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100496$(call gb_LinkTarget_use_static_libraries,$(1),\
497 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400498)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200499else
500$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
501$(call gb_LinkTarget_use_external_project,$(1),mythes)
502endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100503
Peter Foley1d1bab42012-10-28 12:00:06 -0400504endef
505
506endif # SYSTEM_MYTHES
507
Michael Stahlc74af0d2011-04-01 20:49:35 +0000508
Michael Stahl46648152014-02-11 16:33:18 +0100509ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000510
David Tardon51149802013-04-09 09:22:20 +0200511define gb_LinkTarget__use_expat_impl
512$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000513
Michael Stahla88ef232011-04-13 16:11:41 +0000514$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000515 -DSYSTEM_EXPAT \
516)
517
518$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100519
Michael Stahlc74af0d2011-04-01 20:49:35 +0000520endef
521
Michael Stahl77289672012-11-17 00:36:29 +0100522gb_ExternalProject__use_expat :=
523
Michael Stahlc74af0d2011-04-01 20:49:35 +0000524else # !SYSTEM_EXPAT
525
David Tardon51149802013-04-09 09:22:20 +0200526define gb_LinkTarget__use_expat_impl
527$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000528
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700529$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200530 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700531 $$(INCLUDE) \
532)
533
Michael Stahlc923f7d2012-04-07 23:22:08 +0200534$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000535 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000536)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100537
Michael Stahlc74af0d2011-04-01 20:49:35 +0000538endef
539
Michael Stahl77289672012-11-17 00:36:29 +0100540define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100541$(call gb_ExternalProject_use_static_libraries,$(1),expat)
542
543endef
544
Michael Stahlc74af0d2011-04-01 20:49:35 +0000545endif # SYSTEM_EXPAT
546
David Tardon51149802013-04-09 09:22:20 +0200547define gb_LinkTarget__use_expat
548$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100549
Michael Stahlc74af0d2011-04-01 20:49:35 +0000550endef
551
David Tardon51149802013-04-09 09:22:20 +0200552define gb_LinkTarget__use_expat_x64
553$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100554
Michael Stahlc74af0d2011-04-01 20:49:35 +0000555endef
556
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100557ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400558
559define gb_LinkTarget__use_hyphen
560$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
561
562endef
563
564else # !SYSTEM_HYPH
565
Peter Foleydd584cb2012-11-03 13:54:46 -0400566define gb_LinkTarget__use_hyphen
567$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
568$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200569 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400570 $$(INCLUDE) \
571)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200572
573ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400574$(call gb_LinkTarget_use_static_libraries,$(1),\
575 hyphen \
576)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200577else
578$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
579$(call gb_LinkTarget_use_external_project,$(1),hyphen)
580endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400581
582endef
583
584endif # SYSTEM_HYPH
585
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100586ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100587
588define gb_LinkTarget__use_hunspell
589$(call gb_LinkTarget_set_include,$(1),\
590 $$(INCLUDE) \
591 $(HUNSPELL_CFLAGS) \
592)
593$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
594
595endef
596
Michael Stahl2f6261f2013-09-19 19:28:36 +0200597gb_ExternalProject__use_hunspell :=
598
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100599else # !SYSTEM_HUNSPELL
600
601define gb_LinkTarget__use_hunspell
602$(call gb_LinkTarget_add_defs,$(1),\
603 -DHUNSPELL_STATIC \
604)
Matúš Kukan7a030392012-10-29 23:29:37 +0100605$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100606$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200607 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100608 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100609)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200610
611ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200612$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100613 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100614)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200615else
616$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
617$(call gb_LinkTarget_use_external_project,$(1),hunspell)
618endif
619
620endef
621
622define gb_ExternalProject__use_hunspell
623$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100624
625endef
626
627endif # SYSTEM_HUNSPELL
628
629
Michael Stahladddbbc2014-02-11 18:40:09 +0100630ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200631
David Tardon57c439a2016-03-08 06:06:36 +0100632define gb_LinkTarget__use_boost_lib
David Tardon0f6919c2012-06-06 17:04:01 +0200633$(call gb_LinkTarget_set_include,$(1),\
634 $$(INCLUDE) \
635 $(BOOST_CPPFLAGS) \
636)
637
638$(call gb_LinkTarget_add_ldflags,$(1),\
639 $(BOOST_LDFLAGS) \
640)
641
David Tardon57c439a2016-03-08 06:06:36 +0100642$(call gb_LinkTarget_add_libs,$(1),$(2))
643
644endef
645
David Tardon23d2e0e2016-03-08 08:35:59 +0100646define gb_LinkTarget__use_boost_date_time
David Tardon57c439a2016-03-08 06:06:36 +0100647$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
David Tardon0f6919c2012-06-06 17:04:01 +0200648
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200649endef
650
David Tardonb4339fa2016-03-08 06:08:36 +0100651define gb_LinkTarget__use_boost_filesystem
652$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
653
654endef
655
656gb_ExternalProject__use_boost_filesystem :=
657
Markus Mohrhard36788e92014-01-08 13:17:28 +0100658define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100659$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
Markus Mohrhard36788e92014-01-08 13:17:28 +0100660
661endef
662
David Tardon6d9de6b2014-03-03 20:39:13 +0100663gb_ExternalProject__use_boost_iostreams :=
664
Markus Mohrhard36788e92014-01-08 13:17:28 +0100665define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100666$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
Tor Lillqvist503b2482013-05-22 19:50:22 +0300667
668endef
669
Markus Mohrhard36788e92014-01-08 13:17:28 +0100670gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300671
Stephan Bergmann93208022013-02-16 22:56:19 +0100672define gb_LinkTarget__use_boost_headers
673$(call gb_LinkTarget_set_include,$(1),\
674 $$(INCLUDE) \
675 $(BOOST_CPPFLAGS) \
676)
677
678endef
679
Peter Foleycdb6eca2012-11-10 08:56:12 -0500680gb_ExternalProject__use_boost_headers:=
681
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200682else # !SYSTEM_BOOST
683
David Tardon57c439a2016-03-08 06:06:36 +0100684define gb_LinkTarget__use_boost_lib
Michael Stahl7f2e1682012-09-06 20:22:11 +0200685$(call gb_LinkTarget_add_defs,$(1),\
686 -DBOOST_ALL_NO_LIB \
687)
688
David Tardon57c439a2016-03-08 06:06:36 +0100689$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
690
691endef
692
David Tardon23d2e0e2016-03-08 08:35:59 +0100693define gb_LinkTarget__use_boost_date_time
694$(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200695
696endef
697
David Tardond72a33c2016-03-08 05:57:40 +0100698define gb_LinkTarget__use_boost_filesystem
David Tardon57c439a2016-03-08 06:06:36 +0100699$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
David Tardond72a33c2016-03-08 05:57:40 +0100700
701endef
702
703define gb_ExternalProject__use_boost_filesystem
704$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
705endef
706
Markus Mohrhard36788e92014-01-08 13:17:28 +0100707define gb_LinkTarget__use_boost_iostreams
David Tardon57c439a2016-03-08 06:06:36 +0100708$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300709
710endef
711
Markus Mohrhard36788e92014-01-08 13:17:28 +0100712define gb_ExternalProject__use_boost_iostreams
713$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
714endef
715
716define gb_LinkTarget__use_boost_system
David Tardon57c439a2016-03-08 06:06:36 +0100717$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
Markus Mohrhard36788e92014-01-08 13:17:28 +0100718
719endef
720
721define gb_ExternalProject__use_boost_system
722$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300723endef
724
Peter Foleye1f742a2012-11-12 18:37:10 -0500725define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100726$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100727$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200728 -I$(call gb_UnpackedTarball_get_dir,boost) \
Michael Stahla53586f2013-01-26 21:19:13 +0100729 $$(INCLUDE) \
730)
Peter Foleye1f742a2012-11-12 18:37:10 -0500731
732endef
733
Peter Foleycdb6eca2012-11-10 08:56:12 -0500734define gb_ExternalProject__use_boost_headers
David Tardon682e3592015-06-24 15:11:40 +0200735$(call gb_ExternalProject_use_unpacked,$(1),boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500736
737endef
David Tardond72a33c2016-03-08 05:57:40 +0100738
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200739endif # SYSTEM_BOOST
740
741
Michael Stahle3abec32014-02-11 15:57:18 +0100742ifneq ($(SYSTEM_CMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100743
744define gb_LinkTarget__use_cmis
745$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100746 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200747 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100748)
Matúš Kukan707194e2012-09-06 18:19:34 +0200749$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100750
751endef
752
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100753else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100754
Matúš Kukan464b4332012-01-15 02:12:49 +0100755define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200756$(call gb_LinkTarget_set_include,$(1),\
757 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
758 $$(INCLUDE) \
759)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200760$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100761 cmislib \
762)
763
764endef
765
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100766endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100767
David Tardon32cd12c2014-04-26 19:46:40 +0200768ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200769
Peter Foleye5ccda42012-12-25 11:23:58 -0500770ifeq ($(OS)$(COM),WNTGCC)
771
772define gb_LinkTarget__use_jawt
David Tardon943dedc2014-04-26 15:50:10 +0200773$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
774
775$(call gb_LinkTarget_add_ldflags,$(1),\
776 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
777)
778
779$(call gb_LinkTarget_add_libs,$(1),\
David Tardon2a71e152014-04-26 16:08:07 +0200780 $(JAWTLIB) \
Peter Foleye5ccda42012-12-25 11:23:58 -0500781)
782
783endef
784
785else # $(OS)$(COM) != WNTGCC
786
David Tardon2a71e152014-04-26 16:08:07 +0200787define gb_LinkTarget__use_jawt
788$(call gb_LinkTarget_add_libs,$(1),\
789 $(JAWTLIB) \
790)
791
792endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500793
794endif # $(OS)$(COM) = WNTGCC
795
David Tardon2a71e152014-04-26 16:08:07 +0200796else # !ENABLE_JAVA
797
798gb_LinkTarget__use_jawt :=
799
800endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100801
Michael Stahl23647592014-02-11 19:04:20 +0100802ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100803
804define gb_LinkTarget__use_libatomic_ops
805$(call gb_LinkTarget_set_include,$(1),\
806 $$(INCLUDE) \
807 $(LIBATOMIC_OPS_CFLAGS) \
808)
809$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
810
811endef
812gb_ExternalProject__use_libatomic_ops :=
813
814else # !SYSTEM_LIBATOMIC_OPS
815
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100816define gb_LinkTarget__use_libatomic_ops
817$(call gb_LinkTarget_set_include,$(1),\
818$(LIBATOMIC_OPS_CFLAGS) \
819 $$(INCLUDE) \
820 $(LIBATOMIC_OPS_CFLAGS) \
821)
Michael Stahlb3085262013-10-24 12:22:58 +0200822$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100823 libatomic_ops \
824)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100825
Michael Stahlb3085262013-10-24 12:22:58 +0200826$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100827 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100828)
829
830endef
831
832define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200833$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100834
835endef
836
837endif # SYSTEM_LIBATOMIC_OPS
838
839
Michael Stahle3abec32014-02-11 15:57:18 +0100840ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100841
842define gb_LinkTarget__use_libexttextcat
843$(call gb_LinkTarget_set_include,$(1),\
844 $$(INCLUDE) \
845 $(LIBEXTTEXTCAT_CFLAGS) \
846)
Peter Foley31219f02012-11-09 17:25:56 -0500847$(call gb_LinkTarget_add_defs,$(1),\
848 -DSYSTEM_LIBEXTTEXTCAT \
849)
Matúš Kukanbd030302011-12-03 15:06:52 +0100850$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
851
852endef
853
854else # !SYSTEM_LIBEXTTEXTCAT
855
Matúš Kukanbd030302011-12-03 15:06:52 +0100856define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500857$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200858 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500859 $$(INCLUDE) \
860)
Matúš Kukanbd030302011-12-03 15:06:52 +0100861
Michael Stahl2f6261f2013-09-19 19:28:36 +0200862ifeq ($(COM),MSC)
863$(call gb_LinkTarget_use_static_libraries,$(1),\
864 exttextcat \
865)
866else
867$(call gb_LinkTarget_add_libs,$(1),\
868 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
869)
David Tardon523a3042013-10-12 18:22:55 +0200870$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200871endif
872
873
Matúš Kukanbd030302011-12-03 15:06:52 +0100874endef
875
876endif # SYSTEM_LIBEXTTEXTCAT
877
878
Michael Stahl379f9782014-02-11 16:49:19 +0100879ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000880
881define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000882$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000883 -DSYSTEM_LIBXML \
884)
885$(call gb_LinkTarget_set_include,$(1),\
886 $$(INCLUDE) \
887 $(LIBXML_CFLAGS) \
888)
889$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100890
Michael Stahlc74af0d2011-04-01 20:49:35 +0000891endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500892gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000893
894else # !SYSTEM_LIBXML
895
Michael Stahl64ea9942014-03-14 11:48:24 +0100896$(eval $(call gb_Helper_register_packages_for_install,ure,\
897 xml2 \
898))
899
Michael Stahlc74af0d2011-04-01 20:49:35 +0000900define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500901$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500902$(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
David Tardon7515b1a2014-07-17 17:27:05 +0200904 $(LIBXML_CFLAGS) \
905)
906
907$(call gb_LinkTarget_add_libs,$(1),\
908 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500909)
910
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200911ifeq ($(COM),MSC)
David Tardon7515b1a2014-07-17 17:27:05 +0200912$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200913endif
914
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500915endef
916define gb_ExternalProject__use_libxml2
917$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100918
David Tardon7515b1a2014-07-17 17:27:05 +0200919ifeq ($(COM),MSC)
920$(call gb_ExternalProject_use_external_project,$(1),icu)
921endif
922
Michael Stahlc74af0d2011-04-01 20:49:35 +0000923endef
924
925endif # SYSTEM_LIBXML
926
927
Michael Stahle3abec32014-02-11 15:57:18 +0100928ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000929
930define gb_LinkTarget__use_libxslt
931$(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBXSLT_CFLAGS) \
934)
935$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100936
Michael Stahlc74af0d2011-04-01 20:49:35 +0000937endef
938
David Tardonab03e872012-08-15 07:20:13 +0200939define gb_LinkTarget__use_libexslt
940$(call gb_LinkTarget_set_include,$(1),\
941 $$(INCLUDE) \
942 $(LIBEXSLT_CFLAGS) \
943)
944
945$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
946
947endef
948
Michael Stahlc74af0d2011-04-01 20:49:35 +0000949else # !SYSTEM_LIBXSLT
950
Michael Stahl32a617d2014-02-17 11:23:19 +0100951$(eval $(call gb_Helper_register_packages_for_install,ooo,\
952 xslt \
953))
954
Michael Stahlc74af0d2011-04-01 20:49:35 +0000955define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500956$(call gb_LinkTarget_use_package,$(1),xslt)
957$(call gb_LinkTarget_set_include,$(1),\
958 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200959 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500960)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200961
962ifeq ($(COM),MSC)
963$(call gb_LinkTarget_add_libs,$(1),\
964 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000965)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200966else
967$(call gb_LinkTarget_add_libs,$(1),\
968 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
969)
970endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100971
Michael Stahlc74af0d2011-04-01 20:49:35 +0000972endef
973
David Tardonab03e872012-08-15 07:20:13 +0200974define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -0500975$(call gb_LinkTarget_use_package,$(1),xslt)
976$(call gb_LinkTarget_set_include,$(1),\
977 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200978 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500979)
980
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200981ifeq ($(COM),MSC)
982$(call gb_LinkTarget_add_libs,$(1),\
983 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200984)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200985else
986$(call gb_LinkTarget_add_libs,$(1),\
987 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
988)
989endif
David Tardonab03e872012-08-15 07:20:13 +0200990
991endef
992
Michael Stahlc74af0d2011-04-01 20:49:35 +0000993endif # SYSTEM_LIBXSLT
994
Norbert Thiebaud587d9692013-08-29 10:38:00 -0500995ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200996
Michael Stahl49dde4c2014-02-11 19:42:28 +0100997ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +0200998
999define gb_LinkTarget__use_liblangtag
1000$(call gb_LinkTarget_set_include,$(1),\
1001 $$(INCLUDE) \
1002 $(LIBLANGTAG_CFLAGS) \
1003)
1004
1005$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1006
1007endef
1008
David Tardonc2a119b2016-01-13 14:24:31 +01001009gb_ExternalProject__use_liblangtag :=
1010
Eike Rathkea774a482012-08-06 19:22:43 +02001011else # !SYSTEM_LIBLANGTAG
1012
Michael Stahl01adcd82014-03-18 17:38:06 +01001013$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1014 liblangtag_data \
1015))
1016
David Tardon7d93bb82016-01-13 15:45:17 +01001017ifeq ($(COM),MSC)
1018
Eike Rathkea774a482012-08-06 19:22:43 +02001019define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001020$(call gb_LinkTarget_set_include,$(1),\
David Tardon34513502016-01-13 14:21:10 +01001021 $(LIBLANGTAG_CFLAGS) \
Peter Foley782151a2012-11-11 16:02:36 -05001022 $$(INCLUDE) \
1023)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001024$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1025$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001026
1027endef
1028
David Tardon7d93bb82016-01-13 15:45:17 +01001029else
1030
1031$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1032 liblangtag \
1033))
1034
1035define gb_LinkTarget__use_liblangtag
1036$(call gb_LinkTarget_set_include,$(1),\
1037 $(LIBLANGTAG_CFLAGS) \
1038 $$(INCLUDE) \
1039)
1040$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1041$(call gb_LinkTarget_use_package,$(1),liblangtag)
1042
1043endef
1044
1045endif # MSC
1046
David Tardonc2a119b2016-01-13 14:24:31 +01001047define gb_ExternalProject__use_liblangtag
1048$(call gb_ExternalProject_use_external_project,$(1),langtag)
1049
1050endef
1051
Eike Rathkea774a482012-08-06 19:22:43 +02001052endif # SYSTEM_LIBLANGTAG
1053
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001054else
1055
1056gb_LinkTarget__use_liblangtag :=
David Tardonc2a119b2016-01-13 14:24:31 +01001057gb_ExternalProject__use_liblangtag :=
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001058
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001059endif # ENABLE_LIBLANGTAG
1060
Matúš Kukandcae0502014-02-25 21:47:33 +01001061gb_ExternalProject__use_apr :=
1062
1063ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001064
1065define gb_LinkTarget__use_apr
1066$(call gb_LinkTarget_set_include,$(1),\
1067 $$(INCLUDE) \
1068 $(APR_CFLAGS) \
1069)
1070$(call gb_LinkTarget_add_libs,$(1),\
1071 $(APR_LIBS) \
Michael Stahl5cf22052014-06-05 13:35:14 +02001072 $(if $(filter $(OS),LINUX),-lpthread) \
1073 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001074)
1075
1076ifeq ($(SYSTEM_APR),)
1077$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1078 mswsock \
1079 rpcrt4 \
1080 shell32 \
1081)
1082$(call gb_LinkTarget_add_defs,$(1),\
1083 -DAPR_DECLARE_STATIC \
1084 -DAPU_DECLARE_STATIC \
1085)
1086$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1087endif
1088
1089endef
1090
1091define gb_ExternalProject__use_apr
1092ifeq ($(SYSTEM_APR),)
1093$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1094endif
1095
1096endef
1097
1098define gb_LinkTarget__use_serf
1099$(call gb_LinkTarget_set_include,$(1),\
1100 $(SERF_CFLAGS) \
1101 $$(INCLUDE) \
1102)
1103$(call gb_LinkTarget_add_libs,$(1),\
1104 $(SERF_LIBS) \
1105)
1106
1107ifeq ($(SYSTEM_SERF),)
1108$(call gb_LinkTarget_use_external_project,$(1),serf)
1109endif
1110
1111endef
1112
Matúš Kukandcae0502014-02-25 21:47:33 +01001113else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001114
Michael Stahle3abec32014-02-11 15:57:18 +01001115ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001116
1117define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001118$(call gb_LinkTarget_add_defs,$(1),\
1119 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001120 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001121)
Matúš Kukan464b4332012-01-15 02:12:49 +01001122$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001123 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001124 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001125)
1126
1127$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1128
1129endef
1130
1131else # !SYSTEM_NEON
1132
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001133$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001134 neon \
1135))
1136
1137define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001138$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001139$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001140 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001141 $$(INCLUDE) \
1142)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001143$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001144 neon \
1145)
1146
1147endef
1148
1149endif # SYSTEM_NEON
1150
Matúš Kukandcae0502014-02-25 21:47:33 +01001151endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001152
Michael Stahle3abec32014-02-11 15:57:18 +01001153ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001154
1155define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001156$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001157 -DSYSTEM_REDLAND \
1158)
1159$(call gb_LinkTarget_set_include,$(1),\
1160 $$(INCLUDE) \
1161 $(REDLAND_CFLAGS) \
1162)
1163$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001164
Michael Stahlc74af0d2011-04-01 20:49:35 +00001165endef
1166
Peter Foley18bd1e72012-12-27 18:04:21 -05001167gb_LinkTarget__use_redland_headers:=
1168
1169gb_LinkTarget__use_raptor_headers:=
1170
1171gb_LinkTarget__use_rasqal_headers:=
1172
Michael Stahlc74af0d2011-04-01 20:49:35 +00001173else # !SYSTEM_REDLAND
1174
Peter Foley18bd1e72012-12-27 18:04:21 -05001175define gb_LinkTarget__use_redland_headers
1176$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001177 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001178 $$(INCLUDE) \
1179)
1180
1181endef
1182
1183define gb_LinkTarget__use_raptor_headers
1184$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001185 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001186 $$(INCLUDE) \
1187)
1188
1189endef
1190
1191define gb_LinkTarget__use_rasqal_headers
1192$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001193 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001194 $$(INCLUDE) \
1195)
1196
1197endef
1198
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001199ifneq ($(OS),ANDROID)
1200
Michael Stahl5f9cda22013-11-01 15:43:47 +01001201ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001202$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001203 raptor2 \
1204 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001205 rdf \
1206))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001207else
1208$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1209 raptor \
1210 rasqal \
1211 redland \
1212))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001213endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001214
1215define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001216ifeq ($(COM),MSC)
1217$(call gb_LinkTarget_use_libraries,$(1),\
1218 raptor2 \
1219 rdf \
1220)
1221else
Matúš Kukan85d1e392013-12-14 11:17:30 +01001222$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1223
Michael Stahl2793c542013-10-23 21:18:24 +02001224$(call gb_LinkTarget_add_libs,$(1),\
1225 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1226 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001227)
Michael Stahl831aaef2013-10-24 01:09:35 +02001228endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001229
Michael Stahlc74af0d2011-04-01 20:49:35 +00001230endef
1231
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001232else # ANDROID
1233
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001234define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001235$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001236
1237endef
1238
1239endif # ANDROID
1240
Michael Stahlc74af0d2011-04-01 20:49:35 +00001241endif # SYSTEM_REDLAND
1242
1243
Michael Stahlf7a6da22016-02-29 21:15:09 +01001244ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
Michael Stahl32a617d2014-02-17 11:23:19 +01001245
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001246ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001247
Michael Stahlc74af0d2011-04-01 20:49:35 +00001248define gb_LinkTarget__use_cairo
1249$(call gb_LinkTarget_set_include,$(1),\
1250 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001251 $(CAIRO_CFLAGS) \
1252)
David Tardon962771f2013-05-24 14:35:18 +02001253$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001254$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001255
Michael Stahlc74af0d2011-04-01 20:49:35 +00001256endef
1257
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001258else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001259
Michael Stahl32a617d2014-02-17 11:23:19 +01001260$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1261 cairo \
1262 $(if $(filter $(OS),WNT),,pixman) \
1263))
1264
Michael Stahlc74af0d2011-04-01 20:49:35 +00001265define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001266$(call gb_LinkTarget_use_package,$(1),cairo)
1267$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001268$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001269$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001270 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1271 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001272 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001273)
Michael Stahld89f48b2013-10-23 21:27:05 +02001274$(call gb_LinkTarget_add_libs,$(1),\
1275 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001276 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001277 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001278 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001279)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001280
Michael Stahlc74af0d2011-04-01 20:49:35 +00001281endef
1282
1283endif # SYSTEM_CAIRO
1284
Caolán McNamarafb7d4ba2015-11-16 13:40:22 +00001285else ifeq ($(OS),ANDROID)
1286
1287define gb_LinkTarget__use_cairo
1288$(call gb_LinkTarget_use_package,$(1),cairo)
1289$(call gb_LinkTarget_use_package,$(1),pixman)
1290$(call gb_LinkTarget_use_external,$(1),freetype_headers)
1291$(call gb_LinkTarget_set_include,$(1),\
1292 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1293 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1294 $$(INCLUDE) \
1295)
1296$(call gb_LinkTarget_add_libs,$(1),\
1297 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1298 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1299)
1300
1301endef
1302
Michael Stahl32a617d2014-02-17 11:23:19 +01001303endif # CAIRO
1304
Michael Stahl379f9782014-02-11 16:49:19 +01001305ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001306
1307define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001308$(call gb_LinkTarget_set_include,$(1),\
1309 $$(INCLUDE) \
1310 $(FREETYPE_CFLAGS) \
1311)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001312
David Tardon962771f2013-05-24 14:35:18 +02001313endef
1314
1315define gb_LinkTarget__use_freetype
1316$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001317$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1318
1319endef
1320
Michael Stahle568d2a2013-09-30 14:10:22 +02001321gb_ExternalProject__use_freetype :=
1322
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02001323else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001324
1325define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001326$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001327$(call gb_LinkTarget_set_include,$(1),\
1328 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1329 $$(INCLUDE) \
1330)
1331
David Tardon61695f12013-05-24 17:15:20 +02001332endef
1333
David Tardon962771f2013-05-24 14:35:18 +02001334define gb_LinkTarget__use_freetype
1335$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Jan Holesovskyfe5dbe32014-04-22 00:41:57 +02001336$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
David Tardon962771f2013-05-24 14:35:18 +02001337
1338endef
1339
Michael Stahle568d2a2013-09-30 14:10:22 +02001340define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001341$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001342
1343endef
1344
David Tardon962771f2013-05-24 14:35:18 +02001345endif # SYSTEM_FREETYPE
1346
Michael Stahl04ff5352014-02-11 16:21:04 +01001347ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001348
Caolán McNamarab41ae462011-07-25 22:24:27 +01001349define gb_LinkTarget__use_fontconfig
1350$(call gb_LinkTarget_set_include,$(1),\
1351 $$(INCLUDE) \
1352 $(FONTCONFIG_CFLAGS) \
1353)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001354
Caolán McNamarab41ae462011-07-25 22:24:27 +01001355$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1356
1357endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001358
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001359else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001360
David Tardon4eb68422013-05-24 14:16:03 +02001361define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001362$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001363$(call gb_LinkTarget_set_include,$(1),\
1364 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1365 $$(INCLUDE) \
1366)
1367
David Tardon4eb68422013-05-24 14:16:03 +02001368endef
1369
1370endif # SYSTEM_FONTCONFIG
1371
David Tardon026dc562014-05-30 19:50:24 +02001372ifeq ($(ENABLE_GRAPHITE),TRUE)
1373
Michael Stahle3abec32014-02-11 15:57:18 +01001374ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001375
Michael Stahl87e44332011-04-13 16:11:39 +00001376define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001377$(call gb_LinkTarget_set_include,$(1),\
1378 $$(INCLUDE) \
1379 $(GRAPHITE_CFLAGS) \
1380)
1381$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001382
Michael Stahl87e44332011-04-13 16:11:39 +00001383endef
1384
Michael Stahle3abec32014-02-11 15:57:18 +01001385else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001386
Michael Stahl87e44332011-04-13 16:11:39 +00001387define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001388$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001389$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001390 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001391 $$(INCLUDE) \
1392)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001393$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001394 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001395)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001396
Michael Stahl87e44332011-04-13 16:11:39 +00001397endef
1398
1399endif # SYSTEM_GRAPHITE
1400
David Tardon026dc562014-05-30 19:50:24 +02001401else # !ENABLE_GRAPHITE
1402
1403gb_LinkTarget__use_graphite :=
1404
1405endif # ENABLE_GRAPHITE
1406
Michael Stahl187194b2014-02-11 19:17:42 +01001407ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001408
Peter Foleyb92a0d92012-12-25 17:39:43 -05001409gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001410gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001411
Matúš Kukan6fad1752011-08-11 12:42:39 +02001412define gb_LinkTarget__use_icudata
1413$(call gb_LinkTarget_add_libs,$(1),-licudata)
1414
1415endef
David Tardon1a852392011-07-26 09:58:54 +02001416define gb_LinkTarget__use_icui18n
1417$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001418
David Tardon1a852392011-07-26 09:58:54 +02001419endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001420define gb_LinkTarget__use_icuuc
1421$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001422
Michael Stahlc74af0d2011-04-01 20:49:35 +00001423endef
1424
1425else # !SYSTEM_ICU
1426
Michael Stahl057613c2014-07-24 00:22:51 +02001427$(eval $(call gb_Helper_register_packages_for_install,ure, \
1428 icu_ure \
1429))
1430
Michael Stahle7592692014-03-14 11:23:52 +01001431$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1432 icu \
1433))
1434
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001435ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001436gb_ICU_suffix:=lo
1437else
1438gb_ICU_suffix:=
1439endif
1440
Peter Foleyb92a0d92012-12-25 17:39:43 -05001441define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001442$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001443$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001444 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1445 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1446 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001447 $$(INCLUDE) \
1448)
1449
1450endef
1451
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001452define gb_ExternalProject__use_icu
1453$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001454
1455endef
1456
Peter Foleyf7452122012-11-04 08:46:44 -05001457# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001458define gb_LinkTarget__use_icudata
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001459$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001460
1461ifeq ($(OS),WNT)
1462$(call gb_LinkTarget_add_libs,$(1),\
1463 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001464)
Michael Stahla92f80f2013-10-23 15:00:29 +02001465else
1466$(call gb_LinkTarget_add_libs,$(1),\
1467 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1468)
1469endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001470
1471endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001472
1473define gb_LinkTarget__use_icui18n
1474$(call gb_LinkTarget_use_package,$(1),icu)
1475
1476ifeq ($(OS),WNT)
1477$(call gb_LinkTarget_add_libs,$(1),\
1478 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1479)
1480else
1481$(call gb_LinkTarget_add_libs,$(1),\
1482 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1483)
1484endif
1485
1486endef
1487
Michael Stahlc74af0d2011-04-01 20:49:35 +00001488define gb_LinkTarget__use_icuuc
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001489$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001490
1491ifeq ($(OS),WNT)
1492$(call gb_LinkTarget_add_libs,$(1),\
1493 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001494)
Michael Stahla92f80f2013-10-23 15:00:29 +02001495else
1496$(call gb_LinkTarget_add_libs,$(1),\
1497 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1498)
1499endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001500
Michael Stahlc74af0d2011-04-01 20:49:35 +00001501endef
1502
1503endif # SYSTEM_ICU
1504
Fridrich Štrba9a943e52013-04-23 11:23:17 +02001505ifeq ($(ENABLE_HARFBUZZ),TRUE)
Michael Stahle3abec32014-02-11 15:57:18 +01001506ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001507
1508define gb_LinkTarget__use_harfbuzz
1509$(call gb_LinkTarget_set_include,$(1),\
1510 $$(INCLUDE) \
1511 $(HARFBUZZ_CFLAGS) \
1512)
1513$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1514
1515endef
1516
Michael Stahle3abec32014-02-11 15:57:18 +01001517else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001518
Khaled Hosny7e389f42013-04-20 13:00:56 +02001519define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001520$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001521 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001522 $$(INCLUDE) \
1523)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001524$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1525$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001526
1527endef
1528
1529endif # SYSTEM_HARFBUZZ
1530else # ENABLE_HARFBUZZ != YES
1531
1532gb_LinkTarget__use_harfbuzz :=
1533
1534endif # ENABLE_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001535
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001536ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001537
1538gb_ExternalProject__use_openssl:=
1539gb_LinkTarget__use_openssl_headers:=
1540gb_LinkTarget__use_openssl:=
1541
1542else # !DISABLE_OPENSSL
1543
Michael Stahle3abec32014-02-11 15:57:18 +01001544ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001545
Peter Foley9ddba662012-12-28 11:19:06 -05001546gb_LinkTarget__use_openssl_headers:=
1547gb_ExternalProject__use_openssl:=
1548
Michael Stahl4a8919f2011-04-18 11:13:57 +00001549define gb_LinkTarget__use_openssl
1550$(call gb_LinkTarget_set_include,$(1),\
1551 $$(INCLUDE) \
1552 $(OPENSSL_CFLAGS) \
1553)
1554$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001555
Michael Stahl4a8919f2011-04-18 11:13:57 +00001556endef
1557
1558else # !SYSTEM_OPENSSL
1559
Michael Stahlf921e262014-03-13 19:36:48 +01001560$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1561 openssl \
1562))
1563
Peter Foley9ddba662012-12-28 11:19:06 -05001564define gb_ExternalProject__use_openssl
1565$(call gb_ExternalProject_use_package,$(1),openssl)
1566
1567endef
1568
1569define gb_LinkTarget__use_openssl_headers
Michael Stahlc7ca0712016-03-07 21:18:23 +01001570$(call gb_LinkTarget_use_external_project,$(1),openssl)
Peter Foley9ddba662012-12-28 11:19:06 -05001571$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001572 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001573 $$(INCLUDE) \
1574)
1575
1576endef
1577
Michael Stahl4a8919f2011-04-18 11:13:57 +00001578define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001579$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001580ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001581$(call gb_LinkTarget_add_libs,$(1),\
1582 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1583 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001584)
1585else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001586$(call gb_LinkTarget_add_libs,$(1),\
1587 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1588 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001589)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001590$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001591ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001592$(call gb_LinkTarget_add_libs,$(1),\
1593 -lnsl \
1594 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001595)
1596endif
1597endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001598
Michael Stahl4a8919f2011-04-18 11:13:57 +00001599endef
1600
1601endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001602endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001603
Matúš Kukanc4560482011-07-28 01:03:23 +02001604
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001605ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001606
1607define gb_LinkTarget__use_gnutls
1608$(call gb_LinkTarget_set_include,$(1),\
1609 $$(INCLUDE) \
1610 $(GNUTLS_CFLAGS) \
1611)
1612
1613$(call gb_LinkTarget_add_defs,$(1),\
1614 -DDISABLE_OPENSSL \
1615)
1616
1617$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1618
1619endef
1620
1621define gb_LinkTarget__use_libgcrypt
1622$(call gb_LinkTarget_set_include,$(1),\
1623 $$(INCLUDE) \
1624 $(LIBGCRYPT_CFLAGS) \
1625)
1626
1627$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1628
1629endef
1630
1631else # !DISABLE_OPENSSL
1632
1633gb_LinkTarget__use_gnutls:=
1634gb_LinkTarget__use_libgcrypt:=
1635
1636endif # DISABLE_OPENSSL
1637
1638
Michael Stahle3abec32014-02-11 15:57:18 +01001639ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001640
1641define gb_LinkTarget__use_cdr
1642$(call gb_LinkTarget_set_include,$(1),\
1643 $$(INCLUDE) \
1644 $(CDR_CFLAGS) \
1645)
1646$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1647
1648endef
1649
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001650else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001651
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001652define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001653$(call gb_LinkTarget_set_include,$(1),\
1654 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1655 $$(INCLUDE) \
1656)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001657$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001658 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001659)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001660$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001661endef
1662
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001663endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001664
1665
Michael Stahle3abec32014-02-11 15:57:18 +01001666ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001667
1668define gb_LinkTarget__use_ebook
1669$(call gb_LinkTarget_set_include,$(1),\
1670 $$(INCLUDE) \
1671 $(EBOOK_CFLAGS) \
1672)
1673$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1674
1675endef
1676
1677gb_ExternalProject__use_ebook :=
1678
1679else # !SYSTEM_EBOOK
1680
1681define gb_LinkTarget__use_ebook
1682$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001683 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001684 $$(INCLUDE) \
1685)
1686$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001687 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001688)
1689$(call gb_LinkTarget_use_external_project,$(1),libebook)
1690
1691endef
1692
1693define gb_ExternalProject__use_ebook
1694$(call gb_ExternalProject_use_external_project,$(1),libebook)
1695
1696endef
1697
1698endif # SYSTEM_EBOOK
1699
1700
Michael Stahle3abec32014-02-11 15:57:18 +01001701ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001702
1703define gb_LinkTarget__use_etonyek
1704$(call gb_LinkTarget_set_include,$(1),\
1705 $$(INCLUDE) \
1706 $(ETONYEK_CFLAGS) \
1707)
1708$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1709
1710endef
1711
1712gb_ExternalProject__use_etonyek :=
1713
1714else # !SYSTEM_ETONYEK
1715
David Tardon78deb812015-05-19 16:12:08 +02001716ifeq ($(COM),MSC)
1717
1718$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1719 etonyek \
1720))
1721
David Tardon08ca3e42013-10-24 16:46:49 +02001722define gb_LinkTarget__use_etonyek
1723$(call gb_LinkTarget_set_include,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001724 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1725 $$(INCLUDE) \
1726)
1727$(call gb_LinkTarget_use_libraries,$(1),\
1728 etonyek \
1729)
1730
1731endef
1732
1733else # !MSC
1734
1735$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1736 libetonyek \
1737))
1738
1739define gb_LinkTarget__use_etonyek
1740$(call gb_LinkTarget_use_package,$(1),libetonyek)
1741
1742$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001743 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon78deb812015-05-19 16:12:08 +02001744 -DLIBETONYEK_VISIBILITY \
David Tardon08ca3e42013-10-24 16:46:49 +02001745 $$(INCLUDE) \
1746)
1747$(call gb_LinkTarget_add_libs,$(1),\
David Tardon78deb812015-05-19 16:12:08 +02001748 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
David Tardon08ca3e42013-10-24 16:46:49 +02001749)
1750$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1751
1752endef
1753
1754define gb_ExternalProject__use_etonyek
1755$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1756
1757endef
1758
David Tardon78deb812015-05-19 16:12:08 +02001759endif
1760
David Tardon08ca3e42013-10-24 16:46:49 +02001761endif # SYSTEM_ETONYEK
1762
1763
Michael Stahle3abec32014-02-11 15:57:18 +01001764ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001765
1766define gb_LinkTarget__use_freehand
1767$(call gb_LinkTarget_set_include,$(1),\
1768 $$(INCLUDE) \
1769 $(FREEHAND_CFLAGS) \
1770)
1771$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1772
1773endef
1774
1775gb_ExternalProject__use_freehand :=
1776
1777else # !SYSTEM_FREEHAND
1778
1779define gb_LinkTarget__use_freehand
1780$(call gb_LinkTarget_set_include,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001781 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001782 $$(INCLUDE) \
1783)
1784$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001785 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001786)
1787$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1788
1789endef
1790
1791define gb_ExternalProject__use_freehand
1792$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1793
1794endef
1795
1796endif # SYSTEM_FREEHAND
1797
1798
Michael Stahle3abec32014-02-11 15:57:18 +01001799ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001800
1801define gb_LinkTarget__use_odfgen
1802$(call gb_LinkTarget_set_include,$(1),\
1803 $$(INCLUDE) \
1804 $(ODFGEN_CFLAGS) \
1805)
1806$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1807
1808endef
1809
1810else # !SYSTEM_ODFGEN
1811
David Tardon36c3f912014-05-24 09:13:33 +02001812ifeq ($(COM),MSC)
1813
1814$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1815 odfgen \
1816))
1817
Fridrich Štrba93848e12013-05-02 20:25:51 +02001818define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001819$(call gb_LinkTarget_set_include,$(1),\
1820 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1821 $$(INCLUDE) \
1822)
David Tardon36c3f912014-05-24 09:13:33 +02001823$(call gb_LinkTarget_use_libraries,$(1),\
1824 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001825)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001826
1827endef
1828
David Tardon36c3f912014-05-24 09:13:33 +02001829else # !MSC
1830
1831$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1832 libodfgen \
1833))
1834
1835define gb_LinkTarget__use_odfgen
1836$(call gb_LinkTarget_use_package,$(1),libodfgen)
1837
1838$(call gb_LinkTarget_set_include,$(1),\
1839 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001840 -DLIBODFGEN_VISIBILITY \
David Tardon36c3f912014-05-24 09:13:33 +02001841 $$(INCLUDE) \
1842)
1843$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001844 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon36c3f912014-05-24 09:13:33 +02001845)
1846
1847endef
1848
1849endif
1850
Fridrich Štrba93848e12013-05-02 20:25:51 +02001851endif # SYSTEM_ODFGEN
1852
1853
David Tardonb421ce72014-05-24 08:39:54 +02001854ifneq ($(SYSTEM_REVENGE),)
1855
1856define gb_LinkTarget__use_revenge
1857$(call gb_LinkTarget_set_include,$(1),\
1858 $$(INCLUDE) \
1859 $(REVENGE_CFLAGS) \
1860)
1861$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1862
1863endef
1864
David Tardon7c9c7792014-05-25 13:06:57 +02001865gb_ExternalProject__use_revenge :=
1866
David Tardonb421ce72014-05-24 08:39:54 +02001867else # !SYSTEM_REVENGE
1868
1869ifeq ($(COM),MSC)
1870
1871$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1872 revenge \
1873))
1874
1875define gb_LinkTarget__use_revenge
1876$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001877 $(REVENGE_CFLAGS) \
David Tardonb421ce72014-05-24 08:39:54 +02001878 $$(INCLUDE) \
1879)
1880$(call gb_LinkTarget_use_libraries,$(1),\
1881 revenge \
1882)
1883
1884endef
1885
David Tardon7c9c7792014-05-25 13:06:57 +02001886define gb_ExternalProject__use_revenge
1887$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1888
1889endef
1890
David Tardonb421ce72014-05-24 08:39:54 +02001891else # !MSC
1892
1893$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1894 librevenge \
1895))
1896
1897define gb_LinkTarget__use_revenge
1898$(call gb_LinkTarget_use_package,$(1),librevenge)
1899
1900$(call gb_LinkTarget_set_include,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001901 $(REVENGE_CFLAGS) \
Stephan Bergmannb6ee5cf2015-01-26 15:09:13 +01001902 -DLIBREVENGE_VISIBILITY \
David Tardonb421ce72014-05-24 08:39:54 +02001903 $$(INCLUDE) \
1904)
1905$(call gb_LinkTarget_add_libs,$(1),\
David Tardon0b7d0a82014-05-25 13:19:31 +02001906 $(REVENGE_LIBS) \
David Tardonb421ce72014-05-24 08:39:54 +02001907)
1908endef
1909
David Tardon7c9c7792014-05-25 13:06:57 +02001910define gb_ExternalProject__use_revenge
1911$(call gb_ExternalProject_use_package,$(1),librevenge)
1912
1913endef
1914
David Tardonb421ce72014-05-24 08:39:54 +02001915endif # MSC
1916
1917endif # SYSTEM_REVENGE
1918
1919
Michael Stahle3abec32014-02-11 15:57:18 +01001920ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001921
1922define gb_LinkTarget__use_abw
1923$(call gb_LinkTarget_set_include,$(1),\
1924 $$(INCLUDE) \
1925 $(ABW_CFLAGS) \
1926)
1927$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1928
1929endef
1930gb_ExternalProject__use_abw :=
1931
1932else # !SYSTEM_ABW
1933
1934define gb_LinkTarget__use_abw
1935$(call gb_LinkTarget_set_include,$(1),\
1936 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1937 $$(INCLUDE) \
1938)
1939$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001940 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001941)
1942$(call gb_LinkTarget_use_external_project,$(1),libabw)
1943
1944endef
1945define gb_ExternalProject__use_abw
1946$(call gb_ExternalProject_use_external_project,$(1),libabw)
1947
1948endef
1949
1950endif # SYSTEM_ABW
1951
1952
Michael Stahle3abec32014-02-11 15:57:18 +01001953ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001954
1955define gb_LinkTarget__use_mspub
1956$(call gb_LinkTarget_set_include,$(1),\
1957 $$(INCLUDE) \
1958 $(MSPUB_CFLAGS) \
1959)
1960$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1961
1962endef
1963
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001964else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001965
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001966define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001967$(call gb_LinkTarget_set_include,$(1),\
1968 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1969 $$(INCLUDE) \
1970)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001971$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02001972 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001973)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001974$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001975
1976endef
1977
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001978endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001979
1980
David Tardon516fb342014-06-26 21:26:11 +02001981ifneq ($(SYSTEM_PAGEMAKER),)
1982
1983define gb_LinkTarget__use_pagemaker
1984$(call gb_LinkTarget_set_include,$(1),\
1985 $$(INCLUDE) \
1986 $(PAGEMAKER_CFLAGS) \
1987)
1988$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1989
1990endef
1991gb_ExternalProject__use_pagemaker :=
1992
1993else # !SYSTEM_PAGEMAKER
1994
1995define gb_LinkTarget__use_pagemaker
1996$(call gb_LinkTarget_set_include,$(1),\
1997 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1998 $$(INCLUDE) \
1999)
2000$(call gb_LinkTarget_add_libs,$(1),\
2001 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2002)
2003$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2004
2005endef
2006define gb_ExternalProject__use_pagemaker
2007$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2008
2009endef
2010
2011endif # SYSTEM_PAGEMAKER
2012
2013
Michael Stahle3abec32014-02-11 15:57:18 +01002014ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002015
2016define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002017$(call gb_LinkTarget_set_include,$(1),\
2018 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002019 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002020)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02002021$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002022
2023endef
2024
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002025else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002026
Matúš Kukanc6a63952011-07-28 17:29:44 +02002027define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02002028$(call gb_LinkTarget_set_include,$(1),\
2029 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2030 $$(INCLUDE) \
2031)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002032$(call gb_LinkTarget_add_libs,$(1),\
David Tardon48c9d7a2014-05-24 14:21:21 +02002033 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01002034)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002035$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002036
2037endef
2038
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01002039endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02002040
2041
Michael Stahle3abec32014-02-11 15:57:18 +01002042ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002043
2044define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002045$(call gb_LinkTarget_set_include,$(1),\
2046 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002047 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002048)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02002049$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002050
2051endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002052gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002053
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002054else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002055
David Tardonc868a0c2014-12-23 18:37:54 +01002056ifeq ($(COM),MSC)
2057
2058$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2059 wpd \
2060))
2061
Fridrich Štrba4425db62012-09-24 13:17:45 +02002062define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02002063$(call gb_LinkTarget_set_include,$(1),\
2064 $(WPD_CFLAGS) \
2065 $$(INCLUDE) \
2066)
David Tardonc868a0c2014-12-23 18:37:54 +01002067$(call gb_LinkTarget_use_libraries,$(1),\
2068 wpd \
Michael Stahl34295432012-09-24 22:25:28 +02002069)
Fridrich Štrba4425db62012-09-24 13:17:45 +02002070
2071endef
David Tardonc868a0c2014-12-23 18:37:54 +01002072
Michael Stahl2b7536a2012-10-05 21:17:25 +02002073define gb_ExternalProject__use_wpd
David Tardonc868a0c2014-12-23 18:37:54 +01002074$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002075
2076endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02002077
David Tardonc868a0c2014-12-23 18:37:54 +01002078else # !MSC
2079
2080$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2081 libwpd \
2082))
2083
2084define gb_LinkTarget__use_wpd
2085$(call gb_LinkTarget_use_package,$(1),libwpd)
2086
2087$(call gb_LinkTarget_set_include,$(1),\
2088 $(WPD_CFLAGS) \
2089 $$(INCLUDE) \
2090)
2091$(call gb_LinkTarget_add_libs,$(1),\
2092 $(WPD_LIBS) \
2093)
2094
2095endef
2096
2097define gb_ExternalProject__use_wpd
2098$(call gb_ExternalProject_use_package,$(1),libwpd)
2099
2100endef
2101
2102endif # MSC
2103
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01002104endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02002105
2106
Michael Stahle3abec32014-02-11 15:57:18 +01002107ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002108
2109define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002110$(call gb_LinkTarget_set_include,$(1),\
2111 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002112 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002113)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02002114$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002115
2116endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002117gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002118
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002119else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002120
David Tardonc868a0c2014-12-23 18:37:54 +01002121ifeq ($(COM),MSC)
2122
2123$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2124 wpg \
2125))
2126
Matúš Kukanc6a63952011-07-28 17:29:44 +02002127define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02002128$(call gb_LinkTarget_set_include,$(1),\
2129 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2130 $$(INCLUDE) \
2131)
David Tardonc868a0c2014-12-23 18:37:54 +01002132$(call gb_LinkTarget_use_libraries,$(1),\
2133 wpg \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002134)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002135
2136endef
David Tardonc868a0c2014-12-23 18:37:54 +01002137
2138else # !MSC
2139
2140$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2141 libwpg \
2142))
2143
2144define gb_LinkTarget__use_wpg
2145$(call gb_LinkTarget_use_package,$(1),libwpg)
2146
2147$(call gb_LinkTarget_set_include,$(1),\
2148 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2149 $$(INCLUDE) \
2150)
2151$(call gb_LinkTarget_add_libs,$(1),\
2152 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2153)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002154
2155endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002156
David Tardonc868a0c2014-12-23 18:37:54 +01002157endif # MSC
2158
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002159endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002160
2161
Michael Stahle3abec32014-02-11 15:57:18 +01002162ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002163
2164define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002165$(call gb_LinkTarget_set_include,$(1),\
2166 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002167 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002168)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002169$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002170
2171endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002172gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002173
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002174else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002175
David Tardonf85d10f2014-05-30 15:35:48 +02002176ifeq ($(COM),MSC)
2177
2178$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2179 wps \
2180))
2181
Matúš Kukanc6a63952011-07-28 17:29:44 +02002182define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002183$(call gb_LinkTarget_set_include,$(1),\
2184 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2185 $$(INCLUDE) \
2186)
David Tardonf85d10f2014-05-30 15:35:48 +02002187
2188$(call gb_LinkTarget_use_libraries,$(1),\
2189 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002190)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002191
2192endef
David Tardonf85d10f2014-05-30 15:35:48 +02002193
2194else # !MSC
2195
2196$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2197 libwps \
2198))
2199
2200define gb_LinkTarget__use_wps
2201$(call gb_LinkTarget_use_package,$(1),libwps)
2202
2203$(call gb_LinkTarget_set_include,$(1),\
2204 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2205 $$(INCLUDE) \
2206)
2207$(call gb_LinkTarget_add_libs,$(1),\
osnolaf9568332015-05-18 10:21:10 +02002208 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
David Tardonf85d10f2014-05-30 15:35:48 +02002209)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002210
2211endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002212
David Tardonf85d10f2014-05-30 15:35:48 +02002213endif # MSC
2214
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002215endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002216
2217
Michael Stahle3abec32014-02-11 15:57:18 +01002218ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002219
2220define gb_LinkTarget__use_mwaw
2221$(call gb_LinkTarget_set_include,$(1),\
2222 $$(INCLUDE) \
2223 $(MWAW_CFLAGS) \
2224)
2225$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2226
2227endef
2228
2229else # !SYSTEM_MWAW
2230
David Tardon79211c12014-05-30 13:55:20 +02002231ifeq ($(COM),MSC)
2232
2233$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2234 mwaw \
2235))
2236
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002237define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002238$(call gb_LinkTarget_set_include,$(1),\
2239 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2240 $$(INCLUDE) \
2241)
David Tardon79211c12014-05-30 13:55:20 +02002242
2243$(call gb_LinkTarget_use_libraries,$(1),\
2244 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002245)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002246
2247endef
2248
David Tardon79211c12014-05-30 13:55:20 +02002249else # !MSC
2250
2251$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2252 libmwaw \
2253))
2254
2255define gb_LinkTarget__use_mwaw
2256$(call gb_LinkTarget_use_package,$(1),libmwaw)
2257
2258$(call gb_LinkTarget_set_include,$(1),\
2259 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2260 $$(INCLUDE) \
2261)
2262$(call gb_LinkTarget_add_libs,$(1),\
2263 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2264)
2265
2266endef
2267
2268endif # MSC
2269
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002270endif # SYSTEM_MWAW
2271
2272
Michael Stahle3abec32014-02-11 15:57:18 +01002273ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002274
2275define gb_LinkTarget__use_lcms2
2276$(call gb_LinkTarget_set_include,$(1),\
2277 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002278 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002279)
2280$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2281
2282endef
2283
Peter Foley8905c0e2012-11-08 21:00:30 -05002284gb_ExternalProject__use_lcms2 :=
2285
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002286else # !SYSTEM_LCMS2
2287
Michael Stahl32a617d2014-02-17 11:23:19 +01002288$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2289 lcms2 \
2290))
2291
Peter Foley8905c0e2012-11-08 21:00:30 -05002292define gb_ExternalProject__use_lcms2
2293$(call gb_ExternalProject_use_package,$(1),lcms2)
2294
2295endef
2296
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002297ifeq ($(OS),ANDROID)
2298
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002299define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002300$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002301$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002302 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002303 $$(INCLUDE) \
2304)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002305
2306endef
2307
2308else
2309
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002310define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002311$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002312$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002313 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002314 $$(INCLUDE) \
2315)
Michael Stahl25f65f22013-10-23 22:04:36 +02002316$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002317
2318endef
2319
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002320endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002321endif # SYSTEM_LCMS2
2322
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002323ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002324
Michael Stahlab586f12014-02-11 19:25:30 +01002325ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002326
Peter Foley085346f2012-11-03 19:19:30 -04002327define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002328$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002329$(call gb_LinkTarget_add_defs,$(1),\
2330 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002331)
Matúš Kukanc4560482011-07-28 01:03:23 +02002332
2333endef
2334
2335else # !SYSTEM_LPSOLVE
2336
Peter Foley085346f2012-11-03 19:19:30 -04002337define gb_LinkTarget__use_lpsolve
2338$(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002339ifeq ($(COM),MSC)
2340$(call gb_LinkTarget_add_libs,$(1),\
2341 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2342)
2343else
Michael Stahlb177b302013-10-23 21:33:51 +02002344$(call gb_LinkTarget_add_libs,$(1),\
2345 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002346)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002347endif
Peter Foley085346f2012-11-03 19:19:30 -04002348$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002349 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002350 $$(INCLUDE) \
2351)
Matúš Kukanc4560482011-07-28 01:03:23 +02002352
2353endef
2354
Matúš Kukan083fa762014-02-27 17:08:09 +01002355$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2356 lpsolve \
2357))
2358
Matúš Kukanc4560482011-07-28 01:03:23 +02002359endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002360
Matúš Kukan077bdc72014-03-27 14:51:46 +01002361else
2362
2363gb_LinkTarget__use_lpsolve :=
2364
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002365endif # ENABLE_LPSOLVE
2366
2367ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002368
Rene Engelhardd85f5132014-08-06 00:03:21 +02002369ifneq ($(SYSTEM_COINMP),TRUE)
2370
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002371define gb_LinkTarget__use_coinmp
2372$(call gb_LinkTarget_use_package,$(1),coinmp)
2373ifeq ($(COM),MSC)
2374$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovsky152e2a22014-11-30 18:26:01 +01002375 $(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 +01002376)
2377else
2378$(call gb_LinkTarget_add_libs,$(1),\
2379 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2380 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2381 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2382 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2383 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2384 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2385 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2386)
2387endif
2388$(call gb_LinkTarget_set_include,$(1),\
2389 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
Caolán McNamara67b4b342014-06-06 14:32:09 +01002390 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002391 $$(INCLUDE) \
2392)
2393
2394endef
2395
2396$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2397 coinmp \
2398))
2399
Rene Engelhardd85f5132014-08-06 00:03:21 +02002400else # SYSTEM_COINMP
2401
2402define gb_LinkTarget__use_coinmp
2403$(call gb_LinkTarget_set_include,$(1),\
2404 $$(INCLUDE) \
2405 $(COINMP_CFLAGS) \
2406)
2407$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2408
2409endef
2410
2411endif
2412
Matúš Kukan077bdc72014-03-27 14:51:46 +01002413else
2414
2415gb_LinkTarget__use_coinmp :=
2416
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002417endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002418
Michael Stahl9ec0e6d2015-11-27 23:54:40 +01002419ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2420
2421define gb_LinkTarget__use_mDNSResponder
2422$(call gb_LinkTarget_set_include,$(1),\
2423 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2424 $$(INCLUDE) \
2425)
2426$(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2427endef
2428
2429endif # MDNSRESPONDER
2430
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002431ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002432
Matúš Kukan464b4332012-01-15 02:12:49 +01002433define gb_LinkTarget__use_gio
2434$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002435 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002436 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002437)
2438
2439$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2440
2441endef
2442
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002443else # ENABLE_GIO
2444
2445define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002446
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002447endef
2448
2449endif # ENABLE_GIO
2450
Siqid0419802013-07-24 11:16:31 +02002451ifeq ($(ENABLE_AVAHI),TRUE)
2452
2453define gb_LinkTarget__use_avahi
2454$(call gb_LinkTarget_set_include,$(1),\
2455 $$(INCLUDE) \
2456 $(AVAHI_CFLAGS) \
2457)
2458
2459$(call gb_LinkTarget_add_defs,$(1),\
2460 -DENABLE_AVAHI \
2461)
2462
2463$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2464
2465endef
2466
2467else # ENABLE_AVAHI
2468
David Tardon9ce38ef2013-11-05 07:03:08 +01002469gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002470
2471endif # ENABLE_AVAHI
2472
2473
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002474define gb_LinkTarget__use_gtk
2475$(call gb_LinkTarget_set_include,$(1),\
2476 $$(INCLUDE) \
2477 $(GTK_CFLAGS) \
2478)
2479
2480$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2481
David Tardonadb11052011-12-01 13:39:09 +01002482ifeq ($(ENABLE_GTK_PRINT),TRUE)
2483
2484$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2485
2486$(call gb_LinkTarget_set_include,$(1),\
2487 $$(INCLUDE) \
2488 $(GTK_PRINT_CFLAGS) \
2489)
2490
2491$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2492
2493endif
2494
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002495endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002496
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002497define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002498$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002499endef
2500
Caolán McNamara68ffb332012-09-14 11:31:50 +01002501ifeq ($(ENABLE_CUPS),TRUE)
2502
2503define gb_LinkTarget__use_cups
2504$(call gb_LinkTarget_add_defs,$(1),\
2505 -DENABLE_CUPS \
2506)
2507
2508$(call gb_LinkTarget_add_libs,$(1),\
2509 -lcups \
2510)
2511
2512endef
2513
2514else # ENABLE_CUPS
2515
2516define gb_LinkTarget__use_cups
2517
2518endef
2519
2520endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01002521
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002522ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002523
2524define gb_LinkTarget__use_dbus
2525$(call gb_LinkTarget_set_include,$(1),\
2526 $$(INCLUDE) \
2527 $(DBUS_CFLAGS) \
2528)
2529
David Tardon1b717ce2011-11-02 13:00:48 +01002530$(call gb_LinkTarget_add_libs,$(1),\
2531 $(DBUS_LIBS) \
2532)
2533
2534endef
2535
2536else # ENABLE_DBUS
2537
2538define gb_LinkTarget__use_dbus
2539
2540endef
2541
2542endif # ENABLE_DBUS
2543
2544
Bjoern Michaelsendd321062011-07-26 16:04:15 +02002545define gb_LinkTarget__use_dbusmenugtk
2546$(call gb_LinkTarget_set_include,$(1),\
2547 $$(INCLUDE) \
2548 $(DBUSMENUGTK_CFLAGS) \
2549)
2550
2551$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2552
2553endef
2554
Eike Rathkea3a8b802012-03-16 22:14:54 +01002555
2556ifeq ($(ENABLE_TELEPATHY),TRUE)
2557
2558define gb_LinkTarget__use_telepathy
2559$(call gb_LinkTarget_set_include,$(1),\
2560 $$(INCLUDE) \
2561 $(TELEPATHY_CFLAGS) \
2562)
2563
Eike Rathkea3a8b802012-03-16 22:14:54 +01002564$(call gb_LinkTarget_add_libs,$(1),\
2565 $(TELEPATHY_LIBS) \
2566)
2567
2568endef
2569
2570else # !ENABLE_TELEPATHY
2571
Matúš Kukanfe327622012-08-09 00:15:52 +02002572gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01002573
2574endif # ENABLE_TELEPATHY
2575
Michael Stahle3abec32014-02-11 15:57:18 +01002576ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002577
2578define gb_LinkTarget__use_png
2579$(call gb_LinkTarget_set_include,$(1),\
2580 $$(INCLUDE) \
2581 $(LIBPNG_CFLAGS) \
2582)
2583
2584$(call gb_LinkTarget_add_libs,$(1),\
2585 $(LIBPNG_LIBS) \
2586)
2587
2588endef
2589
2590else # !SYSTEM_LIBPNG
2591
David Tardon6df9c472011-09-15 14:44:34 +02002592define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002593$(call gb_LinkTarget_set_include,$(1),\
2594 $(LIBPNG_CFLAGS) \
2595 $$(INCLUDE) \
2596)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002597$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002598 png \
2599)
Michael Stahl398ce442012-09-28 21:47:29 +02002600$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002601
2602endef
2603
2604endif # !SYSTEM_LIBPNG
2605
Michael Stahl50471a82011-12-06 19:17:52 +01002606
Michael Stahle3abec32014-02-11 15:57:18 +01002607ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002608
2609define gb_LinkTarget__use_curl
Cédric Bosdonnat89361fa2014-07-16 17:02:01 +02002610$(call gb_LinkTarget_add_defs,$(1),\
2611 -DSYSTEM_CURL \
2612)
Michael Stahl50471a82011-12-06 19:17:52 +01002613$(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(CURL_CFLAGS) \
2616)
2617$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2618
2619endef
2620
2621else # !SYSTEM_CURL
2622
Michael Stahl32a617d2014-02-17 11:23:19 +01002623$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2624 curl \
2625))
2626
Michael Stahl50471a82011-12-06 19:17:52 +01002627define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002628$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002629$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002630 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002631 $$(INCLUDE) \
2632)
Michael Stahl936a1a92013-10-23 22:37:11 +02002633
2634ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002635$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl548da052014-06-02 01:35:41 +02002636 $(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 +01002637)
Michael Stahl936a1a92013-10-23 22:37:11 +02002638else
2639$(call gb_LinkTarget_add_libs,$(1),\
2640 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2641)
2642endif
Michael Stahl50471a82011-12-06 19:17:52 +01002643
2644endef
2645
2646endif # SYSTEM_CURL
2647
Stephan Bergmann49313b02012-11-27 15:35:02 +01002648ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002649
2650define gb_LinkTarget__use_valgrind
2651$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002652 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002653)
2654
2655$(call gb_LinkTarget_set_include,$(1),\
2656 $$(INCLUDE) \
2657 $(VALGRIND_CFLAGS) \
2658)
2659
2660endef
2661
Stephan Bergmann49313b02012-11-27 15:35:02 +01002662else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002663
2664define gb_LinkTarget__use_valgrind
2665
2666endef
2667
Stephan Bergmann49313b02012-11-27 15:35:02 +01002668endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002669
Michael Stahl32db4992014-02-11 19:35:22 +01002670ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002671
2672define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002673$(call gb_LinkTarget_set_include,$(1),\
2674 $(POPPLER_CFLAGS) \
2675 $$(INCLUDE) \
2676)
2677
2678$(call gb_LinkTarget_add_libs,$(1),\
2679 $(POPPLER_LIBS) \
2680)
2681
2682endef
2683
2684else # !SYSTEM_POPPLER
2685
David Tardondba2d322012-02-18 18:54:35 +01002686define gb_LinkTarget__use_poppler
David Tardoncad68c62015-09-29 18:09:16 +02002687$(call gb_LinkTarget_use_external_project,$(1),poppler,full)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002688
David Tardon548b61a2012-02-21 06:58:02 +01002689$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002690 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2691 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2692 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002693 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002694)
2695
Michael Stahl2f6261f2013-09-19 19:28:36 +02002696$(call gb_LinkTarget_add_libs,$(1),\
2697 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2698 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2699 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002700)
2701
Michael Stahl1a41a312016-11-03 15:58:08 +01002702$(call gb_LinkTarget_use_external,$(1),jpeg)
2703
David Tardon548b61a2012-02-21 06:58:02 +01002704ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002705$(call gb_LinkTarget_add_libs,$(1),\
2706 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002707)
Caolán McNamara0d5cc8c2014-08-30 15:12:53 +01002708else ifeq ($(OS),LINUX)
2709$(call gb_LinkTarget_add_libs,$(1),\
2710 -pthread \
2711)
David Tardon548b61a2012-02-21 06:58:02 +01002712else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002713$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002714 advapi32 \
2715 gdi32 \
2716)
2717endif
2718
David Tardondba2d322012-02-18 18:54:35 +01002719endef
2720
2721endif # SYSTEM_POPPLER
2722
David Tardon3446cda2011-12-23 12:21:19 +01002723
Michael Stahl46648152014-02-11 16:33:18 +01002724ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002725
2726define gb_LinkTarget__use_clucene
2727$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002728 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002729)
2730
2731$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002732 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
David Tardon22c60cb2012-04-07 15:50:47 +02002733 $$(INCLUDE) \
2734)
2735
2736$(call gb_LinkTarget_add_libs,$(1),\
2737 $(CLUCENE_LIBS) \
2738)
2739
2740endef
2741
2742else # !SYSTEM_CLUCENE
2743
2744define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002745$(call gb_LinkTarget_set_include,$(1),\
2746 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2747 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2748 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2749 $$(INCLUDE) \
2750)
2751
Michael Stahlc923f7d2012-04-07 23:22:08 +02002752$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002753 clucene \
2754)
2755
2756endef
2757
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002758$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002759 clucene \
2760))
2761
2762endif # SYSTEM_CLUCENE
2763
Peter Foley64402842011-12-22 16:34:35 -05002764define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002765$(call gb_LinkTarget_add_libs,$(1),\
2766 $(GOBJECT_LIBS) \
2767)
2768
2769$(call gb_LinkTarget_set_include,$(1),\
2770 $$(INCLUDE) \
2771 $(GOBJECT_CFLAGS) \
2772)
Peter Foley64402842011-12-22 16:34:35 -05002773endef
2774
Michael Stahl5866b332014-02-11 18:56:33 +01002775ifneq ($(SYSTEM_HSQLDB),)
David Tardon579f52d2012-03-27 16:36:31 +02002776
2777define gb_LinkTarget__use_hsqldb
2778
2779$(call gb_LinkTarget_add_defs,$(1),\
2780 -DSYSTEM_HSQLDB \
2781 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2782)
2783
2784endef
2785
2786else # !SYSTEM_HSQLDB
2787
2788define gb_LinkTarget__use_hsqldb
2789
2790endef
2791
2792endif # SYSTEM_HSQLDB
2793
David Tardon8bc7afb2012-04-05 10:53:08 +02002794
Michael Stahl5378dea2014-02-11 19:11:47 +01002795ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002796
2797define gb_LinkTarget__use_openldap
2798
2799$(call gb_LinkTarget_add_libs,$(1),\
2800 -lldap \
2801 -llber \
2802)
2803
2804endef
2805
Michael Stahl2f6261f2013-09-19 19:28:36 +02002806gb_ExternalProject__use_openldap :=
2807
Michael Stahl5378dea2014-02-11 19:11:47 +01002808else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002809
Michael Stahle0ee0d42012-07-16 19:00:07 +02002810define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002811$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002812$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002813 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002814 $$(INCLUDE) \
2815)
Stephan Bergmann6b4c4352015-10-09 09:21:48 +02002816$(call gb_LinkTarget_use_external_project,$(1),openldap,full)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002817$(call gb_LinkTarget_add_libs,$(1), \
2818 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2819 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002820)
2821
2822endef
2823
Michael Stahl2f6261f2013-09-19 19:28:36 +02002824define gb_ExternalProject__use_openldap
2825$(call gb_ExternalProject_use_external_project,$(1),openldap)
2826
2827endef
2828
Michael Stahle0ee0d42012-07-16 19:00:07 +02002829endif # SYSTEM_OPENLDAP
2830
2831
Javier Fernandezf53228c2013-05-10 18:21:30 +00002832ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2833
Michael Stahl23647592014-02-11 19:04:20 +01002834ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002835
Rene Engelhard0b68d702013-07-16 21:50:14 +02002836define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002837$(call gb_LinkTarget_set_include,$(1),\
2838 $(FIREBIRD_CFLAGS) \
2839 $$(INCLUDE) \
2840)
2841$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2842
2843endef
2844
2845# gb_LinkTarget__use_atomic_ops :=
2846# gb_LinkTarget__use_tommath :=
2847
2848else # !SYSTEM_FIREBIRD
2849
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002850#$(call gb_LinkTarget__use_libatomic_ops,$(1))
2851
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002852define gb_LinkTarget__use_libfbembed
2853$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002854$(call gb_LinkTarget_set_include,$(1),\
Javier Fernandezf53228c2013-05-10 18:21:30 +00002855 $$(INCLUDE) \
Andrzej J.R. Hunt7309fda2013-07-16 22:40:47 +02002856 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002857)
Michael Stahl37563db2013-10-22 22:22:49 +02002858ifeq ($(COM),MSC)
2859$(call gb_LinkTarget_add_libs,$(1),\
2860 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002861)
Michael Stahl37563db2013-10-22 22:22:49 +02002862else
2863$(call gb_LinkTarget_add_libs,$(1),\
2864 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2865)
2866endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002867
2868endef
2869
Javier Fernandezf53228c2013-05-10 18:21:30 +00002870# define gb_LinkTarget__use_tommath
2871# $(call gb_LinkTarget_set_include,$(1),\
2872# $(TOMMATH_CFLAGS) \
2873# $$(INCLUDE) \
2874# )
2875
2876# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2877
2878# endef
2879
2880endif # SYSTEM_FIREBIRD
2881
2882else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01002883
Javier Fernandezf53228c2013-05-10 18:21:30 +00002884gb_LinkTarget__use_firebird :=
2885# gb_LinkTarget__use_atomic_ops :=
2886# gb_LinkTarget__use_tommath :=
2887
2888endif # ENABLE_FIREBIRD_SDBC
2889
2890
Michael Stahl5866b332014-02-11 18:56:33 +01002891ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02002892
2893define gb_LinkTarget__use_postgresql
2894
David Tardon8bc7afb2012-04-05 10:53:08 +02002895$(call gb_LinkTarget_set_include,$(1),\
2896 $(POSTGRESQL_INC) \
2897 $$(INCLUDE) \
2898)
2899
2900$(call gb_LinkTarget_add_libs,$(1),\
2901 -lpq \
2902)
2903
2904$(call gb_LinkTarget_add_ldflags,$(1),\
2905 $(POSTGRESQL_LIB) \
2906)
2907
2908endef
2909
2910else # !SYSTEM_POSTGRESQL
2911
2912define gb_LinkTarget__use_postgresql
2913
Michael Stahl2f6261f2013-09-19 19:28:36 +02002914$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002915
David Tardon8bc7afb2012-04-05 10:53:08 +02002916$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002917 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2918 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002919 $$(INCLUDE) \
2920)
2921
Michael Stahl2f6261f2013-09-19 19:28:36 +02002922$(call gb_LinkTarget_add_libs,$(1),\
2923 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002924)
2925
Tor Lillqvistc2909892012-12-12 01:07:09 +02002926ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002927$(call gb_LinkTarget_use_external,$(1),openssl)
2928
Michael Stahldc397aae2012-09-28 15:31:46 +02002929$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02002930 secur32 \
2931 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02002932)
David Tardon8af6aa62012-05-30 12:06:42 +02002933
David Tardon8bc7afb2012-04-05 10:53:08 +02002934endif
2935
2936endef
2937
David Tardon8bc7afb2012-04-05 10:53:08 +02002938endif # SYSTEM_POSTGRESQL
2939
David Tardond4efa8b2012-04-28 20:48:14 +02002940ifeq ($(ENABLE_KDE4),TRUE)
2941
2942define gb_LinkTarget__use_kde4
2943$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002944 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002945 $$(INCLUDE) \
2946)
2947
2948$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002949 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
David Tardond4efa8b2012-04-28 20:48:14 +02002950)
2951
2952$(call gb_LinkTarget_add_libs,$(1),\
2953 $(KDE4_LIBS) \
2954)
2955
David Tardond4efa8b2012-04-28 20:48:14 +02002956endef
2957
2958else # !ENABLE_KDE4
2959
2960define gb_LinkTarget__use_kde4
2961
2962endef
2963
2964endif # ENABLE_KDE4
2965
2966
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002967ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02002968
2969define gb_LinkTarget__use_tde
2970$(call gb_LinkTarget_add_libs,$(1),\
2971 $(TDE_LIBS) \
2972)
2973
2974$(call gb_LinkTarget_set_include,$(1),\
2975 $$(INCLUDE) \
2976 $(TDE_CFLAGS) \
2977)
2978endef
2979
2980else # ! ENABLE_TDE
2981
2982define gb_LinkTarget__use_tde
2983
2984endef
2985
2986endif # ENABLE_TDE
2987
2988
David Ostrovskye16ac692012-05-27 22:50:41 +02002989# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01002990# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01002991ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02002992
Michael Stahl91926332012-11-27 15:50:53 +01002993define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02002994$(call gb_LinkTarget_add_defs,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002995 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02002996)
2997
2998$(call gb_LinkTarget_set_include,$(1),\
Markus Mohrhard62101bc2014-08-07 19:40:33 +02002999 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
David Ostrovskye16ac692012-05-27 22:50:41 +02003000 $$(INCLUDE) \
3001)
3002
Michael Stahl91926332012-11-27 15:50:53 +01003003endef
3004
3005define gb_LinkTarget__use_python
3006$(call gb_LinkTarget__use_python_headers,$(1))
3007
David Ostrovskye16ac692012-05-27 22:50:41 +02003008$(call gb_LinkTarget_add_libs,$(1),\
3009 $(PYTHON_LIBS) \
3010)
3011
3012endef
3013
3014else # !SYSTEM_PYTHON
3015
Michael Stahl720ca8e2014-03-18 18:24:15 +01003016$(eval $(call gb_Helper_register_packages_for_install,python,\
3017 python3 \
3018))
3019
Michael Stahl91926332012-11-27 15:50:53 +01003020define gb_LinkTarget__use_python_headers
David Tardoncad68c62015-09-29 18:09:16 +02003021$(call gb_LinkTarget_use_external_project,$(1),python3,full)
Michael Stahl91926332012-11-27 15:50:53 +01003022$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003023 -I$(call gb_UnpackedTarball_get_dir,python3) \
3024 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3025 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003026 $$(INCLUDE) \
3027)
3028
3029endef
3030
David Ostrovskye16ac692012-05-27 22:50:41 +02003031define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003032$(call gb_LinkTarget__use_python_headers,$(1))
Michael Stahld9162d22015-07-29 12:17:03 +02003033ifeq ($(OS),MACOSX)
3034$(call gb_LinkTarget_use_generated_package,$(1),python3)
3035else
Michael Stahl57dd4d02015-07-29 10:56:57 +02003036$(call gb_LinkTarget_use_package,$(1),python3)
Michael Stahld9162d22015-07-29 12:17:03 +02003037endif
David Ostrovskye16ac692012-05-27 22:50:41 +02003038
3039ifeq ($(OS),WNT)
3040$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskye04c7342016-02-27 14:14:12 +01003041 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)$(if $(filter 140-INTEL,$(VCVER)-$(CPUNAME)),/win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02003042)
3043else ifeq ($(OS),MACOSX)
3044$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003045 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003046)
3047else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003048$(call gb_LinkTarget_add_libs,$(1),\
3049 -L$(call gb_UnpackedTarball_get_dir,python3) \
3050 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003051)
3052endif
3053
David Ostrovskye16ac692012-05-27 22:50:41 +02003054endef
3055
David Ostrovskye16ac692012-05-27 22:50:41 +02003056endif # SYSTEM_PYTHON
3057
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003058# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003059ifeq ($(ENABLE_ORCUS),TRUE)
3060
Michael Stahle3abec32014-02-11 15:57:18 +01003061ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003062
3063define gb_LinkTarget__use_orcus
3064$(call gb_LinkTarget_set_include,$(1),\
3065 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003066 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003067)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003068$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003069endef
3070
3071define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003072
3073endef
3074
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003075else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003076
David Tardonedb38d72015-06-04 16:09:48 +02003077ifeq ($(COM),MSC)
3078
3079$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3080 orcus \
3081 orcus-parser \
3082))
3083
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003084define gb_LinkTarget__use_orcus
Matúš Kukan1ee76032012-09-09 15:29:43 +02003085$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003086 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003087 $$(INCLUDE) \
3088)
David Tardonf1035c12012-11-23 06:49:21 +01003089
David Tardonedb38d72015-06-04 16:09:48 +02003090$(call gb_LinkTarget_use_libraries,$(1),\
3091 orcus \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003092)
David Tardonf1035c12012-11-23 06:49:21 +01003093
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003094endef
3095
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003096define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003097$(call gb_LinkTarget_set_include,$(1),\
3098 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3099 $$(INCLUDE) \
3100)
David Tardonedb38d72015-06-04 16:09:48 +02003101
3102$(call gb_LinkTarget_use_libraries,$(1),\
3103 orcus-parser \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003104)
3105
3106endef
3107
David Tardonedb38d72015-06-04 16:09:48 +02003108else # !MSC
3109
3110$(eval $(call gb_Helper_register_packages_for_install,ooo,\
3111 liborcus \
3112))
3113
3114define gb_LinkTarget__use_orcus
3115$(call gb_LinkTarget_use_package,$(1),liborcus)
3116
3117$(call gb_LinkTarget_set_include,$(1),\
3118 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3119 $$(INCLUDE) \
3120)
3121
3122$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshidab325b4c2016-03-05 20:09:34 -05003123 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
David Tardonedb38d72015-06-04 16:09:48 +02003124)
3125
3126$(if $(SYSTEM_BOOST), \
3127 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3128 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3129)
3130
3131endef
3132
3133define gb_LinkTarget__use_orcus-parser
3134$(call gb_LinkTarget_use_package,$(1),liborcus)
3135
3136$(call gb_LinkTarget_set_include,$(1),\
3137 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3138 $$(INCLUDE) \
3139)
3140
3141$(call gb_LinkTarget_add_libs,$(1),\
Kohei Yoshidab325b4c2016-03-05 20:09:34 -05003142 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
David Tardonedb38d72015-06-04 16:09:48 +02003143)
3144
3145endef
3146
3147endif # MSC
3148
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003149endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003150
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003151else # ENABLE_ORCUS != TRUE
3152
3153gb_LinkTarget__use_orcus :=
3154gb_LinkTarget__use_orcus-parser :=
3155
3156endif
Michael Stahl78b59b82012-09-27 21:45:47 +02003157
David Tardon49a4d362013-11-12 16:44:40 +01003158ifeq ($(ENABLE_EOT),TRUE)
3159
Michael Stahle3abec32014-02-11 15:57:18 +01003160ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003161
3162define gb_LinkTarget__use_libeot
3163$(call gb_LinkTarget_set_include,$(1),\
3164 $$(INCLUDE) \
3165 $(LIBEOT_CFLAGS) \
3166)
3167$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3168
3169endef
3170
3171gb_ExternalProject__use_libeot :=
3172
3173else # !SYSTEM_LIBEOT
3174
3175define gb_LinkTarget__use_libeot
3176$(call gb_LinkTarget_set_include,$(1),\
3177 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3178 $$(INCLUDE) \
3179)
3180$(call gb_LinkTarget_add_libs,$(1),\
3181 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3182)
3183$(call gb_LinkTarget_use_external_project,$(1),libeot)
3184
3185endef
3186
3187define gb_ExternalProject__use_libeot
3188$(call gb_ExternalProject_use_external_project,$(1),libeot)
3189
3190endef
3191
3192endif # SYSTEM_LIBEOT
3193
3194else # !ENABLE_EOT
3195
3196gb_LinkTarget__use_libeot :=
3197gb_ExternalProject__use_libeot :=
3198
3199endif # ENABLE_EOT
3200
Michael Stahl78b59b82012-09-27 21:45:47 +02003201### X11 stuff ###
3202
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003203ifeq ($(USING_X11), TRUE)
Michael Stahl78b59b82012-09-27 21:45:47 +02003204
Michael Stahl78b59b82012-09-27 21:45:47 +02003205define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003206$(call gb_LinkTarget_set_include,$(1),\
3207 $$(INCLUDE) \
3208 $(XRANDR_CFLAGS) \
3209)
3210
3211$(call gb_LinkTarget_add_libs,$(1),\
3212 $(XRANDR_LIBS) \
3213)
3214endef
3215
Michael Stahl78b59b82012-09-27 21:45:47 +02003216define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003217$(call gb_LinkTarget_set_include,$(1),\
3218 $$(INCLUDE) \
3219 $(XRENDER_CFLAGS) \
3220)
3221
3222$(call gb_LinkTarget_add_libs,$(1),\
3223 $(XRENDER_LIBS) \
3224)
3225endef
3226
Samuel Mehrbrodtc29ea222015-09-18 14:12:08 +02003227endif # USING_X11
Michael Stahl78b59b82012-09-27 21:45:47 +02003228
Tor Lillqvist35491072011-08-02 21:22:35 +03003229
Michael Meeksb440cfc2013-02-28 12:05:07 +00003230gb_ExternalProject__use_nss3:=
3231
Tor Lillqvist3442b002014-08-12 16:50:17 +03003232ifeq ($(OS),ANDROID)
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003233
Peter Foleyc003d252013-01-01 09:39:36 -05003234gb_LinkTarget__use_nss3:=
Tor Lillqvist801408c2014-12-12 23:51:17 +02003235gb_LinkTarget__use_plc4:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003236
3237else
3238
Michael Stahle3abec32014-02-11 15:57:18 +01003239ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003240
David Tardon2b9dbc82012-08-13 06:57:51 +02003241define gb_LinkTarget__use_nss3
3242$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003243 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003244)
3245
David Tardonb6aa4842011-08-11 13:10:14 +02003246$(call gb_LinkTarget_set_include,$(1),\
3247 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003248 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003249)
3250
3251$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003252 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003253)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003254
David Tardonb6aa4842011-08-11 13:10:14 +02003255endef
3256
David Tardon2b9dbc82012-08-13 06:57:51 +02003257define gb_LinkTarget__use_plc4
3258$(call gb_LinkTarget__use_nss3,$(1))
3259
3260endef
3261
David Tardon6ef46562013-02-04 10:04:07 +01003262define gb_LinkTarget__use_ssl3
3263$(call gb_LinkTarget__use_nss3,$(1))
3264
3265endef
3266
Michael Stahle3abec32014-02-11 15:57:18 +01003267else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003268
Michael Stahlffae67c2014-03-13 19:51:19 +01003269$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3270 nss \
3271))
3272
David Tardon2b9dbc82012-08-13 06:57:51 +02003273define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003274$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003275$(call gb_LinkTarget_set_include,$(1),\
3276 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003277 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3278 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003279)
3280
Michael Stahld2f62c32013-10-23 00:14:01 +02003281ifeq ($(COM),MSC)
3282$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003283 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3284 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3285 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003286)
Michael Stahld2f62c32013-10-23 00:14:01 +02003287else
3288$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003289 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003290 -lnspr4 \
3291 -lnss3 \
3292 -lsmime3 \
3293)
3294endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003295
3296endef
3297
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003298define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003299$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003300ifeq ($(COM),MSC)
3301$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003302 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003303)
Michael Stahld2f62c32013-10-23 00:14:01 +02003304else
3305$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003306 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003307)
3308endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003309
David Tardonb6aa4842011-08-11 13:10:14 +02003310endef
3311
David Tardon6ef46562013-02-04 10:04:07 +01003312define gb_LinkTarget__use_ssl3
3313$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003314ifeq ($(COM),MSC)
3315$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003316 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003317)
Michael Stahld2f62c32013-10-23 00:14:01 +02003318else
3319$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003320 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003321)
3322endif
David Tardon6ef46562013-02-04 10:04:07 +01003323
3324endef
3325
Michael Meeksb440cfc2013-02-28 12:05:07 +00003326define gb_ExternalProject__use_nss3
3327$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003328
3329endef
3330
Michael Stahle3abec32014-02-11 15:57:18 +01003331endif # SYSTEM_NSS
3332
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003333endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02003334
Markus Mohrharda46ef632015-11-15 04:39:24 +01003335ifeq ($(ENABLE_BREAKPAD),TRUE)
3336
Markus Mohrharda46ef632015-11-15 04:39:24 +01003337define gb_LinkTarget__use_breakpad
3338$(call gb_LinkTarget_set_include,$(1),\
3339 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3340 $$(INCLUDE) \
3341)
3342
3343ifeq ($(COM),MSC)
Markus Mohrhardff9b7d12016-03-31 00:00:03 +02003344$(call gb_LinkTarget_use_static_libraries,$(1),\
3345 breakpad \
Markus Mohrharda46ef632015-11-15 04:39:24 +01003346)
3347else
3348$(call gb_LinkTarget_add_libs,$(1),\
3349 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3350)
3351endif
3352
3353$(call gb_LinkTarget_use_external_project,$(1),breakpad)
3354
Michael Stahlb4d3a0d2016-02-23 15:08:47 +01003355endef
3356
Markus Mohrhard133a5d872016-02-27 14:50:13 +01003357endif # ENABLE_BREAKPAD
Markus Mohrharda46ef632015-11-15 04:39:24 +01003358
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003359ifeq ($(ENABLE_GLTF),TRUE)
3360
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003361ifneq ($(SYSTEM_LIBGLTF),TRUE)
3362
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003363define gb_LinkTarget__use_libgltf
3364$(call gb_LinkTarget_set_include,$(1),\
3365 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3366 $$(INCLUDE) \
3367)
3368
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003369ifeq ($(COM),MSC)
3370$(call gb_LinkTarget_add_libs,$(1),\
David Ostrovskyac06ab22015-02-18 22:17:49 +01003371 $(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 +02003372)
Zolnai Tamás6403f2b2014-06-25 15:19:41 +02003373else
3374$(call gb_LinkTarget_add_libs,$(1),\
3375 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3376)
3377endif
3378
3379$(call gb_LinkTarget_use_external_project,$(1),libgltf)
3380
3381endef
3382
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003383else # SYSTEM_LIBGLTF
3384
3385define gb_LinkTarget__use_libgltf
3386$(call gb_LinkTarget_set_include,$(1),\
3387 $$(INCLUDE) \
3388 $(LIBGLTF_CFLAGS) \
3389)
3390$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003391
3392endef
3393
Julien Nabet3ee2edf2016-05-07 22:43:37 +02003394endif # SYSTEM_LIBGLTF
Rene Engelhard97bda8e2014-08-05 20:05:35 +02003395
Zolnai Tamás191f0942014-08-07 15:21:41 +02003396ifeq ($(ENABLE_COLLADA),TRUE)
3397
David Tardonf24c6082014-10-20 14:21:22 +02003398ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3399
3400define gb_LinkTarget__use_opencollada_parser
3401$(call gb_LinkTarget_set_include,$(1),\
3402 $$(INCLUDE) \
3403 $(OPENCOLLADA_CFLAGS) \
3404)
3405
3406$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3407
3408endef
3409
3410else # !SYSTEM_OPENCOLLADA
3411
Zolnai Tamásaa5fe792014-04-10 13:33:58 +02003412define gb_LinkTarget__use_opencollada_parser
3413$(call gb_LinkTarget_set_include,$(1),\
3414 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3415 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3416 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3417 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3418 $$(INCLUDE) \
3419)
3420
3421$(call gb_LinkTarget_use_static_libraries,$(1),\
3422 opencollada_parser \
3423)
3424endef
3425
David Tardonf24c6082014-10-20 14:21:22 +02003426endif # SYSTEM_OPENCOLLADA
3427
David Tardon8840fd32015-04-13 15:31:41 +02003428ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3429
3430define gb_LinkTarget__use_collada2gltf
3431$(call gb_LinkTarget_set_include,$(1),\
3432 $$(INCLUDE) \
3433 $(COLLADA2GLTF_CFLAGS) \
3434)
3435
3436$(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3437
3438endef
3439
3440else # !SYSTEM_COLLADA2GLTF
3441
Zolnai Tamásd57591702014-04-10 13:37:38 +02003442define gb_LinkTarget__use_collada2gltf
3443$(call gb_LinkTarget_set_include,$(1),\
3444 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3445 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3446 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3447 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3448 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3449 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3450 $$(INCLUDE) \
3451)
3452
3453$(call gb_LinkTarget_use_static_libraries,$(1),\
3454 collada2gltf \
3455)
3456endef
3457
David Tardon8840fd32015-04-13 15:31:41 +02003458endif # SYSTEM_COLLADA2GLTF
3459
Zolnai Tamás191f0942014-08-07 15:21:41 +02003460endif # ENABLE_COLLADA
3461
3462endif # ENABLE_GLTF
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003463
Stephan Bergmannecc617e2015-07-08 11:20:19 +02003464define gb_LinkTarget__use_dconf
3465$(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3466$(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3467endef
3468
Michael Stahl2ee5f242011-09-15 14:01:27 +02003469### Jars ############################################################
3470
Michael Stahl5866b332014-02-11 18:56:33 +01003471ifneq ($(SYSTEM_HSQLDB),)
Michael Stahl666173b2012-08-15 20:24:59 +02003472
3473define gb_Jar__use_hsqldb
3474$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3475endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003476define gb_JunitTest__use_hsqldb
3477$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3478endef
Michael Stahl666173b2012-08-15 20:24:59 +02003479
3480else # !SYSTEM_HSQLDB
3481
David Tardon2dec0672014-05-19 10:20:37 +02003482ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl376d1b52014-03-18 20:25:04 +01003483$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003484 hsqldb \
3485))
David Tardon2dec0672014-05-19 10:20:37 +02003486endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003487
Michael Stahl666173b2012-08-15 20:24:59 +02003488define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003489$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02003490endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003491define gb_JunitTest__use_hsqldb
3492$(call gb_JunitTest_use_jar,$(1),hsqldb)
3493endef
Michael Stahl666173b2012-08-15 20:24:59 +02003494
3495endif # SYSTEM_HSQLDB
3496
Michael Stahl2ee5f242011-09-15 14:01:27 +02003497
Rene Engelhard40facc42014-05-23 07:43:19 +02003498ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3499
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003500ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003501
Michael Stahla4551262012-08-15 17:41:25 +02003502define gb_Jar__use_bsh
3503$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003504endef
3505
3506else # !SYSTEM_BSH
3507
David Tardon2dec0672014-05-19 10:20:37 +02003508ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003509$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003510 bsh \
3511))
David Tardon2dec0672014-05-19 10:20:37 +02003512endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003513
Michael Stahla4551262012-08-15 17:41:25 +02003514define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003515$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003516endef
3517
3518endif # SYSTEM_BSH
3519
Rene Engelhard40facc42014-05-23 07:43:19 +02003520endif
3521
3522ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003523
Michael Stahl49dde4c2014-02-11 19:42:28 +01003524ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003525
Michael Stahla4551262012-08-15 17:41:25 +02003526define gb_Jar__use_rhino
3527$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003528endef
3529
3530else # !SYSTEM_RHINO
3531
David Tardon2dec0672014-05-19 10:20:37 +02003532ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003533$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003534 js \
3535))
David Tardon2dec0672014-05-19 10:20:37 +02003536endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003537
Michael Stahla4551262012-08-15 17:41:25 +02003538define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003539$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003540endef
3541
3542endif # SYSTEM_RHINO
3543
Rene Engelhard40facc42014-05-23 07:43:19 +02003544endif
3545
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003546ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003547
Michael Stahla4551262012-08-15 17:41:25 +02003548define gb_Jar__use_commons-logging
3549$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003550endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003551gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003552
3553else # !SYSTEM_APACHE_COMMONS
3554
David Tardon2dec0672014-05-19 10:20:37 +02003555ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003556$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
rbujd8a7f722014-08-18 13:52:32 +02003557 commons-logging-$(COMMONS_LOGGING_VERSION) \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003558))
David Tardon2dec0672014-05-19 10:20:37 +02003559endif
David Tardon9b530e12012-04-07 10:07:35 +02003560
Michael Stahla4551262012-08-15 17:41:25 +02003561define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003562$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
rbujd8a7f722014-08-18 13:52:32 +02003563$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
David Tardon9b530e12012-04-07 10:07:35 +02003564endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003565define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003566$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003567endef
David Tardon9b530e12012-04-07 10:07:35 +02003568
3569endif # SYSTEM_APACHE_COMMONS
3570
3571
Michael Stahl32db4992014-02-11 19:35:22 +01003572ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003573
Michael Stahla4551262012-08-15 17:41:25 +02003574define gb_Jar__use_flow-engine
3575$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003576endef
3577
Michael Stahla4551262012-08-15 17:41:25 +02003578define gb_Jar__use_flute
3579$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003580endef
3581
Michael Stahla4551262012-08-15 17:41:25 +02003582define gb_Jar__use_libbase
3583$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003584endef
3585
Michael Stahla4551262012-08-15 17:41:25 +02003586define gb_Jar__use_libfonts
3587$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003588endef
3589
Michael Stahla4551262012-08-15 17:41:25 +02003590define gb_Jar__use_libformula
3591$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003592endef
3593
Michael Stahla4551262012-08-15 17:41:25 +02003594define gb_Jar__use_liblayout
3595$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003596endef
3597
Michael Stahla4551262012-08-15 17:41:25 +02003598define gb_Jar__use_libloader
3599$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003600endef
3601
Michael Stahla4551262012-08-15 17:41:25 +02003602define gb_Jar__use_librepository
3603$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003604endef
3605
Michael Stahla4551262012-08-15 17:41:25 +02003606define gb_Jar__use_libserializer
3607$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003608endef
3609
Michael Stahla4551262012-08-15 17:41:25 +02003610define gb_Jar__use_libxml
3611$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003612endef
3613
Michael Stahla4551262012-08-15 17:41:25 +02003614define gb_Jar__use_sac
3615$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003616endef
3617
3618else # !SYSTEM_JFREEREPORT
3619
David Tardon2dec0672014-05-19 10:20:37 +02003620ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003621$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003622 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003623 flute-1.1.6 \
3624 libbase-1.1.6 \
3625 libfonts-1.1.6 \
3626 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003627 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003628 libloader-1.1.6 \
3629 librepository-1.1.6 \
3630 libserializer-1.1.6 \
3631 libxml-1.1.7 \
3632 sac \
3633))
David Tardon2dec0672014-05-19 10:20:37 +02003634endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003635
Michael Stahla4551262012-08-15 17:41:25 +02003636define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003637$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003638endef
3639
Michael Stahla4551262012-08-15 17:41:25 +02003640define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003641$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003642endef
3643
Michael Stahla4551262012-08-15 17:41:25 +02003644define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003645$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003646endef
3647
Michael Stahla4551262012-08-15 17:41:25 +02003648define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003649$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003650endef
3651
Michael Stahla4551262012-08-15 17:41:25 +02003652define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003653$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003654endef
3655
Michael Stahla4551262012-08-15 17:41:25 +02003656define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003657$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003658endef
3659
Michael Stahla4551262012-08-15 17:41:25 +02003660define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003661$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003662endef
3663
Michael Stahla4551262012-08-15 17:41:25 +02003664define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003665$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003666endef
3667
Michael Stahla4551262012-08-15 17:41:25 +02003668define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003669$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003670endef
3671
Michael Stahla4551262012-08-15 17:41:25 +02003672define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003673$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003674endef
3675
Michael Stahla4551262012-08-15 17:41:25 +02003676define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003677$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003678endef
3679
3680endif # SYSTEM_JFREEREPORT
3681
David Tardonc2eca352012-12-02 10:51:37 +01003682
3683# Executables
3684
David Tardonedf67302012-12-30 12:27:04 +01003685# FIXME: the library target should be for build too
3686define gb_Executable__register_bestreversemap
3687$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3688 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3689)
3690endef
3691
David Tardonceb0d062012-12-30 13:11:43 +01003692# TODO depending on the whole URE might be overkill, but I do not have a
3693# Windows machine to debug it...
3694# FIXME: the library target should be for build too
3695define gb_Executable__register_climaker
3696$(call gb_Executable_add_runtime_dependencies,climaker,\
3697 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003698 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003699 $(call gb_UnoApi_get_target,udkapi) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003700 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
David Tardonceb0d062012-12-30 13:11:43 +01003701)
3702endef
3703
David Tardon6c1614a2014-01-08 13:49:46 +01003704define gb_Executable__register_cppumaker
3705$(call gb_Executable_add_runtime_dependencies,cppumaker,\
3706 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3707)
3708endef
3709
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003710# This is used to determine what we need for 'build' platform.
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003711# FIXME: the library target should be for build too
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003712define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003713$(call gb_Executable_add_runtime_dependencies,gengal,\
David Tardon1546c292013-05-07 20:41:41 +02003714 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003715 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardone59420d2014-08-04 17:23:54 +02003716 $(call gb_Package_get_target_for_build,postprocess_images) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003717 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukan15614c82015-12-05 07:05:37 +01003718 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3719 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3720 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003721 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3722 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003723 $(call gb_UnoApi_get_target,offapi) \
3724 $(call gb_UnoApi_get_target,udkapi) \
3725)
3726endef
3727
Michael Stahl187194b2014-02-11 19:17:42 +01003728ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003729
3730define gb_Executable__register_gendict
3731$(call gb_Executable_add_runtime_dependencies,gendict,\
3732 $(call gb_Package_get_target_for_build,icu) \
3733)
3734endef
3735
3736endif
3737
David Tardonceb0d062012-12-30 13:11:43 +01003738define gb_Executable__register_idlc
3739$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003740 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003741)
3742endef
3743
David Tardonedf67302012-12-30 12:27:04 +01003744define gb_Executable__register_localize
3745$(call gb_Executable_add_runtime_dependencies,localize,\
3746 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3747 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3748 ) \
3749)
3750endef
3751
Michael Stahl4c51feb2013-09-21 01:39:41 +02003752# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003753# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003754# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3755# FIXME: the library target should be for build too
3756define gb_Executable__register_saxparser
3757$(call gb_Executable_add_runtime_dependencies,saxparser,\
3758 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
David Tardon92f66c52014-10-13 16:59:33 +02003759 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003760 $(call gb_Rdb_get_target_for_build,saxparser) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003761 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003762 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003763)
3764endef
3765
Stephan Bergmannab149c72013-04-24 10:42:40 +02003766# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003767# required due to the settings for URE_SERVICES and URE_TYPES in
3768# cppuhelper/source/unorc
3769# FIXME: the library target should be for build too
3770define gb_Executable__register_uno
3771$(call gb_Executable_add_runtime_dependencies,uno,\
3772 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Michael Stahl4e6b4fb2015-11-27 12:49:34 +01003773 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003774 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003775)
3776endef
3777
3778
3779# External executables
3780
Michael Stahl379f9782014-02-11 16:49:19 +01003781ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003782
3783gb_ExternalExecutable__register_xmllint :=
3784
3785else # ! SYSTEM_LIBXML_FOR_BUILD
3786
3787define gb_ExternalExecutable__register_xmllint
David Tardondbac8f52014-04-18 18:34:40 +02003788$(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 +02003789$(call gb_ExternalExecutable_add_dependencies,xmllint,\
3790 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3791 $(call gb_Package_get_target,xml2) \
3792)
David Tardonc2eca352012-12-02 10:51:37 +01003793
3794endef
3795
3796endif # SYSTEM_LIBXML_FOR_BUILD
3797
Michael Stahle3abec32014-02-11 15:57:18 +01003798ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003799
3800gb_ExternalExecutable__register_xsltproc :=
3801
3802else # ! SYSTEM_LIBXSLT_FOR_BUILD
3803
3804define gb_ExternalExecutable__register_xsltproc
David Tardondbac8f52014-04-18 18:34:40 +02003805$(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 +02003806$(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3807 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
Michael Stahl56b2bb52015-07-31 11:08:04 +02003808 $(call gb_Package_get_target,xml2) \
David Tardon5b660242014-07-28 10:38:49 +02003809 $(call gb_Package_get_target,xslt) \
3810)
David Tardonc2eca352012-12-02 10:51:37 +01003811
3812endef
3813
3814endif # SYSTEM_LIBXSLT_FOR_BUILD
3815
David Tardonce038cf2013-10-20 20:43:46 +02003816ifneq (,$(SYSTEM_UCPP))
3817
3818gb_ExternalExecutable__register_ucpp :=
3819
3820else # ! SYSTEM_UCPP
3821
3822define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003823$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003824
3825endef
3826
3827endif # SYSTEM_UCPP
3828
Matúš Kukane4826722013-03-05 22:03:38 +01003829ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003830
3831define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003832ifeq ($(OS),MACOSX)
3833
3834# use set_external, to avoid having the command added as prerequisite for the
3835# targets that make use of it. (Otherwise make will choke as it doesn't have a
3836# matching rule to build that specific file)
3837$(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))
3838# the Zip ensures that internal python has been built (cannot use the Package
3839# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003840$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003841
3842else
3843
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003844$(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 +01003845$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003846$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3847
3848endif
David Tardonc2eca352012-12-02 10:51:37 +01003849
3850endef
3851
Matúš Kukane4826722013-03-05 22:03:38 +01003852else
3853
3854define gb_ExternalExecutable__register_python
3855$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3856
3857endef
3858
3859endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003860
David Tardon63069262012-12-29 12:56:24 +01003861ifneq ($(SYSTEM_GENBRK),)
3862
3863define gb_ExternalExecutable__register_genbrk
3864$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3865
3866endef
3867
3868else # ! SYSTEM_GENBRK
3869
3870define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02003871$(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 +01003872$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003873$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3874 $(call gb_Package_get_target_for_build,icu) \
3875)
3876
3877endef
3878
3879endif
3880
3881ifneq ($(SYSTEM_GENCCODE),)
3882
3883define gb_ExternalExecutable__register_genccode
3884$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3885
3886endef
3887
3888else # ! SYSTEM_GENCCODE
3889
3890define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02003891$(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 +01003892$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003893$(call gb_ExternalExecutable_add_dependencies,genccode,\
3894 $(call gb_Package_get_target_for_build,icu) \
3895)
3896
3897endef
3898
3899endif
3900
3901ifneq ($(SYSTEM_GENCMN),)
3902
3903define gb_ExternalExecutable__register_gencmn
3904$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3905
3906endef
3907
3908else # ! SYSTEM_GENCMN
3909
3910define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02003911$(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 +01003912$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003913$(call gb_ExternalExecutable_add_dependencies,gencmn,\
3914 $(call gb_Package_get_target_for_build,icu) \
3915)
3916
3917endef
3918
3919endif
3920
Jacobo Aragunde Péreze6fe5082015-02-02 19:49:37 +00003921ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3922
3923$(eval $(call gb_Helper_register_jars,OXT,\
3924 owncloud-android-library \
3925))
3926
3927define gb_Jar__use_owncloud_android_lib
3928$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
3929$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
3930endef
3931define gb_ExternalProject__use_owncloud_android_lib
3932$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
3933endef
3934
3935endif
3936
Nathan Yee7eb863d2015-07-03 11:58:27 +02003937ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
3938ifneq ($(SYSTEM_BZIP2),)
3939
3940define gb_LinkTarget__use_bzip2
3941$(call gb_LinkTarget_set_include,$(1),\
3942 $(BZIP2_CFLAGS) \
3943 $$(INCLUDE) \
3944)
3945$(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
3946
3947endef
Jan Holesovsky025952f2015-07-03 13:46:38 +02003948
Nathan Yee7eb863d2015-07-03 11:58:27 +02003949gb_ExternalProject__use_bzip2 :=
3950
3951else # !SYSTEM_BZIP2
3952
3953define gb_LinkTarget__use_bzip2
Nathan Yee7eb863d2015-07-03 11:58:27 +02003954$(call gb_LinkTarget_set_include,$(1),\
3955 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
3956 $$(INCLUDE) \
3957)
Nathan Yeeb59955b2015-07-14 14:36:37 -07003958
3959ifeq ($(COM),MSC)
3960$(call gb_LinkTarget_add_libs,$(1),\
3961 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
3962)
3963else
Jan Holesovsky025952f2015-07-03 13:46:38 +02003964$(call gb_LinkTarget_add_libs,$(1),\
3965 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
3966)
Nathan Yeeb59955b2015-07-14 14:36:37 -07003967endif
3968
Jan Holesovskyec477172015-07-07 09:24:45 +02003969$(call gb_LinkTarget_use_external_project,$(1),bzip2)
Nathan Yee7eb863d2015-07-03 11:58:27 +02003970endef
3971
3972define gb_ExternalProject__use_bzip2
3973$(call gb_ExternalProject_use_external_project,$(1),bzip2)
3974endef
3975
3976endif
3977endif
3978
Stephan Bergmannec53ac62016-04-12 20:06:04 +02003979define gb_LinkTarget__use_clew
3980$(call gb_LinkTarget_set_include,$(1), \
3981 -I$(SRCDIR)/external/clew/source/include \
3982 $$(INCLUDE) \
3983)
3984$(call gb_LinkTarget_use_libraries,$(1),clew)
3985endef
3986
Michael Stahlc74af0d2011-04-01 20:49:35 +00003987# vim: set noet sw=4 ts=4: