blob: f194fcbe95103fbc437e3e82ddfce4245fb47b62 [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Michael Stahlc74af0d2011-04-01 20:49:35 +00002#
Michael Meeks1e4422a2013-05-16 21:56:04 +01003# This file is part of the LibreOffice project.
Kohei Yoshidaa6639312012-07-27 22:14:39 -04004#
Michael Meeks1e4422a2013-05-16 21:56:04 +01005# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Michael Stahlc74af0d2011-04-01 20:49:35 +00008#
Michael Meeks1e4422a2013-05-16 21:56:04 +01009# This file incorporates work covered by the following license notice:
Michael Stahlc74af0d2011-04-01 20:49:35 +000010#
Michael Meeks1e4422a2013-05-16 21:56:04 +010011# Licensed to the Apache Software Foundation (ASF) under one or more
12# contributor license agreements. See the NOTICE file distributed
13# with this work for additional information regarding copyright
14# ownership. The ASF licenses this file to you under the Apache
15# License, Version 2.0 (the "License"); you may not use this file
16# except in compliance with the License. You may obtain a copy of
17# the License at http://www.apache.org/licenses/LICENSE-2.0 .
Michael Stahlc74af0d2011-04-01 20:49:35 +000018#
Michael Stahlc74af0d2011-04-01 20:49:35 +000019
20# this file describes all the external libraries
21# depending on the configure options these may be taken from the system,
22# or the internal/bundled copy may be built.
23
Zolnai Tamás62fd6302014-04-18 12:55:56 +020024# for every external, a function gb_LinkTarget__use_FOO is defined,
Michael Stahlc74af0d2011-04-01 20:49:35 +000025# once for the system case, once for the internal case.
26
27# in the system case, no libraries should be registered, but the target-local
28# variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
29
Matúš Kukan8e535df2012-04-07 13:59:33 +020030# External headers
31
Michael Stahl8555b372014-02-11 19:28:33 +010032ifneq ($(SYSTEM_MESA_HEADERS),)
Peter Foley1bd28842011-09-09 17:42:24 -040033
Matúš Kukan8e535df2012-04-07 13:59:33 +020034gb_LinkTarget__use_mesa_headers :=
Peter Foley1bd28842011-09-09 17:42:24 -040035
Michael Stahl8555b372014-02-11 19:28:33 +010036else # !SYSTEM_MESA_HEADERS
Peter Foley1bd28842011-09-09 17:42:24 -040037
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
Michael Stahl8555b372014-02-11 19:28:33 +010046endif # SYSTEM_MESA_HEADERS
Peter Foley1bd28842011-09-09 17:42:24 -040047
Michael Stahl187194b2014-02-11 19:17:42 +010048ifneq ($(SYSTEM_NPAPI_HEADERS),)
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
Michael Stahl5378dea2014-02-11 19:11:47 +010074ifneq ($(SYSTEM_ODBC_HEADERS),)
Matúš Kukan5eff0b62012-04-07 13:46:59 +020075
76define gb_LinkTarget__use_odbc_headers
77$(call gb_LinkTarget_add_defs,$(1),\
78 -DSYSTEM_ODBC_HEADERS \
79)
80
81endef
82
Michael Stahl5378dea2014-02-11 19:11:47 +010083else # !SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020084
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
Michael Stahl5378dea2014-02-11 19:11:47 +010093endif # SYSTEM_ODBC_HEADERS
Matúš Kukan5eff0b62012-04-07 13:46:59 +020094
Michael Stahlff69e722014-02-11 19:08:10 +010095ifneq ($(SYSTEM_VIGRA),)
Matúš Kukan54a06c62012-08-25 01:29:00 +020096
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
Michael Stahle3abec32014-02-11 15:57:18 +0100112ifneq ($(SYSTEM_MDDS),)
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200113
David Tardond5d39272014-03-03 15:29:27 +0100114gb_ExternalProject__use_mdds_headers :=
115
David Tardon93aff252014-03-03 16:23:27 +0100116define gb_LinkTarget__use_mdds_headers
117$(call gb_LinkTarget_set_include,$(1),\
118 $(MDDS_CFLAGS) \
119 $$(INCLUDE) \
120)
121
122endef
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200123
Michael Stahle3abec32014-02-11 15:57:18 +0100124else # !SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200125
David Tardond5d39272014-03-03 15:29:27 +0100126define gb_ExternalProject__use_mdds_headers
127$(call gb_ExternalProject_use_external_project,$(1),mdds)
128
129endef
130
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200131define gb_LinkTarget__use_mdds_headers
132$(call gb_LinkTarget_use_unpacked,$(1),mdds)
133$(call gb_LinkTarget_set_include,$(1),\
David Tardon93aff252014-03-03 16:23:27 +0100134 $(MDDS_CFLAGS) \
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200135 $$(INCLUDE) \
136)
137
138endef
139
Michael Stahle3abec32014-02-11 15:57:18 +0100140endif # SYSTEM_MDDS
Matúš Kukan22f50fb2012-08-29 12:27:17 +0200141
Michael Stahlff69e722014-02-11 19:08:10 +0100142ifneq ($(SYSTEM_GLM),)
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000143
144gb_LinkTarget__use_glm_headers :=
Zolnai Tamásb8ee4012014-06-25 15:19:41 +0200145gb_ExternalProject__use_glm_headers :=
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000146
147else
148
149define gb_LinkTarget__use_glm_headers
150$(call gb_LinkTarget_use_unpacked,$(1),glm)
151$(call gb_LinkTarget_set_include,$(1),\
152 -I$(call gb_UnpackedTarball_get_dir,glm) \
153 $$(INCLUDE) \
154)
155
156endef
157
Zolnai Tamásb8ee4012014-06-25 15:19:41 +0200158define gb_ExternalProject__use_glm_headers
159$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
160
161endef
162
Markus Mohrhardae9e6112013-12-23 17:31:55 +0000163endif
164
Michael Stahl674e7912013-05-06 20:23:49 +0200165ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
David Tardoneafaec92012-12-21 14:08:27 +0100166
167define gb_LinkTarget__use_sane_headers
Michael Stahl72279ea2013-05-06 20:14:35 +0200168$(call gb_LinkTarget_set_include,$(1),\
Khaled Hosnya62e7732013-11-04 18:33:52 +0200169 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
Michael Stahl72279ea2013-05-06 20:14:35 +0200170 $$(INCLUDE) \
David Tardoneafaec92012-12-21 14:08:27 +0100171)
172
173endef
174
175else
176
177gb_LinkTarget__use_sane_headers :=
178
179endif
180
Michael Stahl8555b372014-02-11 19:28:33 +0100181ifneq ($(SYSTEM_BLUEZ),)
David Tardon8fa06c82013-11-05 06:53:49 +0100182
183gb_LinkTarget__use_bluez_bluetooth_headers :=
184
185else # !SYSTEM_BLUEZ
186
187define gb_LinkTarget__use_bluez_bluetooth_headers
188$(call gb_LinkTarget_set_include,$(1),\
189 -I$(SRCDIR)/external/bluez_bluetooth/inc \
190 $$(INCLUDE) \
191)
192
193endef
194
195endif # SYSTEM_BLUEZ
196
Matúš Kukan8e535df2012-04-07 13:59:33 +0200197# External libraries
198
Michael Stahle3abec32014-02-11 15:57:18 +0100199ifneq ($(SYSTEM_CPPUNIT),)
David Tardon785e1d92011-07-25 10:34:22 +0200200
201define gb_LinkTarget__use_cppunit
202$(call gb_LinkTarget_set_include,$(1),\
203 $$(INCLUDE) \
204 $(CPPUNIT_CFLAGS) \
205)
206
207$(call gb_LinkTarget_add_libs,$(1),\
208 $(CPPUNIT_LIBS) \
209)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100210
David Tardon785e1d92011-07-25 10:34:22 +0200211endef
212
Michael Stahle3abec32014-02-11 15:57:18 +0100213else # !SYSTEM_CPPUNIT
David Tardon785e1d92011-07-25 10:34:22 +0200214
David Tardon785e1d92011-07-25 10:34:22 +0200215define gb_LinkTarget__use_cppunit
Michael Stahl32a001d2013-10-23 23:41:58 +0200216$(call gb_LinkTarget_use_external_project,$(1),cppunit)
Peter Foley143835b2012-11-25 16:37:40 -0500217
Peter Foley143835b2012-11-25 16:37:40 -0500218$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200219 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
Peter Foley143835b2012-11-25 16:37:40 -0500220 $$(INCLUDE) \
221)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100222
Michael Stahl77fe50b2013-10-23 23:35:16 +0200223ifeq ($(COM),MSC)
224$(call gb_LinkTarget_add_libs,$(1),\
225 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
226)
227else
228$(call gb_LinkTarget_add_libs,$(1),\
229 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
230)
231endif
232
David Tardon785e1d92011-07-25 10:34:22 +0200233endef
234
Michael Stahle3abec32014-02-11 15:57:18 +0100235endif # SYSTEM_CPPUNIT
Michael Stahlc74af0d2011-04-01 20:49:35 +0000236
Tor Lillqvist65b27f82014-04-08 13:36:30 +0300237ifneq ($(SYSTEM_GLEW),)
David Tardon864f7752014-02-09 21:19:07 +0100238
239define gb_LinkTarget__use_glew
240$(call gb_LinkTarget_set_include,$(1),\
241 $$(INCLUDE) \
242 $(GLEW_CFLAGS) \
243)
244$(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
245
246endef
247
Zolnai Tamásb8ee4012014-06-25 15:19:41 +0200248gb_ExternalProject__use_glew :=
249
Michael Stahle3abec32014-02-11 15:57:18 +0100250else # !SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100251
Michael Stahl0c94f232014-03-18 17:17:04 +0100252$(eval $(call gb_Helper_register_packages_for_install,ooo,\
253 glew \
254))
255
David Tardon864f7752014-02-09 21:19:07 +0100256define gb_LinkTarget__use_glew
Matúš Kukan532e8cc2014-04-08 10:30:47 +0200257$(call gb_LinkTarget_use_package,$(1),glew)
David Tardon864f7752014-02-09 21:19:07 +0100258$(call gb_LinkTarget_set_include,$(1),\
259 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
260 $$(INCLUDE) \
261)
262
263ifeq ($(COM),MSC)
264$(call gb_LinkTarget_add_libs,$(1),\
265 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/Win32/glew32d.lib,Release/Win32/glew32.lib) \
266)
267else
268$(call gb_LinkTarget_add_libs,$(1),\
269 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
270)
271endif
272
273endef
274
Zolnai Tamásb8ee4012014-06-25 15:19:41 +0200275define gb_ExternalProject__use_glew
276$(call gb_ExternalProject_use_external_project,$(1),glew)
277
278endef
279
Michael Stahle3abec32014-02-11 15:57:18 +0100280endif # SYSTEM_GLEW
David Tardon864f7752014-02-09 21:19:07 +0100281
Tor Lillqvist40900fb2013-01-03 12:48:14 +0200282define gb_LinkTarget__use_iconv
283$(call gb_LinkTarget_add_libs,$(1),-liconv)
284
285endef
286
Michael Stahl379f9782014-02-11 16:49:19 +0100287ifneq ($(SYSTEM_MARIADB),)
Peter Foleyc322d502013-01-23 16:29:08 -0500288
David Tardon217eae42013-11-05 06:49:33 +0100289define gb_LinkTarget__use_mariadb
290$(call gb_LinkTarget_set_include,$(1),\
291 $$(INCLUDE) \
292 $(MARIADB_CFLAGS) \
293)
294$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
295
296endef
297gb_ExternalProject__use_mariadb :=
298
299else # !SYSTEM_MARIADB
300
301define gb_LinkTarget__use_mariadb
302$(call gb_LinkTarget_set_include,$(1),\
303 $$(INCLUDE) \
304 $(MARIADB_CFLAGS) \
305)
306$(call gb_LinkTarget_use_static_libraries,$(1),\
307 mariadblib \
308)
309
310endef
311define gb_ExternalProject__use_mariadb
312$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
313
314endef
315
316endif # SYSTEM_MARIADB
317
318
Michael Stahl379f9782014-02-11 16:49:19 +0100319ifneq ($(SYSTEM_MARIADB),)
David Tardon217eae42013-11-05 06:49:33 +0100320
Peter Foleyc322d502013-01-23 16:29:08 -0500321define gb_LinkTarget__use_mysql
322
323$(call gb_LinkTarget_add_defs,$(1),\
Fridrich Štrba1bf43062013-03-06 11:45:50 +0100324 -DSYSTEM_MARIADB \
Peter Foleyc322d502013-01-23 16:29:08 -0500325)
326
327$(call gb_LinkTarget_add_libs,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100328 $(MARIADB_LIBS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500329)
330
331$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbacad422a2013-03-06 16:33:07 +0100332 $(MARIADB_CFLAGS) \
Peter Foleyc322d502013-01-23 16:29:08 -0500333 $$(INCLUDE) \
334)
335endef
336
337else
338
339define gb_LinkTarget__use_mysql
340
341$(call gb_LinkTarget_set_include,$(1),\
Peter Foleyc322d502013-01-23 16:29:08 -0500342 $$(INCLUDE) \
343)
344
345endef
346
347endif
348
Michael Stahl0443d0a2014-02-11 16:57:35 +0100349ifneq ($(SYSTEM_MYSQL_CPPCONN),)
Peter Foleyc322d502013-01-23 16:29:08 -0500350
351define gb_LinkTarget__use_mysqlcppconn
352$(call gb_LinkTarget_add_libs,$(1),\
353 -lmysqlcppconn \
354)
355
356$(call gb_LinkTarget_add_defs,$(1),\
Peter Foleyb02d7992013-01-24 15:43:52 -0500357 -DSYSTEM_MYSQL_CPPCONN \
Peter Foleyc322d502013-01-23 16:29:08 -0500358)
359endef
360
361else
362
Michael Stahl5f356bd2013-01-28 23:53:30 +0100363$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
Peter Foleyc322d502013-01-23 16:29:08 -0500364 mysqlcppconn \
365))
366
Michael Stahl5f356bd2013-01-28 23:53:30 +0100367# note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
Peter Foleyc322d502013-01-23 16:29:08 -0500368define gb_LinkTarget__use_mysqlcppconn
369
Michael Stahl5f356bd2013-01-28 23:53:30 +0100370$(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
371
Peter Foleyb02d7992013-01-24 15:43:52 -0500372$(call gb_LinkTarget_add_defs,$(1),\
373 -DCPPCONN_LIB_BUILD \
374)
375
Peter Foleyc322d502013-01-23 16:29:08 -0500376$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200377 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
378 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
Peter Foleyc322d502013-01-23 16:29:08 -0500379 $$(INCLUDE) \
380)
381
382endef
383
384endif
385
Michael Stahl04ff5352014-02-11 16:21:04 +0100386ifneq ($(SYSTEM_ZLIB),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000387
388define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +0000389$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000390 -DSYSTEM_ZLIB \
391)
392$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100393
Michael Stahlc74af0d2011-04-01 20:49:35 +0000394endef
395
David Tardoncb276232012-10-26 15:33:26 +0200396# nothing on system
397define gb_LinkTarget__use_zlib_x64
398
399endef
400
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100401gb_ExternalProject__use_zlib :=
402
Michael Stahlc74af0d2011-04-01 20:49:35 +0000403else # !SYSTEM_ZLIB
404
David Tardoncb276232012-10-26 15:33:26 +0200405define gb_LinkTarget__use_zlib_multiarch
406$(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
407
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200408$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl3c38b772013-05-08 15:47:24 +0200409 $(ZLIB_CFLAGS) \
Matúš Kukanf5ff45b2012-09-08 16:29:05 +0200410 $$(INCLUDE) \
411)
David Tardoncb276232012-10-26 15:33:26 +0200412
Michael Stahlc923f7d2012-04-07 23:22:08 +0200413$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardoncb276232012-10-26 15:33:26 +0200414 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000415)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100416
Michael Stahlc74af0d2011-04-01 20:49:35 +0000417endef
418
David Tardoncb276232012-10-26 15:33:26 +0200419define gb_LinkTarget__use_zlib
420$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
421
422endef
423
424define gb_LinkTarget__use_zlib_x64
425$(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
426
427endef
428
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100429define gb_ExternalProject__use_zlib
Fridrich Štrba2f4d1602013-03-14 12:45:24 +0100430$(call gb_ExternalProject_use_static_libraries,$(1),zlib)
431
432endef
433
Michael Stahlc74af0d2011-04-01 20:49:35 +0000434endif # SYSTEM_ZLIB
435
436
Michael Stahl46648152014-02-11 16:33:18 +0100437ifneq ($(SYSTEM_JPEG),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000438
439define gb_LinkTarget__use_jpeg
440$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
441$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000442 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000443)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100444
Michael Stahlc74af0d2011-04-01 20:49:35 +0000445endef
446
447else # !SYSTEM_JPEG
448
Michael Stahlc74af0d2011-04-01 20:49:35 +0000449define gb_LinkTarget__use_jpeg
Matúš Kukane8a28be2012-01-21 00:46:29 +0100450$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlb65859c2013-05-08 17:30:40 +0200451 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100452 $$(INCLUDE) \
Matúš Kukane8a28be2012-01-21 00:46:29 +0100453)
454
Michael Stahlc923f7d2012-04-07 23:22:08 +0200455$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon4ed91fd2012-10-12 09:32:02 +0200456 jpeg \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000457)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100458
Michael Stahlc74af0d2011-04-01 20:49:35 +0000459endef
460
461endif # SYSTEM_JPEG
462
Michael Stahlab586f12014-02-11 19:25:30 +0100463ifneq ($(SYSTEM_MYTHES),)
Peter Foley1d1bab42012-10-28 12:00:06 -0400464
465define gb_LinkTarget__use_mythes
Rene Engelhard99ef1f52012-10-28 23:00:03 +0100466$(call gb_LinkTarget_set_include,$(1),\
467 $$(INCLUDE) \
468 $(MYTHES_CFLAGS) \
469)
470$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
471
Peter Foley1d1bab42012-10-28 12:00:06 -0400472endef
473
474else # !SYSTEM_MYTHES
475
Peter Foley1d1bab42012-10-28 12:00:06 -0400476define gb_LinkTarget__use_mythes
Michael Stahl90ad80e32013-05-07 23:59:00 +0200477$(call gb_LinkTarget_set_include,$(1),\
478 -I$(call gb_UnpackedTarball_get_dir,mythes) \
479 $$(INCLUDE) \
480)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200481
482ifeq ($(COM),MSC)
Matúš Kukan327db9f2012-10-28 22:40:30 +0100483$(call gb_LinkTarget_use_static_libraries,$(1),\
484 mythes \
Peter Foley1d1bab42012-10-28 12:00:06 -0400485)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200486else
487$(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
488$(call gb_LinkTarget_use_external_project,$(1),mythes)
489endif
Matúš Kukan327db9f2012-10-28 22:40:30 +0100490
Peter Foley1d1bab42012-10-28 12:00:06 -0400491endef
492
493endif # SYSTEM_MYTHES
494
Michael Stahlc74af0d2011-04-01 20:49:35 +0000495
Michael Stahl46648152014-02-11 16:33:18 +0100496ifneq ($(SYSTEM_EXPAT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000497
David Tardon51149802013-04-09 09:22:20 +0200498define gb_LinkTarget__use_expat_impl
499$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000500
Michael Stahla88ef232011-04-13 16:11:41 +0000501$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000502 -DSYSTEM_EXPAT \
503)
504
505$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100506
Michael Stahlc74af0d2011-04-01 20:49:35 +0000507endef
508
Michael Stahl77289672012-11-17 00:36:29 +0100509gb_ExternalProject__use_expat :=
510
Michael Stahlc74af0d2011-04-01 20:49:35 +0000511else # !SYSTEM_EXPAT
512
David Tardon51149802013-04-09 09:22:20 +0200513define gb_LinkTarget__use_expat_impl
514$(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
Michael Stahlc74af0d2011-04-01 20:49:35 +0000515
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700516$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl5e037bb2013-05-07 21:47:18 +0200517 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
David Ostrovsky2ffde7b2012-10-12 12:28:11 -0700518 $$(INCLUDE) \
519)
520
Michael Stahlc923f7d2012-04-07 23:22:08 +0200521$(call gb_LinkTarget_use_static_libraries,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000522 $(2) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000523)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100524
Michael Stahlc74af0d2011-04-01 20:49:35 +0000525endef
526
Michael Stahl77289672012-11-17 00:36:29 +0100527define gb_ExternalProject__use_expat
Michael Stahl77289672012-11-17 00:36:29 +0100528$(call gb_ExternalProject_use_static_libraries,$(1),expat)
529
530endef
531
Michael Stahlc74af0d2011-04-01 20:49:35 +0000532endif # SYSTEM_EXPAT
533
David Tardon51149802013-04-09 09:22:20 +0200534define gb_LinkTarget__use_expat
535$(call gb_LinkTarget__use_expat_impl,$(1),expat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100536
Michael Stahlc74af0d2011-04-01 20:49:35 +0000537endef
538
David Tardon51149802013-04-09 09:22:20 +0200539define gb_LinkTarget__use_expat_x64
540$(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100541
Michael Stahlc74af0d2011-04-01 20:49:35 +0000542endef
543
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100544ifneq ($(SYSTEM_HYPH),)
Peter Foleydd584cb2012-11-03 13:54:46 -0400545
546define gb_LinkTarget__use_hyphen
547$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
548
549endef
550
551else # !SYSTEM_HYPH
552
Peter Foleydd584cb2012-11-03 13:54:46 -0400553define gb_LinkTarget__use_hyphen
554$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
555$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200556 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
Peter Foleydd584cb2012-11-03 13:54:46 -0400557 $$(INCLUDE) \
558)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200559
560ifeq ($(COM),MSC)
Peter Foleydd584cb2012-11-03 13:54:46 -0400561$(call gb_LinkTarget_use_static_libraries,$(1),\
562 hyphen \
563)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200564else
565$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
566$(call gb_LinkTarget_use_external_project,$(1),hyphen)
567endif
Peter Foleydd584cb2012-11-03 13:54:46 -0400568
569endef
570
571endif # SYSTEM_HYPH
572
Michael Stahl9fc9e9c2014-02-11 19:21:36 +0100573ifneq ($(SYSTEM_HUNSPELL),)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100574
575define gb_LinkTarget__use_hunspell
576$(call gb_LinkTarget_set_include,$(1),\
577 $$(INCLUDE) \
578 $(HUNSPELL_CFLAGS) \
579)
580$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
581
582endef
583
Michael Stahl2f6261f2013-09-19 19:28:36 +0200584gb_ExternalProject__use_hunspell :=
585
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100586else # !SYSTEM_HUNSPELL
587
588define gb_LinkTarget__use_hunspell
589$(call gb_LinkTarget_add_defs,$(1),\
590 -DHUNSPELL_STATIC \
591)
Matúš Kukan7a030392012-10-29 23:29:37 +0100592$(call gb_LinkTarget_use_unpacked,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100593$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200594 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
Matúš Kukan7a030392012-10-29 23:29:37 +0100595 $$(INCLUDE) \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100596)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200597
598ifeq ($(COM),MSC)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200599$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan327db9f2012-10-28 22:40:30 +0100600 hunspell \
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100601)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200602else
603$(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
604$(call gb_LinkTarget_use_external_project,$(1),hunspell)
605endif
606
607endef
608
609define gb_ExternalProject__use_hunspell
610$(call gb_ExternalProject_use_external_project,$(1),hunspell)
Matúš Kukanb6bb9bd2011-12-03 14:44:12 +0100611
612endef
613
614endif # SYSTEM_HUNSPELL
615
616
Michael Stahladddbbc2014-02-11 18:40:09 +0100617ifneq ($(SYSTEM_BOOST),)
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200618
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200619define gb_LinkTarget__use_boostdatetime
David Tardon0f6919c2012-06-06 17:04:01 +0200620$(call gb_LinkTarget_set_include,$(1),\
621 $$(INCLUDE) \
622 $(BOOST_CPPFLAGS) \
623)
624
625$(call gb_LinkTarget_add_ldflags,$(1),\
626 $(BOOST_LDFLAGS) \
627)
628
629$(call gb_LinkTarget_add_libs,$(1),\
630 $(BOOST_DATE_TIME_LIB) \
631)
632
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200633endef
634
Markus Mohrhard36788e92014-01-08 13:17:28 +0100635define gb_LinkTarget__use_boost_iostreams
636$(call gb_LinkTarget_set_include,$(1),\
637 $$(INCLUDE) \
638 $(BOOST_CPPFLAGS) \
639)
640
641$(call gb_LinkTarget_add_ldflags,$(1),\
642 $(BOOST_LDFLAGS) \
643)
644
645$(call gb_LinkTarget_add_libs,$(1),\
646 $(BOOST_IOSTREAMS_LIB) \
647)
648
649endef
650
David Tardon6d9de6b2014-03-03 20:39:13 +0100651gb_ExternalProject__use_boost_iostreams :=
652
Markus Mohrhard36788e92014-01-08 13:17:28 +0100653define gb_LinkTarget__use_boost_system
Tor Lillqvist503b2482013-05-22 19:50:22 +0300654$(call gb_LinkTarget_set_include,$(1),\
655 $$(INCLUDE) \
656 $(BOOST_CPPFLAGS) \
657)
658
659$(call gb_LinkTarget_add_ldflags,$(1),\
660 $(BOOST_LDFLAGS) \
661)
662
663$(call gb_LinkTarget_add_libs,$(1),\
664 $(BOOST_SYSTEM_LIB) \
665)
666
667endef
668
Markus Mohrhard36788e92014-01-08 13:17:28 +0100669gb_ExternalProject__use_boost_system :=
Tor Lillqvist503b2482013-05-22 19:50:22 +0300670
Stephan Bergmann93208022013-02-16 22:56:19 +0100671define gb_LinkTarget__use_boost_headers
672$(call gb_LinkTarget_set_include,$(1),\
673 $$(INCLUDE) \
674 $(BOOST_CPPFLAGS) \
675)
676
677endef
678
Peter Foleycdb6eca2012-11-10 08:56:12 -0500679gb_ExternalProject__use_boost_headers:=
680
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200681else # !SYSTEM_BOOST
682
Kohei Yoshida0454b732012-09-06 15:10:19 -0400683ifeq ($(OS),WNT)
Michael Stahl7f2e1682012-09-06 20:22:11 +0200684define gb_LinkTarget__use_boostthread
685$(call gb_LinkTarget_add_defs,$(1),\
686 -DBOOST_ALL_NO_LIB \
687)
688
689$(call gb_LinkTarget_use_static_libraries,$(1),\
690 boostthread \
691)
692endef
Matúš Kukanddb5edc2013-05-30 14:39:38 +0200693endif
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200694
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200695define gb_LinkTarget__use_boostdatetime
Michael Stahl7f2e1682012-09-06 20:22:11 +0200696$(call gb_LinkTarget_add_defs,$(1),\
697 -DBOOST_ALL_NO_LIB \
698)
699
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200700$(call gb_LinkTarget_use_static_libraries,$(1),\
Fridrich Štrbacdabc882013-05-24 14:46:28 +0200701 boostdatetime \
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200702)
703
704endef
705
Markus Mohrhard36788e92014-01-08 13:17:28 +0100706define gb_LinkTarget__use_boost_iostreams
Tor Lillqvist503b2482013-05-22 19:50:22 +0300707$(call gb_LinkTarget_add_defs,$(1),\
708 -DBOOST_ALL_NO_LIB \
709)
710
711$(call gb_LinkTarget_use_static_libraries,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +0100712 boost_iostreams \
Tor Lillqvist503b2482013-05-22 19:50:22 +0300713)
714
715endef
716
Markus Mohrhard36788e92014-01-08 13:17:28 +0100717define gb_ExternalProject__use_boost_iostreams
718$(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
719endef
720
721define gb_LinkTarget__use_boost_system
722$(call gb_LinkTarget_add_defs,$(1),\
723 -DBOOST_ALL_NO_LIB \
724)
725
726$(call gb_LinkTarget_use_static_libraries,$(1),\
727 boost_system \
728)
729
730endef
731
732define gb_ExternalProject__use_boost_system
733$(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
Tor Lillqvist503b2482013-05-22 19:50:22 +0300734endef
735
Peter Foleye1f742a2012-11-12 18:37:10 -0500736define gb_LinkTarget__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100737$(call gb_LinkTarget_use_unpacked,$(1),boost)
Michael Stahla53586f2013-01-26 21:19:13 +0100738$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200739 -I$(call gb_UnpackedTarball_get_dir,boost) \
Michael Stahla53586f2013-01-26 21:19:13 +0100740 $$(INCLUDE) \
741)
Peter Foleye1f742a2012-11-12 18:37:10 -0500742
743endef
744
Peter Foleycdb6eca2012-11-10 08:56:12 -0500745define gb_ExternalProject__use_boost_headers
Christian Lohmaier1654a1e72012-11-14 18:11:30 +0100746$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
Peter Foleycdb6eca2012-11-10 08:56:12 -0500747
748endef
Cédric Bosdonnat12d193d2012-05-10 08:55:12 +0200749endif # SYSTEM_BOOST
750
751
Michael Stahle3abec32014-02-11 15:57:18 +0100752ifneq ($(SYSTEM_CMIS),)
Matúš Kukan464b4332012-01-15 02:12:49 +0100753
754define gb_LinkTarget__use_cmis
755$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100756 $$(INCLUDE) \
Matúš Kukan707194e2012-09-06 18:19:34 +0200757 $(CMIS_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +0100758)
Matúš Kukan707194e2012-09-06 18:19:34 +0200759$(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
Matúš Kukan464b4332012-01-15 02:12:49 +0100760
761endef
762
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100763else # !SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100764
Matúš Kukan464b4332012-01-15 02:12:49 +0100765define gb_LinkTarget__use_cmis
Michael Stahl759d02b2013-05-08 00:55:21 +0200766$(call gb_LinkTarget_set_include,$(1),\
767 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
768 $$(INCLUDE) \
769)
Michael Stahlc923f7d2012-04-07 23:22:08 +0200770$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +0100771 cmislib \
772)
773
774endef
775
Bjoern Michaelsen88ed6d12013-02-19 11:10:16 +0100776endif # SYSTEM_CMIS
Matúš Kukan464b4332012-01-15 02:12:49 +0100777
David Tardon32cd12c2014-04-26 19:46:40 +0200778ifeq ($(ENABLE_JAVA),TRUE)
David Tardon2a71e152014-04-26 16:08:07 +0200779
Peter Foleye5ccda42012-12-25 11:23:58 -0500780ifeq ($(OS)$(COM),WNTGCC)
781
782define gb_LinkTarget__use_jawt
David Tardon943dedc2014-04-26 15:50:10 +0200783$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
784
785$(call gb_LinkTarget_add_ldflags,$(1),\
786 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
787)
788
789$(call gb_LinkTarget_add_libs,$(1),\
David Tardon2a71e152014-04-26 16:08:07 +0200790 $(JAWTLIB) \
Peter Foleye5ccda42012-12-25 11:23:58 -0500791)
792
793endef
794
795else # $(OS)$(COM) != WNTGCC
796
David Tardon2a71e152014-04-26 16:08:07 +0200797define gb_LinkTarget__use_jawt
798$(call gb_LinkTarget_add_libs,$(1),\
799 $(JAWTLIB) \
800)
801
802endef
Peter Foleye5ccda42012-12-25 11:23:58 -0500803
804endif # $(OS)$(COM) = WNTGCC
805
David Tardon2a71e152014-04-26 16:08:07 +0200806else # !ENABLE_JAVA
807
808gb_LinkTarget__use_jawt :=
809
810endif # ENABLE_JAVA
Matúš Kukan464b4332012-01-15 02:12:49 +0100811
Michael Stahl23647592014-02-11 19:04:20 +0100812ifneq ($(SYSTEM_LIBATOMIC_OPS),)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100813
814define gb_LinkTarget__use_libatomic_ops
815$(call gb_LinkTarget_set_include,$(1),\
816 $$(INCLUDE) \
817 $(LIBATOMIC_OPS_CFLAGS) \
818)
819$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
820
821endef
822gb_ExternalProject__use_libatomic_ops :=
823
824else # !SYSTEM_LIBATOMIC_OPS
825
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100826define gb_LinkTarget__use_libatomic_ops
827$(call gb_LinkTarget_set_include,$(1),\
828$(LIBATOMIC_OPS_CFLAGS) \
829 $$(INCLUDE) \
830 $(LIBATOMIC_OPS_CFLAGS) \
831)
Michael Stahlb3085262013-10-24 12:22:58 +0200832$(call gb_LinkTarget_use_external_project,$(1),\
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100833 libatomic_ops \
834)
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100835
Michael Stahlb3085262013-10-24 12:22:58 +0200836$(call gb_LinkTarget_add_libs,$(1),\
Andrzej J.R. Huntf479f622013-09-05 16:27:50 +0100837 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100838)
839
840endef
841
842define gb_ExternalProject__use_libatomic_ops
Michael Stahlb3085262013-10-24 12:22:58 +0200843$(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +0100844
845endef
846
847endif # SYSTEM_LIBATOMIC_OPS
848
849
Michael Stahle3abec32014-02-11 15:57:18 +0100850ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
Matúš Kukanbd030302011-12-03 15:06:52 +0100851
852define gb_LinkTarget__use_libexttextcat
853$(call gb_LinkTarget_set_include,$(1),\
854 $$(INCLUDE) \
855 $(LIBEXTTEXTCAT_CFLAGS) \
856)
Peter Foley31219f02012-11-09 17:25:56 -0500857$(call gb_LinkTarget_add_defs,$(1),\
858 -DSYSTEM_LIBEXTTEXTCAT \
859)
Matúš Kukanbd030302011-12-03 15:06:52 +0100860$(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
861
862endef
863
864else # !SYSTEM_LIBEXTTEXTCAT
865
Matúš Kukanbd030302011-12-03 15:06:52 +0100866define gb_LinkTarget__use_libexttextcat
Peter Foley31219f02012-11-09 17:25:56 -0500867$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +0200868 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
Peter Foley31219f02012-11-09 17:25:56 -0500869 $$(INCLUDE) \
870)
Matúš Kukanbd030302011-12-03 15:06:52 +0100871
Michael Stahl2f6261f2013-09-19 19:28:36 +0200872ifeq ($(COM),MSC)
873$(call gb_LinkTarget_use_static_libraries,$(1),\
874 exttextcat \
875)
876else
877$(call gb_LinkTarget_add_libs,$(1),\
878 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
879)
David Tardon523a3042013-10-12 18:22:55 +0200880$(call gb_LinkTarget_use_external_project,$(1),exttextcat)
Michael Stahl2f6261f2013-09-19 19:28:36 +0200881endif
882
883
Matúš Kukanbd030302011-12-03 15:06:52 +0100884endef
885
886endif # SYSTEM_LIBEXTTEXTCAT
887
888
Michael Stahl379f9782014-02-11 16:49:19 +0100889ifneq ($(SYSTEM_LIBXML),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000890
891define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000892$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000893 -DSYSTEM_LIBXML \
894)
895$(call gb_LinkTarget_set_include,$(1),\
896 $$(INCLUDE) \
897 $(LIBXML_CFLAGS) \
898)
899$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100900
Michael Stahlc74af0d2011-04-01 20:49:35 +0000901endef
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500902gb_ExternalProject__use_libxml2:=
Michael Stahlc74af0d2011-04-01 20:49:35 +0000903
904else # !SYSTEM_LIBXML
905
Michael Stahl64ea9942014-03-14 11:48:24 +0100906$(eval $(call gb_Helper_register_packages_for_install,ure,\
907 xml2 \
908))
909
910$(eval $(call gb_Helper_register_packages_for_install,ooo,\
911 xml2_win32 \
912))
913
Michael Stahlc74af0d2011-04-01 20:49:35 +0000914define gb_LinkTarget__use_libxml2
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500915$(call gb_LinkTarget_use_package,$(1),xml2)
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500916$(call gb_LinkTarget_set_include,$(1),\
917 $$(INCLUDE) \
David Tardon23b4b762014-07-17 17:27:05 +0200918 $(LIBXML_CFLAGS) \
919)
920
921$(call gb_LinkTarget_add_libs,$(1),\
922 $(LIBXML_LIBS) \
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500923)
924
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200925ifeq ($(COM),MSC)
David Tardon23b4b762014-07-17 17:27:05 +0200926$(call gb_LinkTarget_use_external,$(1),icu_headers)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200927endif
928
Peter Foleyb9d6c7a2013-02-05 17:19:11 -0500929endef
930define gb_ExternalProject__use_libxml2
931$(call gb_ExternalProject_use_package,$(1),xml2)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100932
David Tardon23b4b762014-07-17 17:27:05 +0200933ifeq ($(COM),MSC)
934$(call gb_ExternalProject_use_external_project,$(1),icu)
935endif
936
Michael Stahlc74af0d2011-04-01 20:49:35 +0000937endef
938
939endif # SYSTEM_LIBXML
940
941
Michael Stahle3abec32014-02-11 15:57:18 +0100942ifneq ($(SYSTEM_LIBXSLT),)
Michael Stahlc74af0d2011-04-01 20:49:35 +0000943
944define gb_LinkTarget__use_libxslt
945$(call gb_LinkTarget_set_include,$(1),\
946 $$(INCLUDE) \
947 $(LIBXSLT_CFLAGS) \
948)
949$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100950
Michael Stahlc74af0d2011-04-01 20:49:35 +0000951endef
952
David Tardonab03e872012-08-15 07:20:13 +0200953define gb_LinkTarget__use_libexslt
954$(call gb_LinkTarget_set_include,$(1),\
955 $$(INCLUDE) \
956 $(LIBEXSLT_CFLAGS) \
957)
958
959$(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
960
961endef
962
Michael Stahlc74af0d2011-04-01 20:49:35 +0000963else # !SYSTEM_LIBXSLT
964
Michael Stahl32a617d2014-02-17 11:23:19 +0100965$(eval $(call gb_Helper_register_packages_for_install,ooo,\
966 xslt \
967))
968
Michael Stahlc74af0d2011-04-01 20:49:35 +0000969define gb_LinkTarget__use_libxslt
Peter Foley856c0752013-02-02 15:44:30 -0500970$(call gb_LinkTarget_use_package,$(1),xslt)
971$(call gb_LinkTarget_set_include,$(1),\
972 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200973 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500974)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200975
976ifeq ($(COM),MSC)
977$(call gb_LinkTarget_add_libs,$(1),\
978 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000979)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200980else
981$(call gb_LinkTarget_add_libs,$(1),\
982 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
983)
984endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100985
Michael Stahlc74af0d2011-04-01 20:49:35 +0000986endef
987
David Tardonab03e872012-08-15 07:20:13 +0200988define gb_LinkTarget__use_libexslt
Peter Foley856c0752013-02-02 15:44:30 -0500989$(call gb_LinkTarget_use_package,$(1),xslt)
990$(call gb_LinkTarget_set_include,$(1),\
991 $$(INCLUDE) \
Michael Stahl70fcfee2013-04-01 12:47:16 +0200992 -I$(call gb_UnpackedTarball_get_dir,xslt) \
Peter Foley856c0752013-02-02 15:44:30 -0500993)
994
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200995ifeq ($(COM),MSC)
996$(call gb_LinkTarget_add_libs,$(1),\
997 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
David Tardonab03e872012-08-15 07:20:13 +0200998)
Michael Stahlc03ff5e2013-10-22 18:02:28 +0200999else
1000$(call gb_LinkTarget_add_libs,$(1),\
1001 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
1002)
1003endif
David Tardonab03e872012-08-15 07:20:13 +02001004
1005endef
1006
Michael Stahlc74af0d2011-04-01 20:49:35 +00001007endif # SYSTEM_LIBXSLT
1008
Norbert Thiebaud587d9692013-08-29 10:38:00 -05001009ifeq ($(ENABLE_LIBLANGTAG),TRUE)
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001010
Michael Stahl49dde4c2014-02-11 19:42:28 +01001011ifneq ($(SYSTEM_LIBLANGTAG),)
Eike Rathkea774a482012-08-06 19:22:43 +02001012
1013define gb_LinkTarget__use_liblangtag
1014$(call gb_LinkTarget_set_include,$(1),\
1015 $$(INCLUDE) \
1016 $(LIBLANGTAG_CFLAGS) \
1017)
1018
1019$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1020
1021endef
1022
1023else # !SYSTEM_LIBLANGTAG
1024
Michael Stahl01adcd82014-03-18 17:38:06 +01001025$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1026 liblangtag_data \
1027))
1028
Eike Rathkea774a482012-08-06 19:22:43 +02001029define gb_LinkTarget__use_liblangtag
Peter Foley782151a2012-11-11 16:02:36 -05001030$(call gb_LinkTarget_use_unpacked,$(1),langtag)
1031$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001032 -I$(call gb_UnpackedTarball_get_dir,langtag) \
Peter Foley782151a2012-11-11 16:02:36 -05001033 $$(INCLUDE) \
1034)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001035$(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1036$(call gb_LinkTarget_use_external_project,$(1),langtag)
Eike Rathkea774a482012-08-06 19:22:43 +02001037
1038endef
1039
1040endif # SYSTEM_LIBLANGTAG
1041
Matúš Kukan51ba7db2013-05-02 12:19:35 +02001042else
1043
1044gb_LinkTarget__use_liblangtag :=
1045
Jan Holesovsky6a7b32b02012-08-10 10:27:54 +02001046endif # ENABLE_LIBLANGTAG
1047
Matúš Kukandcae0502014-02-25 21:47:33 +01001048gb_ExternalProject__use_apr :=
1049
1050ifeq ($(WITH_WEBDAV),serf)
Matúš Kukan0b272532014-02-06 12:28:36 +01001051
1052define gb_LinkTarget__use_apr
1053$(call gb_LinkTarget_set_include,$(1),\
1054 $$(INCLUDE) \
1055 $(APR_CFLAGS) \
1056)
1057$(call gb_LinkTarget_add_libs,$(1),\
1058 $(APR_LIBS) \
Michael Stahld1820ec2014-06-05 13:35:14 +02001059 $(if $(filter $(OS),LINUX),-lpthread) \
1060 $(if $(filter $(OS),MACOSX),-liconv) \
Matúš Kukan0b272532014-02-06 12:28:36 +01001061)
1062
1063ifeq ($(SYSTEM_APR),)
1064$(call gb_LinkTarget_use_system_win32_libs,$(1),\
1065 mswsock \
1066 rpcrt4 \
1067 shell32 \
1068)
1069$(call gb_LinkTarget_add_defs,$(1),\
1070 -DAPR_DECLARE_STATIC \
1071 -DAPU_DECLARE_STATIC \
1072)
1073$(call gb_LinkTarget_use_external_project,$(1),apr_util)
1074endif
1075
1076endef
1077
1078define gb_ExternalProject__use_apr
1079ifeq ($(SYSTEM_APR),)
1080$(call gb_ExternalProject_use_external_project,$(1),apr_util)
1081endif
1082
1083endef
1084
1085define gb_LinkTarget__use_serf
1086$(call gb_LinkTarget_set_include,$(1),\
1087 $(SERF_CFLAGS) \
1088 $$(INCLUDE) \
1089)
1090$(call gb_LinkTarget_add_libs,$(1),\
1091 $(SERF_LIBS) \
1092)
1093
1094ifeq ($(SYSTEM_SERF),)
1095$(call gb_LinkTarget_use_external_project,$(1),serf)
1096endif
1097
1098endef
1099
Matúš Kukandcae0502014-02-25 21:47:33 +01001100else ifeq ($(WITH_WEBDAV),neon)
Eike Rathkea774a482012-08-06 19:22:43 +02001101
Michael Stahle3abec32014-02-11 15:57:18 +01001102ifneq ($(SYSTEM_NEON),)
Matúš Kukan464b4332012-01-15 02:12:49 +01001103
1104define gb_LinkTarget__use_neon
Matúš Kukan464b4332012-01-15 02:12:49 +01001105$(call gb_LinkTarget_add_defs,$(1),\
1106 -DNEON_VERSION=0x$(NEON_VERSION) \
David Tardonb74bf412013-08-12 09:39:59 +02001107 -DSYSTEM_NEON \
Matúš Kukan464b4332012-01-15 02:12:49 +01001108)
Matúš Kukan464b4332012-01-15 02:12:49 +01001109$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001110 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00001111 $(NEON_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001112)
1113
1114$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1115
1116endef
1117
1118else # !SYSTEM_NEON
1119
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02001120$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
Matúš Kukan464b4332012-01-15 02:12:49 +01001121 neon \
1122))
1123
1124define gb_LinkTarget__use_neon
Matúš Kukan7a030392012-10-29 23:29:37 +01001125$(call gb_LinkTarget_use_unpacked,$(1),neon)
Matúš Kukan464b4332012-01-15 02:12:49 +01001126$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001127 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
Matúš Kukan464b4332012-01-15 02:12:49 +01001128 $$(INCLUDE) \
1129)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001130$(call gb_LinkTarget_use_libraries,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01001131 neon \
1132)
1133
1134endef
1135
1136endif # SYSTEM_NEON
1137
Matúš Kukandcae0502014-02-25 21:47:33 +01001138endif # WITH_WEBDAV
Matúš Kukan464b4332012-01-15 02:12:49 +01001139
Michael Stahle3abec32014-02-11 15:57:18 +01001140ifneq ($(SYSTEM_REDLAND),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001141
1142define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +00001143$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +00001144 -DSYSTEM_REDLAND \
1145)
1146$(call gb_LinkTarget_set_include,$(1),\
1147 $$(INCLUDE) \
1148 $(REDLAND_CFLAGS) \
1149)
1150$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001151
Michael Stahlc74af0d2011-04-01 20:49:35 +00001152endef
1153
Peter Foley18bd1e72012-12-27 18:04:21 -05001154gb_LinkTarget__use_redland_headers:=
1155
1156gb_LinkTarget__use_raptor_headers:=
1157
1158gb_LinkTarget__use_rasqal_headers:=
1159
Michael Stahlc74af0d2011-04-01 20:49:35 +00001160else # !SYSTEM_REDLAND
1161
Peter Foley18bd1e72012-12-27 18:04:21 -05001162define gb_LinkTarget__use_redland_headers
1163$(call gb_LinkTarget_set_include,$(1),\
Michael Stahld719c012013-04-01 12:41:18 +02001164 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001165 $$(INCLUDE) \
1166)
1167
1168endef
1169
1170define gb_LinkTarget__use_raptor_headers
1171$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001172 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001173 $$(INCLUDE) \
1174)
1175
1176endef
1177
1178define gb_LinkTarget__use_rasqal_headers
1179$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001180 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
Peter Foley18bd1e72012-12-27 18:04:21 -05001181 $$(INCLUDE) \
1182)
1183
1184endef
1185
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001186ifneq ($(OS),ANDROID)
1187
Michael Stahl5f9cda22013-11-01 15:43:47 +01001188ifeq ($(COM),MSC)
Michael Stahlae8e5792014-01-10 12:07:31 +01001189$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
David Tardon491dea02013-05-01 11:23:50 +02001190 raptor2 \
1191 rasqal \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001192 rdf \
1193))
Michael Stahl5ae30d32014-03-13 19:32:13 +01001194else
1195$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1196 raptor \
1197 rasqal \
1198 redland \
1199))
Michael Stahl5f9cda22013-11-01 15:43:47 +01001200endif
Michael Stahlc74af0d2011-04-01 20:49:35 +00001201
1202define gb_LinkTarget__use_librdf
Michael Stahl831aaef2013-10-24 01:09:35 +02001203ifeq ($(COM),MSC)
1204$(call gb_LinkTarget_use_libraries,$(1),\
1205 raptor2 \
1206 rdf \
1207)
1208else
Matúš Kukan85d1e392013-12-14 11:17:30 +01001209$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1210
Michael Stahl2793c542013-10-23 21:18:24 +02001211$(call gb_LinkTarget_add_libs,$(1),\
1212 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1213 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001214)
Michael Stahl831aaef2013-10-24 01:09:35 +02001215endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001216
Michael Stahlc74af0d2011-04-01 20:49:35 +00001217endef
1218
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001219else # ANDROID
1220
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001221define gb_LinkTarget__use_librdf
Michael Stahl95565d52013-05-07 12:17:20 +02001222$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
Tor Lillqvist9a42ca72012-04-19 21:45:14 +03001223
1224endef
1225
1226endif # ANDROID
1227
Michael Stahlc74af0d2011-04-01 20:49:35 +00001228endif # SYSTEM_REDLAND
1229
1230
Michael Stahl32a617d2014-02-17 11:23:19 +01001231ifneq ($(filter unx,$(GUIBASE))$(ENABLE_CAIRO_CANVAS),) # or
1232
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001233ifneq ($(SYSTEM_CAIRO),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001234
Michael Stahlc74af0d2011-04-01 20:49:35 +00001235define gb_LinkTarget__use_cairo
1236$(call gb_LinkTarget_set_include,$(1),\
1237 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001238 $(CAIRO_CFLAGS) \
1239)
David Tardon962771f2013-05-24 14:35:18 +02001240$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001241$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001242
Michael Stahlc74af0d2011-04-01 20:49:35 +00001243endef
1244
Michael Stahl5c0e6d82014-02-11 17:03:53 +01001245else # !SYSTEM_CAIRO
Michael Stahlc74af0d2011-04-01 20:49:35 +00001246
Michael Stahl32a617d2014-02-17 11:23:19 +01001247$(eval $(call gb_Helper_register_packages_for_install,ooo,\
1248 cairo \
1249 $(if $(filter $(OS),WNT),,pixman) \
1250))
1251
Michael Stahlc74af0d2011-04-01 20:49:35 +00001252define gb_LinkTarget__use_cairo
Michael Stahlde142202012-11-20 22:05:36 +01001253$(call gb_LinkTarget_use_package,$(1),cairo)
1254$(call gb_LinkTarget_use_package,$(1),pixman)
David Tardon962771f2013-05-24 14:35:18 +02001255$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001256$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001257 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1258 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001259 $$(INCLUDE) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001260)
Michael Stahld89f48b2013-10-23 21:27:05 +02001261$(call gb_LinkTarget_add_libs,$(1),\
1262 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001263 $(if $(filter-out MACOSX WNT,$(OS)), \
Michael Stahld89f48b2013-10-23 21:27:05 +02001264 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
Matúš Kukan2cb7ba12012-11-10 22:14:42 +01001265 ) \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001266)
Caolán McNamara5bb76f62011-07-25 21:50:34 +01001267
Michael Stahlc74af0d2011-04-01 20:49:35 +00001268endef
1269
1270endif # SYSTEM_CAIRO
1271
Michael Stahl32a617d2014-02-17 11:23:19 +01001272endif # CAIRO
1273
Michael Stahl379f9782014-02-11 16:49:19 +01001274ifneq ($(SYSTEM_FREETYPE),)
David Tardon962771f2013-05-24 14:35:18 +02001275
1276define gb_LinkTarget__use_freetype_headers
Caolán McNamarab41ae462011-07-25 22:24:27 +01001277$(call gb_LinkTarget_set_include,$(1),\
1278 $$(INCLUDE) \
1279 $(FREETYPE_CFLAGS) \
1280)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001281
David Tardon962771f2013-05-24 14:35:18 +02001282endef
1283
1284define gb_LinkTarget__use_freetype
1285$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Caolán McNamarab41ae462011-07-25 22:24:27 +01001286$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1287
1288endef
1289
Michael Stahle568d2a2013-09-30 14:10:22 +02001290gb_ExternalProject__use_freetype :=
1291
Zolnai Tamásb8ee4012014-06-25 15:19:41 +02001292else ifeq ($(OS),ANDROID)
David Tardon962771f2013-05-24 14:35:18 +02001293
1294define gb_LinkTarget__use_freetype_headers
Michael Stahlb242cee82013-10-24 12:08:50 +02001295$(call gb_LinkTarget_use_external_project,$(1),freetype)
David Tardon962771f2013-05-24 14:35:18 +02001296$(call gb_LinkTarget_set_include,$(1),\
1297 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1298 $$(INCLUDE) \
1299)
1300
David Tardon61695f12013-05-24 17:15:20 +02001301endef
1302
David Tardon962771f2013-05-24 14:35:18 +02001303define gb_LinkTarget__use_freetype
1304$(call gb_LinkTarget_use_external,$(1),freetype_headers)
Jan Holesovskyfe5dbe32014-04-22 00:41:57 +02001305$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
David Tardon962771f2013-05-24 14:35:18 +02001306
1307endef
1308
Michael Stahle568d2a2013-09-30 14:10:22 +02001309define gb_ExternalProject__use_freetype
Michael Stahlb242cee82013-10-24 12:08:50 +02001310$(call gb_ExternalProject_use_external_project,$(1),freetype)
Michael Stahle568d2a2013-09-30 14:10:22 +02001311
1312endef
1313
David Tardon962771f2013-05-24 14:35:18 +02001314endif # SYSTEM_FREETYPE
1315
Michael Stahl04ff5352014-02-11 16:21:04 +01001316ifneq ($(SYSTEM_FONTCONFIG),)
David Tardon4eb68422013-05-24 14:16:03 +02001317
Caolán McNamarab41ae462011-07-25 22:24:27 +01001318define gb_LinkTarget__use_fontconfig
1319$(call gb_LinkTarget_set_include,$(1),\
1320 $$(INCLUDE) \
1321 $(FONTCONFIG_CFLAGS) \
1322)
Tor Lillqvist0d1c24e2012-04-19 21:10:00 +03001323
Caolán McNamarab41ae462011-07-25 22:24:27 +01001324$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1325
1326endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001327
Matúš Kukanfb8d0a42013-09-25 10:13:09 +02001328else ifeq ($(OS),ANDROID)
David Tardon4eb68422013-05-24 14:16:03 +02001329
David Tardon4eb68422013-05-24 14:16:03 +02001330define gb_LinkTarget__use_fontconfig
Michael Stahl76596b32013-10-24 11:01:41 +02001331$(call gb_LinkTarget_use_external_project,$(1),fontconfig)
David Tardon4eb68422013-05-24 14:16:03 +02001332$(call gb_LinkTarget_set_include,$(1),\
1333 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1334 $$(INCLUDE) \
1335)
1336
David Tardon4eb68422013-05-24 14:16:03 +02001337endef
1338
1339endif # SYSTEM_FONTCONFIG
1340
David Tardonf22f58a2014-05-30 19:50:24 +02001341ifeq ($(ENABLE_GRAPHITE),TRUE)
1342
Michael Stahle3abec32014-02-11 15:57:18 +01001343ifneq ($(SYSTEM_GRAPHITE),)
Michael Stahl87e44332011-04-13 16:11:39 +00001344
Michael Stahl87e44332011-04-13 16:11:39 +00001345define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +00001346$(call gb_LinkTarget_set_include,$(1),\
1347 $$(INCLUDE) \
1348 $(GRAPHITE_CFLAGS) \
1349)
1350$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001351
Michael Stahl87e44332011-04-13 16:11:39 +00001352endef
1353
Michael Stahle3abec32014-02-11 15:57:18 +01001354else # !SYSTEM_GRAPHITE
Michael Stahl87e44332011-04-13 16:11:39 +00001355
Michael Stahl87e44332011-04-13 16:11:39 +00001356define gb_LinkTarget__use_graphite
Matúš Kukan7a030392012-10-29 23:29:37 +01001357$(call gb_LinkTarget_use_unpacked,$(1),graphite)
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001358$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001359 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001360 $$(INCLUDE) \
1361)
Michael Stahlc923f7d2012-04-07 23:22:08 +02001362$(call gb_LinkTarget_use_static_libraries,$(1),\
Matúš Kukan1ceb47d2012-10-25 09:55:13 +02001363 graphite \
Michael Stahl87e44332011-04-13 16:11:39 +00001364)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001365
Michael Stahl87e44332011-04-13 16:11:39 +00001366endef
1367
1368endif # SYSTEM_GRAPHITE
1369
David Tardonf22f58a2014-05-30 19:50:24 +02001370else # !ENABLE_GRAPHITE
1371
1372gb_LinkTarget__use_graphite :=
1373
1374endif # ENABLE_GRAPHITE
1375
Michael Stahl187194b2014-02-11 19:17:42 +01001376ifneq ($(SYSTEM_ICU),)
Michael Stahlc74af0d2011-04-01 20:49:35 +00001377
Peter Foleyb92a0d92012-12-25 17:39:43 -05001378gb_LinkTarget__use_icu_headers:=
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001379gb_ExternalProject__use_icu:=
Peter Foleyb92a0d92012-12-25 17:39:43 -05001380
Matúš Kukan6fad1752011-08-11 12:42:39 +02001381define gb_LinkTarget__use_icudata
1382$(call gb_LinkTarget_add_libs,$(1),-licudata)
1383
1384endef
David Tardon1a852392011-07-26 09:58:54 +02001385define gb_LinkTarget__use_icui18n
1386$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +02001387
David Tardon1a852392011-07-26 09:58:54 +02001388endef
Michael Stahlc74af0d2011-04-01 20:49:35 +00001389define gb_LinkTarget__use_icuuc
1390$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +01001391
Michael Stahlc74af0d2011-04-01 20:49:35 +00001392endef
1393
1394else # !SYSTEM_ICU
1395
Michael Stahl30121562014-07-24 00:22:51 +02001396$(eval $(call gb_Helper_register_packages_for_install,ure, \
1397 icu_ure \
1398))
1399
Michael Stahle7592692014-03-14 11:23:52 +01001400$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1401 icu \
1402))
1403
Tor Lillqvist084db5f2012-09-24 10:37:25 +03001404ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
Tor Lillqvist8a3ea752011-11-21 14:25:37 +02001405gb_ICU_suffix:=lo
1406else
1407gb_ICU_suffix:=
1408endif
1409
Peter Foleyb92a0d92012-12-25 17:39:43 -05001410define gb_LinkTarget__use_icu_headers
Peter Foleyce9bf0f2013-03-23 12:32:31 -04001411$(call gb_LinkTarget_use_unpacked,$(1),icu)
Peter Foleyb92a0d92012-12-25 17:39:43 -05001412$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001413 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1414 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1415 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
Peter Foleyb92a0d92012-12-25 17:39:43 -05001416 $$(INCLUDE) \
1417)
1418
1419endef
1420
Fridrich Štrba8e9675d2013-01-25 10:55:04 +01001421define gb_ExternalProject__use_icu
1422$(call gb_ExternalProject_use_package,$(1),icu)
Fridrich Štrba851ca9c2013-01-25 10:29:59 +01001423
1424endef
1425
Peter Foleyf7452122012-11-04 08:46:44 -05001426# icudata and icui18n is called icudt and icuin when built with MSVC :-/
Michael Stahla92f80f2013-10-23 15:00:29 +02001427define gb_LinkTarget__use_icudata
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001428$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001429
1430ifeq ($(OS),WNT)
1431$(call gb_LinkTarget_add_libs,$(1),\
1432 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Matúš Kukan6fad1752011-08-11 12:42:39 +02001433)
Michael Stahla92f80f2013-10-23 15:00:29 +02001434else
1435$(call gb_LinkTarget_add_libs,$(1),\
1436 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1437)
1438endif
Matúš Kukan6fad1752011-08-11 12:42:39 +02001439
1440endef
Michael Stahla92f80f2013-10-23 15:00:29 +02001441
1442define gb_LinkTarget__use_icui18n
1443$(call gb_LinkTarget_use_package,$(1),icu)
1444
1445ifeq ($(OS),WNT)
1446$(call gb_LinkTarget_add_libs,$(1),\
1447 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1448)
1449else
1450$(call gb_LinkTarget_add_libs,$(1),\
1451 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1452)
1453endif
1454
1455endef
1456
Michael Stahlc74af0d2011-04-01 20:49:35 +00001457define gb_LinkTarget__use_icuuc
Peter Foleyb4b6c45982012-12-31 15:12:11 -05001458$(call gb_LinkTarget_use_package,$(1),icu)
Michael Stahla92f80f2013-10-23 15:00:29 +02001459
1460ifeq ($(OS),WNT)
1461$(call gb_LinkTarget_add_libs,$(1),\
1462 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
Michael Stahlc74af0d2011-04-01 20:49:35 +00001463)
Michael Stahla92f80f2013-10-23 15:00:29 +02001464else
1465$(call gb_LinkTarget_add_libs,$(1),\
1466 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1467)
1468endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001469
Michael Stahlc74af0d2011-04-01 20:49:35 +00001470endef
1471
1472endif # SYSTEM_ICU
1473
Fridrich Štrba9a943e52013-04-23 11:23:17 +02001474ifeq ($(ENABLE_HARFBUZZ),TRUE)
Michael Stahle3abec32014-02-11 15:57:18 +01001475ifneq ($(SYSTEM_HARFBUZZ),)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001476
1477define gb_LinkTarget__use_harfbuzz
1478$(call gb_LinkTarget_set_include,$(1),\
1479 $$(INCLUDE) \
1480 $(HARFBUZZ_CFLAGS) \
1481)
1482$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1483
1484endef
1485
Michael Stahle3abec32014-02-11 15:57:18 +01001486else # SYSTEM_HARFBUZZ != TRUE
Khaled Hosny7e389f42013-04-20 13:00:56 +02001487
Khaled Hosny7e389f42013-04-20 13:00:56 +02001488define gb_LinkTarget__use_harfbuzz
Michael Stahl8db02752013-05-07 23:28:45 +02001489$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl2f6261f2013-09-19 19:28:36 +02001490 $(HARFBUZZ_CFLAGS) \
Michael Stahl8db02752013-05-07 23:28:45 +02001491 $$(INCLUDE) \
1492)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001493$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1494$(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
Khaled Hosny7e389f42013-04-20 13:00:56 +02001495
1496endef
1497
1498endif # SYSTEM_HARFBUZZ
1499else # ENABLE_HARFBUZZ != YES
1500
1501gb_LinkTarget__use_harfbuzz :=
1502
1503endif # ENABLE_HARFBUZZ
Michael Stahl4a8919f2011-04-18 11:13:57 +00001504
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001505ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomeze3f607e2013-04-11 10:24:25 +03001506
1507gb_ExternalProject__use_openssl:=
1508gb_LinkTarget__use_openssl_headers:=
1509gb_LinkTarget__use_openssl:=
1510
1511else # !DISABLE_OPENSSL
1512
Michael Stahle3abec32014-02-11 15:57:18 +01001513ifneq ($(SYSTEM_OPENSSL),)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001514
Peter Foley9ddba662012-12-28 11:19:06 -05001515gb_LinkTarget__use_openssl_headers:=
1516gb_ExternalProject__use_openssl:=
1517
Michael Stahl4a8919f2011-04-18 11:13:57 +00001518define gb_LinkTarget__use_openssl
1519$(call gb_LinkTarget_set_include,$(1),\
1520 $$(INCLUDE) \
1521 $(OPENSSL_CFLAGS) \
1522)
1523$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +01001524
Michael Stahl4a8919f2011-04-18 11:13:57 +00001525endef
1526
1527else # !SYSTEM_OPENSSL
1528
Michael Stahlf921e262014-03-13 19:36:48 +01001529$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1530 openssl \
1531))
1532
Peter Foley9ddba662012-12-28 11:19:06 -05001533define gb_ExternalProject__use_openssl
1534$(call gb_ExternalProject_use_package,$(1),openssl)
1535
1536endef
1537
1538define gb_LinkTarget__use_openssl_headers
1539$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02001540 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
Peter Foley9ddba662012-12-28 11:19:06 -05001541 $$(INCLUDE) \
1542)
1543
1544endef
1545
Michael Stahl4a8919f2011-04-18 11:13:57 +00001546define gb_LinkTarget__use_openssl
Peter Foley9ddba662012-12-28 11:19:06 -05001547$(call gb_LinkTarget_use_package,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001548ifeq ($(OS),WNT)
Michael Stahl5b906622013-10-24 00:22:20 +02001549$(call gb_LinkTarget_add_libs,$(1),\
1550 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1551 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001552)
1553else
Michael Stahl2f6261f2013-09-19 19:28:36 +02001554$(call gb_LinkTarget_add_libs,$(1),\
1555 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1556 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001557)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001558$(call gb_LinkTarget_use_external_project,$(1),openssl)
Michael Stahl4a8919f2011-04-18 11:13:57 +00001559ifeq ($(OS),SOLARIS)
Michael Stahl80374352012-09-28 12:25:50 +02001560$(call gb_LinkTarget_add_libs,$(1),\
1561 -lnsl \
1562 -lsocket \
Michael Stahl4a8919f2011-04-18 11:13:57 +00001563)
1564endif
1565endif
Caolán McNamara6bccd202011-07-25 22:10:33 +01001566
Michael Stahl4a8919f2011-04-18 11:13:57 +00001567endef
1568
1569endif # SYSTEM_OPENSSL
Andres Gomeze3f607e2013-04-11 10:24:25 +03001570endif # DISABLE_OPENSSL
Michael Stahl4a8919f2011-04-18 11:13:57 +00001571
Matúš Kukanc4560482011-07-28 01:03:23 +02001572
Norbert Thiebaudbf6d1f72013-08-31 18:55:53 -05001573ifeq ($(DISABLE_OPENSSL),TRUE)
Andres Gomez48d49752013-04-11 10:32:54 +03001574
1575define gb_LinkTarget__use_gnutls
1576$(call gb_LinkTarget_set_include,$(1),\
1577 $$(INCLUDE) \
1578 $(GNUTLS_CFLAGS) \
1579)
1580
1581$(call gb_LinkTarget_add_defs,$(1),\
1582 -DDISABLE_OPENSSL \
1583)
1584
1585$(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1586
1587endef
1588
1589define gb_LinkTarget__use_libgcrypt
1590$(call gb_LinkTarget_set_include,$(1),\
1591 $$(INCLUDE) \
1592 $(LIBGCRYPT_CFLAGS) \
1593)
1594
1595$(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1596
1597endef
1598
1599else # !DISABLE_OPENSSL
1600
1601gb_LinkTarget__use_gnutls:=
1602gb_LinkTarget__use_libgcrypt:=
1603
1604endif # DISABLE_OPENSSL
1605
1606
Michael Stahle3abec32014-02-11 15:57:18 +01001607ifneq ($(SYSTEM_CDR),)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001608
1609define gb_LinkTarget__use_cdr
1610$(call gb_LinkTarget_set_include,$(1),\
1611 $$(INCLUDE) \
1612 $(CDR_CFLAGS) \
1613)
1614$(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1615
1616endef
1617
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001618else # !SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001619
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001620define gb_LinkTarget__use_cdr
David Tardonf16f3662013-05-24 13:48:03 +02001621$(call gb_LinkTarget_set_include,$(1),\
1622 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1623 $$(INCLUDE) \
1624)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001625$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001626 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrbab8f39c52012-10-05 13:32:14 +02001627)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001628$(call gb_LinkTarget_use_external_project,$(1),libcdr)
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001629endef
1630
Bjoern Michaelsenfb455e52013-02-19 11:22:02 +01001631endif # SYSTEM_CDR
Fridrich Štrbad701a0e2011-11-28 15:06:59 +01001632
1633
Michael Stahle3abec32014-02-11 15:57:18 +01001634ifneq ($(SYSTEM_EBOOK),)
David Tardon316be1b2013-11-09 15:52:36 +01001635
1636define gb_LinkTarget__use_ebook
1637$(call gb_LinkTarget_set_include,$(1),\
1638 $$(INCLUDE) \
1639 $(EBOOK_CFLAGS) \
1640)
1641$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1642
1643endef
1644
1645gb_ExternalProject__use_ebook :=
1646
1647else # !SYSTEM_EBOOK
1648
1649define gb_LinkTarget__use_ebook
1650$(call gb_LinkTarget_set_include,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001651 -I${WORKDIR}/UnpackedTarball/libebook/inc \
David Tardon316be1b2013-11-09 15:52:36 +01001652 $$(INCLUDE) \
1653)
1654$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001655 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon316be1b2013-11-09 15:52:36 +01001656)
1657$(call gb_LinkTarget_use_external_project,$(1),libebook)
1658
1659endef
1660
1661define gb_ExternalProject__use_ebook
1662$(call gb_ExternalProject_use_external_project,$(1),libebook)
1663
1664endef
1665
1666endif # SYSTEM_EBOOK
1667
1668
Michael Stahle3abec32014-02-11 15:57:18 +01001669ifneq ($(SYSTEM_ETONYEK),)
David Tardon08ca3e42013-10-24 16:46:49 +02001670
1671define gb_LinkTarget__use_etonyek
1672$(call gb_LinkTarget_set_include,$(1),\
1673 $$(INCLUDE) \
1674 $(ETONYEK_CFLAGS) \
1675)
1676$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1677
1678endef
1679
1680gb_ExternalProject__use_etonyek :=
1681
1682else # !SYSTEM_ETONYEK
1683
1684define gb_LinkTarget__use_etonyek
1685$(call gb_LinkTarget_set_include,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001686 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
David Tardon08ca3e42013-10-24 16:46:49 +02001687 $$(INCLUDE) \
1688)
1689$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001690 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \
David Tardon08ca3e42013-10-24 16:46:49 +02001691)
1692$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1693
1694endef
1695
1696define gb_ExternalProject__use_etonyek
1697$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1698
1699endef
1700
1701endif # SYSTEM_ETONYEK
1702
1703
Michael Stahle3abec32014-02-11 15:57:18 +01001704ifneq ($(SYSTEM_FREEHAND),)
Fridrich Štrba67153d72013-10-31 12:42:50 +01001705
1706define gb_LinkTarget__use_freehand
1707$(call gb_LinkTarget_set_include,$(1),\
1708 $$(INCLUDE) \
1709 $(FREEHAND_CFLAGS) \
1710)
1711$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1712
1713endef
1714
1715gb_ExternalProject__use_freehand :=
1716
1717else # !SYSTEM_FREEHAND
1718
1719define gb_LinkTarget__use_freehand
1720$(call gb_LinkTarget_set_include,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001721 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001722 $$(INCLUDE) \
1723)
1724$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001725 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba67153d72013-10-31 12:42:50 +01001726)
1727$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1728
1729endef
1730
1731define gb_ExternalProject__use_freehand
1732$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1733
1734endef
1735
1736endif # SYSTEM_FREEHAND
1737
1738
Michael Stahle3abec32014-02-11 15:57:18 +01001739ifneq ($(SYSTEM_ODFGEN),)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001740
1741define gb_LinkTarget__use_odfgen
1742$(call gb_LinkTarget_set_include,$(1),\
1743 $$(INCLUDE) \
1744 $(ODFGEN_CFLAGS) \
1745)
1746$(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1747
1748endef
1749
1750else # !SYSTEM_ODFGEN
1751
David Tardon775589e2014-05-24 09:13:33 +02001752ifeq ($(COM),MSC)
1753
1754$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1755 odfgen \
1756))
1757
Fridrich Štrba93848e12013-05-02 20:25:51 +02001758define gb_LinkTarget__use_odfgen
David Tardon0f8a90c2013-05-24 13:49:11 +02001759$(call gb_LinkTarget_set_include,$(1),\
1760 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1761 $$(INCLUDE) \
1762)
David Tardon775589e2014-05-24 09:13:33 +02001763$(call gb_LinkTarget_use_libraries,$(1),\
1764 odfgen \
Fridrich Štrba93848e12013-05-02 20:25:51 +02001765)
Fridrich Štrba93848e12013-05-02 20:25:51 +02001766
1767endef
1768
David Tardon775589e2014-05-24 09:13:33 +02001769else # !MSC
1770
1771$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1772 libodfgen \
1773))
1774
1775define gb_LinkTarget__use_odfgen
1776$(call gb_LinkTarget_use_package,$(1),libodfgen)
1777
1778$(call gb_LinkTarget_set_include,$(1),\
1779 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1780 $$(INCLUDE) \
1781)
1782$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001783 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
David Tardon775589e2014-05-24 09:13:33 +02001784)
1785
1786endef
1787
1788endif
1789
Fridrich Štrba93848e12013-05-02 20:25:51 +02001790endif # SYSTEM_ODFGEN
1791
1792
David Tardond2a806402014-05-24 08:39:54 +02001793ifneq ($(SYSTEM_REVENGE),)
1794
1795define gb_LinkTarget__use_revenge
1796$(call gb_LinkTarget_set_include,$(1),\
1797 $$(INCLUDE) \
1798 $(REVENGE_CFLAGS) \
1799)
1800$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1801
1802endef
1803
David Tardon6e4575b2014-05-25 13:06:57 +02001804gb_ExternalProject__use_revenge :=
1805
David Tardond2a806402014-05-24 08:39:54 +02001806else # !SYSTEM_REVENGE
1807
1808ifeq ($(COM),MSC)
1809
1810$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1811 revenge \
1812))
1813
1814define gb_LinkTarget__use_revenge
1815$(call gb_LinkTarget_set_include,$(1),\
David Tardonafd0a212014-05-25 13:19:31 +02001816 $(REVENGE_CFLAGS) \
David Tardond2a806402014-05-24 08:39:54 +02001817 $$(INCLUDE) \
1818)
1819$(call gb_LinkTarget_use_libraries,$(1),\
1820 revenge \
1821)
1822
1823endef
1824
David Tardon6e4575b2014-05-25 13:06:57 +02001825define gb_ExternalProject__use_revenge
1826$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1827
1828endef
1829
David Tardond2a806402014-05-24 08:39:54 +02001830else # !MSC
1831
1832$(eval $(call gb_Helper_register_packages_for_install,ooo, \
1833 librevenge \
1834))
1835
1836define gb_LinkTarget__use_revenge
1837$(call gb_LinkTarget_use_package,$(1),librevenge)
1838
1839$(call gb_LinkTarget_set_include,$(1),\
David Tardonafd0a212014-05-25 13:19:31 +02001840 $(REVENGE_CFLAGS) \
David Tardond2a806402014-05-24 08:39:54 +02001841 $$(INCLUDE) \
1842)
1843$(call gb_LinkTarget_add_libs,$(1),\
David Tardonafd0a212014-05-25 13:19:31 +02001844 $(REVENGE_LIBS) \
David Tardond2a806402014-05-24 08:39:54 +02001845)
1846endef
1847
David Tardon6e4575b2014-05-25 13:06:57 +02001848define gb_ExternalProject__use_revenge
1849$(call gb_ExternalProject_use_package,$(1),librevenge)
1850
1851endef
1852
David Tardond2a806402014-05-24 08:39:54 +02001853endif # MSC
1854
1855endif # SYSTEM_REVENGE
1856
1857
Michael Stahle3abec32014-02-11 15:57:18 +01001858ifneq ($(SYSTEM_ABW),)
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001859
1860define gb_LinkTarget__use_abw
1861$(call gb_LinkTarget_set_include,$(1),\
1862 $$(INCLUDE) \
1863 $(ABW_CFLAGS) \
1864)
1865$(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1866
1867endef
1868gb_ExternalProject__use_abw :=
1869
1870else # !SYSTEM_ABW
1871
1872define gb_LinkTarget__use_abw
1873$(call gb_LinkTarget_set_include,$(1),\
1874 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1875 $$(INCLUDE) \
1876)
1877$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001878 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba10eaaac2014-01-13 17:01:32 +01001879)
1880$(call gb_LinkTarget_use_external_project,$(1),libabw)
1881
1882endef
1883define gb_ExternalProject__use_abw
1884$(call gb_ExternalProject_use_external_project,$(1),libabw)
1885
1886endef
1887
1888endif # SYSTEM_ABW
1889
1890
Michael Stahle3abec32014-02-11 15:57:18 +01001891ifneq ($(SYSTEM_MSPUB),)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001892
1893define gb_LinkTarget__use_mspub
1894$(call gb_LinkTarget_set_include,$(1),\
1895 $$(INCLUDE) \
1896 $(MSPUB_CFLAGS) \
1897)
1898$(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1899
1900endef
1901
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001902else # !SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001903
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001904define gb_LinkTarget__use_mspub
Michael Stahl35ac39e2013-05-16 13:09:11 +02001905$(call gb_LinkTarget_set_include,$(1),\
1906 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1907 $$(INCLUDE) \
1908)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001909$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001910 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba093a5c92013-01-28 10:13:50 +01001911)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001912$(call gb_LinkTarget_use_external_project,$(1),libmspub)
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001913
1914endef
1915
Bjoern Michaelsena4c80752013-02-19 11:22:51 +01001916endif # SYSTEM_MSPUB
Fridrich Štrbadc4b91d2012-05-24 11:59:16 +02001917
1918
Michael Stahle3abec32014-02-11 15:57:18 +01001919ifneq ($(SYSTEM_VISIO),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001920
1921define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001922$(call gb_LinkTarget_set_include,$(1),\
1923 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001924 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001925)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +02001926$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001927
1928endef
1929
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001930else # !SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001931
Matúš Kukanc6a63952011-07-28 17:29:44 +02001932define gb_LinkTarget__use_visio
Michael Stahlacc7f612013-05-16 13:14:37 +02001933$(call gb_LinkTarget_set_include,$(1),\
1934 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1935 $$(INCLUDE) \
1936)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001937$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001938 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
Fridrich Štrba64ab6112012-11-05 11:43:55 +01001939)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001940$(call gb_LinkTarget_use_external_project,$(1),libvisio)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001941
1942endef
1943
Bjoern Michaelsenfe8bcfa2013-02-19 11:14:46 +01001944endif # SYSTEM_VISIO
Matúš Kukanc6a63952011-07-28 17:29:44 +02001945
1946
Michael Stahle3abec32014-02-11 15:57:18 +01001947ifneq ($(SYSTEM_WPD),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001948
1949define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001950$(call gb_LinkTarget_set_include,$(1),\
1951 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02001952 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001953)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +02001954$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001955
1956endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001957gb_ExternalProject__use_wpd :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02001958
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01001959else # !SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02001960
Fridrich Štrba4425db62012-09-24 13:17:45 +02001961define gb_LinkTarget__use_wpd
Michael Stahldb5c8c52013-05-16 13:28:14 +02001962$(call gb_LinkTarget_set_include,$(1),\
1963 $(WPD_CFLAGS) \
1964 $$(INCLUDE) \
1965)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001966$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02001967 $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.10$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl34295432012-09-24 22:25:28 +02001968)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001969$(call gb_LinkTarget_use_external_project,$(1),libwpd)
Fridrich Štrba4425db62012-09-24 13:17:45 +02001970
1971endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001972define gb_ExternalProject__use_wpd
Michael Stahl2f6261f2013-09-19 19:28:36 +02001973$(call gb_ExternalProject_use_external_project,$(1),libwpd)
Michael Stahl2b7536a2012-10-05 21:17:25 +02001974
1975endef
Fridrich Štrba4425db62012-09-24 13:17:45 +02001976
Bjoern Michaelsen5de206a2013-02-19 11:20:31 +01001977endif # SYSTEM_WPD
Matúš Kukanc6a63952011-07-28 17:29:44 +02001978
1979
Michael Stahle3abec32014-02-11 15:57:18 +01001980ifneq ($(SYSTEM_WPG),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02001981
1982define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001983$(call gb_LinkTarget_set_include,$(1),\
1984 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +02001985 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02001986)
Fridrich Štrba62c43b42011-10-05 10:15:40 +02001987$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02001988
1989endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02001990gb_ExternalProject__use_wpg :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02001991
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01001992else # !SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02001993
Matúš Kukanc6a63952011-07-28 17:29:44 +02001994define gb_LinkTarget__use_wpg
David Tardonc51a2542013-05-24 14:53:37 +02001995$(call gb_LinkTarget_set_include,$(1),\
1996 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
1997 $$(INCLUDE) \
1998)
Michael Stahl2f6261f2013-09-19 19:28:36 +02001999$(call gb_LinkTarget_add_libs,$(1),\
David Tardon1edc1ea2014-05-24 14:21:21 +02002000 $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.3$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl53b7bdc2012-10-05 17:19:47 +02002001)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002002$(call gb_LinkTarget_use_external_project,$(1),libwpg)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002003
2004endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002005define gb_ExternalProject__use_wpg
Michael Stahl2f6261f2013-09-19 19:28:36 +02002006$(call gb_ExternalProject_use_external_project,$(1),libwpg)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002007
2008endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002009
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002010endif # SYSTEM_WPG
Matúš Kukanc6a63952011-07-28 17:29:44 +02002011
2012
Michael Stahle3abec32014-02-11 15:57:18 +01002013ifneq ($(SYSTEM_WPS),)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002014
2015define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002016$(call gb_LinkTarget_set_include,$(1),\
2017 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002018 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +02002019)
Fridrich Štrbae991bba2011-10-05 10:18:53 +02002020$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +02002021
2022endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02002023gb_ExternalProject__use_wps :=
Matúš Kukanc6a63952011-07-28 17:29:44 +02002024
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002025else # !SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002026
David Tardonc887ea42014-05-30 15:35:48 +02002027ifeq ($(COM),MSC)
2028
2029$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2030 wps \
2031))
2032
Matúš Kukanc6a63952011-07-28 17:29:44 +02002033define gb_LinkTarget__use_wps
David Tardon6f9d8212013-05-24 14:58:31 +02002034$(call gb_LinkTarget_set_include,$(1),\
2035 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2036 $$(INCLUDE) \
2037)
David Tardonc887ea42014-05-30 15:35:48 +02002038
2039$(call gb_LinkTarget_use_libraries,$(1),\
2040 wps \
Fridrich Štrba8c07bd32013-04-19 12:06:58 +02002041)
Matúš Kukanc6a63952011-07-28 17:29:44 +02002042
2043endef
David Tardonc887ea42014-05-30 15:35:48 +02002044
2045else # !MSC
2046
2047$(eval $(call gb_Helper_register_packages_for_install,ooo, \
2048 libwps \
2049))
2050
2051define gb_LinkTarget__use_wps
2052$(call gb_LinkTarget_use_package,$(1),libwps)
2053
2054$(call gb_LinkTarget_set_include,$(1),\
2055 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2056 $$(INCLUDE) \
2057)
2058$(call gb_LinkTarget_add_libs,$(1),\
2059 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
2060)
Michael Stahl2b7536a2012-10-05 21:17:25 +02002061
2062endef
Matúš Kukanc6a63952011-07-28 17:29:44 +02002063
David Tardonc887ea42014-05-30 15:35:48 +02002064endif # MSC
2065
Bjoern Michaelsen3a3254a2013-02-19 11:26:46 +01002066endif # SYSTEM_WPS
Matúš Kukanc6a63952011-07-28 17:29:44 +02002067
2068
Michael Stahle3abec32014-02-11 15:57:18 +01002069ifneq ($(SYSTEM_MWAW),)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002070
2071define gb_LinkTarget__use_mwaw
2072$(call gb_LinkTarget_set_include,$(1),\
2073 $$(INCLUDE) \
2074 $(MWAW_CFLAGS) \
2075)
2076$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2077
2078endef
2079
2080else # !SYSTEM_MWAW
2081
David Tardoncb90b492014-05-30 13:55:20 +02002082ifeq ($(COM),MSC)
2083
2084$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2085 mwaw \
2086))
2087
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002088define gb_LinkTarget__use_mwaw
Michael Stahlff718952013-05-16 13:11:36 +02002089$(call gb_LinkTarget_set_include,$(1),\
2090 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2091 $$(INCLUDE) \
2092)
David Tardoncb90b492014-05-30 13:55:20 +02002093
2094$(call gb_LinkTarget_use_libraries,$(1),\
2095 mwaw \
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002096)
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002097
2098endef
2099
David Tardoncb90b492014-05-30 13:55:20 +02002100else # !MSC
2101
2102$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2103 libmwaw \
2104))
2105
2106define gb_LinkTarget__use_mwaw
2107$(call gb_LinkTarget_use_package,$(1),libmwaw)
2108
2109$(call gb_LinkTarget_set_include,$(1),\
2110 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2111 $$(INCLUDE) \
2112)
2113$(call gb_LinkTarget_add_libs,$(1),\
2114 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2115)
2116
2117endef
2118
2119endif # MSC
2120
Fridrich Štrba790a36d2013-03-11 12:38:12 +01002121endif # SYSTEM_MWAW
2122
2123
Michael Stahle3abec32014-02-11 15:57:18 +01002124ifneq ($(SYSTEM_LCMS2),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002125
2126define gb_LinkTarget__use_lcms2
2127$(call gb_LinkTarget_set_include,$(1),\
2128 $$(INCLUDE) \
Peter Foleyf7452122012-11-04 08:46:44 -05002129 $(LCMS2_CFLAGS) \
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002130)
2131$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2132
2133endef
2134
Peter Foley8905c0e2012-11-08 21:00:30 -05002135gb_ExternalProject__use_lcms2 :=
2136
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002137else # !SYSTEM_LCMS2
2138
Michael Stahl32a617d2014-02-17 11:23:19 +01002139$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2140 lcms2 \
2141))
2142
Peter Foley8905c0e2012-11-08 21:00:30 -05002143define gb_ExternalProject__use_lcms2
2144$(call gb_ExternalProject_use_package,$(1),lcms2)
2145
2146endef
2147
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002148ifeq ($(OS),ANDROID)
2149
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002150define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002151$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002152$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002153 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002154 $$(INCLUDE) \
2155)
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002156
2157endef
2158
2159else
2160
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002161define gb_LinkTarget__use_lcms2
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002162$(call gb_LinkTarget_use_package,$(1),lcms2)
Matúš Kukan3790e842012-09-04 22:00:15 +02002163$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002164 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
Matúš Kukan3790e842012-09-04 22:00:15 +02002165 $$(INCLUDE) \
2166)
Michael Stahl25f65f22013-10-23 22:04:36 +02002167$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002168
2169endef
2170
Tor Lillqvistbd4d3712012-06-06 22:57:56 +03002171endif # ANDROID
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002172endif # SYSTEM_LCMS2
2173
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002174ifneq ($(ENABLE_LPSOLVE),)
Fridrich Štrba8a0a25d2012-03-02 10:15:42 +01002175
Michael Stahlab586f12014-02-11 19:25:30 +01002176ifneq ($(SYSTEM_LPSOLVE),)
Matúš Kukanc4560482011-07-28 01:03:23 +02002177
Peter Foley085346f2012-11-03 19:19:30 -04002178define gb_LinkTarget__use_lpsolve
Matúš Kukanc4560482011-07-28 01:03:23 +02002179$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
Peter Foley085346f2012-11-03 19:19:30 -04002180$(call gb_LinkTarget_add_defs,$(1),\
2181 -DSYSTEM_LPSOLVE \
Peter Foley29d5e292012-11-07 18:18:08 -05002182)
Matúš Kukanc4560482011-07-28 01:03:23 +02002183
2184endef
2185
2186else # !SYSTEM_LPSOLVE
2187
Peter Foley085346f2012-11-03 19:19:30 -04002188define gb_LinkTarget__use_lpsolve
2189$(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002190ifeq ($(COM),MSC)
2191$(call gb_LinkTarget_add_libs,$(1),\
2192 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2193)
2194else
Michael Stahlb177b302013-10-23 21:33:51 +02002195$(call gb_LinkTarget_add_libs,$(1),\
2196 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
Matúš Kukanc4560482011-07-28 01:03:23 +02002197)
Michael Stahlb7d8ca82013-10-24 01:25:59 +02002198endif
Peter Foley085346f2012-11-03 19:19:30 -04002199$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002200 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
Peter Foley085346f2012-11-03 19:19:30 -04002201 $$(INCLUDE) \
2202)
Matúš Kukanc4560482011-07-28 01:03:23 +02002203
2204endef
2205
Matúš Kukan083fa762014-02-27 17:08:09 +01002206$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2207 lpsolve \
2208))
2209
Matúš Kukanc4560482011-07-28 01:03:23 +02002210endif # SYSTEM_LPSOLVE
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002211
Matúš Kukan077bdc72014-03-27 14:51:46 +01002212else
2213
2214gb_LinkTarget__use_lpsolve :=
2215
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002216endif # ENABLE_LPSOLVE
2217
2218ifneq ($(ENABLE_COINMP),)
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002219
2220define gb_LinkTarget__use_coinmp
2221$(call gb_LinkTarget_use_package,$(1),coinmp)
2222ifeq ($(COM),MSC)
2223$(call gb_LinkTarget_add_libs,$(1),\
Tomofumi Yagicddbec72014-04-05 12:02:38 +09002224 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
Matúš Kukan4f7b9682014-02-28 10:39:19 +01002225)
2226else
2227$(call gb_LinkTarget_add_libs,$(1),\
2228 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2229 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2230 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2231 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2232 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2233 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2234 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2235)
2236endif
2237$(call gb_LinkTarget_set_include,$(1),\
2238 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2239 $$(INCLUDE) \
2240)
2241
2242endef
2243
2244$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2245 coinmp \
2246))
2247
Matúš Kukan077bdc72014-03-27 14:51:46 +01002248else
2249
2250gb_LinkTarget__use_coinmp :=
2251
Matúš Kukan8dc394d2014-03-31 19:36:41 +02002252endif # ENABLE_COINMP
Matúš Kukanc4560482011-07-28 01:03:23 +02002253
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002254ifeq ($(ENABLE_GIO),TRUE)
Matúš Kukanc4560482011-07-28 01:03:23 +02002255
Matúš Kukan464b4332012-01-15 02:12:49 +01002256define gb_LinkTarget__use_gio
2257$(call gb_LinkTarget_set_include,$(1),\
Matúš Kukan464b4332012-01-15 02:12:49 +01002258 $$(INCLUDE) \
Caolán McNamara1ac9ccf2012-01-16 08:57:38 +00002259 $(GIO_CFLAGS) \
Matúš Kukan464b4332012-01-15 02:12:49 +01002260)
2261
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002262$(call gb_LinkTarget_add_defs,$(1),\
Siqid0419802013-07-24 11:16:31 +02002263 -DENABLE_GIO \
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002264)
2265
Matúš Kukan464b4332012-01-15 02:12:49 +01002266$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2267
2268endef
2269
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002270else # ENABLE_GIO
2271
2272define gb_LinkTarget__use_gio
Caolán McNamara1e98bb42012-11-06 20:09:57 +00002273
Caolán McNamaraaabc73d2012-08-30 13:58:15 +01002274endef
2275
2276endif # ENABLE_GIO
2277
Siqid0419802013-07-24 11:16:31 +02002278ifeq ($(ENABLE_AVAHI),TRUE)
2279
2280define gb_LinkTarget__use_avahi
2281$(call gb_LinkTarget_set_include,$(1),\
2282 $$(INCLUDE) \
2283 $(AVAHI_CFLAGS) \
2284)
2285
2286$(call gb_LinkTarget_add_defs,$(1),\
2287 -DENABLE_AVAHI \
2288)
2289
2290$(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2291
2292endef
2293
2294else # ENABLE_AVAHI
2295
David Tardon9ce38ef2013-11-05 07:03:08 +01002296gb_LinkTarget__use_avahi :=
Siqid0419802013-07-24 11:16:31 +02002297
2298endif # ENABLE_AVAHI
2299
2300
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002301define gb_LinkTarget__use_gtk
2302$(call gb_LinkTarget_set_include,$(1),\
2303 $$(INCLUDE) \
2304 $(GTK_CFLAGS) \
2305)
2306
2307$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2308
David Tardonadb11052011-12-01 13:39:09 +01002309ifeq ($(ENABLE_GTK_PRINT),TRUE)
2310
2311$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2312
2313$(call gb_LinkTarget_set_include,$(1),\
2314 $$(INCLUDE) \
2315 $(GTK_PRINT_CFLAGS) \
2316)
2317
2318$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2319
2320endif
2321
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +02002322endef
Michael Stahl4a8919f2011-04-18 11:13:57 +00002323
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002324define gb_LinkTarget__use_gthread
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002325$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +02002326endef
2327
Caolán McNamara68ffb332012-09-14 11:31:50 +01002328ifeq ($(ENABLE_CUPS),TRUE)
2329
2330define gb_LinkTarget__use_cups
2331$(call gb_LinkTarget_add_defs,$(1),\
2332 -DENABLE_CUPS \
2333)
2334
2335$(call gb_LinkTarget_add_libs,$(1),\
2336 -lcups \
2337)
2338
2339endef
2340
2341else # ENABLE_CUPS
2342
2343define gb_LinkTarget__use_cups
2344
2345endef
2346
2347endif # ENABLE_DBUS
David Tardon1b717ce2011-11-02 13:00:48 +01002348
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002349ifeq ($(ENABLE_DBUS),TRUE)
David Tardon1b717ce2011-11-02 13:00:48 +01002350
2351define gb_LinkTarget__use_dbus
2352$(call gb_LinkTarget_set_include,$(1),\
2353 $$(INCLUDE) \
2354 $(DBUS_CFLAGS) \
2355)
2356
Matúš Kukan464b4332012-01-15 02:12:49 +01002357$(call gb_LinkTarget_add_defs,$(1),\
David Tardon1b717ce2011-11-02 13:00:48 +01002358 -DENABLE_DBUS \
2359)
2360
Norbert Thiebaud7c88b252013-08-30 23:05:04 -05002361ifeq ($(ENABLE_PACKAGEKIT),TRUE)
Rene Engelhardbea61492012-09-11 02:30:09 +02002362$(call gb_LinkTarget_add_defs,$(1),\
2363 -DENABLE_PACKAGEKIT \
2364)
2365endif # ENABLE_PACKAGEKIT
2366
David Tardon1b717ce2011-11-02 13:00:48 +01002367$(call gb_LinkTarget_add_libs,$(1),\
2368 $(DBUS_LIBS) \
2369)
2370
2371endef
2372
2373else # ENABLE_DBUS
2374
2375define gb_LinkTarget__use_dbus
2376
2377endef
2378
2379endif # ENABLE_DBUS
2380
2381
Bjoern Michaelsendd321062011-07-26 16:04:15 +02002382define gb_LinkTarget__use_dbusmenugtk
2383$(call gb_LinkTarget_set_include,$(1),\
2384 $$(INCLUDE) \
2385 $(DBUSMENUGTK_CFLAGS) \
2386)
2387
2388$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2389
2390endef
2391
Eike Rathkea3a8b802012-03-16 22:14:54 +01002392
2393ifeq ($(ENABLE_TELEPATHY),TRUE)
2394
2395define gb_LinkTarget__use_telepathy
2396$(call gb_LinkTarget_set_include,$(1),\
2397 $$(INCLUDE) \
2398 $(TELEPATHY_CFLAGS) \
2399)
2400
Eike Rathkea3a8b802012-03-16 22:14:54 +01002401$(call gb_LinkTarget_add_libs,$(1),\
2402 $(TELEPATHY_LIBS) \
2403)
2404
2405endef
2406
2407else # !ENABLE_TELEPATHY
2408
Matúš Kukanfe327622012-08-09 00:15:52 +02002409gb_LinkTarget__use_telepathy :=
Eike Rathkea3a8b802012-03-16 22:14:54 +01002410
2411endif # ENABLE_TELEPATHY
2412
Michael Stahle3abec32014-02-11 15:57:18 +01002413ifneq ($(SYSTEM_LIBPNG),)
David Tardon6df9c472011-09-15 14:44:34 +02002414
2415define gb_LinkTarget__use_png
2416$(call gb_LinkTarget_set_include,$(1),\
2417 $$(INCLUDE) \
2418 $(LIBPNG_CFLAGS) \
2419)
2420
2421$(call gb_LinkTarget_add_libs,$(1),\
2422 $(LIBPNG_LIBS) \
2423)
2424
2425endef
2426
2427else # !SYSTEM_LIBPNG
2428
David Tardon6df9c472011-09-15 14:44:34 +02002429define gb_LinkTarget__use_png
Michael Stahl416b3212013-05-08 17:22:22 +02002430$(call gb_LinkTarget_set_include,$(1),\
2431 $(LIBPNG_CFLAGS) \
2432 $$(INCLUDE) \
2433)
Matúš Kukanf96d58b2012-09-08 18:13:20 +02002434$(call gb_LinkTarget_use_static_libraries,$(1),\
David Tardon6df9c472011-09-15 14:44:34 +02002435 png \
2436)
Michael Stahl398ce442012-09-28 21:47:29 +02002437$(call gb_LinkTarget__use_zlib,$(1))
David Tardon6df9c472011-09-15 14:44:34 +02002438
2439endef
2440
2441endif # !SYSTEM_LIBPNG
2442
Michael Stahl50471a82011-12-06 19:17:52 +01002443
Michael Stahle3abec32014-02-11 15:57:18 +01002444ifneq ($(SYSTEM_CURL),)
Michael Stahl50471a82011-12-06 19:17:52 +01002445
2446define gb_LinkTarget__use_curl
Cédric Bosdonnat01f46d82014-07-15 10:31:14 +02002447$(call gb_LinkTarget_add_defs,$(1),\
2448 -DSYSTEM_CURL \
2449)
Michael Stahl50471a82011-12-06 19:17:52 +01002450$(call gb_LinkTarget_set_include,$(1),\
2451 $$(INCLUDE) \
2452 $(CURL_CFLAGS) \
2453)
2454$(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2455
2456endef
2457
2458else # !SYSTEM_CURL
2459
Michael Stahl32a617d2014-02-17 11:23:19 +01002460$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2461 curl \
2462))
2463
Michael Stahl50471a82011-12-06 19:17:52 +01002464define gb_LinkTarget__use_curl
Christian Lohmaier3dee92e2012-11-13 19:44:44 +01002465$(call gb_LinkTarget_use_package,$(1),curl)
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002466$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002467 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
Matúš Kukan9f3a3ab2012-10-29 22:57:34 +01002468 $$(INCLUDE) \
2469)
Michael Stahl936a1a92013-10-23 22:37:11 +02002470
2471ifeq ($(COM),MSC)
Michael Stahl714b93b2013-10-24 00:32:04 +02002472$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl88e65df2013-11-11 14:42:13 +01002473 $(call gb_UnpackedTarball_get_dir,curl)/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
Michael Stahl50471a82011-12-06 19:17:52 +01002474)
Michael Stahl936a1a92013-10-23 22:37:11 +02002475else
2476$(call gb_LinkTarget_add_libs,$(1),\
2477 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2478)
2479endif
Michael Stahl50471a82011-12-06 19:17:52 +01002480
2481endef
2482
2483endif # SYSTEM_CURL
2484
Stephan Bergmann49313b02012-11-27 15:35:02 +01002485ifeq ($(ENABLE_VALGRIND),TRUE)
David Tardon3446cda2011-12-23 12:21:19 +01002486
2487define gb_LinkTarget__use_valgrind
2488$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmann49313b02012-11-27 15:35:02 +01002489 -DHAVE_VALGRIND_HEADERS \
David Tardon3446cda2011-12-23 12:21:19 +01002490)
2491
2492$(call gb_LinkTarget_set_include,$(1),\
2493 $$(INCLUDE) \
2494 $(VALGRIND_CFLAGS) \
2495)
2496
2497endef
2498
Stephan Bergmann49313b02012-11-27 15:35:02 +01002499else # !ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002500
2501define gb_LinkTarget__use_valgrind
2502
2503endef
2504
Stephan Bergmann49313b02012-11-27 15:35:02 +01002505endif # ENABLE_VALGRIND
David Tardon3446cda2011-12-23 12:21:19 +01002506
Michael Stahl32db4992014-02-11 19:35:22 +01002507ifneq ($(SYSTEM_POPPLER),)
David Tardondba2d322012-02-18 18:54:35 +01002508
2509define gb_LinkTarget__use_poppler
David Tardondba2d322012-02-18 18:54:35 +01002510$(call gb_LinkTarget_set_include,$(1),\
2511 $(POPPLER_CFLAGS) \
2512 $$(INCLUDE) \
2513)
2514
2515$(call gb_LinkTarget_add_libs,$(1),\
2516 $(POPPLER_LIBS) \
2517)
2518
2519endef
2520
2521else # !SYSTEM_POPPLER
2522
David Tardondba2d322012-02-18 18:54:35 +01002523define gb_LinkTarget__use_poppler
Michael Stahl2f6261f2013-09-19 19:28:36 +02002524$(call gb_LinkTarget_use_external_project,$(1),poppler)
Peter Foleyfb1d11d2013-02-17 09:26:01 -05002525
David Tardon548b61a2012-02-21 06:58:02 +01002526$(call gb_LinkTarget_set_include,$(1),\
Fridrich Štrbaeb276d12013-07-08 14:01:17 +02002527 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2528 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2529 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
David Tardon548b61a2012-02-21 06:58:02 +01002530 $$(INCLUDE) \
David Tardondba2d322012-02-18 18:54:35 +01002531)
2532
Michael Stahl2f6261f2013-09-19 19:28:36 +02002533$(call gb_LinkTarget_add_libs,$(1),\
2534 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2535 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2536 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
David Tardon548b61a2012-02-21 06:58:02 +01002537)
2538
2539ifeq ($(OS),MACOSX)
Michael Stahl967986b2012-09-28 00:54:49 +02002540$(call gb_LinkTarget_add_libs,$(1),\
2541 -lobjc \
David Tardon548b61a2012-02-21 06:58:02 +01002542)
2543else ifeq ($(OS),WNT)
Michael Stahldc397aae2012-09-28 15:31:46 +02002544$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon548b61a2012-02-21 06:58:02 +01002545 advapi32 \
2546 gdi32 \
2547)
2548endif
2549
David Tardondba2d322012-02-18 18:54:35 +01002550endef
2551
2552endif # SYSTEM_POPPLER
2553
David Tardon3446cda2011-12-23 12:21:19 +01002554
Michael Stahl46648152014-02-11 16:33:18 +01002555ifneq ($(SYSTEM_CLUCENE),)
David Tardon22c60cb2012-04-07 15:50:47 +02002556
2557define gb_LinkTarget__use_clucene
2558$(call gb_LinkTarget_add_defs,$(1),\
2559 $(filter-out -I%,$(CLUCENE_CFLAGS)) \
2560)
2561
2562$(call gb_LinkTarget_set_include,$(1),\
2563 $(filter -I%,$(CLUCENE_CFLAGS)) \
2564 $$(INCLUDE) \
2565)
2566
2567$(call gb_LinkTarget_add_libs,$(1),\
2568 $(CLUCENE_LIBS) \
2569)
2570
2571endef
2572
2573else # !SYSTEM_CLUCENE
2574
2575define gb_LinkTarget__use_clucene
Michael Stahl28cde0c2013-05-07 23:47:27 +02002576$(call gb_LinkTarget_set_include,$(1),\
2577 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2578 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2579 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2580 $$(INCLUDE) \
2581)
2582
Michael Stahlc923f7d2012-04-07 23:22:08 +02002583$(call gb_LinkTarget_use_libraries,$(1),\
David Tardon22c60cb2012-04-07 15:50:47 +02002584 clucene \
2585)
2586
2587endef
2588
Marcos Paulo de Souzaf70343b2014-02-12 06:53:02 -02002589$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
David Tardon22c60cb2012-04-07 15:50:47 +02002590 clucene \
2591))
2592
2593endif # SYSTEM_CLUCENE
2594
Peter Foley64402842011-12-22 16:34:35 -05002595define gb_LinkTarget__use_gobject
Rene Engelhardac3c7ba2012-11-06 20:38:47 +01002596$(call gb_LinkTarget_add_libs,$(1),\
2597 $(GOBJECT_LIBS) \
2598)
2599
2600$(call gb_LinkTarget_set_include,$(1),\
2601 $$(INCLUDE) \
2602 $(GOBJECT_CFLAGS) \
2603)
Peter Foley64402842011-12-22 16:34:35 -05002604endef
2605
Michael Stahl5866b332014-02-11 18:56:33 +01002606ifneq ($(SYSTEM_HSQLDB),)
David Tardon579f52d2012-03-27 16:36:31 +02002607
2608define gb_LinkTarget__use_hsqldb
2609
2610$(call gb_LinkTarget_add_defs,$(1),\
2611 -DSYSTEM_HSQLDB \
2612 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2613)
2614
2615endef
2616
2617else # !SYSTEM_HSQLDB
2618
2619define gb_LinkTarget__use_hsqldb
2620
2621endef
2622
2623endif # SYSTEM_HSQLDB
2624
David Tardon8bc7afb2012-04-05 10:53:08 +02002625
Michael Stahl5378dea2014-02-11 19:11:47 +01002626ifneq ($(SYSTEM_OPENLDAP),)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002627
2628define gb_LinkTarget__use_openldap
2629
2630$(call gb_LinkTarget_add_libs,$(1),\
2631 -lldap \
2632 -llber \
2633)
2634
2635endef
2636
Michael Stahl2f6261f2013-09-19 19:28:36 +02002637gb_ExternalProject__use_openldap :=
2638
Michael Stahl5378dea2014-02-11 19:11:47 +01002639else # !SYSTEM_OPENLDAP
Michael Stahle0ee0d42012-07-16 19:00:07 +02002640
Michael Stahle0ee0d42012-07-16 19:00:07 +02002641define gb_LinkTarget__use_openldap
Matúš Kukan7a030392012-10-29 23:29:37 +01002642$(call gb_LinkTarget_use_unpacked,$(1),openldap)
Michael Stahle0ee0d42012-07-16 19:00:07 +02002643$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02002644 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002645 $$(INCLUDE) \
2646)
Michael Stahl2f6261f2013-09-19 19:28:36 +02002647$(call gb_LinkTarget_use_external_project,$(1),openldap)
2648$(call gb_LinkTarget_add_libs,$(1), \
2649 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2650 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
Michael Stahle0ee0d42012-07-16 19:00:07 +02002651)
2652
2653endef
2654
Michael Stahl2f6261f2013-09-19 19:28:36 +02002655define gb_ExternalProject__use_openldap
2656$(call gb_ExternalProject_use_external_project,$(1),openldap)
2657
2658endef
2659
Michael Stahle0ee0d42012-07-16 19:00:07 +02002660endif # SYSTEM_OPENLDAP
2661
2662
Javier Fernandezf53228c2013-05-10 18:21:30 +00002663ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2664
Michael Stahl23647592014-02-11 19:04:20 +01002665ifneq ($(SYSTEM_FIREBIRD),)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002666
Rene Engelhard0b68d702013-07-16 21:50:14 +02002667define gb_LinkTarget__use_libfbembed
Javier Fernandezf53228c2013-05-10 18:21:30 +00002668$(call gb_LinkTarget_set_include,$(1),\
2669 $(FIREBIRD_CFLAGS) \
2670 $$(INCLUDE) \
2671)
2672$(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2673
2674endef
2675
2676# gb_LinkTarget__use_atomic_ops :=
2677# gb_LinkTarget__use_tommath :=
2678
2679else # !SYSTEM_FIREBIRD
2680
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002681#$(call gb_LinkTarget__use_libatomic_ops,$(1))
2682
Andrzej J.R. Hunt0f16fa02013-06-14 14:55:22 +01002683define gb_LinkTarget__use_libfbembed
2684$(call gb_LinkTarget_use_package,$(1),firebird)
Javier Fernandezf53228c2013-05-10 18:21:30 +00002685$(call gb_LinkTarget_set_include,$(1),\
Javier Fernandezf53228c2013-05-10 18:21:30 +00002686 $$(INCLUDE) \
Andrzej J.R. Hunt7309fda2013-07-16 22:40:47 +02002687 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002688)
Michael Stahl37563db2013-10-22 22:22:49 +02002689ifeq ($(COM),MSC)
2690$(call gb_LinkTarget_add_libs,$(1),\
2691 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
Javier Fernandezf53228c2013-05-10 18:21:30 +00002692)
Michael Stahl37563db2013-10-22 22:22:49 +02002693else
2694$(call gb_LinkTarget_add_libs,$(1),\
2695 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2696)
2697endif
Javier Fernandezf53228c2013-05-10 18:21:30 +00002698
2699endef
2700
Javier Fernandezf53228c2013-05-10 18:21:30 +00002701# define gb_LinkTarget__use_tommath
2702# $(call gb_LinkTarget_set_include,$(1),\
2703# $(TOMMATH_CFLAGS) \
2704# $$(INCLUDE) \
2705# )
2706
2707# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2708
2709# endef
2710
2711endif # SYSTEM_FIREBIRD
2712
2713else # !ENABLE_FIREBIRD_SDBC
Michael Stahl6fa0b372014-02-12 17:01:35 +01002714
Javier Fernandezf53228c2013-05-10 18:21:30 +00002715gb_LinkTarget__use_firebird :=
2716# gb_LinkTarget__use_atomic_ops :=
2717# gb_LinkTarget__use_tommath :=
2718
2719endif # ENABLE_FIREBIRD_SDBC
2720
2721
Michael Stahl5866b332014-02-11 18:56:33 +01002722ifneq ($(SYSTEM_POSTGRESQL),)
David Tardon8bc7afb2012-04-05 10:53:08 +02002723
2724define gb_LinkTarget__use_postgresql
2725
David Tardon8bc7afb2012-04-05 10:53:08 +02002726$(call gb_LinkTarget_set_include,$(1),\
2727 $(POSTGRESQL_INC) \
2728 $$(INCLUDE) \
2729)
2730
2731$(call gb_LinkTarget_add_libs,$(1),\
2732 -lpq \
2733)
2734
2735$(call gb_LinkTarget_add_ldflags,$(1),\
2736 $(POSTGRESQL_LIB) \
2737)
2738
2739endef
2740
2741else # !SYSTEM_POSTGRESQL
2742
2743define gb_LinkTarget__use_postgresql
2744
Michael Stahl2f6261f2013-09-19 19:28:36 +02002745$(call gb_LinkTarget_use_external_project,$(1),postgresql)
David Tardoncb9823b2012-10-22 06:33:00 +02002746
David Tardon8bc7afb2012-04-05 10:53:08 +02002747$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlee8323e2013-05-08 00:19:40 +02002748 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2749 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
David Tardon8bc7afb2012-04-05 10:53:08 +02002750 $$(INCLUDE) \
2751)
2752
Michael Stahl2f6261f2013-09-19 19:28:36 +02002753$(call gb_LinkTarget_add_libs,$(1),\
2754 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
David Tardon8bc7afb2012-04-05 10:53:08 +02002755)
2756
Tor Lillqvistc2909892012-12-12 01:07:09 +02002757ifeq ($(OS)$(COM),WNTMSC)
Matúš Kukan5e32d152012-05-27 00:21:12 +02002758$(call gb_LinkTarget_use_external,$(1),openssl)
2759
Michael Stahldc397aae2012-09-28 15:31:46 +02002760$(call gb_LinkTarget_use_system_win32_libs,$(1),\
David Tardon8bc7afb2012-04-05 10:53:08 +02002761 secur32 \
2762 ws2_32 \
David Tardon8bc7afb2012-04-05 10:53:08 +02002763)
David Tardon8af6aa62012-05-30 12:06:42 +02002764
David Tardon8bc7afb2012-04-05 10:53:08 +02002765endif
2766
2767endef
2768
David Tardon8bc7afb2012-04-05 10:53:08 +02002769endif # SYSTEM_POSTGRESQL
2770
Michael Stahl589d6342014-03-18 17:56:10 +01002771ifneq ($(WITH_MOZAB4WIN),)
2772
2773$(eval $(call gb_Helper_register_packages_for_install,ooo,\
2774 moz_runtime \
2775))
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002776
David Tardonc678a4c2012-04-05 17:59:36 +02002777define gb_LinkTarget__use_mozilla
2778
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002779$(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2780$(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2781
David Tardonc678a4c2012-04-05 17:59:36 +02002782$(call gb_LinkTarget_add_defs,$(1),\
2783 -DMOZILLA_INTERNAL_API \
2784)
2785
2786$(call gb_LinkTarget_set_include,$(1),\
Michael Stahlbf80dfc2013-10-31 11:00:47 +01002787 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2788 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2789 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2790 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2791 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2792 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2793 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2794 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2795 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2796 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2797 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2798 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2799 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2800 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2801 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2802 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
David Tardonc678a4c2012-04-05 17:59:36 +02002803 $$(INCLUDE) \
David Tardonc678a4c2012-04-05 17:59:36 +02002804)
2805
Michael Stahld2f62c32013-10-23 00:14:01 +02002806$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01002807 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
Michael Stahl3dadfa52013-10-29 14:34:56 +01002808 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2809 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002810)
2811
David Tardonc678a4c2012-04-05 17:59:36 +02002812$(call gb_LinkTarget_add_defs,$(1),\
2813 -DMOZILLA_CLIENT \
2814 -DMOZ_REFLOW_PERF \
2815 -DMOZ_REFLOW_PERF_DSP \
2816 -DMOZ_XUL \
2817 -DOJI \
2818 -DWIN32 \
2819 -DXP_PC \
2820 -DXP_WIN \
2821 -DXP_WIN32 \
2822 -D_WINDOWS \
2823)
2824
2825ifeq ($(COM),GCC)
2826
2827$(call gb_LinkTarget_add_cxxflags,$(1),\
2828 -Wall \
2829 -Wcast-align \
2830 -Wconversion \
2831 -Wno-long-long \
2832 -Woverloaded-virtual \
2833 -Wpointer-arith \
2834 -Wsynth \
2835 -fno-rtti \
2836)
2837
2838else
2839
2840ifneq ($(DBG_LEVEL),0)
2841$(call gb_LinkTarget_add_defs,$(1),\
2842 -D_STL_NOFORCE_MANIFEST \
2843)
2844endif
2845
2846$(call gb_LinkTarget_add_libs,$(1),\
Christian Lohmaierc18dc122013-10-10 18:31:27 +02002847 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2848 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
David Tardonc678a4c2012-04-05 17:59:36 +02002849)
2850
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03002851endif # !GCC
David Tardonc678a4c2012-04-05 17:59:36 +02002852
David Tardonc678a4c2012-04-05 17:59:36 +02002853endef
2854
Michael Stahl589d6342014-03-18 17:56:10 +01002855endif # WITH_MOZAB4WIN
David Tardonc678a4c2012-04-05 17:59:36 +02002856
David Tardond4efa8b2012-04-28 20:48:14 +02002857ifeq ($(ENABLE_KDE),TRUE)
2858
2859define gb_LinkTarget__use_kde
2860$(call gb_LinkTarget_set_include,$(1),\
2861 $(filter -I%,$(KDE_CFLAGS)) \
2862 $$(INCLUDE) \
2863)
2864
2865$(call gb_LinkTarget_add_defs,$(1),\
2866 $(filter-out -I%,$(KDE_CFLAGS)) \
2867)
2868
2869$(call gb_LinkTarget_add_libs,$(1),\
2870 $(KDE_LIBS) \
2871)
2872
2873ifeq ($(COM),GCC)
2874$(call gb_LinkTarget_add_cxxflags,$(1),\
2875 -Wno-shadow \
2876)
2877endif
2878
2879endef
2880
2881else # !ENABLE_KDE
2882
2883define gb_LinkTarget__use_kde
2884
2885endef
2886
2887endif # ENABLE_KDE
2888
2889
2890ifeq ($(ENABLE_KDE4),TRUE)
2891
2892define gb_LinkTarget__use_kde4
2893$(call gb_LinkTarget_set_include,$(1),\
2894 $(filter -I%,$(KDE4_CFLAGS)) \
2895 $$(INCLUDE) \
2896)
2897
2898$(call gb_LinkTarget_add_defs,$(1),\
2899 $(filter-out -I%,$(KDE4_CFLAGS)) \
2900)
2901
2902$(call gb_LinkTarget_add_libs,$(1),\
2903 $(KDE4_LIBS) \
2904)
2905
2906ifeq ($(COM),GCC)
2907$(call gb_LinkTarget_add_cxxflags,$(1),\
2908 -Wno-shadow \
2909)
2910endif
2911
2912endef
2913
2914else # !ENABLE_KDE4
2915
2916define gb_LinkTarget__use_kde4
2917
2918endef
2919
2920endif # ENABLE_KDE4
2921
2922
Caolán McNamara9ec0a3e2012-08-30 13:44:53 +01002923ifeq ($(ENABLE_TDE),TRUE)
David Tardond4efa8b2012-04-28 20:48:14 +02002924
2925define gb_LinkTarget__use_tde
2926$(call gb_LinkTarget_add_libs,$(1),\
2927 $(TDE_LIBS) \
2928)
2929
2930$(call gb_LinkTarget_set_include,$(1),\
2931 $$(INCLUDE) \
2932 $(TDE_CFLAGS) \
2933)
2934endef
2935
2936else # ! ENABLE_TDE
2937
2938define gb_LinkTarget__use_tde
2939
2940endef
2941
2942endif # ENABLE_TDE
2943
2944
2945ifeq ($(ENABLE_GCONF),TRUE)
2946
2947define gb_LinkTarget__use_gconf
2948$(call gb_LinkTarget_set_include,$(1),\
2949 $(filter -I%,$(GCONF_CFLAGS)) \
2950 $$(INCLUDE) \
2951)
2952
2953$(call gb_LinkTarget_add_defs,$(1),\
2954 $(filter-out -I%,$(GCONF_CFLAGS)) \
2955)
2956
2957$(call gb_LinkTarget_add_libs,$(1),\
2958 $(GCONF_LIBS) \
2959)
2960
2961endef
2962
2963else # !ENABLE_GCONF
2964
2965define gb_LinkTarget__use_gconf
2966
2967endef
2968
2969endif # ENABLE_GCONF
2970
2971
David Ostrovskye16ac692012-05-27 22:50:41 +02002972# PYTHON
Michael Stahl91926332012-11-27 15:50:53 +01002973# extra python_headers external because pyuno wrapper must not link python
Michael Stahl0443d0a2014-02-11 16:57:35 +01002974ifneq ($(SYSTEM_PYTHON),)
David Ostrovskye16ac692012-05-27 22:50:41 +02002975
Michael Stahl91926332012-11-27 15:50:53 +01002976define gb_LinkTarget__use_python_headers
David Ostrovskye16ac692012-05-27 22:50:41 +02002977$(call gb_LinkTarget_add_defs,$(1),\
2978 $(filter-out -I%,$(PYTHON_CFLAGS)) \
2979)
2980
2981$(call gb_LinkTarget_set_include,$(1),\
2982 $(filter -I%,$(PYTHON_CFLAGS)) \
2983 $$(INCLUDE) \
2984)
2985
Michael Stahl91926332012-11-27 15:50:53 +01002986endef
2987
2988define gb_LinkTarget__use_python
2989$(call gb_LinkTarget__use_python_headers,$(1))
2990
David Ostrovskye16ac692012-05-27 22:50:41 +02002991$(call gb_LinkTarget_add_libs,$(1),\
2992 $(PYTHON_LIBS) \
2993)
2994
2995endef
2996
2997else # !SYSTEM_PYTHON
2998
Michael Stahl720ca8e2014-03-18 18:24:15 +01002999$(eval $(call gb_Helper_register_packages_for_install,python,\
3000 python3 \
3001))
3002
Michael Stahl75a2c502012-12-04 13:47:22 +01003003# depend on external project because on MACOSX the Package is disabled...
Michael Stahl91926332012-11-27 15:50:53 +01003004define gb_LinkTarget__use_python_headers
Michael Stahl75a2c502012-12-04 13:47:22 +01003005$(call gb_LinkTarget_use_external_project,$(1),python3)
Michael Stahl91926332012-11-27 15:50:53 +01003006$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl70fcfee2013-04-01 12:47:16 +02003007 -I$(call gb_UnpackedTarball_get_dir,python3) \
3008 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3009 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
Michael Stahl91926332012-11-27 15:50:53 +01003010 $$(INCLUDE) \
3011)
3012
3013endef
3014
David Ostrovskye16ac692012-05-27 22:50:41 +02003015define gb_LinkTarget__use_python
Michael Stahl91926332012-11-27 15:50:53 +01003016$(call gb_LinkTarget__use_python_headers,$(1))
David Ostrovskye16ac692012-05-27 22:50:41 +02003017
3018ifeq ($(OS),WNT)
3019$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl5b7ccf32013-06-04 17:16:47 +02003020 $(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 +02003021)
3022else ifeq ($(OS),MACOSX)
3023$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahl9d921ba2012-11-27 15:32:36 +01003024 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
David Ostrovskye16ac692012-05-27 22:50:41 +02003025)
3026else
Michael Stahlb6bcbb62013-04-21 14:34:50 +02003027$(call gb_LinkTarget_add_libs,$(1),\
3028 -L$(call gb_UnpackedTarball_get_dir,python3) \
3029 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
David Ostrovskye16ac692012-05-27 22:50:41 +02003030)
3031endif
3032
David Ostrovskye16ac692012-05-27 22:50:41 +02003033endef
3034
David Ostrovskye16ac692012-05-27 22:50:41 +02003035endif # SYSTEM_PYTHON
3036
Kohei Yoshida49b0b692012-09-04 15:05:35 -04003037# ORCUS
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003038ifeq ($(ENABLE_ORCUS),TRUE)
3039
Michael Stahle3abec32014-02-11 15:57:18 +01003040ifneq ($(SYSTEM_LIBORCUS),)
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003041
3042define gb_LinkTarget__use_orcus
3043$(call gb_LinkTarget_set_include,$(1),\
3044 $$(INCLUDE) \
Matúš Kukana2d63fe2012-09-09 16:29:10 +02003045 $(ORCUS_CFLAGS) \
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003046)
Rene Engelhard26b80fc2013-04-13 19:29:33 +02003047$(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
Rene Engelhardfb360f52013-04-13 16:17:29 +02003048endef
3049
3050define gb_LinkTarget__use_orcus-parser
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003051
3052endef
3053
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003054else # !SYSTEM_LIBORCUS
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003055
Kohei Yoshidac8b7e982012-08-31 10:11:32 -04003056define gb_LinkTarget__use_orcus
Michael Stahl2f6261f2013-09-19 19:28:36 +02003057$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Matúš Kukan1ee76032012-09-09 15:29:43 +02003058$(call gb_LinkTarget_set_include,$(1),\
Michael Stahl10fc13c2013-05-06 23:35:13 +02003059 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
Matúš Kukan1ee76032012-09-09 15:29:43 +02003060 $$(INCLUDE) \
3061)
Michael Stahl2f6261f2013-09-19 19:28:36 +02003062$(call gb_LinkTarget_add_libs,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +01003063 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
Michael Stahl2f6261f2013-09-19 19:28:36 +02003064)
David Tardonf1035c12012-11-23 06:49:21 +01003065
Michael Stahladddbbc2014-02-11 18:40:09 +01003066$(if $(SYSTEM_BOOST), \
Stephan Bergmann3743cdb2013-02-17 22:58:21 +01003067 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3068 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3069)
David Tardonf1035c12012-11-23 06:49:21 +01003070
Kohei Yoshidaa6639312012-07-27 22:14:39 -04003071endef
3072
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003073define gb_LinkTarget__use_orcus-parser
Michael Stahl2f6261f2013-09-19 19:28:36 +02003074$(call gb_LinkTarget_use_external_project,$(1),liborcus)
Kohei Yoshidaecc884e2013-12-17 21:18:46 -05003075$(call gb_LinkTarget_set_include,$(1),\
3076 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3077 $$(INCLUDE) \
3078)
Michael Stahl2f6261f2013-09-19 19:28:36 +02003079$(call gb_LinkTarget_add_libs,$(1),\
Markus Mohrhard36788e92014-01-08 13:17:28 +01003080 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
Kohei Yoshida4d9c2fb2013-04-11 23:11:21 -04003081)
3082
3083endef
3084
Kohei Yoshida31f589b2012-08-30 23:26:59 -04003085endif # SYSTEM_LIBORCUS
David Ostrovskye16ac692012-05-27 22:50:41 +02003086
Kohei Yoshida02346aa2013-09-18 19:06:20 -04003087else # ENABLE_ORCUS != TRUE
3088
3089gb_LinkTarget__use_orcus :=
3090gb_LinkTarget__use_orcus-parser :=
3091
3092endif
Michael Stahl78b59b82012-09-27 21:45:47 +02003093
David Tardon49a4d362013-11-12 16:44:40 +01003094ifeq ($(ENABLE_EOT),TRUE)
3095
Michael Stahle3abec32014-02-11 15:57:18 +01003096ifneq ($(SYSTEM_LIBEOT),)
David Tardon49a4d362013-11-12 16:44:40 +01003097
3098define gb_LinkTarget__use_libeot
3099$(call gb_LinkTarget_set_include,$(1),\
3100 $$(INCLUDE) \
3101 $(LIBEOT_CFLAGS) \
3102)
3103$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3104
3105endef
3106
3107gb_ExternalProject__use_libeot :=
3108
3109else # !SYSTEM_LIBEOT
3110
3111define gb_LinkTarget__use_libeot
3112$(call gb_LinkTarget_set_include,$(1),\
3113 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3114 $$(INCLUDE) \
3115)
3116$(call gb_LinkTarget_add_libs,$(1),\
3117 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3118)
3119$(call gb_LinkTarget_use_external_project,$(1),libeot)
3120
3121endef
3122
3123define gb_ExternalProject__use_libeot
3124$(call gb_ExternalProject_use_external_project,$(1),libeot)
3125
3126endef
3127
3128endif # SYSTEM_LIBEOT
3129
3130else # !ENABLE_EOT
3131
3132gb_LinkTarget__use_libeot :=
3133gb_ExternalProject__use_libeot :=
3134
3135endif # ENABLE_EOT
3136
Michael Stahl78b59b82012-09-27 21:45:47 +02003137### X11 stuff ###
3138
3139ifeq ($(GUIBASE),unx)
3140
Michael Stahl78b59b82012-09-27 21:45:47 +02003141ifeq ($(XRANDR_DLOPEN),FALSE)
3142
3143define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003144$(call gb_LinkTarget_set_include,$(1),\
3145 $$(INCLUDE) \
3146 $(XRANDR_CFLAGS) \
3147)
3148
3149$(call gb_LinkTarget_add_libs,$(1),\
3150 $(XRANDR_LIBS) \
3151)
3152endef
3153
3154else # XRANDR_DLOPEN
3155
3156define gb_LinkTarget__use_Xrandr
Michael Stahl78b59b82012-09-27 21:45:47 +02003157$(call gb_LinkTarget_add_defs,$(1),\
3158 -DXRANDR_DLOPEN \
3159)
3160endef
3161
3162endif # XRANDR_DLOPEN
3163
3164define gb_LinkTarget__use_Xrender
Michael Stahl78b59b82012-09-27 21:45:47 +02003165$(call gb_LinkTarget_set_include,$(1),\
3166 $$(INCLUDE) \
3167 $(XRENDER_CFLAGS) \
3168)
3169
3170$(call gb_LinkTarget_add_libs,$(1),\
3171 $(XRENDER_LIBS) \
3172)
3173endef
3174
3175endif # GUIBASE=unx
3176
Tor Lillqvist35491072011-08-02 21:22:35 +03003177
Michael Meeksb440cfc2013-02-28 12:05:07 +00003178gb_ExternalProject__use_nss3:=
3179
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003180ifeq (,$(filter DESKTOP,$(BUILD_TYPE)))
3181
Peter Foleyc003d252013-01-01 09:39:36 -05003182gb_LinkTarget__use_nss3:=
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003183
3184else
3185
Michael Stahle3abec32014-02-11 15:57:18 +01003186ifneq ($(SYSTEM_NSS),)
David Tardonb6aa4842011-08-11 13:10:14 +02003187
David Tardon2b9dbc82012-08-13 06:57:51 +02003188define gb_LinkTarget__use_nss3
3189$(call gb_LinkTarget_add_defs,$(1),\
Stephan Bergmannea641222012-11-19 16:40:33 +01003190 -DSYSTEM_NSS \
David Tardon2b9dbc82012-08-13 06:57:51 +02003191)
3192
David Tardonb6aa4842011-08-11 13:10:14 +02003193$(call gb_LinkTarget_set_include,$(1),\
3194 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003195 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003196)
3197
3198$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +01003199 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +02003200)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003201
David Tardonb6aa4842011-08-11 13:10:14 +02003202endef
3203
David Tardon2b9dbc82012-08-13 06:57:51 +02003204define gb_LinkTarget__use_plc4
3205$(call gb_LinkTarget__use_nss3,$(1))
3206
3207endef
3208
David Tardon6ef46562013-02-04 10:04:07 +01003209define gb_LinkTarget__use_ssl3
3210$(call gb_LinkTarget__use_nss3,$(1))
3211
3212endef
3213
Michael Stahle3abec32014-02-11 15:57:18 +01003214else # !SYSTEM_NSS
David Tardonb6aa4842011-08-11 13:10:14 +02003215
Michael Stahlffae67c2014-03-13 19:51:19 +01003216$(eval $(call gb_Helper_register_packages_for_install,ooo, \
3217 nss \
3218))
3219
David Tardon2b9dbc82012-08-13 06:57:51 +02003220define gb_LinkTarget__use_nss3
Peter Foleyc003d252013-01-01 09:39:36 -05003221$(call gb_LinkTarget_use_package,$(1),nss)
David Tardon2b9dbc82012-08-13 06:57:51 +02003222$(call gb_LinkTarget_set_include,$(1),\
3223 $$(INCLUDE) \
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003224 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3225 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
David Tardon2b9dbc82012-08-13 06:57:51 +02003226)
3227
Michael Stahld2f62c32013-10-23 00:14:01 +02003228ifeq ($(COM),MSC)
3229$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003230 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3231 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3232 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
David Tardon2b9dbc82012-08-13 06:57:51 +02003233)
Michael Stahld2f62c32013-10-23 00:14:01 +02003234else
3235$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003236 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
Michael Stahld2f62c32013-10-23 00:14:01 +02003237 -lnspr4 \
3238 -lnss3 \
3239 -lsmime3 \
3240)
3241endif
David Tardon2b9dbc82012-08-13 06:57:51 +02003242
3243endef
3244
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003245define gb_LinkTarget__use_plc4
Peter Foleyc003d252013-01-01 09:39:36 -05003246$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003247ifeq ($(COM),MSC)
3248$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003249 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
David Tardonb6aa4842011-08-11 13:10:14 +02003250)
Michael Stahld2f62c32013-10-23 00:14:01 +02003251else
3252$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003253 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003254)
3255endif
Caolán McNamara24ae3ab2011-08-11 12:47:00 +01003256
David Tardonb6aa4842011-08-11 13:10:14 +02003257endef
3258
David Tardon6ef46562013-02-04 10:04:07 +01003259define gb_LinkTarget__use_ssl3
3260$(call gb_LinkTarget_use_package,$(1),nss)
Michael Stahld2f62c32013-10-23 00:14:01 +02003261ifeq ($(COM),MSC)
3262$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003263 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
David Tardon6ef46562013-02-04 10:04:07 +01003264)
Michael Stahld2f62c32013-10-23 00:14:01 +02003265else
3266$(call gb_LinkTarget_add_libs,$(1),\
Michael Stahlcca8c8c2013-11-13 17:08:03 +01003267 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
Michael Stahld2f62c32013-10-23 00:14:01 +02003268)
3269endif
David Tardon6ef46562013-02-04 10:04:07 +01003270
3271endef
3272
Michael Meeksb440cfc2013-02-28 12:05:07 +00003273define gb_ExternalProject__use_nss3
3274$(call gb_ExternalProject_use_package,$(1),nss)
Michael Meeksb440cfc2013-02-28 12:05:07 +00003275
3276endef
3277
Michael Stahle3abec32014-02-11 15:57:18 +01003278endif # SYSTEM_NSS
3279
Tor Lillqvist9dc7f052012-08-13 09:19:35 +03003280endif # DESKTOP
David Tardonb6aa4842011-08-11 13:10:14 +02003281
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003282ifeq ($(ENABLE_GLTF),TRUE)
3283
Rene Engelhard2378f452014-08-05 20:05:35 +02003284ifneq ($(SYSTEM_LIBGLTF),TRUE)
3285
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003286define gb_LinkTarget__use_libgltf
3287$(call gb_LinkTarget_set_include,$(1),\
3288 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3289 $$(INCLUDE) \
3290)
3291
Zolnai Tamásb8ee4012014-06-25 15:19:41 +02003292ifeq ($(COM),MSC)
3293$(call gb_LinkTarget_add_libs,$(1),\
3294 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003295)
Zolnai Tamásb8ee4012014-06-25 15:19:41 +02003296else
3297$(call gb_LinkTarget_add_libs,$(1),\
3298 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3299)
3300endif
3301
3302$(call gb_LinkTarget_use_external_project,$(1),libgltf)
3303
3304endef
3305
Rene Engelhard2378f452014-08-05 20:05:35 +02003306else # SYSTEM_LIBGLTF
3307
3308define gb_LinkTarget__use_libgltf
3309$(call gb_LinkTarget_set_include,$(1),\
3310 $$(INCLUDE) \
3311 $(LIBGLTF_CFLAGS) \
3312)
3313$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
Rene Engelhard2378f452014-08-05 20:05:35 +02003314
3315endef
3316
3317endif # SYSTEN_LIBGLTF
3318
Zolnai Tamás6d239ee2014-08-29 14:14:31 +02003319ifeq ($(ENABLE_COLLADA),TRUE)
3320
Zolnai Tamásaa5fe792014-04-10 13:33:58 +02003321define gb_LinkTarget__use_opencollada_parser
3322$(call gb_LinkTarget_set_include,$(1),\
3323 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3324 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3325 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3326 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3327 $$(INCLUDE) \
3328)
3329
3330$(call gb_LinkTarget_use_static_libraries,$(1),\
3331 opencollada_parser \
3332)
3333endef
3334
Zolnai Tamásd57591702014-04-10 13:37:38 +02003335define gb_LinkTarget__use_collada2gltf
3336$(call gb_LinkTarget_set_include,$(1),\
3337 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3338 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3339 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3340 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3341 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3342 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3343 $$(INCLUDE) \
3344)
3345
3346$(call gb_LinkTarget_use_static_libraries,$(1),\
3347 collada2gltf \
3348)
3349endef
3350
Zolnai Tamás6d239ee2014-08-29 14:14:31 +02003351endif # ENABLE_COLLADA
3352
3353endif # ENABLE_GLTF
Zolnai Tamás62fd6302014-04-18 12:55:56 +02003354
Michael Stahl2ee5f242011-09-15 14:01:27 +02003355### Jars ############################################################
3356
Michael Stahl5866b332014-02-11 18:56:33 +01003357ifneq ($(SYSTEM_HSQLDB),)
Michael Stahl666173b2012-08-15 20:24:59 +02003358
3359define gb_Jar__use_hsqldb
3360$(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3361endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003362define gb_JunitTest__use_hsqldb
3363$(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3364endef
Michael Stahl666173b2012-08-15 20:24:59 +02003365
3366else # !SYSTEM_HSQLDB
3367
David Tardon2dec0672014-05-19 10:20:37 +02003368ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl376d1b52014-03-18 20:25:04 +01003369$(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003370 hsqldb \
3371))
David Tardon2dec0672014-05-19 10:20:37 +02003372endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003373
Michael Stahl666173b2012-08-15 20:24:59 +02003374define gb_Jar__use_hsqldb
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003375$(call gb_Jar_use_jar,$(1),hsqldb)
Michael Stahl666173b2012-08-15 20:24:59 +02003376endef
Michael Stahlb254f4f2012-08-17 11:47:29 +02003377define gb_JunitTest__use_hsqldb
3378$(call gb_JunitTest_use_jar,$(1),hsqldb)
3379endef
Michael Stahl666173b2012-08-15 20:24:59 +02003380
3381endif # SYSTEM_HSQLDB
3382
Michael Stahl2ee5f242011-09-15 14:01:27 +02003383
Rene Engelhardb1dfdf62014-05-23 07:43:19 +02003384ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3385
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003386ifneq ($(SYSTEM_BSH),)
David Tardon3bcf9102011-10-04 09:44:48 +02003387
Michael Stahla4551262012-08-15 17:41:25 +02003388define gb_Jar__use_bsh
3389$(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
David Tardon3bcf9102011-10-04 09:44:48 +02003390endef
3391
3392else # !SYSTEM_BSH
3393
David Tardon2dec0672014-05-19 10:20:37 +02003394ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl8475eb92014-03-18 20:38:30 +01003395$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003396 bsh \
3397))
David Tardon2dec0672014-05-19 10:20:37 +02003398endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003399
Michael Stahla4551262012-08-15 17:41:25 +02003400define gb_Jar__use_bsh
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003401$(call gb_Jar_use_jar,$(1),bsh)
David Tardon3bcf9102011-10-04 09:44:48 +02003402endef
3403
3404endif # SYSTEM_BSH
3405
Rene Engelhardb1dfdf62014-05-23 07:43:19 +02003406endif
3407
3408ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
Michael Stahl2ee5f242011-09-15 14:01:27 +02003409
Michael Stahl49dde4c2014-02-11 19:42:28 +01003410ifneq ($(SYSTEM_RHINO),)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003411
Michael Stahla4551262012-08-15 17:41:25 +02003412define gb_Jar__use_rhino
3413$(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003414endef
3415
3416else # !SYSTEM_RHINO
3417
David Tardon2dec0672014-05-19 10:20:37 +02003418ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl6474d1c2014-03-18 20:50:02 +01003419$(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003420 js \
3421))
David Tardon2dec0672014-05-19 10:20:37 +02003422endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003423
Michael Stahla4551262012-08-15 17:41:25 +02003424define gb_Jar__use_rhino
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003425$(call gb_Jar_use_jar,$(1),js)
Tomas Chvatal32af02b2012-05-06 12:49:33 +02003426endef
3427
3428endif # SYSTEM_RHINO
3429
Rene Engelhardb1dfdf62014-05-23 07:43:19 +02003430endif
3431
Michael Stahl7d2f7c62014-02-11 19:39:18 +01003432ifneq ($(SYSTEM_APACHE_COMMONS),)
David Tardon9b530e12012-04-07 10:07:35 +02003433
Michael Stahla4551262012-08-15 17:41:25 +02003434define gb_Jar__use_commons-codec
3435$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003436endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003437gb_ExternalProject__use_commons-codec :=
David Tardon9b530e12012-04-07 10:07:35 +02003438
Michael Stahla4551262012-08-15 17:41:25 +02003439define gb_Jar__use_commons-httpclient
3440$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003441endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003442gb_ExternalProject__use_commons-httpclient :=
David Tardon9b530e12012-04-07 10:07:35 +02003443
Michael Stahla4551262012-08-15 17:41:25 +02003444define gb_Jar__use_commons-lang
3445$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003446endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003447gb_ExternalProject__use_commons-lang :=
David Tardon9b530e12012-04-07 10:07:35 +02003448
Michael Stahla4551262012-08-15 17:41:25 +02003449define gb_Jar__use_commons-logging
3450$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003451endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003452gb_ExternalProject__use_commons-logging :=
David Tardon9b530e12012-04-07 10:07:35 +02003453
3454else # !SYSTEM_APACHE_COMMONS
3455
David Tardon2dec0672014-05-19 10:20:37 +02003456ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl2bec9f42014-03-18 21:54:33 +01003457$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Caolán McNamara2b15c852014-03-25 09:31:52 +00003458 commons-logging-1.1.3 \
Michael Stahldb23d4b2013-10-24 23:10:27 +02003459))
David Tardon2dec0672014-05-19 10:20:37 +02003460endif
Michael Stahl87a723d2012-08-17 12:43:37 +02003461$(eval $(call gb_Helper_register_jars,OXT,\
Douglas Mencken7e470872014-05-20 12:55:56 -04003462 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003463 commons-httpclient-3.1 \
Douglas Mencken7e470872014-05-20 12:55:56 -04003464 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003465))
3466
Michael Stahla4551262012-08-15 17:41:25 +02003467define gb_Jar__use_commons-codec
Michael Stahl461d8302013-10-25 18:40:48 +02003468$(call gb_Jar_use_external_project,$(1),apache_commons_codec)
Douglas Mencken7e470872014-05-20 12:55:56 -04003469$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3470$(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3471$(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3472)
David Tardon9b530e12012-04-07 10:07:35 +02003473endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003474define gb_ExternalProject__use_commons-codec
3475$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3476endef
David Tardon9b530e12012-04-07 10:07:35 +02003477
Michael Stahla4551262012-08-15 17:41:25 +02003478define gb_Jar__use_commons-httpclient
Michael Stahl461d8302013-10-25 18:40:48 +02003479$(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3480$(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 +02003481endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003482define gb_ExternalProject__use_commons-httpclient
3483$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3484endef
David Tardon9b530e12012-04-07 10:07:35 +02003485
Michael Stahla4551262012-08-15 17:41:25 +02003486define gb_Jar__use_commons-lang
Michael Stahl461d8302013-10-25 18:40:48 +02003487$(call gb_Jar_use_external_project,$(1),apache_commons_lang)
Douglas Mencken7e470872014-05-20 12:55:56 -04003488$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3489$(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3490$(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3491)
David Tardon9b530e12012-04-07 10:07:35 +02003492endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003493define gb_ExternalProject__use_commons-lang
3494$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3495endef
David Tardon9b530e12012-04-07 10:07:35 +02003496
Michael Stahla4551262012-08-15 17:41:25 +02003497define gb_Jar__use_commons-logging
Michael Stahl461d8302013-10-25 18:40:48 +02003498$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
Caolán McNamara2b15c852014-03-25 09:31:52 +00003499$(call gb_Jar_use_jar,$(1),commons-logging-1.1.3)
David Tardon9b530e12012-04-07 10:07:35 +02003500endef
Michael Stahl2b7536a2012-10-05 21:17:25 +02003501define gb_ExternalProject__use_commons-logging
Michael Stahla60427e2013-10-26 20:17:52 +02003502$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
Michael Stahl2b7536a2012-10-05 21:17:25 +02003503endef
David Tardon9b530e12012-04-07 10:07:35 +02003504
3505endif # SYSTEM_APACHE_COMMONS
3506
3507
Michael Stahl32db4992014-02-11 19:35:22 +01003508ifneq ($(SYSTEM_JFREEREPORT),)
David Tardon9b530e12012-04-07 10:07:35 +02003509
Michael Stahla4551262012-08-15 17:41:25 +02003510define gb_Jar__use_flow-engine
3511$(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003512endef
3513
Michael Stahla4551262012-08-15 17:41:25 +02003514define gb_Jar__use_flute
3515$(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003516endef
3517
Michael Stahla4551262012-08-15 17:41:25 +02003518define gb_Jar__use_libbase
3519$(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003520endef
3521
Michael Stahla4551262012-08-15 17:41:25 +02003522define gb_Jar__use_libfonts
3523$(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003524endef
3525
Michael Stahla4551262012-08-15 17:41:25 +02003526define gb_Jar__use_libformula
3527$(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003528endef
3529
Michael Stahla4551262012-08-15 17:41:25 +02003530define gb_Jar__use_liblayout
3531$(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003532endef
3533
Michael Stahla4551262012-08-15 17:41:25 +02003534define gb_Jar__use_libloader
3535$(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003536endef
3537
Michael Stahla4551262012-08-15 17:41:25 +02003538define gb_Jar__use_librepository
3539$(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003540endef
3541
Michael Stahla4551262012-08-15 17:41:25 +02003542define gb_Jar__use_libserializer
3543$(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003544endef
3545
Michael Stahla4551262012-08-15 17:41:25 +02003546define gb_Jar__use_libxml
3547$(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003548endef
3549
Michael Stahla4551262012-08-15 17:41:25 +02003550define gb_Jar__use_sac
3551$(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
David Tardon9b530e12012-04-07 10:07:35 +02003552endef
3553
3554else # !SYSTEM_JFREEREPORT
3555
David Tardon2dec0672014-05-19 10:20:37 +02003556ifeq ($(ENABLE_JAVA),TRUE)
Michael Stahl4c3626af2014-03-18 22:03:00 +01003557$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
Michael Stahl070ca1e2013-10-25 21:01:58 +02003558 flow-engine \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003559 flute-1.1.6 \
3560 libbase-1.1.6 \
3561 libfonts-1.1.6 \
3562 libformula-1.1.7 \
Michael Stahl070ca1e2013-10-25 21:01:58 +02003563 liblayout \
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003564 libloader-1.1.6 \
3565 librepository-1.1.6 \
3566 libserializer-1.1.6 \
3567 libxml-1.1.7 \
3568 sac \
3569))
David Tardon2dec0672014-05-19 10:20:37 +02003570endif
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003571
Michael Stahla4551262012-08-15 17:41:25 +02003572define gb_Jar__use_flow-engine
Michael Stahl070ca1e2013-10-25 21:01:58 +02003573$(call gb_Jar_use_jar,$(1),flow-engine)
David Tardon9b530e12012-04-07 10:07:35 +02003574endef
3575
Michael Stahla4551262012-08-15 17:41:25 +02003576define gb_Jar__use_flute
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003577$(call gb_Jar_use_jar,$(1),flute-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003578endef
3579
Michael Stahla4551262012-08-15 17:41:25 +02003580define gb_Jar__use_libbase
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003581$(call gb_Jar_use_jar,$(1),libbase-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003582endef
3583
Michael Stahla4551262012-08-15 17:41:25 +02003584define gb_Jar__use_libfonts
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003585$(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003586endef
3587
Michael Stahla4551262012-08-15 17:41:25 +02003588define gb_Jar__use_libformula
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003589$(call gb_Jar_use_jar,$(1),libformula-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003590endef
3591
Michael Stahla4551262012-08-15 17:41:25 +02003592define gb_Jar__use_liblayout
Michael Stahl070ca1e2013-10-25 21:01:58 +02003593$(call gb_Jar_use_jar,$(1),liblayout)
David Tardon9b530e12012-04-07 10:07:35 +02003594endef
3595
Michael Stahla4551262012-08-15 17:41:25 +02003596define gb_Jar__use_libloader
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003597$(call gb_Jar_use_jar,$(1),libloader-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003598endef
3599
Michael Stahla4551262012-08-15 17:41:25 +02003600define gb_Jar__use_librepository
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003601$(call gb_Jar_use_jar,$(1),librepository-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003602endef
3603
Michael Stahla4551262012-08-15 17:41:25 +02003604define gb_Jar__use_libserializer
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003605$(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
David Tardon9b530e12012-04-07 10:07:35 +02003606endef
3607
Michael Stahla4551262012-08-15 17:41:25 +02003608define gb_Jar__use_libxml
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003609$(call gb_Jar_use_jar,$(1),libxml-1.1.7)
David Tardon9b530e12012-04-07 10:07:35 +02003610endef
3611
Michael Stahla4551262012-08-15 17:41:25 +02003612define gb_Jar__use_sac
Michael Stahl5a4bcd32012-08-17 11:02:49 +02003613$(call gb_Jar_use_jar,$(1),sac)
David Tardon9b530e12012-04-07 10:07:35 +02003614endef
3615
3616endif # SYSTEM_JFREEREPORT
3617
David Tardonc2eca352012-12-02 10:51:37 +01003618
3619# Executables
3620
David Tardonedf67302012-12-30 12:27:04 +01003621# FIXME: the library target should be for build too
3622define gb_Executable__register_bestreversemap
3623$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3624 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3625)
3626endef
3627
David Tardonceb0d062012-12-30 13:11:43 +01003628# TODO depending on the whole URE might be overkill, but I do not have a
3629# Windows machine to debug it...
3630# FIXME: the library target should be for build too
3631define gb_Executable__register_climaker
3632$(call gb_Executable_add_runtime_dependencies,climaker,\
3633 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003634 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003635 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003636 $(call gb_UnoApi_get_target,udkapi) \
David Tardonceb0d062012-12-30 13:11:43 +01003637)
3638endef
3639
David Tardon6c1614a2014-01-08 13:49:46 +01003640define gb_Executable__register_cppumaker
3641$(call gb_Executable_add_runtime_dependencies,cppumaker,\
3642 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3643)
3644endef
3645
Matúš Kukane1b51e72013-09-27 09:41:09 +02003646gb_Gallery__UNO_COMPONENTS := \
3647 comphelper/util/comphelp \
3648 configmgr/source/configmgr \
3649 drawinglayer/drawinglayer \
Matúš Kukane1b51e72013-09-27 09:41:09 +02003650 framework/util/fwk \
3651 i18npool/util/i18npool \
3652 package/source/xstor/xstor \
3653 package/util/package2 \
3654 sax/source/expatwrap/expwrap \
3655 sfx2/util/sfx \
3656 svgio/svgio \
3657 svx/util/svx \
3658 svx/util/svxcore \
3659 ucb/source/core/ucb1 \
3660 ucb/source/ucp/file/ucpfile1 \
3661 unoxml/source/service/unoxml
3662
Matúš Kukanbae52ee2013-05-16 09:17:57 +02003663# This is used to determine what we need for 'build' platform.
Matúš Kukan9555b5b2013-06-14 12:48:20 +02003664define gb_Executable__register_gengal
Matúš Kukan94b68822013-06-17 10:41:18 +02003665$(call gb_Executable_add_runtime_dependencies,gengal,\
Matúš Kukane1b51e72013-09-27 09:41:09 +02003666 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
Matúš Kukan85c6f802013-05-23 23:01:05 +02003667 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
David Tardon1546c292013-05-07 20:41:41 +02003668 $(call gb_AllLangResTarget_get_target,ofa) \
David Tardon1546c292013-05-07 20:41:41 +02003669 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Riccardo Magliocchettib75fae72013-06-06 18:52:57 +02003670 $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
Caolan McNamara48e70ad2013-05-15 10:30:18 +01003671 $(call gb_Library_get_target,vclplug_svp) \
Riccardo Magliocchettib75fae72013-06-06 18:52:57 +02003672 )) \
Matúš Kukan8b162f22013-09-27 10:58:28 +02003673 $(call gb_Package_get_target_for_build,postprocess_registry) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003674 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003675 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
David Tardon1546c292013-05-07 20:41:41 +02003676 $(call gb_UnoApi_get_target,offapi) \
3677 $(call gb_UnoApi_get_target,udkapi) \
3678)
3679endef
3680
Michael Stahl187194b2014-02-11 19:17:42 +01003681ifeq ($(SYSTEM_ICU),)
David Tardonedf67302012-12-30 12:27:04 +01003682
3683define gb_Executable__register_gendict
3684$(call gb_Executable_add_runtime_dependencies,gendict,\
3685 $(call gb_Package_get_target_for_build,icu) \
3686)
3687endef
3688
3689endif
3690
David Tardonceb0d062012-12-30 13:11:43 +01003691define gb_Executable__register_idlc
3692$(call gb_Executable_add_runtime_dependencies,idlc,\
David Tardonce038cf2013-10-20 20:43:46 +02003693 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
David Tardonceb0d062012-12-30 13:11:43 +01003694)
3695endef
3696
David Tardonedf67302012-12-30 12:27:04 +01003697define gb_Executable__register_localize
3698$(call gb_Executable_add_runtime_dependencies,localize,\
3699 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3700 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3701 ) \
3702)
3703endef
3704
Michael Stahl4c51feb2013-09-21 01:39:41 +02003705# FIXME ure/services.rdb needs cleanup
Stephan Bergmannab149c72013-04-24 10:42:40 +02003706# The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
David Tardonedf67302012-12-30 12:27:04 +01003707# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3708# FIXME: the library target should be for build too
3709define gb_Executable__register_saxparser
3710$(call gb_Executable_add_runtime_dependencies,saxparser,\
3711 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003712 $(call gb_Rdb_get_target_for_build,saxparser) \
3713 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003714 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003715 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003716)
3717endef
3718
Stephan Bergmannab149c72013-04-24 10:42:40 +02003719# NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
David Tardonedf67302012-12-30 12:27:04 +01003720# required due to the settings for URE_SERVICES and URE_TYPES in
3721# cppuhelper/source/unorc
3722# FIXME: the library target should be for build too
3723define gb_Executable__register_uno
3724$(call gb_Executable_add_runtime_dependencies,uno,\
3725 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
Matúš Kukanb469cd22013-05-24 12:24:27 +02003726 $(call gb_Rdb_get_target_for_build,ure/services) \
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003727 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
Tor Lillqviste4c6fe52013-04-24 15:11:39 +03003728 $(call gb_UnoApi_get_target,udkapi) \
David Tardonedf67302012-12-30 12:27:04 +01003729)
3730endef
3731
3732
3733# External executables
3734
Michael Stahl379f9782014-02-11 16:49:19 +01003735ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003736
3737gb_ExternalExecutable__register_xmllint :=
3738
3739else # ! SYSTEM_LIBXML_FOR_BUILD
3740
3741define gb_ExternalExecutable__register_xmllint
David Tardondbac8f52014-04-18 18:34:40 +02003742$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),xml2)
Michael Stahle6c47b02013-10-22 18:47:56 +02003743$(call gb_ExternalExecutable_add_dependencies,xmllint,$(call gb_Package_get_target,xml2))
David Tardonc2eca352012-12-02 10:51:37 +01003744
3745endef
3746
3747endif # SYSTEM_LIBXML_FOR_BUILD
3748
Michael Stahle3abec32014-02-11 15:57:18 +01003749ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
David Tardonc2eca352012-12-02 10:51:37 +01003750
3751gb_ExternalExecutable__register_xsltproc :=
3752
3753else # ! SYSTEM_LIBXSLT_FOR_BUILD
3754
3755define gb_ExternalExecutable__register_xsltproc
David Tardondbac8f52014-04-18 18:34:40 +02003756$(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt)
Peter Foley52e47b62013-02-06 17:59:18 -05003757$(call gb_ExternalExecutable_add_dependencies,xsltproc,$(call gb_Package_get_target,xslt))
David Tardonc2eca352012-12-02 10:51:37 +01003758
3759endef
3760
3761endif # SYSTEM_LIBXSLT_FOR_BUILD
3762
David Tardonce038cf2013-10-20 20:43:46 +02003763ifneq (,$(SYSTEM_UCPP))
3764
3765gb_ExternalExecutable__register_ucpp :=
3766
3767else # ! SYSTEM_UCPP
3768
3769define gb_ExternalExecutable__register_ucpp
David Tardon489d2ea2013-10-21 08:17:32 +02003770$(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
David Tardonce038cf2013-10-20 20:43:46 +02003771
3772endef
3773
3774endif # SYSTEM_UCPP
3775
Matúš Kukane4826722013-03-05 22:03:38 +01003776ifeq (,$(PYTHON_FOR_BUILD))
David Tardonc2eca352012-12-02 10:51:37 +01003777
3778define gb_ExternalExecutable__register_python
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003779ifeq ($(OS),MACOSX)
3780
3781# use set_external, to avoid having the command added as prerequisite for the
3782# targets that make use of it. (Otherwise make will choke as it doesn't have a
3783# matching rule to build that specific file)
3784$(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))
3785# the Zip ensures that internal python has been built (cannot use the Package
3786# target, as that is not used on Mac)
David Tardon45a5c262013-05-16 13:36:24 +02003787$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003788
3789else
3790
Tor Lillqvist4c63fd102013-09-22 19:59:37 +03003791$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
Stephan Bergmann233610f2014-03-19 11:24:13 +01003792$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
Christian Lohmaier04032bd2013-03-19 17:27:01 +01003793$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3794
3795endif
David Tardonc2eca352012-12-02 10:51:37 +01003796
3797endef
3798
Matúš Kukane4826722013-03-05 22:03:38 +01003799else
3800
3801define gb_ExternalExecutable__register_python
3802$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3803
3804endef
3805
3806endif # PYTHON_FOR_BUILD
David Tardonc2eca352012-12-02 10:51:37 +01003807
David Tardon63069262012-12-29 12:56:24 +01003808ifneq ($(SYSTEM_GENBRK),)
3809
3810define gb_ExternalExecutable__register_genbrk
3811$(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3812
3813endef
3814
3815else # ! SYSTEM_GENBRK
3816
3817define gb_ExternalExecutable__register_genbrk
David Tardondbac8f52014-04-18 18:34:40 +02003818$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01003819$(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003820$(call gb_ExternalExecutable_add_dependencies,genbrk,\
3821 $(call gb_Package_get_target_for_build,icu) \
3822)
3823
3824endef
3825
3826endif
3827
3828ifneq ($(SYSTEM_GENCCODE),)
3829
3830define gb_ExternalExecutable__register_genccode
3831$(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3832
3833endef
3834
3835else # ! SYSTEM_GENCCODE
3836
3837define gb_ExternalExecutable__register_genccode
David Tardondbac8f52014-04-18 18:34:40 +02003838$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01003839$(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003840$(call gb_ExternalExecutable_add_dependencies,genccode,\
3841 $(call gb_Package_get_target_for_build,icu) \
3842)
3843
3844endef
3845
3846endif
3847
3848ifneq ($(SYSTEM_GENCMN),)
3849
3850define gb_ExternalExecutable__register_gencmn
3851$(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3852
3853endef
3854
3855else # ! SYSTEM_GENCMN
3856
3857define gb_ExternalExecutable__register_gencmn
David Tardondbac8f52014-04-18 18:34:40 +02003858$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
Stephan Bergmann58d80a62014-03-19 10:39:40 +01003859$(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
David Tardon63069262012-12-29 12:56:24 +01003860$(call gb_ExternalExecutable_add_dependencies,gencmn,\
3861 $(call gb_Package_get_target_for_build,icu) \
3862)
3863
3864endef
3865
3866endif
3867
Michael Stahlc74af0d2011-04-01 20:49:35 +00003868# vim: set noet sw=4 ts=4: