blob: 4a4ce6e80b24cbad454dc4b75d4d1e598fe9a6a3 [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
24# for every external, a function gb_LinkTarget_use__FOO is defined,
25# 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
Matúš Kukan8e535df2012-04-07 13:59:33 +020030# External headers
31
Peter Foley1bd28842011-09-09 17:42:24 -040032ifeq ($(SYSTEM_MESA_HEADERS),YES)
33
Matúš Kukan8e535df2012-04-07 13:59:33 +020034gb_LinkTarget__use_mesa_headers :=
Peter Foley1bd28842011-09-09 17:42:24 -040035
36else
37
Matúš Kukan8e535df2012-04-07 13:59:33 +020038define gb_LinkTarget__use_mesa_headers
Michael Stahl6b2ce082013-05-06 17:43:54 +020039$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny6c4b7e42013-11-03 20:54:23 +020040 -I$(SRCDIR)/external/Mesa/inc \
Michael Stahl6b2ce082013-05-06 17:43:54 +020041 $$(INCLUDE) \
42)
Matúš Kukan8e535df2012-04-07 13:59:33 +020043
Peter Foley1bd28842011-09-09 17:42:24 -040044endef
45
46endif
47
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010048ifeq ($(SYSTEM_NPAPI_HEADERS),YES)
Matúš Kukan8e535df2012-04-07 13:59:33 +020049
Michael Stahl96907bf2013-05-07 00:50:15 +020050# yes this uses internal headers too...
51# they are split across 2 dirs for this reason
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010052define gb_LinkTarget__use_npapi_headers
Matúš Kukan8f6510b2012-06-02 21:54:26 +020053$(call gb_LinkTarget_set_include,$(1),\
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010054 $(NPAPI_HEADERS_CFLAGS) \
Khaled Hosny622a6332013-11-03 20:58:47 +020055 -I$(SRCDIR)/external/np_sdk \
Matúš Kukan8e535df2012-04-07 13:59:33 +020056 $$(INCLUDE) \
Matúš Kukan8f6510b2012-06-02 21:54:26 +020057)
Matúš Kukan8e535df2012-04-07 13:59:33 +020058
59endef
60
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010061else #!SYSTEM_NPAPI_HEADERS
Matúš Kukan8e535df2012-04-07 13:59:33 +020062
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010063define gb_LinkTarget__use_npapi_headers
Matúš Kukan8f6510b2012-06-02 21:54:26 +020064$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny622a6332013-11-03 20:58:47 +020065 -I$(SRCDIR)/external/np_sdk/inc \
66 -I$(SRCDIR)/external/np_sdk \
Matúš Kukan8e535df2012-04-07 13:59:33 +020067 $$(INCLUDE) \
Matúš Kukan8f6510b2012-06-02 21:54:26 +020068)
Matúš Kukan8e535df2012-04-07 13:59:33 +020069
70endef
71
Stephan Bergmann13ef9dc2012-11-15 18:09:55 +010072endif #SYSTEM_NPAPI_HEADERS
Matúš Kukan8e535df2012-04-07 13:59:33 +020073
Matúš Kukan5eff0b62012-04-07 13:46:59 +020074ifeq ($(SYSTEM_ODBC_HEADERS),YES)
75
76define gb_LinkTarget__use_odbc_headers
77$(call gb_LinkTarget_add_defs,$(1),\
78 -DSYSTEM_ODBC_HEADERS \
79)
80
81endef
82
83else
84
85define gb_LinkTarget__use_odbc_headers
Michael Stahlfea65aa2013-05-06 20:09:47 +020086$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosny891bb7c2013-11-04 18:40:17 +020087 -I$(SRCDIR)/external/unixODBC/inc \
Michael Stahlfea65aa2013-05-06 20:09:47 +020088 $$(INCLUDE) \
89)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020090
91endef
92
93endif
94
Matúš Kukan54a06c62012-08-25 01:29:00 +020095ifeq ($(SYSTEM_VIGRA),YES)
96
97gb_LinkTarget__use_vigra_headers :=
98
99else
100
101define gb_LinkTarget__use_vigra_headers
102$(call gb_LinkTarget_use_unpacked,$(1),vigra)
103$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200104 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
Matúš Kukan54a06c62012-08-25 01:29:00 +0200105 $$(INCLUDE) \
106)
107
108endef
109
110endif
111
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200112ifeq ($(SYSTEM_MDDS),YES)
113
114gb_LinkTarget__use_mdds_headers :=
115
116else
117
118define gb_LinkTarget__use_mdds_headers
119$(call gb_LinkTarget_use_unpacked,$(1),mdds)
120$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200121 -I$(call gb_UnpackedTarball_get_dir,mdds/include) \
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200122 $$(INCLUDE) \
123)
124
125endef
126
127endif
128
Michael Stahl674e7912013-05-06 20:23:49 +0200129ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100130
131define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200132$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosnya62e7732013-11-04 18:33:52 +0200133 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
Michael Stahl72279ea2013-05-06 20:14:35 +0200134 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100135)
136
137endef
138
139else
140
141gb_LinkTarget__use_sane_headers :=
142
143endif
144
David Tardon8fa06c82013-11-05 06:53:49 +0100145ifeq ($(SYSTEM_BLUEZ),YES)
146
147gb_LinkTarget__use_bluez_bluetooth_headers :=
148
149else # !SYSTEM_BLUEZ
150
151define gb_LinkTarget__use_bluez_bluetooth_headers
152$(call gb_LinkTarget_set_include,$(1),\
153 -I$(SRCDIR)/external/bluez_bluetooth/inc \
154 $$(INCLUDE) \
155)
156
157endef
158
159endif # SYSTEM_BLUEZ
160
Matúš Kukan8e535df2012-04-07 13:59:33 +0200161# External libraries
162
David Tardon785e1d92011-07-25 10:34:22 +0200163ifeq ($(SYSTEM_CPPUNIT),YES)
164
165define gb_LinkTarget__use_cppunit
166$(call gb_LinkTarget_set_include,$(1),\
167 $$(INCLUDE) \
168 $(CPPUNIT_CFLAGS) \
169)
170
171$(call gb_LinkTarget_add_libs,$(1),\
172 $(CPPUNIT_LIBS) \
173)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100174
David Tardon785e1d92011-07-25 10:34:22 +0200175endef
176
177else
178
David Tardon785e1d92011-07-25 10:34:22 +0200179define gb_LinkTarget__use_cppunit
Michael Stahl32a001d2013-10-23 23:41:58 +0200180$(call gb_LinkTarget_use_external_project,$(1),cppunit)
Peter Foley143835b2012-11-25 16:37:40 -0500181
Peter Foley143835b2012-11-25 16:37:40 -0500182$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200183 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500184 $$(INCLUDE) \
185)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100186
Michael Stahl77fe50b2013-10-23 23:35:16 +0200187ifeq ($(COM),MSC)
188$(call gb_LinkTarget_add_libs,$(1),\
189 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
190)
191else
192$(call gb_LinkTarget_add_libs,$(1),\
193 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
194)
195endif
196
David Tardon785e1d92011-07-25 10:34:22 +0200197endef
198
199endif
Michael Stahlc74af0d2011-04-01 20:49:35 +0000200
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200201define gb_LinkTarget__use_iconv
202$(call gb_LinkTarget_add_libs,$(1),-liconv)
203
204endef
205
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100206ifeq ($(SYSTEM_MARIADB),YES)
Peter Foleyc322d502013-01-23 16:29:08 -0500207
David Tardon217eae42013-11-05 06:49:33 +0100208define gb_LinkTarget__use_mariadb
209$(call gb_LinkTarget_set_include,$(1),\
210 $$(INCLUDE) \
211 $(MARIADB_CFLAGS) \
212)
213$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
214
215endef
216gb_ExternalProject__use_mariadb :=
217
218else # !SYSTEM_MARIADB
219
220define gb_LinkTarget__use_mariadb
221$(call gb_LinkTarget_set_include,$(1),\
222 $$(INCLUDE) \
223 $(MARIADB_CFLAGS) \
224)
225$(call gb_LinkTarget_use_static_libraries,$(1),\
226 mariadblib \
227)
228
229endef
230define gb_ExternalProject__use_mariadb
231$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
232
233endef
234
235endif # SYSTEM_MARIADB
236
237
238ifeq ($(SYSTEM_MARIADB),YES)
239
Peter Foleyc322d502013-01-23 16:29:08 -0500240define gb_LinkTarget__use_mysql
241
242$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100243 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500244)
245
246$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100247 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500248)
249
250$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100251 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500252 $$(INCLUDE) \
253)
254endef
255
256else
257
258define gb_LinkTarget__use_mysql
259
260$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500261 $$(INCLUDE) \
262)
263
264endef
265
266endif
267
268ifeq ($(SYSTEM_MYSQL_CPPCONN),YES)
269
270define gb_LinkTarget__use_mysqlcppconn
271$(call gb_LinkTarget_add_libs,$(1),\
272 -lmysqlcppconn \
273)
274
275$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500276 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500277)
278endef
279
280else
281
Michael Stahl5f356bd2013-01-28 23:53:30 +0100282$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
Peter Foleyc322d502013-01-23 16:29:08 -0500283 mysqlcppconn \
284))
285
Michael Stahl5f356bd2013-01-28 23:53:30 +0100286# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500287define gb_LinkTarget__use_mysqlcppconn
288
Michael Stahl5f356bd2013-01-28 23:53:30 +0100289$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
290
Peter Foleyb02d7992013-01-24 15:43:52 -0500291$(call gb_LinkTarget_add_defs,$(1),\
292 -DCPPCONN_LIB_BUILD \
293)
294
Peter Foleyc322d502013-01-23 16:29:08 -0500295$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200296 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
297 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500298 $$(INCLUDE) \
299)
300
301endef
302
303endif
304
Michael Stahlc74af0d2011-04-01 20:49:35 +0000305ifeq ($(SYSTEM_ZLIB),YES)
306
307define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000308$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000309 -DSYSTEM_ZLIB \
310)
311$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100312
Michael Stahlc74af0d2011-04-01 20:49:35 +0000313endef
314
David Tardoncb276232012-10-26 15:33:26 +0200315# nothing on system
316define gb_LinkTarget__use_zlib_x64
317
318endef
319
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100320gb_ExternalProject__use_zlib :=
321
Michael Stahlc74af0d2011-04-01 20:49:35 +0000322else # !SYSTEM_ZLIB
323
David Tardoncb276232012-10-26 15:33:26 +0200324define gb_LinkTarget__use_zlib_multiarch
325$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
326
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200327$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200328 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200329 $$(INCLUDE) \
330)
David Tardoncb276232012-10-26 15:33:26 +0200331
Michael Stahlc923f7d2012-04-07 23:22:08 +0200332$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200333 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000334)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100335
Michael Stahlc74af0d2011-04-01 20:49:35 +0000336endef
337
David Tardoncb276232012-10-26 15:33:26 +0200338define gb_LinkTarget__use_zlib
339$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
340
341endef
342
343define gb_LinkTarget__use_zlib_x64
344$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
345
346endef
347
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100348define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100349$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
350
351endef
352
Michael Stahlc74af0d2011-04-01 20:49:35 +0000353endif # SYSTEM_ZLIB
354
355
356ifeq ($(SYSTEM_JPEG),YES)
357
358define gb_LinkTarget__use_jpeg
359$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
360$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000361 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000362)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100363
Michael Stahlc74af0d2011-04-01 20:49:35 +0000364endef
365
366else # !SYSTEM_JPEG
367
Michael Stahlc74af0d2011-04-01 20:49:35 +0000368define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100369$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlb65859c2013-05-08 17:30:40 +0200370 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100371 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100372)
373
Michael Stahlc923f7d2012-04-07 23:22:08 +0200374$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200375 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000376)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100377
Michael Stahlc74af0d2011-04-01 20:49:35 +0000378endef
379
380endif # SYSTEM_JPEG
381
Peter Foley1d1bab42012-10-28 12:00:06 -0400382ifeq ($(SYSTEM_MYTHES),YES)
383
384define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100385$(call gb_LinkTarget_set_include,$(1),\
386 $$(INCLUDE) \
387 $(MYTHES_CFLAGS) \
388)
389$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
390
Peter Foley1d1bab42012-10-28 12:00:06 -0400391endef
392
393else # !SYSTEM_MYTHES
394
Peter Foley1d1bab42012-10-28 12:00:06 -0400395define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200396$(call gb_LinkTarget_set_include,$(1),\
397 -I$(call gb_UnpackedTarball_get_dir,mythes) \
398 $$(INCLUDE) \
399)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200400
401ifeq ($(COM),MSC)
Peter Foley1d1bab42012-10-28 12:00:06 -0400402$(call gb_LinkTarget_use_package,$(1),\
403 mythes \
404)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100405$(call gb_LinkTarget_use_static_libraries,$(1),\
406 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400407)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200408else
409$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
410$(call gb_LinkTarget_use_external_project,$(1),mythes)
411endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100412
Peter Foley1d1bab42012-10-28 12:00:06 -0400413endef
414
415endif # SYSTEM_MYTHES
416
Michael Stahlc74af0d2011-04-01 20:49:35 +0000417
418ifeq ($(SYSTEM_EXPAT),YES)
419
David Tardon51149802013-04-09 09:22:20 +0200420define gb_LinkTarget__use_expat_impl
421$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000422
Michael Stahla88ef232011-04-13 16:11:41 +0000423$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000424 -DSYSTEM_EXPAT \
425)
426
427$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100428
Michael Stahlc74af0d2011-04-01 20:49:35 +0000429endef
430
Michael Stahl77289672012-11-17 00:36:29 +0100431gb_ExternalProject__use_expat :=
432
Michael Stahlc74af0d2011-04-01 20:49:35 +0000433else # !SYSTEM_EXPAT
434
David Tardon51149802013-04-09 09:22:20 +0200435define gb_LinkTarget__use_expat_impl
436$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000437
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700438$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200439 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700440 $$(INCLUDE) \
441)
442
Michael Stahlc923f7d2012-04-07 23:22:08 +0200443$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000444 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000445)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100446
Michael Stahlc74af0d2011-04-01 20:49:35 +0000447endef
448
Michael Stahl77289672012-11-17 00:36:29 +0100449define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100450$(call gb_ExternalProject_use_static_libraries,$(1),expat)
451
452endef
453
Michael Stahlc74af0d2011-04-01 20:49:35 +0000454endif # SYSTEM_EXPAT
455
David Tardon51149802013-04-09 09:22:20 +0200456define gb_LinkTarget__use_expat
457$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100458
Michael Stahlc74af0d2011-04-01 20:49:35 +0000459endef
460
David Tardon51149802013-04-09 09:22:20 +0200461define gb_LinkTarget__use_expat_x64
462$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100463
Michael Stahlc74af0d2011-04-01 20:49:35 +0000464endef
465
Peter Foleydd584cb2012-11-03 13:54:46 -0400466ifeq ($(SYSTEM_HYPH),YES)
467
468define gb_LinkTarget__use_hyphen
469$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
470
471endef
472
473else # !SYSTEM_HYPH
474
Peter Foleydd584cb2012-11-03 13:54:46 -0400475define gb_LinkTarget__use_hyphen
476$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
477$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200478 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400479 $$(INCLUDE) \
480)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200481
482ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400483$(call gb_LinkTarget_use_static_libraries,$(1),\
484 hyphen \
485)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200486else
487$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
488$(call gb_LinkTarget_use_external_project,$(1),hyphen)
489endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400490
491endef
492
493endif # SYSTEM_HYPH
494
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100495ifeq ($(SYSTEM_HUNSPELL),YES)
496
497define gb_LinkTarget__use_hunspell
498$(call gb_LinkTarget_set_include,$(1),\
499 $$(INCLUDE) \
500 $(HUNSPELL_CFLAGS) \
501)
502$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
503
504endef
505
Michael Stahl2f6261f2013-09-19 19:28:36 +0200506gb_ExternalProject__use_hunspell :=
507
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100508else # !SYSTEM_HUNSPELL
509
510define gb_LinkTarget__use_hunspell
511$(call gb_LinkTarget_add_defs,$(1),\
512 -DHUNSPELL_STATIC \
513)
Matúš Kukan7a030392012-10-29 23:29:37 +0100514$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100515$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200516 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100517 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100518)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200519
520ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200521$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100522 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100523)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200524else
525$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
526$(call gb_LinkTarget_use_external_project,$(1),hunspell)
527endif
528
529endef
530
531define gb_ExternalProject__use_hunspell
532$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100533
534endef
535
536endif # SYSTEM_HUNSPELL
537
538
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200539ifeq ($(SYSTEM_BOOST),YES)
540
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200541define gb_LinkTarget__use_boostdatetime
David Tardon0f6919c2012-06-06 17:04:01 +0200542$(call gb_LinkTarget_set_include,$(1),\
543 $$(INCLUDE) \
544 $(BOOST_CPPFLAGS) \
545)
546
547$(call gb_LinkTarget_add_ldflags,$(1),\
548 $(BOOST_LDFLAGS) \
549)
550
551$(call gb_LinkTarget_add_libs,$(1),\
552 $(BOOST_DATE_TIME_LIB) \
553)
554
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200555endef
556
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200557define gb_LinkTarget__use_boostsystem
Tor Lillqvist503b2482013-05-22 19:50:22 +0300558$(call gb_LinkTarget_set_include,$(1),\
559 $$(INCLUDE) \
560 $(BOOST_CPPFLAGS) \
561)
562
563$(call gb_LinkTarget_add_ldflags,$(1),\
564 $(BOOST_LDFLAGS) \
565)
566
567$(call gb_LinkTarget_add_libs,$(1),\
568 $(BOOST_SYSTEM_LIB) \
569)
570
571endef
572
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200573gb_ExternalProject__use_boostsystem :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300574
Stephan Bergmann93208022013-02-16 22:56:19 +0100575define gb_LinkTarget__use_boost_headers
576$(call gb_LinkTarget_set_include,$(1),\
577 $$(INCLUDE) \
578 $(BOOST_CPPFLAGS) \
579)
580
581endef
582
Peter Foleycdb6eca2012-11-10 08:56:12 -0500583gb_ExternalProject__use_boost_headers:=
584
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200585else # !SYSTEM_BOOST
586
Kohei Yoshida0454b732012-09-06 15:10:19 -0400587ifeq ($(OS),WNT)
Michael Stahl7f2e1682012-09-06 20:22:11 +0200588define gb_LinkTarget__use_boostthread
589$(call gb_LinkTarget_add_defs,$(1),\
590 -DBOOST_ALL_NO_LIB \
591)
592
593$(call gb_LinkTarget_use_static_libraries,$(1),\
594 boostthread \
595)
596endef
Matúš Kukanddb5edc2013-05-30 14:39:38 +0200597endif
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200598
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200599define gb_LinkTarget__use_boostdatetime
Michael Stahl7f2e1682012-09-06 20:22:11 +0200600$(call gb_LinkTarget_add_defs,$(1),\
601 -DBOOST_ALL_NO_LIB \
602)
603
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200604$(call gb_LinkTarget_use_static_libraries,$(1),\
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200605 boostdatetime \
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200606)
607
608endef
609
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200610define gb_LinkTarget__use_boostsystem
Tor Lillqvist503b2482013-05-22 19:50:22 +0300611$(call gb_LinkTarget_add_defs,$(1),\
612 -DBOOST_ALL_NO_LIB \
613)
614
615$(call gb_LinkTarget_use_static_libraries,$(1),\
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200616 boostsystem \
Tor Lillqvist503b2482013-05-22 19:50:22 +0300617)
618
619endef
620
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200621define gb_ExternalProject__use_boostsystem
Michael Stahl963737d2013-05-29 18:36:29 +0200622$(call gb_ExternalProject_use_static_libraries,$(1),boostsystem)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300623endef
624
Peter Foleye1f742a2012-11-12 18:37:10 -0500625define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100626$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100627$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200628 -I$(call gb_UnpackedTarball_get_dir,boost) \
Michael Stahla53586f2013-01-26 21:19:13 +0100629 $$(INCLUDE) \
630)
Peter Foleye1f742a2012-11-12 18:37:10 -0500631
632endef
633
Peter Foleycdb6eca2012-11-10 08:56:12 -0500634define gb_ExternalProject__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100635$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500636
637endef
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200638endif # SYSTEM_BOOST
639
640
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100641ifeq ($(SYSTEM_CMIS),YES)
Matúš Kukan464b4332012-01-15 02:12:49 +0100642
643define gb_LinkTarget__use_cmis
644$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100645 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200646 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100647)
Matúš Kukan707194e2012-09-06 18:19:34 +0200648$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100649
650endef
651
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100652else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100653
Matúš Kukan464b4332012-01-15 02:12:49 +0100654define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200655$(call gb_LinkTarget_set_include,$(1),\
656 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
657 $$(INCLUDE) \
658)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200659$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100660 cmislib \
661)
662
663endef
664
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100665endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100666
Peter Foleye5ccda42012-12-25 11:23:58 -0500667ifeq ($(OS)$(COM),WNTGCC)
668
669define gb_LinkTarget__use_jawt
670$(call gb_LinkTarget_use_packages,$(1),\
671 jawt \
672)
673
674endef
675
676else # $(OS)$(COM) != WNTGCC
677
678gb_LinkTarget__use_jawt :=
679
680endif # $(OS)$(COM) = WNTGCC
681
Matúš Kukan464b4332012-01-15 02:12:49 +0100682
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100683ifeq ($(SYSTEM_LIBATOMIC_OPS),YES)
684
685define gb_LinkTarget__use_libatomic_ops
686$(call gb_LinkTarget_set_include,$(1),\
687 $$(INCLUDE) \
688 $(LIBATOMIC_OPS_CFLAGS) \
689)
690$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
691
692endef
693gb_ExternalProject__use_libatomic_ops :=
694
695else # !SYSTEM_LIBATOMIC_OPS
696
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100697define gb_LinkTarget__use_libatomic_ops
698$(call gb_LinkTarget_set_include,$(1),\
699$(LIBATOMIC_OPS_CFLAGS) \
700 $$(INCLUDE) \
701 $(LIBATOMIC_OPS_CFLAGS) \
702)
Michael Stahlb3085262013-10-24 12:22:58 +0200703$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100704 libatomic_ops \
705)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100706
Michael Stahlb3085262013-10-24 12:22:58 +0200707$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100708 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100709)
710
711endef
712
713define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200714$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100715
716endef
717
718endif # SYSTEM_LIBATOMIC_OPS
719
720
Matúš Kukanbd030302011-12-03 15:06:52 +0100721ifeq ($(SYSTEM_LIBEXTTEXTCAT),YES)
722
723define gb_LinkTarget__use_libexttextcat
724$(call gb_LinkTarget_set_include,$(1),\
725 $$(INCLUDE) \
726 $(LIBEXTTEXTCAT_CFLAGS) \
727)
Peter Foley31219f02012-11-09 17:25:56 -0500728$(call gb_LinkTarget_add_defs,$(1),\
729 -DSYSTEM_LIBEXTTEXTCAT \
730)
Matúš Kukanbd030302011-12-03 15:06:52 +0100731$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
732
733endef
734
735else # !SYSTEM_LIBEXTTEXTCAT
736
Matúš Kukanbd030302011-12-03 15:06:52 +0100737define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500738$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200739 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500740 $$(INCLUDE) \
741)
Matúš Kukanbd030302011-12-03 15:06:52 +0100742
Michael Stahl2f6261f2013-09-19 19:28:36 +0200743ifeq ($(COM),MSC)
744$(call gb_LinkTarget_use_static_libraries,$(1),\
745 exttextcat \
746)
747else
748$(call gb_LinkTarget_add_libs,$(1),\
749 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
750)
David Tardon523a3042013-10-12 18:22:55 +0200751$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200752endif
753
754
Matúš Kukanbd030302011-12-03 15:06:52 +0100755endef
756
757endif # SYSTEM_LIBEXTTEXTCAT
758
759
Michael Stahlc74af0d2011-04-01 20:49:35 +0000760ifeq ($(SYSTEM_LIBXML),YES)
761
762define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000763$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000764 -DSYSTEM_LIBXML \
765)
766$(call gb_LinkTarget_set_include,$(1),\
767 $$(INCLUDE) \
768 $(LIBXML_CFLAGS) \
769)
770$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100771
Michael Stahlc74af0d2011-04-01 20:49:35 +0000772endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500773gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000774
775else # !SYSTEM_LIBXML
776
Michael Stahlc74af0d2011-04-01 20:49:35 +0000777define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500778$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500779$(call gb_LinkTarget_set_include,$(1),\
780 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200781 -I$(call gb_UnpackedTarball_get_dir,xml2)/include \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500782)
783
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200784ifeq ($(COM),MSC)
785$(call gb_LinkTarget_add_libs,$(1),\
786 $(call gb_UnpackedTarball_get_dir,xml2)/win32/bin.msvc/libxml2.lib \
787)
788else
789$(call gb_LinkTarget_add_libs,$(1),\
790 -L$(call gb_UnpackedTarball_get_dir,xml2)/.libs -lxml2 \
791)
792endif
793
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500794endef
795define gb_ExternalProject__use_libxml2
796$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100797
Michael Stahlc74af0d2011-04-01 20:49:35 +0000798endef
799
800endif # SYSTEM_LIBXML
801
802
803ifeq ($(SYSTEM_LIBXSLT),YES)
804
805define gb_LinkTarget__use_libxslt
806$(call gb_LinkTarget_set_include,$(1),\
807 $$(INCLUDE) \
808 $(LIBXSLT_CFLAGS) \
809)
810$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100811
Michael Stahlc74af0d2011-04-01 20:49:35 +0000812endef
813
David Tardonab03e872012-08-15 07:20:13 +0200814define gb_LinkTarget__use_libexslt
815$(call gb_LinkTarget_set_include,$(1),\
816 $$(INCLUDE) \
817 $(LIBEXSLT_CFLAGS) \
818)
819
820$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
821
822endef
823
Michael Stahlc74af0d2011-04-01 20:49:35 +0000824else # !SYSTEM_LIBXSLT
825
Michael Stahlc74af0d2011-04-01 20:49:35 +0000826define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500827$(call gb_LinkTarget_use_package,$(1),xslt)
828$(call gb_LinkTarget_set_include,$(1),\
829 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200830 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500831)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200832
833ifeq ($(COM),MSC)
834$(call gb_LinkTarget_add_libs,$(1),\
835 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000836)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200837else
838$(call gb_LinkTarget_add_libs,$(1),\
839 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
840)
841endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100842
Michael Stahlc74af0d2011-04-01 20:49:35 +0000843endef
844
David Tardonab03e872012-08-15 07:20:13 +0200845define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -0500846$(call gb_LinkTarget_use_package,$(1),xslt)
847$(call gb_LinkTarget_set_include,$(1),\
848 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200849 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500850)
851
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200852ifeq ($(COM),MSC)
853$(call gb_LinkTarget_add_libs,$(1),\
854 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200855)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200856else
857$(call gb_LinkTarget_add_libs,$(1),\
858 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
859)
860endif
David Tardonab03e872012-08-15 07:20:13 +0200861
862endef
863
Michael Stahlc74af0d2011-04-01 20:49:35 +0000864endif # SYSTEM_LIBXSLT
865
Eike Rathkea774a482012-08-06 19:22:43 +0200866define gb_LinkTarget__use_glib
Tor Lillqviste10124b2012-11-06 18:08:16 +0200867$(error gb_LinkTarget__use_glib should not be called any more)
Eike Rathkea774a482012-08-06 19:22:43 +0200868endef
869
Norbert Thiebaud587d9692013-08-29 10:38:00 -0500870ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200871
Eike Rathkea774a482012-08-06 19:22:43 +0200872ifeq ($(SYSTEM_LIBLANGTAG),YES)
873
874define gb_LinkTarget__use_liblangtag
875$(call gb_LinkTarget_set_include,$(1),\
876 $$(INCLUDE) \
877 $(LIBLANGTAG_CFLAGS) \
878)
879
880$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
881
882endef
883
884else # !SYSTEM_LIBLANGTAG
885
Eike Rathkea774a482012-08-06 19:22:43 +0200886define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -0500887$(call gb_LinkTarget_use_unpacked,$(1),langtag)
888$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200889 -I$(call gb_UnpackedTarball_get_dir,langtag) \
Peter Foley782151a2012-11-11 16:02:36 -0500890 $$(INCLUDE) \
891)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200892$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
893$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +0200894
895endef
896
897endif # SYSTEM_LIBLANGTAG
898
Matúš Kukan51ba7db2013-05-02 12:19:35 +0200899else
900
901gb_LinkTarget__use_liblangtag :=
902
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +0200903endif # ENABLE_LIBLANGTAG
904
Eike Rathkea774a482012-08-06 19:22:43 +0200905
Matúš Kukan464b4332012-01-15 02:12:49 +0100906ifeq ($(SYSTEM_NEON),YES)
907
908define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +0100909$(call gb_LinkTarget_add_defs,$(1),\
910 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +0200911 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +0100912)
Matúš Kukan464b4332012-01-15 02:12:49 +0100913$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100914 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +0000915 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100916)
917
918$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
919
920endef
921
922else # !SYSTEM_NEON
923
Matúš Kukanbb6c5a52012-09-11 12:56:39 +0200924$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
Matúš Kukan464b4332012-01-15 02:12:49 +0100925 neon \
926))
927
928define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +0100929$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +0100930$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200931 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100932 $$(INCLUDE) \
933)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200934$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100935 neon \
936)
937
938endef
939
940endif # SYSTEM_NEON
941
942
Michael Stahlc74af0d2011-04-01 20:49:35 +0000943ifeq ($(SYSTEM_REDLAND),YES)
944
945define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +0000946$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000947 -DSYSTEM_REDLAND \
948)
949$(call gb_LinkTarget_set_include,$(1),\
950 $$(INCLUDE) \
951 $(REDLAND_CFLAGS) \
952)
953$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100954
Michael Stahlc74af0d2011-04-01 20:49:35 +0000955endef
956
Peter Foley18bd1e72012-12-27 18:04:21 -0500957gb_LinkTarget__use_redland_headers:=
958
959gb_LinkTarget__use_raptor_headers:=
960
961gb_LinkTarget__use_rasqal_headers:=
962
Michael Stahlc74af0d2011-04-01 20:49:35 +0000963else # !SYSTEM_REDLAND
964
Peter Foley18bd1e72012-12-27 18:04:21 -0500965define gb_LinkTarget__use_redland_headers
966$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +0200967 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -0500968 $$(INCLUDE) \
969)
970
971endef
972
973define gb_LinkTarget__use_raptor_headers
974$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200975 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -0500976 $$(INCLUDE) \
977)
978
979endef
980
981define gb_LinkTarget__use_rasqal_headers
982$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200983 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -0500984 $$(INCLUDE) \
985)
986
987endef
988
Tor Lillqvist9a42ca72012-04-19 21:45:14 +0300989ifneq ($(OS),ANDROID)
990
Michael Stahl5f9cda22013-11-01 15:43:47 +0100991ifeq ($(COM),MSC)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000992$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
David Tardon491dea02013-05-01 11:23:50 +0200993 raptor2 \
994 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000995 rdf \
996))
Michael Stahl5f9cda22013-11-01 15:43:47 +0100997endif
Michael Stahlc74af0d2011-04-01 20:49:35 +0000998
999define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001000$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Michael Stahl831aaef2013-10-24 01:09:35 +02001001
1002ifeq ($(COM),MSC)
1003$(call gb_LinkTarget_use_libraries,$(1),\
1004 raptor2 \
1005 rdf \
1006)
1007else
Michael Stahl2793c542013-10-23 21:18:24 +02001008$(call gb_LinkTarget_add_libs,$(1),\
1009 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1010 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001011)
Michael Stahl831aaef2013-10-24 01:09:35 +02001012endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001013
Michael Stahlc74af0d2011-04-01 20:49:35 +00001014endef
1015
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001016else # ANDROID
1017
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001018define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001019$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001020
1021endef
1022
1023endif # ANDROID
1024
Michael Stahlc74af0d2011-04-01 20:49:35 +00001025endif # SYSTEM_REDLAND
1026
1027
1028ifeq ($(SYSTEM_CAIRO),YES)
1029
Michael Stahlc74af0d2011-04-01 20:49:35 +00001030define gb_LinkTarget__use_cairo
1031$(call gb_LinkTarget_set_include,$(1),\
1032 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001033 $(CAIRO_CFLAGS) \
1034)
David Tardon962771f2013-05-24 14:35:18 +02001035$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001036$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001037
Michael Stahlc74af0d2011-04-01 20:49:35 +00001038endef
1039
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001040else ifeq ($(SYSTEM_CAIRO),NO)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001041
Michael Stahlc74af0d2011-04-01 20:49:35 +00001042define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001043$(call gb_LinkTarget_use_package,$(1),cairo)
1044$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001045$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001046$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001047 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1048 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001049 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001050)
Michael Stahld89f48b2013-10-23 21:27:05 +02001051$(call gb_LinkTarget_add_libs,$(1),\
1052 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001053 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001054 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001055 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001056)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001057
Michael Stahlc74af0d2011-04-01 20:49:35 +00001058endef
1059
1060endif # SYSTEM_CAIRO
1061
David Tardon962771f2013-05-24 14:35:18 +02001062ifeq ($(SYSTEM_FREETYPE),YES)
1063
1064define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001065$(call gb_LinkTarget_set_include,$(1),\
1066 $$(INCLUDE) \
1067 $(FREETYPE_CFLAGS) \
1068)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001069
David Tardon962771f2013-05-24 14:35:18 +02001070endef
1071
1072define gb_LinkTarget__use_freetype
1073$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001074$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1075
1076endef
1077
Michael Stahle568d2a2013-09-30 14:10:22 +02001078gb_ExternalProject__use_freetype :=
1079
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001080else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001081
1082define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001083$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001084$(call gb_LinkTarget_set_include,$(1),\
1085 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1086 $$(INCLUDE) \
1087)
1088
David Tardon61695f12013-05-24 17:15:20 +02001089endef
1090
David Tardon962771f2013-05-24 14:35:18 +02001091define gb_LinkTarget__use_freetype
1092$(call gb_LinkTarget_use_external,$(1),freetype_headers)
David Tardon962771f2013-05-24 14:35:18 +02001093
1094endef
1095
Michael Stahle568d2a2013-09-30 14:10:22 +02001096define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001097$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001098
1099endef
1100
David Tardon962771f2013-05-24 14:35:18 +02001101endif # SYSTEM_FREETYPE
1102
David Tardon4eb68422013-05-24 14:16:03 +02001103ifeq ($(SYSTEM_FONTCONFIG),YES)
1104
Caolán McNamarab41ae462011-07-25 22:24:27 +01001105define gb_LinkTarget__use_fontconfig
1106$(call gb_LinkTarget_set_include,$(1),\
1107 $$(INCLUDE) \
1108 $(FONTCONFIG_CFLAGS) \
1109)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001110
Caolán McNamarab41ae462011-07-25 22:24:27 +01001111$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1112
1113endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001114
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001115else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001116
David Tardon4eb68422013-05-24 14:16:03 +02001117define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001118$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001119$(call gb_LinkTarget_set_include,$(1),\
1120 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1121 $$(INCLUDE) \
1122)
1123
David Tardon4eb68422013-05-24 14:16:03 +02001124endef
1125
1126endif # SYSTEM_FONTCONFIG
1127
Michael Stahl87e44332011-04-13 16:11:39 +00001128ifeq ($(SYSTEM_GRAPHITE),YES)
1129
Michael Stahl87e44332011-04-13 16:11:39 +00001130define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001131$(call gb_LinkTarget_set_include,$(1),\
1132 $$(INCLUDE) \
1133 $(GRAPHITE_CFLAGS) \
1134)
1135$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001136
Michael Stahl87e44332011-04-13 16:11:39 +00001137endef
1138
Matúš Kukan1e925462012-10-26 13:37:59 +02001139else ifeq ($(SYSTEM_GRAPHITE),NO)
Michael Stahl87e44332011-04-13 16:11:39 +00001140
Michael Stahl87e44332011-04-13 16:11:39 +00001141define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001142$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001143$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001144 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001145 $$(INCLUDE) \
1146)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001147$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001148 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001149)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001150
Michael Stahl87e44332011-04-13 16:11:39 +00001151endef
1152
Matúš Kukan1e925462012-10-26 13:37:59 +02001153else # DISABLED GRAPHITE
1154
1155gb_LinkTarget__use_graphite :=
1156
Michael Stahl87e44332011-04-13 16:11:39 +00001157endif # SYSTEM_GRAPHITE
1158
Michael Stahlc74af0d2011-04-01 20:49:35 +00001159ifeq ($(SYSTEM_ICU),YES)
1160
Peter Foleyb92a0d92012-12-25 17:39:43 -05001161gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001162gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001163
Matúš Kukan6fad1752011-08-11 12:42:39 +02001164define gb_LinkTarget__use_icudata
1165$(call gb_LinkTarget_add_libs,$(1),-licudata)
1166
1167endef
David Tardon1a852392011-07-26 09:58:54 +02001168define gb_LinkTarget__use_icui18n
1169$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001170
David Tardon1a852392011-07-26 09:58:54 +02001171endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001172define gb_LinkTarget__use_icuuc
1173$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001174
Michael Stahlc74af0d2011-04-01 20:49:35 +00001175endef
1176
1177else # !SYSTEM_ICU
1178
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001179ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001180gb_ICU_suffix:=lo
1181else
1182gb_ICU_suffix:=
1183endif
1184
Peter Foleyb92a0d92012-12-25 17:39:43 -05001185define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001186$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001187$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001188 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1189 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1190 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001191 $$(INCLUDE) \
1192)
1193
1194endef
1195
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001196define gb_ExternalProject__use_icu
1197$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001198
1199endef
1200
Peter Foleyf7452122012-11-04 08:46:44 -05001201# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001202define gb_LinkTarget__use_icudata
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001203$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001204
1205ifeq ($(OS),WNT)
1206$(call gb_LinkTarget_add_libs,$(1),\
1207 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001208)
Michael Stahla92f80f2013-10-23 15:00:29 +02001209else
1210$(call gb_LinkTarget_add_libs,$(1),\
1211 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1212)
1213endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001214
1215endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001216
1217define gb_LinkTarget__use_icui18n
1218$(call gb_LinkTarget_use_package,$(1),icu)
1219
1220ifeq ($(OS),WNT)
1221$(call gb_LinkTarget_add_libs,$(1),\
1222 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1223)
1224else
1225$(call gb_LinkTarget_add_libs,$(1),\
1226 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1227)
1228endif
1229
1230endef
1231
Michael Stahlc74af0d2011-04-01 20:49:35 +00001232define gb_LinkTarget__use_icuuc
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001233$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001234
1235ifeq ($(OS),WNT)
1236$(call gb_LinkTarget_add_libs,$(1),\
1237 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001238)
Michael Stahla92f80f2013-10-23 15:00:29 +02001239else
1240$(call gb_LinkTarget_add_libs,$(1),\
1241 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1242)
1243endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001244
Michael Stahlc74af0d2011-04-01 20:49:35 +00001245endef
1246
1247endif # SYSTEM_ICU
1248
Fridrich Štrba9a943e52013-04-23 11:23:17 +02001249ifeq ($(ENABLE_HARFBUZZ),TRUE)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001250ifeq ($(SYSTEM_HARFBUZZ),YES)
1251
1252define gb_LinkTarget__use_harfbuzz
1253$(call gb_LinkTarget_set_include,$(1),\
1254 $$(INCLUDE) \
1255 $(HARFBUZZ_CFLAGS) \
1256)
1257$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1258
1259endef
1260
1261else # SYSTEM_HARFBUZZ != YES
1262
Khaled Hosny7e389f42013-04-20 13:00:56 +02001263define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001264$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001265 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001266 $$(INCLUDE) \
1267)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001268$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1269$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001270
1271endef
1272
1273endif # SYSTEM_HARFBUZZ
1274else # ENABLE_HARFBUZZ != YES
1275
1276gb_LinkTarget__use_harfbuzz :=
1277
1278endif # ENABLE_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001279
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001280ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001281
1282gb_ExternalProject__use_openssl:=
1283gb_LinkTarget__use_openssl_headers:=
1284gb_LinkTarget__use_openssl:=
1285
1286else # !DISABLE_OPENSSL
1287
Michael Stahl4a8919f2011-04-18 11:13:57 +00001288ifeq ($(SYSTEM_OPENSSL),YES)
1289
Peter Foley9ddba662012-12-28 11:19:06 -05001290gb_LinkTarget__use_openssl_headers:=
1291gb_ExternalProject__use_openssl:=
1292
Michael Stahl4a8919f2011-04-18 11:13:57 +00001293define gb_LinkTarget__use_openssl
1294$(call gb_LinkTarget_set_include,$(1),\
1295 $$(INCLUDE) \
1296 $(OPENSSL_CFLAGS) \
1297)
1298$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001299
Michael Stahl4a8919f2011-04-18 11:13:57 +00001300endef
1301
1302else # !SYSTEM_OPENSSL
1303
Peter Foley9ddba662012-12-28 11:19:06 -05001304define gb_ExternalProject__use_openssl
1305$(call gb_ExternalProject_use_package,$(1),openssl)
1306
1307endef
1308
1309define gb_LinkTarget__use_openssl_headers
1310$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001311 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001312 $$(INCLUDE) \
1313)
1314
1315endef
1316
Michael Stahl4a8919f2011-04-18 11:13:57 +00001317define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001318$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001319ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001320$(call gb_LinkTarget_add_libs,$(1),\
1321 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1322 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001323)
1324else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001325$(call gb_LinkTarget_add_libs,$(1),\
1326 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1327 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001328)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001329$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001330ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001331$(call gb_LinkTarget_add_libs,$(1),\
1332 -lnsl \
1333 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001334)
1335endif
1336endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001337
Michael Stahl4a8919f2011-04-18 11:13:57 +00001338endef
1339
1340endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001341endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001342
Matúš Kukanc4560482011-07-28 01:03:23 +02001343
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001344ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001345
1346define gb_LinkTarget__use_gnutls
1347$(call gb_LinkTarget_set_include,$(1),\
1348 $$(INCLUDE) \
1349 $(GNUTLS_CFLAGS) \
1350)
1351
1352$(call gb_LinkTarget_add_defs,$(1),\
1353 -DDISABLE_OPENSSL \
1354)
1355
1356$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1357
1358endef
1359
1360define gb_LinkTarget__use_libgcrypt
1361$(call gb_LinkTarget_set_include,$(1),\
1362 $$(INCLUDE) \
1363 $(LIBGCRYPT_CFLAGS) \
1364)
1365
1366$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1367
1368endef
1369
1370else # !DISABLE_OPENSSL
1371
1372gb_LinkTarget__use_gnutls:=
1373gb_LinkTarget__use_libgcrypt:=
1374
1375endif # DISABLE_OPENSSL
1376
1377
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001378ifeq ($(SYSTEM_CDR),YES)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001379
1380define gb_LinkTarget__use_cdr
1381$(call gb_LinkTarget_set_include,$(1),\
1382 $$(INCLUDE) \
1383 $(CDR_CFLAGS) \
1384)
1385$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1386
1387endef
1388
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001389else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001390
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001391define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001392$(call gb_LinkTarget_set_include,$(1),\
1393 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1394 $$(INCLUDE) \
1395)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001396$(call gb_LinkTarget_add_libs,$(1),\
1397 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.0$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001398)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001399$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001400endef
1401
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001402endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001403
1404
David Tardon316be1b2013-11-09 15:52:36 +01001405ifeq ($(SYSTEM_EBOOK),YES)
1406
1407define gb_LinkTarget__use_ebook
1408$(call gb_LinkTarget_set_include,$(1),\
1409 $$(INCLUDE) \
1410 $(EBOOK_CFLAGS) \
1411)
1412$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1413
1414endef
1415
1416gb_ExternalProject__use_ebook :=
1417
1418else # !SYSTEM_EBOOK
1419
1420define gb_LinkTarget__use_ebook
1421$(call gb_LinkTarget_set_include,$(1),\
1422 $(EBOOK_CFLAGS) \
1423 $$(INCLUDE) \
1424)
1425$(call gb_LinkTarget_add_libs,$(1),\
1426 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.0$(gb_StaticLibrary_PLAINEXT) \
1427)
1428$(call gb_LinkTarget_use_external_project,$(1),libebook)
1429
1430endef
1431
1432define gb_ExternalProject__use_ebook
1433$(call gb_ExternalProject_use_external_project,$(1),libebook)
1434
1435endef
1436
1437endif # SYSTEM_EBOOK
1438
1439
David Tardon08ca3e42013-10-24 16:46:49 +02001440ifeq ($(SYSTEM_ETONYEK),YES)
1441
1442define gb_LinkTarget__use_etonyek
1443$(call gb_LinkTarget_set_include,$(1),\
1444 $$(INCLUDE) \
1445 $(ETONYEK_CFLAGS) \
1446)
1447$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1448
1449endef
1450
1451gb_ExternalProject__use_etonyek :=
1452
1453else # !SYSTEM_ETONYEK
1454
1455define gb_LinkTarget__use_etonyek
1456$(call gb_LinkTarget_set_include,$(1),\
1457 $(ETONYEK_CFLAGS) \
1458 $$(INCLUDE) \
1459)
1460$(call gb_LinkTarget_add_libs,$(1),\
1461 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.0$(gb_StaticLibrary_PLAINEXT) \
1462)
1463$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1464
1465endef
1466
1467define gb_ExternalProject__use_etonyek
1468$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1469
1470endef
1471
1472endif # SYSTEM_ETONYEK
1473
1474
Fridrich Štrba67153d72013-10-31 12:42:50 +01001475ifeq ($(SYSTEM_FREEHAND),YES)
1476
1477define gb_LinkTarget__use_freehand
1478$(call gb_LinkTarget_set_include,$(1),\
1479 $$(INCLUDE) \
1480 $(FREEHAND_CFLAGS) \
1481)
1482$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1483
1484endef
1485
1486gb_ExternalProject__use_freehand :=
1487
1488else # !SYSTEM_FREEHAND
1489
1490define gb_LinkTarget__use_freehand
1491$(call gb_LinkTarget_set_include,$(1),\
1492 $(FREEHAND_CFLAGS) \
1493 $$(INCLUDE) \
1494)
1495$(call gb_LinkTarget_add_libs,$(1),\
1496 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.0$(gb_StaticLibrary_PLAINEXT) \
1497)
1498$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1499
1500endef
1501
1502define gb_ExternalProject__use_freehand
1503$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1504
1505endef
1506
1507endif # SYSTEM_FREEHAND
1508
1509
Fridrich Štrba93848e12013-05-02 20:25:51 +02001510ifeq ($(SYSTEM_ODFGEN),YES)
1511
1512define gb_LinkTarget__use_odfgen
1513$(call gb_LinkTarget_set_include,$(1),\
1514 $$(INCLUDE) \
1515 $(ODFGEN_CFLAGS) \
1516)
1517$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1518
1519endef
1520
1521else # !SYSTEM_ODFGEN
1522
Fridrich Štrba93848e12013-05-02 20:25:51 +02001523define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001524$(call gb_LinkTarget_set_include,$(1),\
1525 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1526 $$(INCLUDE) \
1527)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001528$(call gb_LinkTarget_add_libs,$(1),\
1529 $(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs/libodfgen-0.0$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001530)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001531$(call gb_LinkTarget_use_external_project,$(1),libodfgen)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001532
1533endef
1534
1535endif # SYSTEM_ODFGEN
1536
1537
Fridrich Štrba6c5709c2014-01-13 17:01:32 +01001538ifeq ($(SYSTEM_ABW),YES)
1539
1540define gb_LinkTarget__use_abw
1541$(call gb_LinkTarget_set_include,$(1),\
1542 $$(INCLUDE) \
1543 $(ABW_CFLAGS) \
1544)
1545$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1546
1547endef
1548gb_ExternalProject__use_abw :=
1549
1550else # !SYSTEM_ABW
1551
1552define gb_LinkTarget__use_abw
1553$(call gb_LinkTarget_set_include,$(1),\
1554 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1555 $$(INCLUDE) \
1556)
1557$(call gb_LinkTarget_add_libs,$(1),\
1558 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.0$(gb_StaticLibrary_PLAINEXT) \
1559)
1560$(call gb_LinkTarget_use_external_project,$(1),libabw)
1561
1562endef
1563define gb_ExternalProject__use_abw
1564$(call gb_ExternalProject_use_external_project,$(1),libabw)
1565
1566endef
1567
1568endif # SYSTEM_ABW
1569
1570
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001571ifeq ($(SYSTEM_MSPUB),YES)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001572
1573define gb_LinkTarget__use_mspub
1574$(call gb_LinkTarget_set_include,$(1),\
1575 $$(INCLUDE) \
1576 $(MSPUB_CFLAGS) \
1577)
1578$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1579
1580endef
1581
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001582else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001583
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001584define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001585$(call gb_LinkTarget_set_include,$(1),\
1586 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1587 $$(INCLUDE) \
1588)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001589$(call gb_LinkTarget_add_libs,$(1),\
1590 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.0$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001591)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001592$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001593
1594endef
1595
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001596endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001597
1598
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001599ifeq ($(SYSTEM_VISIO),YES)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001600
1601define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001602$(call gb_LinkTarget_set_include,$(1),\
1603 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001604 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001605)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001606$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001607
1608endef
1609
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001610else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001611
Matúš Kukanc6a63952011-07-28 17:29:44 +02001612define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02001613$(call gb_LinkTarget_set_include,$(1),\
1614 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1615 $$(INCLUDE) \
1616)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001617$(call gb_LinkTarget_add_libs,$(1),\
1618 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.0$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01001619)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001620$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001621
1622endef
1623
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001624endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001625
1626
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01001627ifeq ($(SYSTEM_WPD),YES)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001628
1629define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001630$(call gb_LinkTarget_set_include,$(1),\
1631 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02001632 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001633)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02001634$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001635
1636endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001637gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02001638
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01001639else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02001640
Fridrich Štrba4425db62012-09-24 13:17:45 +02001641define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02001642$(call gb_LinkTarget_set_include,$(1),\
1643 $(WPD_CFLAGS) \
1644 $$(INCLUDE) \
1645)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001646$(call gb_LinkTarget_add_libs,$(1),\
1647 $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.9$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl34295432012-09-24 22:25:28 +02001648)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001649$(call gb_LinkTarget_use_external_project,$(1),libwpd)
Fridrich Štrba4425db62012-09-24 13:17:45 +02001650
1651endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001652define gb_ExternalProject__use_wpd
Michael Stahl2f6261f2013-09-19 19:28:36 +02001653$(call gb_ExternalProject_use_external_project,$(1),libwpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02001654
1655endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02001656
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01001657endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02001658
1659
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001660ifeq ($(SYSTEM_WPG),YES)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001661
1662define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001663$(call gb_LinkTarget_set_include,$(1),\
1664 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02001665 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001666)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02001667$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001668
1669endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001670gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02001671
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001672else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02001673
Matúš Kukanc6a63952011-07-28 17:29:44 +02001674define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02001675$(call gb_LinkTarget_set_include,$(1),\
1676 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
1677 $$(INCLUDE) \
1678)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001679$(call gb_LinkTarget_add_libs,$(1),\
1680 $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.2$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02001681)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001682$(call gb_LinkTarget_use_external_project,$(1),libwpg)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001683
1684endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001685define gb_ExternalProject__use_wpg
Michael Stahl2f6261f2013-09-19 19:28:36 +02001686$(call gb_ExternalProject_use_external_project,$(1),libwpg)
Michael Stahl2b7536a2012-10-05 21:17:25 +02001687
1688endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02001689
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001690endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02001691
1692
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001693ifeq ($(SYSTEM_WPS),YES)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001694
1695define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001696$(call gb_LinkTarget_set_include,$(1),\
1697 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02001698 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001699)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02001700$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001701
1702endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001703gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02001704
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001705else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02001706
Matúš Kukanc6a63952011-07-28 17:29:44 +02001707define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02001708$(call gb_LinkTarget_set_include,$(1),\
1709 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
1710 $$(INCLUDE) \
1711)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001712$(call gb_LinkTarget_add_libs,$(1),\
1713 $(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs/libwps-0.2$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02001714)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001715$(call gb_LinkTarget_use_external_project,$(1),libwps)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001716
1717endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001718define gb_ExternalProject__use_wps
Michael Stahl2f6261f2013-09-19 19:28:36 +02001719$(call gb_ExternalProject_use_external_project,$(1),libwps)
Michael Stahl2b7536a2012-10-05 21:17:25 +02001720
1721endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02001722
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001723endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02001724
1725
Fridrich Štrba790a36d2013-03-11 12:38:12 +01001726ifeq ($(SYSTEM_MWAW),YES)
1727
1728define gb_LinkTarget__use_mwaw
1729$(call gb_LinkTarget_set_include,$(1),\
1730 $$(INCLUDE) \
1731 $(MWAW_CFLAGS) \
1732)
1733$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
1734
1735endef
1736
1737else # !SYSTEM_MWAW
1738
Fridrich Štrba790a36d2013-03-11 12:38:12 +01001739define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02001740$(call gb_LinkTarget_set_include,$(1),\
1741 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
1742 $$(INCLUDE) \
1743)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001744$(call gb_LinkTarget_add_libs,$(1),\
David Tardonb253d442013-11-03 09:34:36 +01001745 $(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs/libmwaw-0.2$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01001746)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001747$(call gb_LinkTarget_use_external_project,$(1),libmwaw)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01001748
1749endef
1750
1751endif # SYSTEM_MWAW
1752
1753
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001754ifeq ($(SYSTEM_LCMS2),YES)
1755
1756define gb_LinkTarget__use_lcms2
1757$(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05001759 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001760)
1761$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
1762
1763endef
1764
Peter Foley8905c0e2012-11-08 21:00:30 -05001765gb_ExternalProject__use_lcms2 :=
1766
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001767else # !SYSTEM_LCMS2
1768
Peter Foley8905c0e2012-11-08 21:00:30 -05001769define gb_ExternalProject__use_lcms2
1770$(call gb_ExternalProject_use_package,$(1),lcms2)
1771
1772endef
1773
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03001774ifeq ($(OS),ANDROID)
1775
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03001776define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01001777$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02001778$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001779 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02001780 $$(INCLUDE) \
1781)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03001782
1783endef
1784
1785else
1786
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001787define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01001788$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02001789$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001790 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02001791 $$(INCLUDE) \
1792)
Michael Stahl25f65f22013-10-23 22:04:36 +02001793$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001794
1795endef
1796
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03001797endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01001798endif # SYSTEM_LCMS2
1799
1800
Matúš Kukanc4560482011-07-28 01:03:23 +02001801ifeq ($(SYSTEM_LPSOLVE),YES)
1802
Peter Foley085346f2012-11-03 19:19:30 -04001803define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02001804$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04001805$(call gb_LinkTarget_add_defs,$(1),\
1806 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05001807)
Matúš Kukanc4560482011-07-28 01:03:23 +02001808
1809endef
1810
1811else # !SYSTEM_LPSOLVE
1812
Peter Foley085346f2012-11-03 19:19:30 -04001813define gb_LinkTarget__use_lpsolve
1814$(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02001815ifeq ($(COM),MSC)
1816$(call gb_LinkTarget_add_libs,$(1),\
1817 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
1818)
1819else
Michael Stahlb177b302013-10-23 21:33:51 +02001820$(call gb_LinkTarget_add_libs,$(1),\
1821 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02001822)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02001823endif
Peter Foley085346f2012-11-03 19:19:30 -04001824$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001825 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04001826 $$(INCLUDE) \
1827)
Matúš Kukanc4560482011-07-28 01:03:23 +02001828
1829endef
1830
1831endif # SYSTEM_LPSOLVE
1832
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01001833ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02001834
Matúš Kukan464b4332012-01-15 02:12:49 +01001835define gb_LinkTarget__use_gio
1836$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001837 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001838 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001839)
1840
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01001841$(call gb_LinkTarget_add_defs,$(1),\
Siqid0419802013-07-24 11:16:31 +02001842 -DENABLE_GIO \
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01001843)
1844
Matúš Kukan464b4332012-01-15 02:12:49 +01001845$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
1846
1847endef
1848
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01001849else # ENABLE_GIO
1850
1851define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00001852
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01001853endef
1854
1855endif # ENABLE_GIO
1856
Siqid0419802013-07-24 11:16:31 +02001857ifeq ($(ENABLE_AVAHI),TRUE)
1858
1859define gb_LinkTarget__use_avahi
1860$(call gb_LinkTarget_set_include,$(1),\
1861 $$(INCLUDE) \
1862 $(AVAHI_CFLAGS) \
1863)
1864
1865$(call gb_LinkTarget_add_defs,$(1),\
1866 -DENABLE_AVAHI \
1867)
1868
1869$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
1870
1871endef
1872
1873else # ENABLE_AVAHI
1874
David Tardon9ce38ef2013-11-05 07:03:08 +01001875gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02001876
1877endif # ENABLE_AVAHI
1878
1879
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02001880define gb_LinkTarget__use_gtk
1881$(call gb_LinkTarget_set_include,$(1),\
1882 $$(INCLUDE) \
1883 $(GTK_CFLAGS) \
1884)
1885
1886$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
1887
David Tardonadb11052011-12-01 13:39:09 +01001888ifeq ($(ENABLE_GTK_PRINT),TRUE)
1889
1890$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
1891
1892$(call gb_LinkTarget_set_include,$(1),\
1893 $$(INCLUDE) \
1894 $(GTK_PRINT_CFLAGS) \
1895)
1896
1897$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
1898
1899endif
1900
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02001901endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00001902
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02001903define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01001904$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02001905endef
1906
Caolán McNamara68ffb332012-09-14 11:31:50 +01001907ifeq ($(ENABLE_CUPS),TRUE)
1908
1909define gb_LinkTarget__use_cups
1910$(call gb_LinkTarget_add_defs,$(1),\
1911 -DENABLE_CUPS \
1912)
1913
1914$(call gb_LinkTarget_add_libs,$(1),\
1915 -lcups \
1916)
1917
1918endef
1919
1920else # ENABLE_CUPS
1921
1922define gb_LinkTarget__use_cups
1923
1924endef
1925
1926endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01001927
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01001928ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01001929
1930define gb_LinkTarget__use_dbus
1931$(call gb_LinkTarget_set_include,$(1),\
1932 $$(INCLUDE) \
1933 $(DBUS_CFLAGS) \
1934)
1935
Matúš Kukan464b4332012-01-15 02:12:49 +01001936$(call gb_LinkTarget_add_defs,$(1),\
David Tardon1b717ce2011-11-02 13:00:48 +01001937 -DENABLE_DBUS \
1938)
1939
Norbert Thiebaud7c88b252013-08-30 23:05:04 -05001940ifeq ($(ENABLE_PACKAGEKIT),TRUE)
Rene Engelhardbea61492012-09-11 02:30:09 +02001941$(call gb_LinkTarget_add_defs,$(1),\
1942 -DENABLE_PACKAGEKIT \
1943)
1944endif # ENABLE_PACKAGEKIT
1945
David Tardon1b717ce2011-11-02 13:00:48 +01001946$(call gb_LinkTarget_add_libs,$(1),\
1947 $(DBUS_LIBS) \
1948)
1949
1950endef
1951
1952else # ENABLE_DBUS
1953
1954define gb_LinkTarget__use_dbus
1955
1956endef
1957
1958endif # ENABLE_DBUS
1959
1960
Bjoern Michaelsendd321062011-07-26 16:04:15 +02001961define gb_LinkTarget__use_dbusmenugtk
1962$(call gb_LinkTarget_set_include,$(1),\
1963 $$(INCLUDE) \
1964 $(DBUSMENUGTK_CFLAGS) \
1965)
1966
1967$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
1968
1969endef
1970
Eike Rathkea3a8b802012-03-16 22:14:54 +01001971
1972ifeq ($(ENABLE_TELEPATHY),TRUE)
1973
1974define gb_LinkTarget__use_telepathy
1975$(call gb_LinkTarget_set_include,$(1),\
1976 $$(INCLUDE) \
1977 $(TELEPATHY_CFLAGS) \
1978)
1979
Eike Rathkea3a8b802012-03-16 22:14:54 +01001980$(call gb_LinkTarget_add_libs,$(1),\
1981 $(TELEPATHY_LIBS) \
1982)
1983
1984endef
1985
1986else # !ENABLE_TELEPATHY
1987
Matúš Kukanfe327622012-08-09 00:15:52 +02001988gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01001989
1990endif # ENABLE_TELEPATHY
1991
Peter Foley8615d092012-10-10 21:43:21 -04001992define gb_LinkTarget__use_croco
Tor Lillqviste10124b2012-11-06 18:08:16 +02001993$(error gb_LinkTarget__use_croco should not be used any more)
Peter Foley8615d092012-10-10 21:43:21 -04001994endef
1995
Peter Foley8615d092012-10-10 21:43:21 -04001996define gb_LinkTarget__use_pango
Tor Lillqviste10124b2012-11-06 18:08:16 +02001997$(error gb_LinkTarget__use_pango should not be used any more)
Peter Foley8615d092012-10-10 21:43:21 -04001998endef
1999
Peter Foley8615d092012-10-10 21:43:21 -04002000define gb_LinkTarget__use_gsf
Tor Lillqviste10124b2012-11-06 18:08:16 +02002001$(error gb_LinkTarget__use_gsf should not be used any more)
Peter Foley8615d092012-10-10 21:43:21 -04002002endef
2003
Peter Foley8615d092012-10-10 21:43:21 -04002004define gb_LinkTarget__use_pixbuf
Tor Lillqviste10124b2012-11-06 18:08:16 +02002005$(error gb_LinkTarget__use_pixbuf should not be used any more)
Peter Foley8615d092012-10-10 21:43:21 -04002006endef
2007
David Tardon6df9c472011-09-15 14:44:34 +02002008ifeq ($(SYSTEM_LIBPNG),YES)
2009
2010define gb_LinkTarget__use_png
2011$(call gb_LinkTarget_set_include,$(1),\
2012 $$(INCLUDE) \
2013 $(LIBPNG_CFLAGS) \
2014)
2015
2016$(call gb_LinkTarget_add_libs,$(1),\
2017 $(LIBPNG_LIBS) \
2018)
2019
2020endef
2021
2022else # !SYSTEM_LIBPNG
2023
David Tardon6df9c472011-09-15 14:44:34 +02002024define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002025$(call gb_LinkTarget_set_include,$(1),\
2026 $(LIBPNG_CFLAGS) \
2027 $$(INCLUDE) \
2028)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002029$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002030 png \
2031)
Michael Stahl398ce442012-09-28 21:47:29 +02002032$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002033
2034endef
2035
2036endif # !SYSTEM_LIBPNG
2037
Michael Stahl50471a82011-12-06 19:17:52 +01002038
2039ifeq ($(SYSTEM_CURL),YES)
2040
2041define gb_LinkTarget__use_curl
2042$(call gb_LinkTarget_set_include,$(1),\
2043 $$(INCLUDE) \
2044 $(CURL_CFLAGS) \
2045)
2046$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2047
2048endef
2049
2050else # !SYSTEM_CURL
2051
Michael Stahl50471a82011-12-06 19:17:52 +01002052define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002053$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002054$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002055 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002056 $$(INCLUDE) \
2057)
Michael Stahl936a1a92013-10-23 22:37:11 +02002058
2059ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002060$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl88e65df2013-11-11 14:42:13 +01002061 $(call gb_UnpackedTarball_get_dir,curl)/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002062)
Michael Stahl936a1a92013-10-23 22:37:11 +02002063else
2064$(call gb_LinkTarget_add_libs,$(1),\
2065 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2066)
2067endif
Michael Stahl50471a82011-12-06 19:17:52 +01002068
2069endef
2070
2071endif # SYSTEM_CURL
2072
Stephan Bergmann49313b02012-11-27 15:35:02 +01002073ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002074
2075define gb_LinkTarget__use_valgrind
2076$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002077 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002078)
2079
2080$(call gb_LinkTarget_set_include,$(1),\
2081 $$(INCLUDE) \
2082 $(VALGRIND_CFLAGS) \
2083)
2084
2085endef
2086
Stephan Bergmann49313b02012-11-27 15:35:02 +01002087else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002088
2089define gb_LinkTarget__use_valgrind
2090
2091endef
2092
Stephan Bergmann49313b02012-11-27 15:35:02 +01002093endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002094
David Tardondba2d322012-02-18 18:54:35 +01002095ifeq ($(SYSTEM_POPPLER),YES)
2096
2097define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002098$(call gb_LinkTarget_set_include,$(1),\
2099 $(POPPLER_CFLAGS) \
2100 $$(INCLUDE) \
2101)
2102
2103$(call gb_LinkTarget_add_libs,$(1),\
2104 $(POPPLER_LIBS) \
2105)
2106
2107endef
2108
2109else # !SYSTEM_POPPLER
2110
David Tardondba2d322012-02-18 18:54:35 +01002111define gb_LinkTarget__use_poppler
Michael Stahl2f6261f2013-09-19 19:28:36 +02002112$(call gb_LinkTarget_use_external_project,$(1),poppler)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002113
David Tardon548b61a2012-02-21 06:58:02 +01002114$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002115 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2116 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2117 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002118 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002119)
2120
Michael Stahl2f6261f2013-09-19 19:28:36 +02002121$(call gb_LinkTarget_add_libs,$(1),\
2122 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2123 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2124 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002125)
2126
2127ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002128$(call gb_LinkTarget_add_libs,$(1),\
2129 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002130)
2131else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002132$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002133 advapi32 \
2134 gdi32 \
2135)
2136endif
2137
David Tardondba2d322012-02-18 18:54:35 +01002138endef
2139
2140endif # SYSTEM_POPPLER
2141
David Tardon3446cda2011-12-23 12:21:19 +01002142
David Tardon22c60cb2012-04-07 15:50:47 +02002143ifeq ($(SYSTEM_CLUCENE),YES)
2144
2145define gb_LinkTarget__use_clucene
2146$(call gb_LinkTarget_add_defs,$(1),\
2147 $(filter-out -I%,$(CLUCENE_CFLAGS)) \
2148)
2149
2150$(call gb_LinkTarget_set_include,$(1),\
2151 $(filter -I%,$(CLUCENE_CFLAGS)) \
2152 $$(INCLUDE) \
2153)
2154
2155$(call gb_LinkTarget_add_libs,$(1),\
2156 $(CLUCENE_LIBS) \
2157)
2158
2159endef
2160
2161else # !SYSTEM_CLUCENE
2162
2163define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002164$(call gb_LinkTarget_set_include,$(1),\
2165 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2166 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2167 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2168 $$(INCLUDE) \
2169)
2170
Michael Stahlc923f7d2012-04-07 23:22:08 +02002171$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002172 clucene \
2173)
2174
2175endef
2176
David Tardon735c5292012-04-07 17:15:35 +02002177$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
David Tardon22c60cb2012-04-07 15:50:47 +02002178 clucene \
2179))
2180
2181endif # SYSTEM_CLUCENE
2182
Peter Foley64402842011-12-22 16:34:35 -05002183define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002184$(call gb_LinkTarget_add_libs,$(1),\
2185 $(GOBJECT_LIBS) \
2186)
2187
2188$(call gb_LinkTarget_set_include,$(1),\
2189 $$(INCLUDE) \
2190 $(GOBJECT_CFLAGS) \
2191)
Peter Foley64402842011-12-22 16:34:35 -05002192endef
2193
Michael Stahl1d6830e2012-07-17 13:07:30 +02002194ifeq ($(SYSTEM_HSQLDB),YES)
David Tardon579f52d2012-03-27 16:36:31 +02002195
2196define gb_LinkTarget__use_hsqldb
2197
2198$(call gb_LinkTarget_add_defs,$(1),\
2199 -DSYSTEM_HSQLDB \
2200 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2201)
2202
2203endef
2204
2205else # !SYSTEM_HSQLDB
2206
2207define gb_LinkTarget__use_hsqldb
2208
2209endef
2210
2211endif # SYSTEM_HSQLDB
2212
David Tardon8bc7afb2012-04-05 10:53:08 +02002213
Luboš Luňáke13cda12012-07-16 21:50:59 +02002214ifeq ($(SYSTEM_OPENLDAP),YES)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002215
2216define gb_LinkTarget__use_openldap
2217
2218$(call gb_LinkTarget_add_libs,$(1),\
2219 -lldap \
2220 -llber \
2221)
2222
2223endef
2224
Michael Stahl2f6261f2013-09-19 19:28:36 +02002225gb_ExternalProject__use_openldap :=
2226
Matúš Kukand6a02072013-03-27 00:34:19 +01002227else ifeq ($(SYSTEM_OPENLDAP),NO)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002228
Michael Stahle0ee0d42012-07-16 19:00:07 +02002229define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002230$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002231$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002232 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002233 $$(INCLUDE) \
2234)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002235$(call gb_LinkTarget_use_external_project,$(1),openldap)
2236$(call gb_LinkTarget_add_libs,$(1), \
2237 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2238 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002239)
2240
2241endef
2242
Michael Stahl2f6261f2013-09-19 19:28:36 +02002243define gb_ExternalProject__use_openldap
2244$(call gb_ExternalProject_use_external_project,$(1),openldap)
2245
2246endef
2247
Matúš Kukan006e1272013-03-27 01:02:55 +01002248else # no openldap
2249
2250gb_LinkTarget__use_openldap :=
Michael Stahl2f6261f2013-09-19 19:28:36 +02002251gb_ExternalProject__use_openldap :=
Matúš Kukan006e1272013-03-27 01:02:55 +01002252
Michael Stahle0ee0d42012-07-16 19:00:07 +02002253endif # SYSTEM_OPENLDAP
2254
2255
Javier Fernandezf53228c2013-05-10 18:21:30 +00002256ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2257
2258ifeq ($(SYSTEM_FIREBIRD),YES)
2259
Rene Engelhard0b68d702013-07-16 21:50:14 +02002260define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002261$(call gb_LinkTarget_set_include,$(1),\
2262 $(FIREBIRD_CFLAGS) \
2263 $$(INCLUDE) \
2264)
2265$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2266
2267endef
2268
2269# gb_LinkTarget__use_atomic_ops :=
2270# gb_LinkTarget__use_tommath :=
2271
2272else # !SYSTEM_FIREBIRD
2273
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002274#$(call gb_LinkTarget__use_libatomic_ops,$(1))
2275
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002276define gb_LinkTarget__use_libfbembed
2277$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002278$(call gb_LinkTarget_set_include,$(1),\
Javier Fernandezf53228c2013-05-10 18:21:30 +00002279 $$(INCLUDE) \
Andrzej J.R. Hunt7309fda2013-07-16 22:40:47 +02002280 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002281)
Michael Stahl37563db2013-10-22 22:22:49 +02002282ifeq ($(COM),MSC)
2283$(call gb_LinkTarget_add_libs,$(1),\
2284 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002285)
Michael Stahl37563db2013-10-22 22:22:49 +02002286else
2287$(call gb_LinkTarget_add_libs,$(1),\
2288 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2289)
2290endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002291
2292endef
2293
Javier Fernandezf53228c2013-05-10 18:21:30 +00002294# define gb_LinkTarget__use_tommath
2295# $(call gb_LinkTarget_set_include,$(1),\
2296# $(TOMMATH_CFLAGS) \
2297# $$(INCLUDE) \
2298# )
2299
2300# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2301
2302# endef
2303
2304endif # SYSTEM_FIREBIRD
2305
2306else # !ENABLE_FIREBIRD_SDBC
2307
2308gb_LinkTarget__use_firebird :=
2309# gb_LinkTarget__use_atomic_ops :=
2310# gb_LinkTarget__use_tommath :=
2311
2312endif # ENABLE_FIREBIRD_SDBC
2313
2314
David Tardon8bc7afb2012-04-05 10:53:08 +02002315ifeq ($(SYSTEM_POSTGRESQL),YES)
2316
2317define gb_LinkTarget__use_postgresql
2318
David Tardon8bc7afb2012-04-05 10:53:08 +02002319$(call gb_LinkTarget_set_include,$(1),\
2320 $(POSTGRESQL_INC) \
2321 $$(INCLUDE) \
2322)
2323
2324$(call gb_LinkTarget_add_libs,$(1),\
2325 -lpq \
2326)
2327
2328$(call gb_LinkTarget_add_ldflags,$(1),\
2329 $(POSTGRESQL_LIB) \
2330)
2331
2332endef
2333
2334else # !SYSTEM_POSTGRESQL
2335
2336define gb_LinkTarget__use_postgresql
2337
Michael Stahl2f6261f2013-09-19 19:28:36 +02002338$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002339
David Tardon8bc7afb2012-04-05 10:53:08 +02002340$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002341 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2342 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002343 $$(INCLUDE) \
2344)
2345
Michael Stahl2f6261f2013-09-19 19:28:36 +02002346$(call gb_LinkTarget_add_libs,$(1),\
2347 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002348)
2349
Tor Lillqvistc2909892012-12-12 01:07:09 +02002350ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002351$(call gb_LinkTarget_use_external,$(1),openssl)
2352
Michael Stahldc397aae2012-09-28 15:31:46 +02002353$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02002354 secur32 \
2355 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02002356)
David Tardon8af6aa62012-05-30 12:06:42 +02002357
David Tardon8bc7afb2012-04-05 10:53:08 +02002358endif
2359
2360endef
2361
David Tardon8bc7afb2012-04-05 10:53:08 +02002362endif # SYSTEM_POSTGRESQL
2363
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002364ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002365
David Tardonc678a4c2012-04-05 17:59:36 +02002366define gb_LinkTarget__use_mozilla
2367
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002368$(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2369$(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2370
David Tardonc678a4c2012-04-05 17:59:36 +02002371$(call gb_LinkTarget_add_defs,$(1),\
2372 -DMOZILLA_INTERNAL_API \
2373)
2374
2375$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002376 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2377 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2378 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2379 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2380 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2381 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2382 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2383 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2384 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2385 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2386 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2387 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2388 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2389 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2390 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2391 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
David Tardonc678a4c2012-04-05 17:59:36 +02002392 $$(INCLUDE) \
David Tardonc678a4c2012-04-05 17:59:36 +02002393)
2394
Michael Stahld2f62c32013-10-23 00:14:01 +02002395$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002396 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
Michael Stahl3dadfa52013-10-29 14:34:56 +01002397 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2398 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002399)
2400
David Tardonc678a4c2012-04-05 17:59:36 +02002401$(call gb_LinkTarget_add_defs,$(1),\
2402 -DMOZILLA_CLIENT \
2403 -DMOZ_REFLOW_PERF \
2404 -DMOZ_REFLOW_PERF_DSP \
2405 -DMOZ_XUL \
2406 -DOJI \
2407 -DWIN32 \
2408 -DXP_PC \
2409 -DXP_WIN \
2410 -DXP_WIN32 \
2411 -D_WINDOWS \
2412)
2413
2414ifeq ($(COM),GCC)
2415
2416$(call gb_LinkTarget_add_cxxflags,$(1),\
2417 -Wall \
2418 -Wcast-align \
2419 -Wconversion \
2420 -Wno-long-long \
2421 -Woverloaded-virtual \
2422 -Wpointer-arith \
2423 -Wsynth \
2424 -fno-rtti \
2425)
2426
2427else
2428
2429ifneq ($(DBG_LEVEL),0)
2430$(call gb_LinkTarget_add_defs,$(1),\
2431 -D_STL_NOFORCE_MANIFEST \
2432)
2433endif
2434
2435$(call gb_LinkTarget_add_libs,$(1),\
Christian Lohmaierc18dc122013-10-10 18:31:27 +02002436 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2437 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002438)
2439
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002440endif # !GCC
David Tardonc678a4c2012-04-05 17:59:36 +02002441
David Tardonc678a4c2012-04-05 17:59:36 +02002442endef
2443
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002444endif # DESKTOP
David Tardonc678a4c2012-04-05 17:59:36 +02002445
David Tardond4efa8b2012-04-28 20:48:14 +02002446ifeq ($(ENABLE_KDE),TRUE)
2447
2448define gb_LinkTarget__use_kde
2449$(call gb_LinkTarget_set_include,$(1),\
2450 $(filter -I%,$(KDE_CFLAGS)) \
2451 $$(INCLUDE) \
2452)
2453
2454$(call gb_LinkTarget_add_defs,$(1),\
2455 $(filter-out -I%,$(KDE_CFLAGS)) \
2456)
2457
2458$(call gb_LinkTarget_add_libs,$(1),\
2459 $(KDE_LIBS) \
2460)
2461
2462ifeq ($(COM),GCC)
2463$(call gb_LinkTarget_add_cxxflags,$(1),\
2464 -Wno-shadow \
2465)
2466endif
2467
2468endef
2469
2470else # !ENABLE_KDE
2471
2472define gb_LinkTarget__use_kde
2473
2474endef
2475
2476endif # ENABLE_KDE
2477
2478
2479ifeq ($(ENABLE_KDE4),TRUE)
2480
2481define gb_LinkTarget__use_kde4
2482$(call gb_LinkTarget_set_include,$(1),\
2483 $(filter -I%,$(KDE4_CFLAGS)) \
2484 $$(INCLUDE) \
2485)
2486
2487$(call gb_LinkTarget_add_defs,$(1),\
2488 $(filter-out -I%,$(KDE4_CFLAGS)) \
2489)
2490
2491$(call gb_LinkTarget_add_libs,$(1),\
2492 $(KDE4_LIBS) \
2493)
2494
2495ifeq ($(COM),GCC)
2496$(call gb_LinkTarget_add_cxxflags,$(1),\
2497 -Wno-shadow \
2498)
2499endif
2500
2501endef
2502
2503else # !ENABLE_KDE4
2504
2505define gb_LinkTarget__use_kde4
2506
2507endef
2508
2509endif # ENABLE_KDE4
2510
2511
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002512ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02002513
2514define gb_LinkTarget__use_tde
2515$(call gb_LinkTarget_add_libs,$(1),\
2516 $(TDE_LIBS) \
2517)
2518
2519$(call gb_LinkTarget_set_include,$(1),\
2520 $$(INCLUDE) \
2521 $(TDE_CFLAGS) \
2522)
2523endef
2524
2525else # ! ENABLE_TDE
2526
2527define gb_LinkTarget__use_tde
2528
2529endef
2530
2531endif # ENABLE_TDE
2532
2533
2534ifeq ($(ENABLE_GCONF),TRUE)
2535
2536define gb_LinkTarget__use_gconf
2537$(call gb_LinkTarget_set_include,$(1),\
2538 $(filter -I%,$(GCONF_CFLAGS)) \
2539 $$(INCLUDE) \
2540)
2541
2542$(call gb_LinkTarget_add_defs,$(1),\
2543 $(filter-out -I%,$(GCONF_CFLAGS)) \
2544)
2545
2546$(call gb_LinkTarget_add_libs,$(1),\
2547 $(GCONF_LIBS) \
2548)
2549
2550endef
2551
2552else # !ENABLE_GCONF
2553
2554define gb_LinkTarget__use_gconf
2555
2556endef
2557
2558endif # ENABLE_GCONF
2559
2560
David Ostrovskye16ac692012-05-27 22:50:41 +02002561# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01002562# extra python_headers external because pyuno wrapper must not link python
David Ostrovskye16ac692012-05-27 22:50:41 +02002563ifeq ($(SYSTEM_PYTHON),YES)
2564
Michael Stahl91926332012-11-27 15:50:53 +01002565define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02002566$(call gb_LinkTarget_add_defs,$(1),\
2567 $(filter-out -I%,$(PYTHON_CFLAGS)) \
2568)
2569
2570$(call gb_LinkTarget_set_include,$(1),\
2571 $(filter -I%,$(PYTHON_CFLAGS)) \
2572 $$(INCLUDE) \
2573)
2574
Michael Stahl91926332012-11-27 15:50:53 +01002575endef
2576
2577define gb_LinkTarget__use_python
2578$(call gb_LinkTarget__use_python_headers,$(1))
2579
David Ostrovskye16ac692012-05-27 22:50:41 +02002580$(call gb_LinkTarget_add_libs,$(1),\
2581 $(PYTHON_LIBS) \
2582)
2583
2584endef
2585
2586else # !SYSTEM_PYTHON
2587
Michael Stahl75a2c502012-12-04 13:47:22 +01002588# depend on external project because on MACOSX the Package is disabled...
Michael Stahl91926332012-11-27 15:50:53 +01002589define gb_LinkTarget__use_python_headers
Michael Stahl75a2c502012-12-04 13:47:22 +01002590$(call gb_LinkTarget_use_external_project,$(1),python3)
Michael Stahl91926332012-11-27 15:50:53 +01002591$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002592 -I$(call gb_UnpackedTarball_get_dir,python3) \
2593 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
2594 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01002595 $$(INCLUDE) \
2596)
2597
2598endef
2599
David Ostrovskye16ac692012-05-27 22:50:41 +02002600define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01002601$(call gb_LinkTarget__use_python_headers,$(1))
David Ostrovskye16ac692012-05-27 22:50:41 +02002602
2603ifeq ($(OS),WNT)
2604$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl5b7ccf32013-06-04 17:16:47 +02002605 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
David Ostrovskye16ac692012-05-27 22:50:41 +02002606)
2607else ifeq ($(OS),MACOSX)
2608$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01002609 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02002610)
2611else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02002612$(call gb_LinkTarget_add_libs,$(1),\
2613 -L$(call gb_UnpackedTarball_get_dir,python3) \
2614 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02002615)
2616endif
2617
David Ostrovskye16ac692012-05-27 22:50:41 +02002618endef
2619
David Ostrovskye16ac692012-05-27 22:50:41 +02002620endif # SYSTEM_PYTHON
2621
Kohei Yoshida49b0b692012-09-04 15:05:35 -04002622# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04002623ifeq ($(ENABLE_ORCUS),TRUE)
2624
Kohei Yoshida31f589b2012-08-30 23:26:59 -04002625ifeq ($(SYSTEM_LIBORCUS),YES)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04002626
2627define gb_LinkTarget__use_orcus
2628$(call gb_LinkTarget_set_include,$(1),\
2629 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02002630 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04002631)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02002632$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02002633endef
2634
2635define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04002636
2637endef
2638
Kohei Yoshida31f589b2012-08-30 23:26:59 -04002639else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04002640
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04002641define gb_LinkTarget__use_orcus
Michael Stahl2f6261f2013-09-19 19:28:36 +02002642$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Matúš Kukan1ee76032012-09-09 15:29:43 +02002643$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02002644 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02002645 $$(INCLUDE) \
2646)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002647$(call gb_LinkTarget_add_libs,$(1),\
2648 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.6$(gb_StaticLibrary_PLAINEXT) \
2649)
David Tardonf1035c12012-11-23 06:49:21 +01002650
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01002651$(if $(filter YES,$(SYSTEM_BOOST)), \
2652 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
2653 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
2654)
David Tardonf1035c12012-11-23 06:49:21 +01002655
Kohei Yoshidaa6639312012-07-27 22:14:39 -04002656endef
2657
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04002658define gb_LinkTarget__use_orcus-parser
Michael Stahl2f6261f2013-09-19 19:28:36 +02002659$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Kohei Yoshidabe7fea02013-12-12 16:09:11 +01002660$(call gb_LinkTarget_set_include,$(1),\
2661 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
2662 $$(INCLUDE) \
2663)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002664$(call gb_LinkTarget_add_libs,$(1),\
2665 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.6$(gb_StaticLibrary_PLAINEXT) \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04002666)
2667
2668endef
2669
Kohei Yoshida31f589b2012-08-30 23:26:59 -04002670endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02002671
Kohei Yoshida02346aa2013-09-18 19:06:20 -04002672else # ENABLE_ORCUS != TRUE
2673
2674gb_LinkTarget__use_orcus :=
2675gb_LinkTarget__use_orcus-parser :=
2676
2677endif
Michael Stahl78b59b82012-09-27 21:45:47 +02002678
David Tardon49a4d362013-11-12 16:44:40 +01002679ifeq ($(ENABLE_EOT),TRUE)
2680
Rene Engelhardfab0aee2013-12-01 14:05:38 +01002681ifeq ($(SYSTEM_LIBEOT),YES)
David Tardon49a4d362013-11-12 16:44:40 +01002682
2683define gb_LinkTarget__use_libeot
2684$(call gb_LinkTarget_set_include,$(1),\
2685 $$(INCLUDE) \
2686 $(LIBEOT_CFLAGS) \
2687)
2688$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
2689
2690endef
2691
2692gb_ExternalProject__use_libeot :=
2693
2694else # !SYSTEM_LIBEOT
2695
2696define gb_LinkTarget__use_libeot
2697$(call gb_LinkTarget_set_include,$(1),\
2698 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
2699 $$(INCLUDE) \
2700)
2701$(call gb_LinkTarget_add_libs,$(1),\
2702 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
2703)
2704$(call gb_LinkTarget_use_external_project,$(1),libeot)
2705
2706endef
2707
2708define gb_ExternalProject__use_libeot
2709$(call gb_ExternalProject_use_external_project,$(1),libeot)
2710
2711endef
2712
2713endif # SYSTEM_LIBEOT
2714
2715else # !ENABLE_EOT
2716
2717gb_LinkTarget__use_libeot :=
2718gb_ExternalProject__use_libeot :=
2719
2720endif # ENABLE_EOT
2721
Michael Stahl78b59b82012-09-27 21:45:47 +02002722### X11 stuff ###
2723
2724ifeq ($(GUIBASE),unx)
2725
Michael Stahl78b59b82012-09-27 21:45:47 +02002726ifeq ($(XRANDR_DLOPEN),FALSE)
2727
2728define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02002729$(call gb_LinkTarget_set_include,$(1),\
2730 $$(INCLUDE) \
2731 $(XRANDR_CFLAGS) \
2732)
2733
2734$(call gb_LinkTarget_add_libs,$(1),\
2735 $(XRANDR_LIBS) \
2736)
2737endef
2738
2739else # XRANDR_DLOPEN
2740
2741define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02002742$(call gb_LinkTarget_add_defs,$(1),\
2743 -DXRANDR_DLOPEN \
2744)
2745endef
2746
2747endif # XRANDR_DLOPEN
2748
2749define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02002750$(call gb_LinkTarget_set_include,$(1),\
2751 $$(INCLUDE) \
2752 $(XRENDER_CFLAGS) \
2753)
2754
2755$(call gb_LinkTarget_add_libs,$(1),\
2756 $(XRENDER_LIBS) \
2757)
2758endef
2759
2760endif # GUIBASE=unx
2761
Tor Lillqvist35491072011-08-02 21:22:35 +03002762
Michael Meeksb440cfc2013-02-28 12:05:07 +00002763gb_ExternalProject__use_nss3:=
2764
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002765ifeq (,$(filter DESKTOP,$(BUILD_TYPE)))
2766
Peter Foleyc003d252013-01-01 09:39:36 -05002767gb_LinkTarget__use_nss3:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002768
2769else
2770
Tomas Chvatal75f77e62011-11-02 21:16:53 +01002771ifeq ($(SYSTEM_NSS),YES)
David Tardonb6aa4842011-08-11 13:10:14 +02002772
David Tardon2b9dbc82012-08-13 06:57:51 +02002773define gb_LinkTarget__use_nss3
2774$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01002775 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02002776)
2777
David Tardonb6aa4842011-08-11 13:10:14 +02002778$(call gb_LinkTarget_set_include,$(1),\
2779 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01002780 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02002781)
2782
2783$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01002784 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02002785)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01002786
David Tardonb6aa4842011-08-11 13:10:14 +02002787endef
2788
David Tardon2b9dbc82012-08-13 06:57:51 +02002789define gb_LinkTarget__use_plc4
2790$(call gb_LinkTarget__use_nss3,$(1))
2791
2792endef
2793
David Tardon6ef46562013-02-04 10:04:07 +01002794define gb_LinkTarget__use_ssl3
2795$(call gb_LinkTarget__use_nss3,$(1))
2796
2797endef
2798
David Tardonb6aa4842011-08-11 13:10:14 +02002799else
2800
David Tardon2b9dbc82012-08-13 06:57:51 +02002801define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05002802$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02002803$(call gb_LinkTarget_set_include,$(1),\
2804 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002805 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
2806 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02002807)
2808
Michael Stahld2f62c32013-10-23 00:14:01 +02002809ifeq ($(COM),MSC)
2810$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002811 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
2812 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
2813 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02002814)
Michael Stahld2f62c32013-10-23 00:14:01 +02002815else
2816$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002817 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02002818 -lnspr4 \
2819 -lnss3 \
2820 -lsmime3 \
2821)
2822endif
David Tardon2b9dbc82012-08-13 06:57:51 +02002823
2824endef
2825
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01002826define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05002827$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02002828ifeq ($(COM),MSC)
2829$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002830 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02002831)
Michael Stahld2f62c32013-10-23 00:14:01 +02002832else
2833$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002834 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02002835)
2836endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01002837
David Tardonb6aa4842011-08-11 13:10:14 +02002838endef
2839
David Tardon6ef46562013-02-04 10:04:07 +01002840define gb_LinkTarget__use_ssl3
2841$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02002842ifeq ($(COM),MSC)
2843$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002844 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01002845)
Michael Stahld2f62c32013-10-23 00:14:01 +02002846else
2847$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002848 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02002849)
2850endif
David Tardon6ef46562013-02-04 10:04:07 +01002851
2852endef
2853
Michael Meeksb440cfc2013-02-28 12:05:07 +00002854define gb_ExternalProject__use_nss3
2855$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00002856
2857endef
2858
David Tardonb6aa4842011-08-11 13:10:14 +02002859endif
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002860endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02002861
Michael Stahl2ee5f242011-09-15 14:01:27 +02002862### Jars ############################################################
2863
Michael Stahl666173b2012-08-15 20:24:59 +02002864ifeq ($(SYSTEM_HSQLDB),YES)
2865
2866define gb_Jar__use_hsqldb
2867$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
2868endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02002869define gb_JunitTest__use_hsqldb
2870$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
2871endef
Michael Stahl666173b2012-08-15 20:24:59 +02002872
2873else # !SYSTEM_HSQLDB
2874
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002875$(eval $(call gb_Helper_register_jars,OOO,\
2876 hsqldb \
2877))
2878
Michael Stahl666173b2012-08-15 20:24:59 +02002879define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002880$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02002881endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02002882define gb_JunitTest__use_hsqldb
2883$(call gb_JunitTest_use_jar,$(1),hsqldb)
2884endef
Michael Stahl666173b2012-08-15 20:24:59 +02002885
2886endif # SYSTEM_HSQLDB
2887
Michael Stahl2ee5f242011-09-15 14:01:27 +02002888
David Tardon3bcf9102011-10-04 09:44:48 +02002889ifeq ($(SYSTEM_BSH),YES)
2890
Michael Stahla4551262012-08-15 17:41:25 +02002891define gb_Jar__use_bsh
2892$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02002893endef
2894
2895else # !SYSTEM_BSH
2896
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002897$(eval $(call gb_Helper_register_jars,OOO,\
2898 bsh \
2899))
2900
Michael Stahla4551262012-08-15 17:41:25 +02002901define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002902$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02002903endef
2904
2905endif # SYSTEM_BSH
2906
Michael Stahl2ee5f242011-09-15 14:01:27 +02002907
Tomas Chvatal32af02b2012-05-06 12:49:33 +02002908ifeq ($(SYSTEM_RHINO),YES)
2909
Michael Stahla4551262012-08-15 17:41:25 +02002910define gb_Jar__use_rhino
2911$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02002912endef
2913
2914else # !SYSTEM_RHINO
2915
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002916$(eval $(call gb_Helper_register_jars,OOO,\
2917 js \
2918))
2919
Michael Stahla4551262012-08-15 17:41:25 +02002920define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002921$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02002922endef
2923
2924endif # SYSTEM_RHINO
2925
David Tardon9b530e12012-04-07 10:07:35 +02002926ifeq ($(SYSTEM_APACHE_COMMONS),YES)
2927
Michael Stahla4551262012-08-15 17:41:25 +02002928define gb_Jar__use_commons-codec
2929$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02002930endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002931gb_ExternalProject__use_commons-codec :=
David Tardon9b530e12012-04-07 10:07:35 +02002932
Michael Stahla4551262012-08-15 17:41:25 +02002933define gb_Jar__use_commons-httpclient
2934$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02002935endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002936gb_ExternalProject__use_commons-httpclient :=
David Tardon9b530e12012-04-07 10:07:35 +02002937
Michael Stahla4551262012-08-15 17:41:25 +02002938define gb_Jar__use_commons-lang
2939$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02002940endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002941gb_ExternalProject__use_commons-lang :=
David Tardon9b530e12012-04-07 10:07:35 +02002942
Michael Stahla4551262012-08-15 17:41:25 +02002943define gb_Jar__use_commons-logging
2944$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02002945endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002946gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02002947
2948else # !SYSTEM_APACHE_COMMONS
2949
Michael Stahldb23d4b2013-10-24 23:10:27 +02002950$(eval $(call gb_Helper_register_jars,OOO,\
2951 commons-logging-1.1.1 \
2952))
Michael Stahl87a723d2012-08-17 12:43:37 +02002953$(eval $(call gb_Helper_register_jars,OXT,\
Julien Nabet6188e1d2013-03-26 21:39:42 +01002954 commons-codec-1.6 \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002955 commons-httpclient-3.1 \
Julien Nabeta70aeef2013-03-26 21:49:53 +01002956 commons-lang-2.4 \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002957))
2958
Michael Stahla4551262012-08-15 17:41:25 +02002959define gb_Jar__use_commons-codec
Michael Stahl461d8302013-10-25 18:40:48 +02002960$(call gb_Jar_use_external_project,$(1),apache_commons_codec)
2961$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.6-SNAPSHOT.jar,commons-codec-1.6.jar)
David Tardon9b530e12012-04-07 10:07:35 +02002962endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002963define gb_ExternalProject__use_commons-codec
2964$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
2965endef
David Tardon9b530e12012-04-07 10:07:35 +02002966
Michael Stahla4551262012-08-15 17:41:25 +02002967define gb_Jar__use_commons-httpclient
Michael Stahl461d8302013-10-25 18:40:48 +02002968$(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
2969$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
David Tardon9b530e12012-04-07 10:07:35 +02002970endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002971define gb_ExternalProject__use_commons-httpclient
2972$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
2973endef
David Tardon9b530e12012-04-07 10:07:35 +02002974
Michael Stahla4551262012-08-15 17:41:25 +02002975define gb_Jar__use_commons-lang
Michael Stahl461d8302013-10-25 18:40:48 +02002976$(call gb_Jar_use_external_project,$(1),apache_commons_lang)
2977$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)/dist/commons-lang-2.4.jar,commons-lang-2.4.jar)
David Tardon9b530e12012-04-07 10:07:35 +02002978endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002979define gb_ExternalProject__use_commons-lang
2980$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
2981endef
David Tardon9b530e12012-04-07 10:07:35 +02002982
Michael Stahla4551262012-08-15 17:41:25 +02002983define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02002984$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
Michael Stahl5a4bcd32012-08-17 11:02:49 +02002985$(call gb_Jar_use_jar,$(1),commons-logging-1.1.1)
David Tardon9b530e12012-04-07 10:07:35 +02002986endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002987define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02002988$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002989endef
David Tardon9b530e12012-04-07 10:07:35 +02002990
2991endif # SYSTEM_APACHE_COMMONS
2992
2993
2994ifeq ($(SYSTEM_JFREEREPORT),YES)
2995
Michael Stahla4551262012-08-15 17:41:25 +02002996define gb_Jar__use_flow-engine
2997$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02002998endef
2999
Michael Stahla4551262012-08-15 17:41:25 +02003000define gb_Jar__use_flute
3001$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003002endef
3003
Michael Stahla4551262012-08-15 17:41:25 +02003004define gb_Jar__use_libbase
3005$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003006endef
3007
Michael Stahla4551262012-08-15 17:41:25 +02003008define gb_Jar__use_libfonts
3009$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003010endef
3011
Michael Stahla4551262012-08-15 17:41:25 +02003012define gb_Jar__use_libformula
3013$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003014endef
3015
Michael Stahla4551262012-08-15 17:41:25 +02003016define gb_Jar__use_liblayout
3017$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003018endef
3019
Michael Stahla4551262012-08-15 17:41:25 +02003020define gb_Jar__use_libloader
3021$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003022endef
3023
Michael Stahla4551262012-08-15 17:41:25 +02003024define gb_Jar__use_librepository
3025$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003026endef
3027
Michael Stahla4551262012-08-15 17:41:25 +02003028define gb_Jar__use_libserializer
3029$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003030endef
3031
Michael Stahla4551262012-08-15 17:41:25 +02003032define gb_Jar__use_libxml
3033$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003034endef
3035
Michael Stahla4551262012-08-15 17:41:25 +02003036define gb_Jar__use_sac
3037$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003038endef
3039
3040else # !SYSTEM_JFREEREPORT
3041
Michael Stahldb23d4b2013-10-24 23:10:27 +02003042$(eval $(call gb_Helper_register_jars,OOO,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003043 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003044 flute-1.1.6 \
3045 libbase-1.1.6 \
3046 libfonts-1.1.6 \
3047 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003048 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003049 libloader-1.1.6 \
3050 librepository-1.1.6 \
3051 libserializer-1.1.6 \
3052 libxml-1.1.7 \
3053 sac \
3054))
3055
Michael Stahla4551262012-08-15 17:41:25 +02003056define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003057$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003058endef
3059
Michael Stahla4551262012-08-15 17:41:25 +02003060define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003061$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003062endef
3063
Michael Stahla4551262012-08-15 17:41:25 +02003064define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003065$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003066endef
3067
Michael Stahla4551262012-08-15 17:41:25 +02003068define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003069$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003070endef
3071
Michael Stahla4551262012-08-15 17:41:25 +02003072define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003073$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003074endef
3075
Michael Stahla4551262012-08-15 17:41:25 +02003076define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003077$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003078endef
3079
Michael Stahla4551262012-08-15 17:41:25 +02003080define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003081$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003082endef
3083
Michael Stahla4551262012-08-15 17:41:25 +02003084define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003085$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003086endef
3087
Michael Stahla4551262012-08-15 17:41:25 +02003088define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003089$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003090endef
3091
Michael Stahla4551262012-08-15 17:41:25 +02003092define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003093$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003094endef
3095
Michael Stahla4551262012-08-15 17:41:25 +02003096define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003097$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003098endef
3099
3100endif # SYSTEM_JFREEREPORT
3101
David Tardonc2eca352012-12-02 10:51:37 +01003102
3103# Executables
3104
David Tardonedf67302012-12-30 12:27:04 +01003105# FIXME: the library target should be for build too
3106define gb_Executable__register_bestreversemap
3107$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3108 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3109)
3110endef
3111
David Tardonceb0d062012-12-30 13:11:43 +01003112# TODO depending on the whole URE might be overkill, but I do not have a
3113# Windows machine to debug it...
3114# FIXME: the library target should be for build too
3115define gb_Executable__register_climaker
3116$(call gb_Executable_add_runtime_dependencies,climaker,\
3117 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3118 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003119 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003120 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003121 $(call gb_UnoApi_get_target,udkapi) \
David Tardonceb0d062012-12-30 13:11:43 +01003122)
3123endef
3124
Matúš Kukane1b51e72013-09-27 09:41:09 +02003125gb_Gallery__UNO_COMPONENTS := \
3126 comphelper/util/comphelp \
3127 configmgr/source/configmgr \
3128 drawinglayer/drawinglayer \
Matúš Kukane1b51e72013-09-27 09:41:09 +02003129 framework/util/fwk \
3130 i18npool/util/i18npool \
3131 package/source/xstor/xstor \
3132 package/util/package2 \
3133 sax/source/expatwrap/expwrap \
3134 sfx2/util/sfx \
3135 svgio/svgio \
3136 svx/util/svx \
3137 svx/util/svxcore \
3138 ucb/source/core/ucb1 \
3139 ucb/source/ucp/file/ucpfile1 \
3140 unoxml/source/service/unoxml
3141
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003142# This is used to determine what we need for 'build' platform.
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003143define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003144$(call gb_Executable_add_runtime_dependencies,gengal,\
Matúš Kukane1b51e72013-09-27 09:41:09 +02003145 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
Matúš Kukan85c6f802013-05-23 23:01:05 +02003146 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
David Tardon1546c292013-05-07 20:41:41 +02003147 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003148 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Riccardo Magliocchettib75fae72013-06-06 18:52:57 +02003149 $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
Caolan McNamara48e70ad2013-05-15 10:30:18 +01003150 $(call gb_Library_get_target,vclplug_svp) \
Riccardo Magliocchettib75fae72013-06-06 18:52:57 +02003151 )) \
David Tardon1546c292013-05-07 20:41:41 +02003152 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003153 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003154 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003155 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003156 $(call gb_UnoApi_get_target,offapi) \
3157 $(call gb_UnoApi_get_target,udkapi) \
3158)
3159endef
3160
David Tardonedf67302012-12-30 12:27:04 +01003161ifneq ($(SYSTEM_ICU),YES)
3162
3163define gb_Executable__register_gendict
3164$(call gb_Executable_add_runtime_dependencies,gendict,\
3165 $(call gb_Package_get_target_for_build,icu) \
3166)
3167endef
3168
3169endif
3170
David Tardonceb0d062012-12-30 13:11:43 +01003171define gb_Executable__register_idlc
3172$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003173 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003174)
3175endef
3176
David Tardonedf67302012-12-30 12:27:04 +01003177define gb_Executable__register_localize
3178$(call gb_Executable_add_runtime_dependencies,localize,\
3179 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3180 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3181 ) \
3182)
3183endef
3184
Michael Stahl4c51feb2013-09-21 01:39:41 +02003185# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003186# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003187# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3188# FIXME: the library target should be for build too
3189define gb_Executable__register_saxparser
3190$(call gb_Executable_add_runtime_dependencies,saxparser,\
3191 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3192 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003193 $(call gb_Rdb_get_target_for_build,saxparser) \
3194 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003195 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003196 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003197)
3198endef
3199
Stephan Bergmannab149c72013-04-24 10:42:40 +02003200# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003201# required due to the settings for URE_SERVICES and URE_TYPES in
3202# cppuhelper/source/unorc
3203# FIXME: the library target should be for build too
3204define gb_Executable__register_uno
3205$(call gb_Executable_add_runtime_dependencies,uno,\
3206 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3207 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003208 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003209 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003210 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003211)
3212endef
3213
3214
3215# External executables
3216
David Tardonc2eca352012-12-02 10:51:37 +01003217ifneq ($(SYSTEM_LIBXML_FOR_BUILD),YES)
3218
3219gb_ExternalExecutable__register_xmllint :=
3220
3221else # ! SYSTEM_LIBXML_FOR_BUILD
3222
3223define gb_ExternalExecutable__register_xmllint
Michael Stahle6c47b02013-10-22 18:47:56 +02003224$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build))
3225$(call gb_ExternalExecutable_add_dependencies,xmllint,$(call gb_Package_get_target,xml2))
David Tardonc2eca352012-12-02 10:51:37 +01003226
3227endef
3228
3229endif # SYSTEM_LIBXML_FOR_BUILD
3230
3231ifeq ($(SYSTEM_LIBXSLT_FOR_BUILD),YES)
3232
3233gb_ExternalExecutable__register_xsltproc :=
3234
3235else # ! SYSTEM_LIBXSLT_FOR_BUILD
3236
3237define gb_ExternalExecutable__register_xsltproc
Michael Stahle6c47b02013-10-22 18:47:56 +02003238$(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))
Peter Foley52e47b62013-02-06 17:59:18 -05003239$(call gb_ExternalExecutable_add_dependencies,xsltproc,$(call gb_Package_get_target,xslt))
David Tardonc2eca352012-12-02 10:51:37 +01003240
3241endef
3242
3243endif # SYSTEM_LIBXSLT_FOR_BUILD
3244
David Tardonce038cf2013-10-20 20:43:46 +02003245ifneq (,$(SYSTEM_UCPP))
3246
3247gb_ExternalExecutable__register_ucpp :=
3248
3249else # ! SYSTEM_UCPP
3250
3251define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003252$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003253
3254endef
3255
3256endif # SYSTEM_UCPP
3257
Matúš Kukane4826722013-03-05 22:03:38 +01003258ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003259
3260define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003261ifeq ($(OS),MACOSX)
3262
3263# use set_external, to avoid having the command added as prerequisite for the
3264# targets that make use of it. (Otherwise make will choke as it doesn't have a
3265# matching rule to build that specific file)
3266$(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))
3267# the Zip ensures that internal python has been built (cannot use the Package
3268# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003269$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003270
3271else
3272
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003273$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003274$(call gb_ExternalExecutable_set_precommand,python,$(gb_Python_PRECOMMAND))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003275$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3276
3277endif
David Tardonc2eca352012-12-02 10:51:37 +01003278
3279endef
3280
Matúš Kukane4826722013-03-05 22:03:38 +01003281else
3282
3283define gb_ExternalExecutable__register_python
3284$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3285
3286endef
3287
3288endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003289
David Tardon63069262012-12-29 12:56:24 +01003290ifneq ($(SYSTEM_GENBRK),)
3291
3292define gb_ExternalExecutable__register_genbrk
3293$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3294
3295endef
3296
3297else # ! SYSTEM_GENBRK
3298
3299define gb_ExternalExecutable__register_genbrk
Michael Stahle353b2b2013-10-23 15:19:14 +02003300$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build))
3301$(call gb_ExternalExecutable_set_precommand,genbrk,$(gb_ICU_PRECOMMAND))
David Tardon63069262012-12-29 12:56:24 +01003302$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3303 $(call gb_Package_get_target_for_build,icu) \
3304)
3305
3306endef
3307
3308endif
3309
3310ifneq ($(SYSTEM_GENCCODE),)
3311
3312define gb_ExternalExecutable__register_genccode
3313$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3314
3315endef
3316
3317else # ! SYSTEM_GENCCODE
3318
3319define gb_ExternalExecutable__register_genccode
Michael Stahle353b2b2013-10-23 15:19:14 +02003320$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build))
3321$(call gb_ExternalExecutable_set_precommand,genccode,$(gb_ICU_PRECOMMAND))
David Tardon63069262012-12-29 12:56:24 +01003322$(call gb_ExternalExecutable_add_dependencies,genccode,\
3323 $(call gb_Package_get_target_for_build,icu) \
3324)
3325
3326endef
3327
3328endif
3329
3330ifneq ($(SYSTEM_GENCMN),)
3331
3332define gb_ExternalExecutable__register_gencmn
3333$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3334
3335endef
3336
3337else # ! SYSTEM_GENCMN
3338
3339define gb_ExternalExecutable__register_gencmn
Michael Stahle353b2b2013-10-23 15:19:14 +02003340$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build))
3341$(call gb_ExternalExecutable_set_precommand,gencmn,$(gb_ICU_PRECOMMAND))
David Tardon63069262012-12-29 12:56:24 +01003342$(call gb_ExternalExecutable_add_dependencies,gencmn,\
3343 $(call gb_Package_get_target_for_build,icu) \
3344)
3345
3346endef
3347
3348endif
3349
Michael Stahlc74af0d2011-04-01 20:49:35 +00003350# vim: set noet sw=4 ts=4: