blob: 6da9253ae1fec61a5a3e7df08b3cb6cb524b6576 [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#*************************************************************************
3#
4# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5#
6# Copyright 2009 by Sun Microsystems, Inc.
7#
8# OpenOffice.org - a multi-platform office productivity suite
9#
10# This file is part of OpenOffice.org.
11#
12# OpenOffice.org is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Lesser General Public License version 3
14# only, as published by the Free Software Foundation.
15#
16# OpenOffice.org is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU Lesser General Public License version 3 for more details
20# (a copy is included in the LICENSE file that accompanied this code).
21#
22# You should have received a copy of the GNU Lesser General Public License
23# version 3 along with OpenOffice.org. If not, see
24# <http://www.openoffice.org/license.html>
25# for a copy of the LGPLv3 License.
26#
27#*************************************************************************
28
29# this file describes all the external libraries
30# depending on the configure options these may be taken from the system,
31# or the internal/bundled copy may be built.
32
33# for every external, a function gb_LinkTarget_use__FOO is defined,
34# once for the system case, once for the internal case.
35
36# in the system case, no libraries should be registered, but the target-local
37# variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
38
Peter Foley1bd28842011-09-09 17:42:24 -040039ifeq ($(SYSTEM_MESA_HEADERS),YES)
40
41gb_LinkTarget__use_Mesa:=
42
43else
44
45define gb_LinkTarget__use_Mesa
46$(eval $(call gb_LinkTarget_add_external_headers,$(1),Mesa_inc))
47endef
48
49endif
50
David Tardon785e1d92011-07-25 10:34:22 +020051ifeq ($(SYSTEM_CPPUNIT),YES)
52
53define gb_LinkTarget__use_cppunit
54$(call gb_LinkTarget_set_include,$(1),\
55 $$(INCLUDE) \
56 $(CPPUNIT_CFLAGS) \
57)
58
59$(call gb_LinkTarget_add_libs,$(1),\
60 $(CPPUNIT_LIBS) \
61)
Caolán McNamara6bccd202011-07-25 22:10:33 +010062
David Tardon785e1d92011-07-25 10:34:22 +020063endef
64
65else
66
67$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
68 cppunit \
69))
70
71define gb_LinkTarget__use_cppunit
72$(call gb_LinkTarget_add_linked_libs,$(1),\
73 cppunit \
74)
Caolán McNamara6bccd202011-07-25 22:10:33 +010075
David Tardon785e1d92011-07-25 10:34:22 +020076endef
77
78endif
Michael Stahlc74af0d2011-04-01 20:49:35 +000079
80ifeq ($(SYSTEM_ZLIB),YES)
81
82define gb_LinkTarget__use_zlib
Michael Stahla88ef232011-04-13 16:11:41 +000083$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +000084 -DSYSTEM_ZLIB \
85)
86$(call gb_LinkTarget_add_libs,$(1),-lz)
Caolán McNamara6bccd202011-07-25 22:10:33 +010087
Michael Stahlc74af0d2011-04-01 20:49:35 +000088endef
89
90else # !SYSTEM_ZLIB
91
92$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
93 zlib \
94))
95
96define gb_LinkTarget__use_zlib
97$(call gb_LinkTarget_add_linked_static_libs,$(1),\
98 zlib \
99)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100100
Michael Stahlc74af0d2011-04-01 20:49:35 +0000101endef
102
103endif # SYSTEM_ZLIB
104
105
106ifeq ($(SYSTEM_JPEG),YES)
107
108define gb_LinkTarget__use_jpeg
109$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
110$(call gb_LinkTarget_set_ldflags,$(1),\
Michael Stahl73d2fe92011-04-13 16:11:39 +0000111 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000112)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100113
Michael Stahlc74af0d2011-04-01 20:49:35 +0000114endef
115
116else # !SYSTEM_JPEG
117
118$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
119 jpeglib \
120))
121
122define gb_LinkTarget__use_jpeg
123$(call gb_LinkTarget_add_linked_static_libs,$(1),\
124 jpeglib \
125)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100126
Michael Stahlc74af0d2011-04-01 20:49:35 +0000127endef
128
129endif # SYSTEM_JPEG
130
131
132ifeq ($(SYSTEM_EXPAT),YES)
133
134define gb_LinkTarget__use_expat
135$(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter))
136
Michael Stahla88ef232011-04-13 16:11:41 +0000137$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000138 -DSYSTEM_EXPAT \
139)
140
141$(call gb_LinkTarget_add_libs,$(1),-lexpat)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100142
Michael Stahlc74af0d2011-04-01 20:49:35 +0000143endef
144
145else # !SYSTEM_EXPAT
146
147$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
148 ascii_expat_xmlparse \
149 expat_xmlparse \
150 expat_xmltok \
151))
152
153define gb_LinkTarget__use_expat
154$(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter))
155
156$(if $(filter-out ascii_expat_xmlparse,$(2)),\
Michael Stahla88ef232011-04-13 16:11:41 +0000157 $(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000158 -DXML_UNICODE \
159))
160
161$(call gb_LinkTarget_add_linked_static_libs,$(1),\
162 $(2) \
163 expat_xmltok \
164)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100165
Michael Stahlc74af0d2011-04-01 20:49:35 +0000166endef
167
168endif # SYSTEM_EXPAT
169
170# now define 2 wrappers that select which internal static library to use...
171define gb_LinkTarget__use_expat_utf8
172$(call gb_LinkTarget__use_expat,$(1),ascii_expat_xmlparse)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100173
Michael Stahlc74af0d2011-04-01 20:49:35 +0000174endef
175
176define gb_LinkTarget__use_expat_utf16
177$(call gb_LinkTarget__use_expat,$(1),expat_xmlparse)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100178
Michael Stahlc74af0d2011-04-01 20:49:35 +0000179endef
180
181
182ifeq ($(SYSTEM_LIBXML),YES)
183
184define gb_LinkTarget__use_libxml2
Michael Stahla88ef232011-04-13 16:11:41 +0000185$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000186 -DSYSTEM_LIBXML \
187)
188$(call gb_LinkTarget_set_include,$(1),\
189 $$(INCLUDE) \
190 $(LIBXML_CFLAGS) \
191)
192$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100193
Michael Stahlc74af0d2011-04-01 20:49:35 +0000194endef
195
196else # !SYSTEM_LIBXML
197
198$(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
199 xml2 \
200))
201
202define gb_LinkTarget__use_libxml2
203$(call gb_LinkTarget_add_linked_libs,$(1),\
204 xml2 \
205)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100206
Michael Stahlc74af0d2011-04-01 20:49:35 +0000207endef
208
209endif # SYSTEM_LIBXML
210
211
212ifeq ($(SYSTEM_LIBXSLT),YES)
213
214define gb_LinkTarget__use_libxslt
215$(call gb_LinkTarget_set_include,$(1),\
216 $$(INCLUDE) \
217 $(LIBXSLT_CFLAGS) \
218)
219$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100220
Michael Stahlc74af0d2011-04-01 20:49:35 +0000221endef
222
223else # !SYSTEM_LIBXSLT
224
225$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
226 xslt \
227))
228
229define gb_LinkTarget__use_libxslt
230$(call gb_LinkTarget_add_linked_libs,$(1),\
231 xslt \
232)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100233
Michael Stahlc74af0d2011-04-01 20:49:35 +0000234endef
235
236endif # SYSTEM_LIBXSLT
237
238
239ifeq ($(SYSTEM_REDLAND),YES)
240
241define gb_LinkTarget__use_librdf
Michael Stahla88ef232011-04-13 16:11:41 +0000242$(call gb_LinkTarget_add_defs,$(1),\
Michael Stahlc74af0d2011-04-01 20:49:35 +0000243 -DSYSTEM_REDLAND \
244)
245$(call gb_LinkTarget_set_include,$(1),\
246 $$(INCLUDE) \
247 $(REDLAND_CFLAGS) \
248)
249$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100250
Michael Stahlc74af0d2011-04-01 20:49:35 +0000251endef
252
253else # !SYSTEM_REDLAND
254
255$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
256 rdf \
257))
258
259define gb_LinkTarget__use_librdf
260$(call gb_LinkTarget_add_linked_libs,$(1),\
261 rdf \
262)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100263
Michael Stahlc74af0d2011-04-01 20:49:35 +0000264endef
265
266endif # SYSTEM_REDLAND
267
268
269ifeq ($(SYSTEM_CAIRO),YES)
270
271# FREETYPE_CLAGS from environment if ENABLE_CAIRO is used
272define gb_LinkTarget__use_cairo
273$(call gb_LinkTarget_set_include,$(1),\
274 $$(INCLUDE) \
275 $(FREETYPE_CFLAGS) \
276 $(CAIRO_CFLAGS) \
277)
278$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100279
Michael Stahlc74af0d2011-04-01 20:49:35 +0000280endef
281
282else # !SYSTEM_CAIRO
283
284$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
285 cairo \
286))
287ifneq ($(OS),WNT)
288$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
289 pixman-1 \
290))
291endif # WNT
292
293define gb_LinkTarget__use_cairo
294$(call gb_LinkTarget_set_include,$(1),\
295 $$(INCLUDE) \
296 -I$(OUTDIR)/inc/cairo \
297 $(FREETYPE_CFLAGS) \
298)
299$(call gb_LinkTarget_add_linked_libs,$(1),\
300 cairo \
301)
302ifneq ($(OS),WNT)
Norbert Thiebaudae70a172011-07-24 16:00:24 -0500303ifeq ($(OS),MACOSX)
304$(call gb_LinkTarget_add_static_libs,$(1),\
305 pixman-1 \
306)
307else
Michael Stahlc74af0d2011-04-01 20:49:35 +0000308$(call gb_LinkTarget_add_linked_libs,$(1),\
309 pixman-1 \
310)
311endif
Norbert Thiebaudae70a172011-07-24 16:00:24 -0500312endif
Caolán McNamara5bb76f62011-07-25 21:50:34 +0100313
Michael Stahlc74af0d2011-04-01 20:49:35 +0000314endef
315
316endif # SYSTEM_CAIRO
317
Caolán McNamarab41ae462011-07-25 22:24:27 +0100318define gb_LinkTarget__use_freetype
319$(call gb_LinkTarget_set_include,$(1),\
320 $$(INCLUDE) \
321 $(FREETYPE_CFLAGS) \
322)
323$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
324
325endef
326
327define gb_LinkTarget__use_fontconfig
328$(call gb_LinkTarget_set_include,$(1),\
329 $$(INCLUDE) \
330 $(FONTCONFIG_CFLAGS) \
331)
332$(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
333
334endef
Michael Stahlc74af0d2011-04-01 20:49:35 +0000335
Michael Stahl87e44332011-04-13 16:11:39 +0000336ifeq ($(SYSTEM_GRAPHITE),YES)
337
Michael Stahl87e44332011-04-13 16:11:39 +0000338define gb_LinkTarget__use_graphite
Michael Stahl87e44332011-04-13 16:11:39 +0000339$(call gb_LinkTarget_set_include,$(1),\
340 $$(INCLUDE) \
341 $(GRAPHITE_CFLAGS) \
342)
343$(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100344
Michael Stahl87e44332011-04-13 16:11:39 +0000345endef
346
347else # !SYSTEM_GRAPHITE
348
349$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +0200350 graphite2_off \
Michael Stahl87e44332011-04-13 16:11:39 +0000351))
352define gb_LinkTarget__use_graphite
353$(call gb_LinkTarget_add_linked_static_libs,$(1),\
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +0200354 graphite2_off \
Michael Stahl87e44332011-04-13 16:11:39 +0000355)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100356
Michael Stahl87e44332011-04-13 16:11:39 +0000357endef
358
359endif # SYSTEM_GRAPHITE
360
361
Michael Stahlc74af0d2011-04-01 20:49:35 +0000362ifeq ($(SYSTEM_ICU),YES)
363
Matúš Kukan6fad1752011-08-11 12:42:39 +0200364define gb_LinkTarget__use_icudata
365$(call gb_LinkTarget_add_libs,$(1),-licudata)
366
367endef
David Tardon1a852392011-07-26 09:58:54 +0200368define gb_LinkTarget__use_icui18n
369$(call gb_LinkTarget_add_libs,$(1),-licui18n)
Matúš Kukan6fad1752011-08-11 12:42:39 +0200370
David Tardon1a852392011-07-26 09:58:54 +0200371endef
Michael Stahle1999382011-04-13 16:11:40 +0000372define gb_LinkTarget__use_icule
373$(call gb_LinkTarget_add_libs,$(1),-licule)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100374
Michael Stahle1999382011-04-13 16:11:40 +0000375endef
Matúš Kukan6fad1752011-08-11 12:42:39 +0200376define gb_LinkTarget__use_icutu
377$(call gb_LinkTarget_add_libs,$(1),-licutu)
378
379endef
Michael Stahlc74af0d2011-04-01 20:49:35 +0000380define gb_LinkTarget__use_icuuc
381$(call gb_LinkTarget_add_libs,$(1),-licuuc)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100382
Michael Stahlc74af0d2011-04-01 20:49:35 +0000383endef
384
385else # !SYSTEM_ICU
386
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200387ifeq ($(OS),ANDROID)
388gb_ICU_suffix:=lo
389else
390gb_ICU_suffix:=
391endif
392
Tor Lillqvistbdfca5e2011-08-19 12:38:09 +0300393# icudata and icui18n is called icudt and icuin when built with MSVC :-(
394ifeq ($(OS)$(COM),WNTMSC)
Jan Holesovsky534b3bc2011-08-19 09:32:18 +0200395$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
396 icudt \
397 icuin \
398 icule \
399 icutu \
400 icuuc \
401))
402
403define gb_LinkTarget__use_icudt
404$(call gb_LinkTarget_add_linked_libs,$(1),\
405 icudt \
406)
407
408endef
409define gb_LinkTarget__use_icuin
410$(call gb_LinkTarget_add_linked_libs,$(1),\
411 icuin \
412)
413
414endef
415else
Michael Stahlc74af0d2011-04-01 20:49:35 +0000416$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200417 icudata$(gb_ICU_suffix) \
418 icui18n$(gb_ICU_suffix) \
419 icule$(gb_ICU_suffix) \
420 icutu$(gb_ICU_suffix) \
421 icuuc$(gb_ICU_suffix) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000422))
423
Matúš Kukan6fad1752011-08-11 12:42:39 +0200424define gb_LinkTarget__use_icudata
425$(call gb_LinkTarget_add_linked_libs,$(1),\
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200426 icudata$(gb_ICU_suffix) \
Matúš Kukan6fad1752011-08-11 12:42:39 +0200427)
428
429endef
David Tardon1a852392011-07-26 09:58:54 +0200430define gb_LinkTarget__use_icui18n
431$(call gb_LinkTarget_add_linked_libs,$(1),\
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200432 icui18n$(gb_ICU_suffix) \
David Tardon1a852392011-07-26 09:58:54 +0200433)
Matúš Kukan6fad1752011-08-11 12:42:39 +0200434
David Tardon1a852392011-07-26 09:58:54 +0200435endef
Jan Holesovsky534b3bc2011-08-19 09:32:18 +0200436endif
437
Michael Stahle1999382011-04-13 16:11:40 +0000438define gb_LinkTarget__use_icule
439$(call gb_LinkTarget_add_linked_libs,$(1),\
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200440 icule$(gb_ICU_suffix) \
Michael Stahle1999382011-04-13 16:11:40 +0000441)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100442
Michael Stahle1999382011-04-13 16:11:40 +0000443endef
Matúš Kukan6fad1752011-08-11 12:42:39 +0200444define gb_LinkTarget__use_icutu
445$(call gb_LinkTarget_add_linked_libs,$(1),\
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200446 icutu$(gb_ICU_suffix) \
Matúš Kukan6fad1752011-08-11 12:42:39 +0200447)
448
449endef
Michael Stahlc74af0d2011-04-01 20:49:35 +0000450define gb_LinkTarget__use_icuuc
451$(call gb_LinkTarget_add_linked_libs,$(1),\
Tor Lillqvist8a3ea752011-11-21 14:25:37 +0200452 icuuc$(gb_ICU_suffix) \
Michael Stahlc74af0d2011-04-01 20:49:35 +0000453)
Caolán McNamara6bccd202011-07-25 22:10:33 +0100454
Michael Stahlc74af0d2011-04-01 20:49:35 +0000455endef
456
457endif # SYSTEM_ICU
458
Michael Stahl4a8919f2011-04-18 11:13:57 +0000459
460ifeq ($(SYSTEM_OPENSSL),YES)
461
462define gb_LinkTarget__use_openssl
463$(call gb_LinkTarget_set_include,$(1),\
464 $$(INCLUDE) \
465 $(OPENSSL_CFLAGS) \
466)
467$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
Caolán McNamara6bccd202011-07-25 22:10:33 +0100468
Michael Stahl4a8919f2011-04-18 11:13:57 +0000469endef
470
471else # !SYSTEM_OPENSSL
472
473ifeq ($(OS),WNT)
474$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
475 crypto \
476 ssl \
477))
478else
479$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
480 crypto \
481 ssl \
482))
483endif
484
485define gb_LinkTarget__use_openssl
486ifeq ($(OS),WNT)
487$(call gb_LinkTarget_add_linked_libs,$(1),\
488 crypto \
489 ssl \
490)
491else
492$(call gb_LinkTarget_add_linked_static_libs,$(1),\
493 crypto \
494 ssl \
495)
496ifeq ($(OS),SOLARIS)
497$(call gb_LinkTarget_add_libs,$(1),\
498 -lnsl \
499 -lsocket \
500)
501endif
502endif
Caolán McNamara6bccd202011-07-25 22:10:33 +0100503
Michael Stahl4a8919f2011-04-18 11:13:57 +0000504endef
505
506endif # SYSTEM_OPENSSL
507
Matúš Kukanc4560482011-07-28 01:03:23 +0200508
Matúš Kukanc6a63952011-07-28 17:29:44 +0200509ifeq ($(SYSTEM_LIBVISIO),YES)
510
511define gb_LinkTarget__use_visio
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200512$(call gb_LinkTarget_set_include,$(1),\
513 $$(INCLUDE) \
Fridrich Štrbae531e8a2011-10-05 10:21:08 +0200514 $(VISIO_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200515)
Fridrich Štrbae531e8a2011-10-05 10:21:08 +0200516$(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +0200517
518endef
519
520else # !SYSTEM_LIBVISIO
521
522$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
523 visiolib \
524))
525
526define gb_LinkTarget__use_visio
527$(call gb_LinkTarget_add_linked_static_libs,$(1),\
528 visiolib \
529)
530
531endef
532
533endif # SYSTEM_LIBVISIO
534
535
536ifeq ($(SYSTEM_LIBWPD),YES)
537
538define gb_LinkTarget__use_wpd
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200539$(call gb_LinkTarget_set_include,$(1),\
540 $$(INCLUDE) \
Fridrich Štrba8703f3e2011-10-05 10:04:04 +0200541 $(WPD_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200542)
Fridrich Štrba8703f3e2011-10-05 10:04:04 +0200543$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +0200544
545endef
546
547else # !SYSTEM_LIBWPD
548
549$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
550 wpdlib \
551))
552
553define gb_LinkTarget__use_wpd
554$(call gb_LinkTarget_add_linked_static_libs,$(1),\
555 wpdlib \
556)
557
558endef
559
560endif # SYSTEM_LIBWPD
561
562
563ifeq ($(SYSTEM_LIBWPG),YES)
564
565define gb_LinkTarget__use_wpg
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200566$(call gb_LinkTarget_set_include,$(1),\
567 $$(INCLUDE) \
Fridrich Štrba62c43b42011-10-05 10:15:40 +0200568 $(WPG_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200569)
Fridrich Štrba62c43b42011-10-05 10:15:40 +0200570$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +0200571
572endef
573
574else # !SYSTEM_LIBWPG
575
576$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
577 wpglib \
578))
579
580define gb_LinkTarget__use_wpg
581$(call gb_LinkTarget_add_linked_static_libs,$(1),\
582 wpglib \
583)
584
585endef
586
587endif # SYSTEM_LIBWPG
588
589
590ifeq ($(SYSTEM_LIBWPS),YES)
591
592define gb_LinkTarget__use_wps
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200593$(call gb_LinkTarget_set_include,$(1),\
594 $$(INCLUDE) \
Fridrich Štrbae991bba2011-10-05 10:18:53 +0200595 $(WPS_CFLAGS) \
Lionel Elie Mamanee4a17792011-08-02 07:10:30 +0200596)
Fridrich Štrbae991bba2011-10-05 10:18:53 +0200597$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
Matúš Kukanc6a63952011-07-28 17:29:44 +0200598
599endef
600
601else # !SYSTEM_LIBWPS
602
603$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
604 wpslib \
605))
606
607define gb_LinkTarget__use_wps
608$(call gb_LinkTarget_add_linked_static_libs,$(1),\
609 wpslib \
610)
611
612endef
613
614endif # SYSTEM_LIBWPS
615
616
Matúš Kukanc4560482011-07-28 01:03:23 +0200617ifeq ($(SYSTEM_LPSOLVE),YES)
618
619define gb_LinkTarget__use_lpsolve55
620$(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
621
622endef
623
624else # !SYSTEM_LPSOLVE
625
626$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
627 lpsolve55 \
628))
629
630define gb_LinkTarget__use_lpsolve55
631$(call gb_LinkTarget_add_linked_libs,$(1),\
632 lpsolve55 \
633)
634
635endef
636
637endif # SYSTEM_LPSOLVE
638
639
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +0200640define gb_LinkTarget__use_gtk
641$(call gb_LinkTarget_set_include,$(1),\
642 $$(INCLUDE) \
643 $(GTK_CFLAGS) \
644)
645
646$(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
647
David Tardonadb11052011-12-01 13:39:09 +0100648ifeq ($(ENABLE_GTK_PRINT),TRUE)
649
650$(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
651
652$(call gb_LinkTarget_set_include,$(1),\
653 $$(INCLUDE) \
654 $(GTK_PRINT_CFLAGS) \
655)
656
657$(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
658
659endif
660
Bjoern Michaelsene7cc9e02011-07-26 14:51:35 +0200661endef
Michael Stahl4a8919f2011-04-18 11:13:57 +0000662
Bjoern Michaelsen54dd3072011-07-26 15:15:41 +0200663define gb_LinkTarget__use_gthread
664$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
665
666endef
667
David Tardon1b717ce2011-11-02 13:00:48 +0100668
669ifeq ($(ENABLE_DBUS),YES)
670
671define gb_LinkTarget__use_dbus
672$(call gb_LinkTarget_set_include,$(1),\
673 $$(INCLUDE) \
674 $(DBUS_CFLAGS) \
675)
676
677$(call gb_Library_add_defs,$(1),\
678 -DENABLE_DBUS \
679)
680
681$(call gb_LinkTarget_add_libs,$(1),\
682 $(DBUS_LIBS) \
683)
684
685endef
686
687else # ENABLE_DBUS
688
689define gb_LinkTarget__use_dbus
690
691endef
692
693endif # ENABLE_DBUS
694
695
Bjoern Michaelsendd321062011-07-26 16:04:15 +0200696define gb_LinkTarget__use_dbusmenugtk
697$(call gb_LinkTarget_set_include,$(1),\
698 $$(INCLUDE) \
699 $(DBUSMENUGTK_CFLAGS) \
700)
701
702$(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
703
704endef
705
David Tardon6df9c472011-09-15 14:44:34 +0200706ifeq ($(SYSTEM_DB),YES)
707
708define gb_LinkTarget__use_berkeleydb
709$(call gb_LinkTarget_set_include,$(1),\
710 $$(INCLUDE) \
711 $(filter -I%,$(SYSTEM_DB_CFLAGS)) \
712)
713
714$(call gb_LinkTarget_add_defs,$(1),\
715 $(filter -D%,$(SYSTEM_DB_CFLAGS)) \
716)
717
718$(call gb_LinkTarget_add_libs,$(1),\
719 -l$(DB_LIB) \
720)
721
722endef
723
724else # !SYSTEM_DB
725
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100726ifneq ($(OS),WNT)
David Tardon6df9c472011-09-15 14:44:34 +0200727$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100728 db-4.7 \
David Tardon6df9c472011-09-15 14:44:34 +0200729))
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100730else
731$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
732 db47 \
733))
734endif
David Tardon6df9c472011-09-15 14:44:34 +0200735
736define gb_LinkTarget__use_berkeleydb
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100737ifneq ($(OS),WNT)
David Tardon6df9c472011-09-15 14:44:34 +0200738$(call gb_LinkTarget_add_linked_libs,$(1),\
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100739 db-4.7 \
David Tardon6df9c472011-09-15 14:44:34 +0200740)
Caolán McNamaraa0831a172011-09-15 21:27:13 +0100741else
742$(call gb_LinkTarget_add_linked_libs,$(1),\
743 db47 \
744)
745endif
David Tardon6df9c472011-09-15 14:44:34 +0200746
747endef
748
749endif # SYSTEM_DB
750
751ifeq ($(SYSTEM_LIBPNG),YES)
752
753define gb_LinkTarget__use_png
754$(call gb_LinkTarget_set_include,$(1),\
755 $$(INCLUDE) \
756 $(LIBPNG_CFLAGS) \
757)
758
759$(call gb_LinkTarget_add_libs,$(1),\
760 $(LIBPNG_LIBS) \
761)
762
763endef
764
765else # !SYSTEM_LIBPNG
766
767$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
768 png \
769))
770
771define gb_LinkTarget__use_png
772$(call gb_LinkTarget_add_linked_libs,$(1),\
773 png \
774)
775
776endef
777
778endif # !SYSTEM_LIBPNG
779
Tor Lillqvist2a961582011-08-02 22:19:35 +0300780# MacOSX-only frameworks
781# (in alphabetical order)
Bjoern Michaelsen92ac3ae2011-07-26 16:32:29 +0200782
Tor Lillqvist2a961582011-08-02 22:19:35 +0300783define gb_LinkTarget__use_carbon
Bjoern Michaelsenfe1efb92011-07-26 18:07:15 +0200784$(call gb_LinkTarget_add_libs,$(1), \
Tor Lillqvist2a961582011-08-02 22:19:35 +0300785 -framework Carbon \
Tor Lillqvistff88a5f2011-07-26 22:44:10 +0300786)
787
788endef
789
Bjoern Michaelsen92ac3ae2011-07-26 16:32:29 +0200790define gb_LinkTarget__use_cocoa
Bjoern Michaelsenfe1efb92011-07-26 18:07:15 +0200791$(call gb_LinkTarget_add_libs,$(1), \
Bjoern Michaelsen92ac3ae2011-07-26 16:32:29 +0200792 -framework Cocoa \
793)
794
795endef
796
Matúš Kukane85875b2011-08-03 15:08:56 +0200797define gb_LinkTarget__use_qtkit
798$(call gb_LinkTarget_add_libs,$(1), \
799 -framework QTKit \
800)
801
802endef
803
Tor Lillqvist2a961582011-08-02 22:19:35 +0300804define gb_LinkTarget__use_quicktime
Bjoern Michaelsenfe1efb92011-07-26 18:07:15 +0200805$(call gb_LinkTarget_add_libs,$(1), \
Tor Lillqvist2a961582011-08-02 22:19:35 +0300806 -framework QuickTime \
Bjoern Michaelsen92ac3ae2011-07-26 16:32:29 +0200807)
808
809endef
810
Tor Lillqvist2a961582011-08-02 22:19:35 +0300811# Common MacOSX and iOS frameworks
812
813define gb_LinkTarget__use_corefoundation
Bjoern Michaelsenfe1efb92011-07-26 18:07:15 +0200814$(call gb_LinkTarget_add_libs,$(1), \
Tor Lillqvist2a961582011-08-02 22:19:35 +0300815 -framework CoreFoundation \
816)
817
818endef
819
820define gb_LinkTarget__use_coregraphics
821$(call gb_Library_add_libs,$(1), \
822 -framework CoreGraphics \
823)
824
825endef
826
827define gb_LinkTarget__use_coretext
828$(call gb_Library_add_libs,$(1), \
829 -framework CoreText \
830)
831
832endef
833
834define gb_LinkTarget__use_foundation
835$(call gb_LinkTarget_add_libs,$(1), \
836 -framework Foundation \
837)
838
839endef
840
841# iOS-only frameworks
842
843define gb_LinkTarget__use_uikit
844$(call gb_LinkTarget_add_libs,$(1), \
845 -framework UIKit \
Bjoern Michaelsen92ac3ae2011-07-26 16:32:29 +0200846)
847
848endef
Tor Lillqvist35491072011-08-02 21:22:35 +0300849
Tomas Chvatal75f77e62011-11-02 21:16:53 +0100850ifeq ($(SYSTEM_NSS),YES)
David Tardonb6aa4842011-08-11 13:10:14 +0200851
852define gb_LinkTarget__use_plc4
853$(call gb_LinkTarget_set_include,$(1),\
854 $$(INCLUDE) \
Tomas Chvatal75f77e62011-11-02 21:16:53 +0100855 $(NSS_CFLAGS) \
David Tardonb6aa4842011-08-11 13:10:14 +0200856)
857
858$(call gb_LinkTarget_add_libs,$(1),\
Tomas Chvatal75f77e62011-11-02 21:16:53 +0100859 $(NSS_LIBS) \
David Tardonb6aa4842011-08-11 13:10:14 +0200860)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +0100861
David Tardonb6aa4842011-08-11 13:10:14 +0200862endef
863
864else
865
David Tardonb6aa4842011-08-11 13:10:14 +0200866$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
867 nspr4 \
868 nss3 \
869 plc4 \
870))
871
Caolán McNamara24ae3ab2011-08-11 12:47:00 +0100872define gb_LinkTarget__use_plc4
David Tardonb6aa4842011-08-11 13:10:14 +0200873$(call gb_LinkTarget_add_linked_libs,$(1),\
874 plc4 \
875)
Caolán McNamara24ae3ab2011-08-11 12:47:00 +0100876
David Tardonb6aa4842011-08-11 13:10:14 +0200877endef
878
879endif
880
Michael Stahl2ee5f242011-09-15 14:01:27 +0200881### Jars ############################################################
882
883ifeq ($(SYSTEM_SAXON),YES)
884
885define gb_JavaClassSet__use_saxon
886$(call gb_JavaClassSet_add_system_jar,$(1),$(SAXON_JAR))
887endef
888
889else # !SYSTEM_SAXON
890
891define gb_JavaClassSet__use_saxon
892$(call gb_JavaClassSet_add_jar,$(1),$(OUTDIR)/bin/saxon9.jar)
893endef
894
895endif # SYSTEM_SAXON
896
David Tardon3bcf9102011-10-04 09:44:48 +0200897ifeq ($(SYSTEM_BSH),YES)
898
899define gb_JavaClassSet__use_bsh
900$(call gb_JavaClassSet_add_system_jar,$(1),$(BSH_JAR))
901endef
902
903else # !SYSTEM_BSH
904
905define gb_JavaClassSet__use_bsh
906$(call gb_JavaClassSet_add_jar,$(1),$(OUTDIR)/bin/bsh.jar)
907endef
908
909endif # SYSTEM_BSH
910
Michael Stahl2ee5f242011-09-15 14:01:27 +0200911
Michael Stahlc74af0d2011-04-01 20:49:35 +0000912# vim: set noet sw=4 ts=4: