Sukapura:^ Superscript, Subscript, Clear Direct Formatting, Font Color
[LibreOffice.git] / RepositoryExternal.mk
blob15cfbfde3d4ac1f5f4cf8e4f9b5e0caa0f55ed23
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # 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/.
9 # This file incorporates work covered by the following license notice:
11 # 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 .
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.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
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.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 define gb_LinkTarget__use_glm_headers
94 $(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
98 endef
100 gb_ExternalProject__use_glm_headers :=
102 else
104 define gb_LinkTarget__use_glm_headers
105 $(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
108 $(call gb_LinkTarget_use_unpacked,$(1),glm)
109 $(call gb_LinkTarget_set_include,$(1),\
110 $(GLM_CFLAGS) \
111 $$(INCLUDE) \
114 endef
116 define gb_ExternalProject__use_glm_headers
117 $(call gb_ExternalProject_use_unpacked,$(1),glm)
119 endef
121 endif
123 ifneq ($(ENABLE_SKIA),)
124 define gb_LinkTarget__use_skia
125 $(call gb_LinkTarget_set_include,$(1),\
126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
133 -I$(call gb_UnpackedTarball_get_dir,skia) \
134 -I$(SRCDIR)/external/skia/inc/ \
135 $$(INCLUDE) \
137 $(call gb_LinkTarget_use_libraries,$(1),skia)
138 $(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
142 endef
143 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
144 skia \
146 endif
148 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
150 define gb_LinkTarget__use_sane_headers
151 $(call gb_LinkTarget_set_include,$(1),\
152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
158 ifeq ($(OS),WNT)
159 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160 endif
162 endef
164 else
166 gb_LinkTarget__use_sane_headers :=
168 endif
170 ifneq ($(SYSTEM_BLUEZ),)
172 gb_LinkTarget__use_bluez_bluetooth_headers :=
174 else # !SYSTEM_BLUEZ
176 define gb_LinkTarget__use_bluez_bluetooth_headers
177 $(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
182 endef
184 endif # SYSTEM_BLUEZ
186 # External libraries
188 ifneq ($(SYSTEM_CPPUNIT),)
190 define gb_LinkTarget__use_cppunit
191 $(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
196 $(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
200 endef
202 else # !SYSTEM_CPPUNIT
204 define gb_LinkTarget__use_cppunit
205 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
209 $$(INCLUDE) \
212 ifeq ($(COM),MSC)
213 $(call gb_LinkTarget_add_libs,$(1),\
214 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
216 else
217 $(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
220 endif
222 endef
224 endif # SYSTEM_CPPUNIT
226 ifneq ($(SYSTEM_EPOXY),)
228 define gb_LinkTarget__use_epoxy
229 $(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
231 $(EPOXY_CFLAGS) \
233 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
235 endef
237 gb_ExternalProject__use_epoxy :=
239 else # !SYSTEM_EPOXY
241 define gb_LinkTarget__use_epoxy
242 $(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
247 $(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
251 endef
253 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
257 define gb_ExternalProject__use_epoxy
258 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
260 endef
262 endif # SYSTEM_EPOXY
264 define gb_LinkTarget__use_iconv
265 ifeq ($(COM),MSC)
266 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267 else
268 $(call gb_LinkTarget_add_libs,$(1),-liconv)
269 endif
270 endef
272 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
274 define gb_LinkTarget__use_mariadb-connector-c
275 $(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
279 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
281 endef
282 gb_ExternalProject__use_mariadb-connector-c :=
284 else # !SYSTEM_MARIADB_CONNECTOR_C
286 define gb_LinkTarget__use_mariadb-connector-c
287 $(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
291 $(call gb_LinkTarget_use_static_libraries,$(1),\
292 mariadb-connector-c \
294 ifeq ($(OS),MACOSX)
295 $(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
298 endif
299 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
307 endef
308 define gb_ExternalProject__use_mariadb-connector-c
309 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
311 endef
313 endif # SYSTEM_MARIADB_CONNECTOR_C
316 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DSYSTEM_MARIADB \
324 $(call gb_LinkTarget_add_libs,$(1),\
325 $(MARIADB_LIBS) \
328 $(call gb_LinkTarget_set_include,$(1),\
329 $(MARIADB_CFLAGS) \
330 $$(INCLUDE) \
332 endef
334 else
336 define gb_LinkTarget__use_mysql
338 $(call gb_LinkTarget_set_include,$(1),\
339 $$(INCLUDE) \
342 endef
344 endif
346 ifneq ($(SYSTEM_ZLIB),)
348 define gb_LinkTarget__use_zlib
349 $(call gb_LinkTarget_add_defs,$(1),\
350 -DSYSTEM_ZLIB \
351 -DZLIB_CONST \
353 $(call gb_LinkTarget_add_libs,$(1),-lz)
355 endef
357 # nothing on system
358 define gb_LinkTarget__use_zlib_x64
360 endef
362 gb_ExternalProject__use_zlib :=
364 else # !SYSTEM_ZLIB
366 define gb_LinkTarget__use_zlib_multiarch
367 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
369 $(call gb_LinkTarget_add_defs,$(1), \
370 -DZLIB_CONST \
373 $(call gb_LinkTarget_set_include,$(1),\
374 $(ZLIB_CFLAGS) \
375 $$(INCLUDE) \
378 $(call gb_LinkTarget_use_static_libraries,$(1),\
379 $(2) \
382 endef
384 define gb_LinkTarget__use_zlib
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
387 endef
389 define gb_LinkTarget__use_zlib_x64
390 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
392 endef
394 define gb_ExternalProject__use_zlib
395 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
397 endef
399 endif # SYSTEM_ZLIB
402 ifneq ($(SYSTEM_LIBJPEG),)
404 define gb_LinkTarget__use_libjpeg
405 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
406 $(call gb_LinkTarget_set_ldflags,$(1),\
407 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
410 endef
412 gb_ExternalProject__use_libjpeg :=
414 else
416 define gb_LinkTarget__use_libjpeg
417 $(call gb_LinkTarget_set_include,$(1),\
418 $(LIBJPEG_CFLAGS) \
419 $$(INCLUDE) \
421 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
422 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
424 endef
426 define gb_ExternalProject__use_libjpeg
427 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
429 endef
431 endif # SYSTEM_LIBJPEG
433 ifneq ($(SYSTEM_MYTHES),)
435 define gb_LinkTarget__use_mythes
436 $(call gb_LinkTarget_set_include,$(1),\
437 $$(INCLUDE) \
438 $(MYTHES_CFLAGS) \
440 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
442 endef
444 else # !SYSTEM_MYTHES
446 define gb_LinkTarget__use_mythes
447 $(call gb_LinkTarget_set_include,$(1),\
448 -I$(call gb_UnpackedTarball_get_dir,mythes) \
449 $$(INCLUDE) \
452 ifeq ($(COM),MSC)
453 $(call gb_LinkTarget_use_static_libraries,$(1),\
454 mythes \
456 else
457 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
458 $(call gb_LinkTarget_use_external_project,$(1),mythes)
459 endif
461 endef
463 endif # SYSTEM_MYTHES
466 ifneq ($(SYSTEM_EXPAT),)
468 define gb_LinkTarget__use_expat_impl
469 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
471 $(call gb_LinkTarget_add_defs,$(1),\
472 -DSYSTEM_EXPAT \
475 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
477 endef
479 gb_ExternalProject__use_expat :=
481 else # !SYSTEM_EXPAT
483 define gb_LinkTarget__use_expat_impl
484 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
486 $(call gb_LinkTarget_set_include,$(1),\
487 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
488 $$(INCLUDE) \
491 $(call gb_LinkTarget_use_static_libraries,$(1),\
492 $(2) \
495 endef
497 define gb_ExternalProject__use_expat
498 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
500 endef
502 endif # SYSTEM_EXPAT
504 define gb_LinkTarget__use_expat
505 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
507 endef
509 define gb_LinkTarget__use_expat_x64
510 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
512 endef
514 ifneq ($(SYSTEM_HYPH),)
516 define gb_LinkTarget__use_hyphen
517 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
519 endef
521 else # !SYSTEM_HYPH
523 define gb_LinkTarget__use_hyphen
524 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
525 $(call gb_LinkTarget_set_include,$(1),\
526 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
527 $$(INCLUDE) \
530 ifeq ($(COM),MSC)
531 $(call gb_LinkTarget_use_static_libraries,$(1),\
532 hyphen \
534 else
535 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
536 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
537 endif
539 endef
541 endif # SYSTEM_HYPH
543 ifneq ($(SYSTEM_HUNSPELL),)
545 define gb_LinkTarget__use_hunspell
546 $(call gb_LinkTarget_set_include,$(1),\
547 $$(INCLUDE) \
548 $(HUNSPELL_CFLAGS) \
550 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
552 endef
554 gb_ExternalProject__use_hunspell :=
556 else # !SYSTEM_HUNSPELL
558 define gb_LinkTarget__use_hunspell
559 $(call gb_LinkTarget_add_defs,$(1),\
560 -DHUNSPELL_STATIC \
562 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
563 $(call gb_LinkTarget_set_include,$(1),\
564 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
565 $$(INCLUDE) \
568 ifeq ($(COM),MSC)
569 $(call gb_LinkTarget_use_static_libraries,$(1),\
570 hunspell \
572 else
573 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
574 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
575 endif
577 endef
579 define gb_ExternalProject__use_hunspell
580 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
582 endef
584 endif # SYSTEM_HUNSPELL
587 ifneq ($(SYSTEM_BOOST),)
589 define gb_LinkTarget__use_boost_lib
590 $(call gb_LinkTarget_set_include,$(1),\
591 $$(INCLUDE) \
592 $(BOOST_CPPFLAGS) \
595 $(call gb_LinkTarget_add_ldflags,$(1),\
596 $(BOOST_LDFLAGS) \
599 $(call gb_LinkTarget_add_libs,$(1),$(2))
601 endef
603 define gb_LinkTarget__use_boost_locale
604 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
606 endef
608 define gb_LinkTarget__use_boost_date_time
609 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
611 endef
613 define gb_LinkTarget__use_boost_filesystem
614 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
616 endef
618 gb_ExternalProject__use_boost_filesystem :=
620 define gb_LinkTarget__use_boost_iostreams
621 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
623 endef
625 gb_ExternalProject__use_boost_iostreams :=
627 define gb_LinkTarget__use_boost_system
628 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
630 endef
632 gb_ExternalProject__use_boost_system :=
634 define gb_LinkTarget__use_boost_headers
635 $(call gb_LinkTarget_set_include,$(1),\
636 $$(INCLUDE) \
637 $(BOOST_CPPFLAGS) \
640 endef
642 gb_ExternalProject__use_boost_headers:=
644 else # !SYSTEM_BOOST
646 define gb_LinkTarget__use_boost_lib
647 $(call gb_LinkTarget_add_defs,$(1),\
648 -DBOOST_ALL_NO_LIB \
651 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
653 endef
655 define gb_LinkTarget__use_boost_locale
656 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
657 $(call gb_LinkTarget_add_libs,$(1),\
658 $(if $(filter $(OS),MACOSX),-liconv) \
661 endef
663 define gb_LinkTarget__use_boost_date_time
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
666 endef
668 define gb_LinkTarget__use_boost_filesystem
669 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
671 endef
673 define gb_ExternalProject__use_boost_filesystem
674 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
675 endef
677 define gb_LinkTarget__use_boost_iostreams
678 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
680 endef
682 define gb_ExternalProject__use_boost_iostreams
683 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
684 endef
686 define gb_LinkTarget__use_boost_system
687 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
689 endef
691 define gb_ExternalProject__use_boost_system
692 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
693 endef
695 define gb_LinkTarget__use_boost_headers
696 $(call gb_LinkTarget_use_unpacked,$(1),boost)
697 $(call gb_LinkTarget_set_include,$(1),\
698 $(BOOST_CPPFLAGS) \
699 $$(INCLUDE) \
702 endef
704 define gb_ExternalProject__use_boost_headers
705 $(call gb_ExternalProject_use_unpacked,$(1),boost)
707 endef
709 endif # SYSTEM_BOOST
712 ifneq ($(SYSTEM_LIBCMIS),)
714 define gb_LinkTarget__use_libcmis
715 $(call gb_LinkTarget_set_include,$(1),\
716 $$(INCLUDE) \
717 $(LIBCMIS_CFLAGS) \
719 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
721 endef
723 else # !SYSTEM_LIBCMIS
725 define gb_LinkTarget__use_libcmis
726 $(call gb_LinkTarget_set_include,$(1),\
727 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
728 $$(INCLUDE) \
730 $(call gb_LinkTarget_use_static_libraries,$(1),\
731 libcmis \
734 endef
736 endif # SYSTEM_LIBCMIS
738 ifeq ($(ENABLE_JAVA),TRUE)
740 define gb_LinkTarget__use_jawt
741 $(call gb_LinkTarget_add_libs,$(1),\
742 $(JAWTLIB) \
745 endef
747 else # !ENABLE_JAVA
749 gb_LinkTarget__use_jawt :=
751 endif # ENABLE_JAVA
753 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
755 define gb_LinkTarget__use_libatomic_ops
756 $(call gb_LinkTarget_set_include,$(1),\
757 $$(INCLUDE) \
758 $(LIBATOMIC_OPS_CFLAGS) \
760 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
762 endef
763 gb_ExternalProject__use_libatomic_ops :=
765 else # !SYSTEM_LIBATOMIC_OPS
767 define gb_LinkTarget__use_libatomic_ops
768 $(call gb_LinkTarget_set_include,$(1),\
769 $(LIBATOMIC_OPS_CFLAGS) \
770 $$(INCLUDE) \
771 $(LIBATOMIC_OPS_CFLAGS) \
773 $(call gb_LinkTarget_use_external_project,$(1),\
774 libatomic_ops \
777 $(call gb_LinkTarget_add_libs,$(1),\
778 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
781 endef
783 define gb_ExternalProject__use_libatomic_ops
784 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
786 endef
788 endif # SYSTEM_LIBATOMIC_OPS
791 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
793 define gb_LinkTarget__use_libexttextcat
794 $(call gb_LinkTarget_set_include,$(1),\
795 $$(INCLUDE) \
796 $(LIBEXTTEXTCAT_CFLAGS) \
798 $(call gb_LinkTarget_add_defs,$(1),\
799 -DSYSTEM_LIBEXTTEXTCAT \
801 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
803 endef
805 else # !SYSTEM_LIBEXTTEXTCAT
807 define gb_LinkTarget__use_libexttextcat
808 $(call gb_LinkTarget_set_include,$(1),\
809 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
810 $$(INCLUDE) \
813 ifeq ($(COM),MSC)
814 $(call gb_LinkTarget_use_static_libraries,$(1),\
815 libexttextcat \
817 else
818 $(call gb_LinkTarget_add_libs,$(1),\
819 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
821 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
822 endif
825 endef
827 endif # SYSTEM_LIBEXTTEXTCAT
830 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
832 define gb_LinkTarget__use_libnumbertext
833 $(call gb_LinkTarget_set_include,$(1),\
834 $$(INCLUDE) \
835 $(LIBNUMBERTEXT_CFLAGS) \
837 $(call gb_LinkTarget_add_defs,$(1),\
838 -DSYSTEM_LIBNUMBERTEXT \
840 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
842 endef
844 else # !SYSTEM_LIBNUMBERTEXT
846 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
847 libnumbertext_numbertext \
850 define gb_LinkTarget__use_libnumbertext
851 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
852 $(call gb_LinkTarget_set_include,$(1),\
853 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
854 $$(INCLUDE) \
857 ifeq ($(COM),MSC)
858 $(call gb_LinkTarget_use_static_libraries,$(1),\
859 libnumbertext \
861 else
863 $(call gb_LinkTarget_add_libs,$(1),\
864 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
866 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
868 endif
870 endef
872 endif # SYSTEM_LIBNUMBERTEXT
875 ifneq ($(SYSTEM_LIBXML),)
877 define gb_LinkTarget__use_libxml2
878 $(call gb_LinkTarget_add_defs,$(1),\
879 -DSYSTEM_LIBXML \
881 $(call gb_LinkTarget_set_include,$(1),\
882 $$(INCLUDE) \
883 $(LIBXML_CFLAGS) \
885 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
887 endef
888 gb_ExternalProject__use_libxml2:=
890 else # !SYSTEM_LIBXML
892 $(eval $(call gb_Helper_register_packages_for_install,ure,\
893 libxml2 \
896 define gb_LinkTarget__use_libxml2
897 $(call gb_LinkTarget_use_package,$(1),libxml2)
898 $(call gb_LinkTarget_set_include,$(1),\
899 $$(INCLUDE) \
900 $(LIBXML_CFLAGS) \
903 $(call gb_LinkTarget_add_libs,$(1),\
904 $(LIBXML_LIBS) \
907 ifeq ($(COM),MSC)
908 $(call gb_LinkTarget_use_external,$(1),icu_headers)
909 endif
911 endef
912 define gb_ExternalProject__use_libxml2
913 $(call gb_ExternalProject_use_package,$(1),libxml2)
915 ifeq ($(COM),MSC)
916 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
917 endif
919 endef
921 endif # SYSTEM_LIBXML
924 ifneq ($(SYSTEM_LIBXSLT),)
926 define gb_LinkTarget__use_libxslt
927 $(call gb_LinkTarget_set_include,$(1),\
928 $$(INCLUDE) \
929 $(LIBXSLT_CFLAGS) \
931 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
933 endef
935 define gb_LinkTarget__use_libexslt
936 $(call gb_LinkTarget_set_include,$(1),\
937 $$(INCLUDE) \
938 $(LIBEXSLT_CFLAGS) \
941 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
943 endef
945 else # !SYSTEM_LIBXSLT
947 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
948 libxslt \
951 define gb_LinkTarget__use_libxslt
952 $(call gb_LinkTarget_use_package,$(1),libxslt)
953 $(call gb_LinkTarget_set_include,$(1),\
954 $$(INCLUDE) \
955 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
958 ifeq ($(COM),MSC)
959 $(call gb_LinkTarget_add_libs,$(1),\
960 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
962 else
963 $(call gb_LinkTarget_add_libs,$(1),\
964 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
966 endif
968 endef
970 define gb_LinkTarget__use_libexslt
971 $(call gb_LinkTarget_use_package,$(1),libxslt)
972 $(call gb_LinkTarget_set_include,$(1),\
973 $$(INCLUDE) \
974 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
977 ifeq ($(COM),MSC)
978 $(call gb_LinkTarget_add_libs,$(1),\
979 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
981 else
982 $(call gb_LinkTarget_add_libs,$(1),\
983 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
985 endif
987 endef
989 endif # SYSTEM_LIBXSLT
992 ifneq ($(SYSTEM_XMLSEC),)
994 define gb_LinkTarget__use_xmlsec
995 $(call gb_LinkTarget_add_defs,$(1),\
996 -DSYSTEM_XMLSEC \
998 $(call gb_LinkTarget_set_include,$(1),\
999 $$(INCLUDE) \
1000 $(XMLSEC_CFLAGS) \
1002 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1004 endef
1006 gb_ExternalProject__use_xmlsec:=
1008 else # !SYSTEM_XMLSEC
1010 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1011 xmlsec \
1014 define gb_LinkTarget__use_xmlsec
1016 endef
1018 endif # SYSTEM_XMLSEC
1020 ifneq ($(SYSTEM_LIBLANGTAG),)
1022 define gb_LinkTarget__use_liblangtag
1023 $(call gb_LinkTarget_set_include,$(1),\
1024 $$(INCLUDE) \
1025 $(LIBLANGTAG_CFLAGS) \
1028 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1030 endef
1032 gb_ExternalProject__use_liblangtag :=
1034 else # !SYSTEM_LIBLANGTAG
1036 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1037 liblangtag_data \
1040 ifeq ($(COM),MSC)
1042 define gb_LinkTarget__use_liblangtag
1043 $(call gb_LinkTarget_set_include,$(1),\
1044 $(LIBLANGTAG_CFLAGS) \
1045 $$(INCLUDE) \
1047 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1048 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1050 endef
1052 else
1054 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1055 liblangtag \
1058 define gb_LinkTarget__use_liblangtag
1059 $(call gb_LinkTarget_set_include,$(1),\
1060 $(LIBLANGTAG_CFLAGS) \
1061 $$(INCLUDE) \
1063 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1064 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1066 endef
1068 endif # MSC
1070 define gb_ExternalProject__use_liblangtag
1071 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1073 endef
1075 endif # SYSTEM_LIBLANGTAG
1078 gb_ExternalProject__use_apr :=
1080 ifeq ($(WITH_WEBDAV),serf)
1082 define gb_LinkTarget__use_apr
1083 $(call gb_LinkTarget_set_include,$(1),\
1084 $$(INCLUDE) \
1085 $(APR_CFLAGS) \
1087 $(call gb_LinkTarget_add_libs,$(1),\
1088 $(APR_LIBS) \
1089 $(if $(filter $(OS),LINUX),-lpthread) \
1090 $(if $(filter $(OS),MACOSX),-liconv) \
1093 ifeq ($(SYSTEM_APR),)
1094 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1095 mswsock \
1096 rpcrt4 \
1097 shell32 \
1099 $(call gb_LinkTarget_add_defs,$(1),\
1100 -DAPR_DECLARE_STATIC \
1101 -DAPU_DECLARE_STATIC \
1103 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1104 endif
1106 endef
1108 define gb_ExternalProject__use_apr
1109 ifeq ($(SYSTEM_APR),)
1110 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1111 endif
1113 endef
1115 ifneq ($(SYSTEM_SERF),)
1117 define gb_LinkTarget__use_serf
1118 $(call gb_LinkTarget_add_defs,$(1),\
1119 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1122 $(call gb_LinkTarget_set_include,$(1),\
1123 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1124 $$(INCLUDE) \
1127 $(call gb_LinkTarget_add_libs,$(1),\
1128 $(SERF_LIBS) \
1131 endef
1133 else # !SYSTEM_SERF
1135 define gb_LinkTarget__use_serf
1136 $(call gb_LinkTarget_set_include,$(1),\
1137 -I$(call gb_UnpackedTarball_get_dir,serf) \
1138 $$(INCLUDE) \
1141 $(call gb_LinkTarget_use_static_libraries,$(1),\
1142 serf \
1145 endef
1147 endif # SYSTEM_SERF
1149 else ifeq ($(WITH_WEBDAV),neon)
1151 ifneq ($(SYSTEM_NEON),)
1153 define gb_LinkTarget__use_neon
1154 $(call gb_LinkTarget_add_defs,$(1),\
1155 -DNEON_VERSION=0x$(NEON_VERSION) \
1156 -DSYSTEM_NEON \
1158 $(call gb_LinkTarget_set_include,$(1),\
1159 $$(INCLUDE) \
1160 $(NEON_CFLAGS) \
1163 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1165 endef
1167 else # !SYSTEM_NEON
1169 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1170 neon \
1173 define gb_LinkTarget__use_neon
1174 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1175 $(call gb_LinkTarget_set_include,$(1),\
1176 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1177 $$(INCLUDE) \
1179 $(call gb_LinkTarget_use_libraries,$(1),\
1180 neon \
1183 endef
1185 endif # SYSTEM_NEON
1187 endif # WITH_WEBDAV
1189 ifneq ($(SYSTEM_REDLAND),)
1191 define gb_LinkTarget__use_librdf
1192 $(call gb_LinkTarget_add_defs,$(1),\
1193 -DSYSTEM_REDLAND \
1195 $(call gb_LinkTarget_set_include,$(1),\
1196 $$(INCLUDE) \
1197 $(REDLAND_CFLAGS) \
1199 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1201 endef
1203 gb_LinkTarget__use_redland_headers:=
1205 gb_LinkTarget__use_raptor_headers:=
1207 gb_LinkTarget__use_rasqal_headers:=
1209 else # !SYSTEM_REDLAND
1211 define gb_LinkTarget__use_redland_headers
1212 $(call gb_LinkTarget_set_include,$(1),\
1213 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1214 $$(INCLUDE) \
1217 endef
1219 define gb_LinkTarget__use_raptor_headers
1220 $(call gb_LinkTarget_set_include,$(1),\
1221 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1222 $$(INCLUDE) \
1225 endef
1227 define gb_LinkTarget__use_rasqal_headers
1228 $(call gb_LinkTarget_set_include,$(1),\
1229 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1230 $$(INCLUDE) \
1233 endef
1235 ifneq ($(OS),ANDROID)
1237 ifeq ($(COM),MSC)
1238 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1239 raptor2 \
1240 rasqal \
1241 rdf \
1243 else
1244 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1245 raptor \
1246 rasqal \
1247 redland \
1249 endif
1251 define gb_LinkTarget__use_librdf
1252 ifeq ($(COM),MSC)
1253 $(call gb_LinkTarget_use_libraries,$(1),\
1254 raptor2 \
1255 rdf \
1257 else
1258 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1260 $(call gb_LinkTarget_add_libs,$(1),\
1261 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1262 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1263 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1265 endif
1267 endef
1269 else # ANDROID
1271 define gb_LinkTarget__use_librdf
1272 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1274 endef
1276 endif # ANDROID
1278 endif # SYSTEM_REDLAND
1280 ifneq ($(SYSTEM_CAIRO),)
1282 define gb_LinkTarget__use_cairo
1283 $(call gb_LinkTarget_set_include,$(1),\
1284 $$(INCLUDE) \
1285 $(CAIRO_CFLAGS) \
1287 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1288 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1290 endef
1292 else # !SYSTEM_CAIRO
1294 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1296 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1297 cairo \
1298 pixman \
1301 define gb_LinkTarget__use_cairo
1302 $(call gb_LinkTarget_use_package,$(1),cairo)
1303 $(call gb_LinkTarget_use_package,$(1),pixman)
1304 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1305 $(call gb_LinkTarget_set_include,$(1),\
1306 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1307 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1308 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1309 $$(INCLUDE) \
1311 $(call gb_LinkTarget_add_libs,$(1),\
1312 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1313 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1316 endef
1318 endif # !MACOSX, !WNT
1320 endif # !SYSTEM_CAIRO
1322 ifneq ($(SYSTEM_FREETYPE),)
1324 define gb_LinkTarget__use_freetype_headers
1325 $(call gb_LinkTarget_set_include,$(1),\
1326 $$(INCLUDE) \
1327 $(FREETYPE_CFLAGS) \
1330 endef
1332 gb_ExternalProject__use_freetype :=
1334 else
1336 define gb_LinkTarget__use_freetype_headers
1337 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1338 $(call gb_LinkTarget_set_include,$(1),\
1339 $(FREETYPE_CFLAGS) \
1340 $$(INCLUDE) \
1343 endef
1345 define gb_ExternalProject__use_freetype
1346 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1348 endef
1350 endif # SYSTEM_FREETYPE
1352 define gb_LinkTarget__use_freetype
1353 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1354 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1356 endef
1358 ifneq ($(SYSTEM_FONTCONFIG),)
1360 define gb_LinkTarget__use_fontconfig
1361 $(call gb_LinkTarget_set_include,$(1),\
1362 $$(INCLUDE) \
1363 $(FONTCONFIG_CFLAGS) \
1366 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1368 endef
1370 gb_ExternalProject__use_fontconfig :=
1372 else
1374 define gb_LinkTarget__use_fontconfig
1375 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1376 $(call gb_LinkTarget_set_include,$(1),\
1377 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1378 $$(INCLUDE) \
1381 $(call gb_LinkTarget_add_libs,$(1),\
1382 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1385 endef
1387 define gb_ExternalProject__use_fontconfig
1388 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1390 endef
1392 endif # SYSTEM_FONTCONFIG
1394 ifneq ($(SYSTEM_GRAPHITE),)
1396 define gb_LinkTarget__use_graphite
1397 $(call gb_LinkTarget_set_include,$(1),\
1398 $$(INCLUDE) \
1399 $(GRAPHITE_CFLAGS) \
1401 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1403 endef
1405 gb_ExternalProject__use_graphite:=
1407 else # !SYSTEM_GRAPHITE
1409 define gb_LinkTarget__use_graphite
1410 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1411 $(call gb_LinkTarget_set_include,$(1),\
1412 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1413 $$(INCLUDE) \
1415 $(call gb_LinkTarget_use_static_libraries,$(1),\
1416 graphite \
1419 endef
1421 define gb_ExternalProject__use_graphite
1422 $(call gb_ExternalProject_use_static_libraries,$(1),\
1423 graphite \
1426 endef
1427 endif # SYSTEM_GRAPHITE
1429 ifneq ($(SYSTEM_ICU),)
1431 gb_LinkTarget__use_icu_headers:=
1432 gb_ExternalProject__use_icu:=
1434 define gb_LinkTarget__use_icudata
1435 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1437 endef
1438 define gb_LinkTarget__use_icui18n
1439 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1441 endef
1442 define gb_LinkTarget__use_icuuc
1443 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1445 endef
1447 else # !SYSTEM_ICU
1449 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1450 icu_ure \
1453 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1454 icu \
1457 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1458 gb_ICU_suffix:=lo
1459 else
1460 gb_ICU_suffix:=
1461 endif
1463 define gb_LinkTarget__use_icu_headers
1464 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1465 $(call gb_LinkTarget_set_include,$(1),\
1466 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1467 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1468 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1469 $$(INCLUDE) \
1472 endef
1474 define gb_ExternalProject__use_icu
1475 $(call gb_ExternalProject_use_package,$(1),icu)
1477 endef
1479 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1480 define gb_LinkTarget__use_icudata
1481 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1483 ifeq ($(OS),WNT)
1484 $(call gb_LinkTarget_add_libs,$(1),\
1485 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1487 else
1488 $(call gb_LinkTarget_add_libs,$(1),\
1489 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1491 endif
1493 endef
1495 define gb_LinkTarget__use_icui18n
1496 $(call gb_LinkTarget_use_package,$(1),icu)
1498 ifeq ($(OS),WNT)
1499 $(call gb_LinkTarget_add_libs,$(1),\
1500 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1502 else
1503 $(call gb_LinkTarget_add_libs,$(1),\
1504 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1506 endif
1508 endef
1510 define gb_LinkTarget__use_icuuc
1511 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1513 ifeq ($(OS),WNT)
1514 $(call gb_LinkTarget_add_libs,$(1),\
1515 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1517 else
1518 $(call gb_LinkTarget_add_libs,$(1),\
1519 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1521 endif
1523 endef
1525 endif # SYSTEM_ICU
1527 ifneq ($(SYSTEM_HARFBUZZ),)
1529 define gb_LinkTarget__use_harfbuzz
1530 $(call gb_LinkTarget_set_include,$(1),\
1531 $$(INCLUDE) \
1532 $(HARFBUZZ_CFLAGS) \
1534 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1536 endef
1538 gb_ExternalProject__use_harfbuzz :=
1540 else # SYSTEM_HARFBUZZ != TRUE
1542 define gb_LinkTarget__use_harfbuzz
1543 $(call gb_LinkTarget_set_include,$(1),\
1544 $(HARFBUZZ_CFLAGS) \
1545 $$(INCLUDE) \
1547 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1548 $(call gb_LinkTarget_use_external,$(1),icuuc)
1549 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1551 endef
1553 define gb_ExternalProject__use_harfbuzz
1554 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1556 endef
1558 endif # SYSTEM_HARFBUZZ
1560 ifneq ($(ENABLE_OPENSSL),TRUE)
1562 gb_ExternalProject__use_openssl:=
1563 gb_LinkTarget__use_openssl_headers:=
1564 gb_LinkTarget__use_openssl:=
1566 else # ENABLE_OPENSSL
1568 ifneq ($(SYSTEM_OPENSSL),)
1570 gb_LinkTarget__use_openssl_headers:=
1571 gb_ExternalProject__use_openssl:=
1573 define gb_LinkTarget__use_openssl
1574 $(call gb_LinkTarget_set_include,$(1),\
1575 $$(INCLUDE) \
1576 $(OPENSSL_CFLAGS) \
1578 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1580 endef
1582 else # !SYSTEM_OPENSSL
1584 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1585 openssl \
1588 define gb_ExternalProject__use_openssl
1589 $(call gb_ExternalProject_use_package,$(1),openssl)
1591 endef
1593 define gb_LinkTarget__use_openssl_headers
1594 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1595 $(call gb_LinkTarget_set_include,$(1),\
1596 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1597 $$(INCLUDE) \
1600 endef
1602 define gb_LinkTarget__use_openssl
1603 $(call gb_LinkTarget_use_package,$(1),openssl)
1604 ifeq ($(OS),WNT)
1605 $(call gb_LinkTarget_add_libs,$(1),\
1606 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1607 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1609 else
1610 $(call gb_LinkTarget_add_libs,$(1),\
1611 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1612 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1613 $(if $(filter $(OS),LINUX),-pthread) \
1615 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1616 ifeq ($(OS),SOLARIS)
1617 $(call gb_LinkTarget_add_libs,$(1),\
1618 -lnsl \
1619 -lsocket \
1621 endif
1622 endif
1624 endef
1626 endif # SYSTEM_OPENSSL
1627 endif # ENABLE_OPENSSL
1630 ifneq ($(ENABLE_OPENSSL),TRUE)
1632 define gb_LinkTarget__use_gnutls
1633 $(call gb_LinkTarget_set_include,$(1),\
1634 $$(INCLUDE) \
1635 $(GNUTLS_CFLAGS) \
1638 $(call gb_LinkTarget_add_defs,$(1),\
1639 -DDISABLE_OPENSSL \
1642 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1644 endef
1646 define gb_LinkTarget__use_libgcrypt
1647 $(call gb_LinkTarget_set_include,$(1),\
1648 $$(INCLUDE) \
1649 $(LIBGCRYPT_CFLAGS) \
1652 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1654 endef
1656 else # ENABLE_OPENSSL
1658 gb_LinkTarget__use_gnutls:=
1659 gb_LinkTarget__use_libgcrypt:=
1661 endif # ENABLE_OPENSSL
1664 ifneq ($(SYSTEM_CDR),)
1666 define gb_LinkTarget__use_cdr
1667 $(call gb_LinkTarget_set_include,$(1),\
1668 $$(INCLUDE) \
1669 $(CDR_CFLAGS) \
1671 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1673 endef
1675 else # !SYSTEM_CDR
1677 define gb_LinkTarget__use_cdr
1678 $(call gb_LinkTarget_set_include,$(1),\
1679 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1680 $$(INCLUDE) \
1682 $(call gb_LinkTarget_add_libs,$(1),\
1683 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1685 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1686 endef
1688 endif # SYSTEM_CDR
1691 ifneq ($(SYSTEM_EBOOK),)
1693 define gb_LinkTarget__use_ebook
1694 $(call gb_LinkTarget_set_include,$(1),\
1695 $$(INCLUDE) \
1696 $(EBOOK_CFLAGS) \
1698 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1700 endef
1702 gb_ExternalProject__use_ebook :=
1704 else # !SYSTEM_EBOOK
1706 define gb_LinkTarget__use_ebook
1707 $(call gb_LinkTarget_set_include,$(1),\
1708 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1709 $$(INCLUDE) \
1711 $(call gb_LinkTarget_add_libs,$(1),\
1712 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1714 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1716 endef
1718 define gb_ExternalProject__use_ebook
1719 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1721 endef
1723 endif # SYSTEM_EBOOK
1726 ifneq ($(SYSTEM_ETONYEK),)
1728 define gb_LinkTarget__use_etonyek
1729 $(call gb_LinkTarget_set_include,$(1),\
1730 $$(INCLUDE) \
1731 $(ETONYEK_CFLAGS) \
1733 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1735 endef
1737 gb_ExternalProject__use_etonyek :=
1739 else # !SYSTEM_ETONYEK
1741 ifeq ($(COM),MSC)
1743 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1744 etonyek \
1747 define gb_LinkTarget__use_etonyek
1748 $(call gb_LinkTarget_set_include,$(1),\
1749 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1750 $$(INCLUDE) \
1752 $(call gb_LinkTarget_use_libraries,$(1),\
1753 etonyek \
1756 endef
1758 else # !MSC
1760 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1761 libetonyek \
1764 define gb_LinkTarget__use_etonyek
1765 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1767 $(call gb_LinkTarget_set_include,$(1),\
1768 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1769 -DLIBETONYEK_VISIBILITY \
1770 $$(INCLUDE) \
1772 $(call gb_LinkTarget_add_libs,$(1),\
1773 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1775 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1777 endef
1779 define gb_ExternalProject__use_etonyek
1780 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1782 endef
1784 endif
1786 endif # SYSTEM_ETONYEK
1789 ifneq ($(SYSTEM_FREEHAND),)
1791 define gb_LinkTarget__use_freehand
1792 $(call gb_LinkTarget_set_include,$(1),\
1793 $$(INCLUDE) \
1794 $(FREEHAND_CFLAGS) \
1796 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1798 endef
1800 gb_ExternalProject__use_freehand :=
1802 else # !SYSTEM_FREEHAND
1804 define gb_LinkTarget__use_freehand
1805 $(call gb_LinkTarget_set_include,$(1),\
1806 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1807 $$(INCLUDE) \
1809 $(call gb_LinkTarget_add_libs,$(1),\
1810 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1812 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1814 endef
1816 define gb_ExternalProject__use_freehand
1817 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1819 endef
1821 endif # SYSTEM_FREEHAND
1824 ifneq ($(SYSTEM_ODFGEN),)
1826 define gb_LinkTarget__use_odfgen
1827 $(call gb_LinkTarget_set_include,$(1),\
1828 $$(INCLUDE) \
1829 $(ODFGEN_CFLAGS) \
1831 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1833 endef
1835 else # !SYSTEM_ODFGEN
1837 ifeq ($(COM),MSC)
1839 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1840 odfgen \
1843 define gb_LinkTarget__use_odfgen
1844 $(call gb_LinkTarget_set_include,$(1),\
1845 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1846 $$(INCLUDE) \
1848 $(call gb_LinkTarget_use_libraries,$(1),\
1849 odfgen \
1852 endef
1854 else # !MSC
1856 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1857 libodfgen \
1860 define gb_LinkTarget__use_odfgen
1861 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1863 $(call gb_LinkTarget_set_include,$(1),\
1864 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1865 -DLIBODFGEN_VISIBILITY \
1866 $$(INCLUDE) \
1868 $(call gb_LinkTarget_add_libs,$(1),\
1869 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1872 endef
1874 endif
1876 endif # SYSTEM_ODFGEN
1878 ifneq ($(SYSTEM_EPUBGEN),)
1880 define gb_LinkTarget__use_epubgen
1881 $(call gb_LinkTarget_set_include,$(1),\
1882 $$(INCLUDE) \
1883 $(EPUBGEN_CFLAGS) \
1885 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1887 endef
1888 gb_ExternalProject__use_epubgen :=
1890 else # !SYSTEM_EPUBGEN
1892 define gb_LinkTarget__use_epubgen
1893 $(call gb_LinkTarget_set_include,$(1),\
1894 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1895 $$(INCLUDE) \
1897 $(call gb_LinkTarget_add_libs,$(1),\
1898 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1900 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1902 endef
1903 define gb_ExternalProject__use_epubgen
1904 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1906 endef
1908 endif # SYSTEM_EPUBGEN
1910 ifneq ($(SYSTEM_REVENGE),)
1912 define gb_LinkTarget__use_revenge
1913 $(call gb_LinkTarget_set_include,$(1),\
1914 $$(INCLUDE) \
1915 $(REVENGE_CFLAGS) \
1917 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1919 endef
1921 gb_ExternalProject__use_revenge :=
1923 else # !SYSTEM_REVENGE
1925 ifeq ($(COM),MSC)
1927 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1928 revenge \
1931 define gb_LinkTarget__use_revenge
1932 $(call gb_LinkTarget_set_include,$(1),\
1933 $(REVENGE_CFLAGS) \
1934 $$(INCLUDE) \
1936 $(call gb_LinkTarget_use_libraries,$(1),\
1937 revenge \
1940 endef
1942 define gb_ExternalProject__use_revenge
1943 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1945 endef
1947 else # !MSC
1949 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1950 librevenge \
1953 define gb_LinkTarget__use_revenge
1954 $(call gb_LinkTarget_use_package,$(1),librevenge)
1956 $(call gb_LinkTarget_set_include,$(1),\
1957 $(REVENGE_CFLAGS) \
1958 -DLIBREVENGE_VISIBILITY \
1959 $$(INCLUDE) \
1961 $(call gb_LinkTarget_add_libs,$(1),\
1962 $(REVENGE_LIBS) \
1964 endef
1966 define gb_ExternalProject__use_revenge
1967 $(call gb_ExternalProject_use_package,$(1),librevenge)
1969 endef
1971 endif # MSC
1973 endif # SYSTEM_REVENGE
1976 ifneq ($(SYSTEM_ABW),)
1978 define gb_LinkTarget__use_abw
1979 $(call gb_LinkTarget_set_include,$(1),\
1980 $$(INCLUDE) \
1981 $(ABW_CFLAGS) \
1983 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1985 endef
1986 gb_ExternalProject__use_abw :=
1988 else # !SYSTEM_ABW
1990 define gb_LinkTarget__use_abw
1991 $(call gb_LinkTarget_set_include,$(1),\
1992 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1993 $$(INCLUDE) \
1995 $(call gb_LinkTarget_add_libs,$(1),\
1996 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1998 $(call gb_LinkTarget_use_external_project,$(1),libabw)
2000 endef
2001 define gb_ExternalProject__use_abw
2002 $(call gb_ExternalProject_use_external_project,$(1),libabw)
2004 endef
2006 endif # SYSTEM_ABW
2009 ifneq ($(SYSTEM_MSPUB),)
2011 define gb_LinkTarget__use_mspub
2012 $(call gb_LinkTarget_set_include,$(1),\
2013 $$(INCLUDE) \
2014 $(MSPUB_CFLAGS) \
2016 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2018 endef
2020 else # !SYSTEM_MSPUB
2022 define gb_LinkTarget__use_mspub
2023 $(call gb_LinkTarget_set_include,$(1),\
2024 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2025 $$(INCLUDE) \
2027 $(call gb_LinkTarget_add_libs,$(1),\
2028 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2030 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2032 endef
2034 endif # SYSTEM_MSPUB
2037 ifneq ($(SYSTEM_PAGEMAKER),)
2039 define gb_LinkTarget__use_pagemaker
2040 $(call gb_LinkTarget_set_include,$(1),\
2041 $$(INCLUDE) \
2042 $(PAGEMAKER_CFLAGS) \
2044 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2046 endef
2047 gb_ExternalProject__use_pagemaker :=
2049 else # !SYSTEM_PAGEMAKER
2051 define gb_LinkTarget__use_pagemaker
2052 $(call gb_LinkTarget_set_include,$(1),\
2053 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2054 $$(INCLUDE) \
2056 $(call gb_LinkTarget_add_libs,$(1),\
2057 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2059 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2061 endef
2062 define gb_ExternalProject__use_pagemaker
2063 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2065 endef
2067 endif # SYSTEM_PAGEMAKER
2070 ifneq ($(SYSTEM_QXP),)
2072 define gb_LinkTarget__use_qxp
2073 $(call gb_LinkTarget_set_include,$(1),\
2074 $$(INCLUDE) \
2075 $(QXP_CFLAGS) \
2077 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2079 endef
2080 gb_ExternalProject__use_qxp :=
2082 else # !SYSTEM_QXP
2084 define gb_LinkTarget__use_qxp
2085 $(call gb_LinkTarget_set_include,$(1),\
2086 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2087 $$(INCLUDE) \
2089 $(call gb_LinkTarget_add_libs,$(1),\
2090 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2092 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2094 endef
2095 define gb_ExternalProject__use_qxp
2096 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2098 endef
2100 endif # SYSTEM_QXP
2103 ifneq ($(SYSTEM_ZMF),)
2105 define gb_LinkTarget__use_zmf
2106 $(call gb_LinkTarget_set_include,$(1),\
2107 $$(INCLUDE) \
2108 $(ZMF_CFLAGS) \
2110 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2112 endef
2113 gb_ExternalProject__use_zmf :=
2115 else # !SYSTEM_ZMF
2117 define gb_LinkTarget__use_zmf
2118 $(call gb_LinkTarget_set_include,$(1),\
2119 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2120 $$(INCLUDE) \
2122 $(call gb_LinkTarget_add_libs,$(1),\
2123 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2125 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2127 endef
2128 define gb_ExternalProject__use_zmf
2129 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2131 endef
2133 endif # SYSTEM_ZMF
2136 ifneq ($(SYSTEM_VISIO),)
2138 define gb_LinkTarget__use_visio
2139 $(call gb_LinkTarget_set_include,$(1),\
2140 $$(INCLUDE) \
2141 $(VISIO_CFLAGS) \
2143 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2145 endef
2147 else # !SYSTEM_VISIO
2149 define gb_LinkTarget__use_visio
2150 $(call gb_LinkTarget_set_include,$(1),\
2151 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2152 $$(INCLUDE) \
2154 $(call gb_LinkTarget_add_libs,$(1),\
2155 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2157 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2159 endef
2161 endif # SYSTEM_VISIO
2164 ifneq ($(SYSTEM_WPD),)
2166 define gb_LinkTarget__use_wpd
2167 $(call gb_LinkTarget_set_include,$(1),\
2168 $$(INCLUDE) \
2169 $(WPD_CFLAGS) \
2171 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2173 endef
2174 gb_ExternalProject__use_wpd :=
2176 else # !SYSTEM_WPD
2178 ifeq ($(COM),MSC)
2180 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2181 wpd \
2184 define gb_LinkTarget__use_wpd
2185 $(call gb_LinkTarget_set_include,$(1),\
2186 $(WPD_CFLAGS) \
2187 $$(INCLUDE) \
2189 $(call gb_LinkTarget_use_libraries,$(1),\
2190 wpd \
2193 endef
2195 define gb_ExternalProject__use_wpd
2196 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2198 endef
2200 else # !MSC
2202 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2203 libwpd \
2206 define gb_LinkTarget__use_wpd
2207 $(call gb_LinkTarget_use_package,$(1),libwpd)
2209 $(call gb_LinkTarget_set_include,$(1),\
2210 $(WPD_CFLAGS) \
2211 $$(INCLUDE) \
2213 $(call gb_LinkTarget_add_libs,$(1),\
2214 $(WPD_LIBS) \
2217 endef
2219 define gb_ExternalProject__use_wpd
2220 $(call gb_ExternalProject_use_package,$(1),libwpd)
2222 endef
2224 endif # MSC
2226 endif # SYSTEM_WPD
2229 ifneq ($(SYSTEM_WPG),)
2231 define gb_LinkTarget__use_wpg
2232 $(call gb_LinkTarget_set_include,$(1),\
2233 $$(INCLUDE) \
2234 $(WPG_CFLAGS) \
2236 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2238 endef
2239 gb_ExternalProject__use_wpg :=
2241 else # !SYSTEM_WPG
2243 ifeq ($(COM),MSC)
2245 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2246 wpg \
2249 define gb_LinkTarget__use_wpg
2250 $(call gb_LinkTarget_set_include,$(1),\
2251 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2252 $$(INCLUDE) \
2254 $(call gb_LinkTarget_use_libraries,$(1),\
2255 wpg \
2258 endef
2260 else # !MSC
2262 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2263 libwpg \
2266 define gb_LinkTarget__use_wpg
2267 $(call gb_LinkTarget_use_package,$(1),libwpg)
2269 $(call gb_LinkTarget_set_include,$(1),\
2270 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2271 $$(INCLUDE) \
2273 $(call gb_LinkTarget_add_libs,$(1),\
2274 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2277 endef
2279 endif # MSC
2281 endif # SYSTEM_WPG
2284 ifneq ($(SYSTEM_WPS),)
2286 define gb_LinkTarget__use_wps
2287 $(call gb_LinkTarget_set_include,$(1),\
2288 $$(INCLUDE) \
2289 $(WPS_CFLAGS) \
2291 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2293 endef
2294 gb_ExternalProject__use_wps :=
2296 else # !SYSTEM_WPS
2298 ifeq ($(COM),MSC)
2300 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2301 wps \
2304 define gb_LinkTarget__use_wps
2305 $(call gb_LinkTarget_set_include,$(1),\
2306 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2307 $$(INCLUDE) \
2310 $(call gb_LinkTarget_use_libraries,$(1),\
2311 wps \
2314 endef
2316 else # !MSC
2318 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2319 libwps \
2322 define gb_LinkTarget__use_wps
2323 $(call gb_LinkTarget_use_package,$(1),libwps)
2325 $(call gb_LinkTarget_set_include,$(1),\
2326 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2327 $$(INCLUDE) \
2329 $(call gb_LinkTarget_add_libs,$(1),\
2330 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2333 endef
2335 endif # MSC
2337 endif # SYSTEM_WPS
2340 ifneq ($(SYSTEM_MWAW),)
2342 define gb_LinkTarget__use_mwaw
2343 $(call gb_LinkTarget_set_include,$(1),\
2344 $$(INCLUDE) \
2345 $(MWAW_CFLAGS) \
2347 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2349 endef
2351 else # !SYSTEM_MWAW
2353 ifeq ($(COM),MSC)
2355 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2356 mwaw \
2359 define gb_LinkTarget__use_mwaw
2360 $(call gb_LinkTarget_set_include,$(1),\
2361 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2362 $$(INCLUDE) \
2365 $(call gb_LinkTarget_use_libraries,$(1),\
2366 mwaw \
2369 endef
2371 else # !MSC
2373 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2374 libmwaw \
2377 define gb_LinkTarget__use_mwaw
2378 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2380 $(call gb_LinkTarget_set_include,$(1),\
2381 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2382 $$(INCLUDE) \
2384 $(call gb_LinkTarget_add_libs,$(1),\
2385 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2388 endef
2390 endif # MSC
2392 endif # SYSTEM_MWAW
2394 ifneq ($(SYSTEM_STAROFFICE),)
2396 define gb_LinkTarget__use_staroffice
2397 $(call gb_LinkTarget_set_include,$(1),\
2398 $$(INCLUDE) \
2399 $(STAROFFICE_CFLAGS) \
2401 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2403 endef
2405 else # !SYSTEM_STAROFFICE
2407 ifeq ($(COM),MSC)
2409 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2410 staroffice \
2413 define gb_LinkTarget__use_staroffice
2414 $(call gb_LinkTarget_set_include,$(1),\
2415 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2416 $$(INCLUDE) \
2419 $(call gb_LinkTarget_use_libraries,$(1),\
2420 staroffice \
2423 endef
2425 else # !MSC
2427 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2428 libstaroffice \
2431 define gb_LinkTarget__use_staroffice
2432 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2434 $(call gb_LinkTarget_set_include,$(1),\
2435 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2436 $$(INCLUDE) \
2438 $(call gb_LinkTarget_add_libs,$(1),\
2439 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2442 endef
2444 endif # MSC
2446 endif # SYSTEM_STAROFFICE
2449 ifneq ($(SYSTEM_LCMS2),)
2451 define gb_LinkTarget__use_lcms2
2452 $(call gb_LinkTarget_set_include,$(1),\
2453 $$(INCLUDE) \
2454 $(LCMS2_CFLAGS) \
2456 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2458 endef
2460 gb_ExternalProject__use_lcms2 :=
2462 else # !SYSTEM_LCMS2
2464 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2465 lcms2 \
2468 define gb_ExternalProject__use_lcms2
2469 $(call gb_ExternalProject_use_package,$(1),lcms2)
2471 endef
2473 ifeq ($(OS),ANDROID)
2475 define gb_LinkTarget__use_lcms2
2476 $(call gb_LinkTarget_use_package,$(1),lcms2)
2477 $(call gb_LinkTarget_set_include,$(1),\
2478 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2479 $$(INCLUDE) \
2482 endef
2484 else
2486 define gb_LinkTarget__use_lcms2
2487 $(call gb_LinkTarget_use_package,$(1),lcms2)
2488 $(call gb_LinkTarget_set_include,$(1),\
2489 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2490 $$(INCLUDE) \
2492 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2494 endef
2496 endif # ANDROID
2497 endif # SYSTEM_LCMS2
2499 ifneq ($(ENABLE_LPSOLVE),)
2501 ifneq ($(SYSTEM_LPSOLVE),)
2503 define gb_LinkTarget__use_lpsolve
2504 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2505 $(call gb_LinkTarget_add_defs,$(1),\
2506 -DSYSTEM_LPSOLVE \
2509 endef
2511 else # !SYSTEM_LPSOLVE
2513 define gb_LinkTarget__use_lpsolve
2514 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2515 ifeq ($(COM),MSC)
2516 $(call gb_LinkTarget_add_libs,$(1),\
2517 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2519 else
2520 $(call gb_LinkTarget_add_libs,$(1),\
2521 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2523 endif
2524 $(call gb_LinkTarget_set_include,$(1),\
2525 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2526 $$(INCLUDE) \
2529 endef
2531 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2532 lpsolve \
2535 endif # SYSTEM_LPSOLVE
2537 else
2539 gb_LinkTarget__use_lpsolve :=
2541 endif # ENABLE_LPSOLVE
2543 ifneq ($(ENABLE_COINMP),)
2545 ifneq ($(SYSTEM_COINMP),TRUE)
2547 define gb_LinkTarget__use_coinmp
2548 $(call gb_LinkTarget_use_package,$(1),coinmp)
2549 ifeq ($(COM),MSC)
2550 $(call gb_LinkTarget_add_libs,$(1),\
2551 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2553 else
2554 $(call gb_LinkTarget_add_libs,$(1),\
2555 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2556 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2557 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2558 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2559 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2560 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2561 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2563 endif
2564 $(call gb_LinkTarget_set_include,$(1),\
2565 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2566 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2567 $$(INCLUDE) \
2570 endef
2572 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2573 coinmp \
2576 else # SYSTEM_COINMP
2578 define gb_LinkTarget__use_coinmp
2579 $(call gb_LinkTarget_set_include,$(1),\
2580 $$(INCLUDE) \
2581 $(COINMP_CFLAGS) \
2583 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2585 endef
2587 endif
2589 else
2591 gb_LinkTarget__use_coinmp :=
2593 endif # ENABLE_COINMP
2595 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2597 define gb_LinkTarget__use_mDNSResponder
2598 $(call gb_LinkTarget_set_include,$(1),\
2599 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2600 $$(INCLUDE) \
2602 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2603 endef
2605 endif # MDNSRESPONDER
2607 ifeq ($(ENABLE_GIO),TRUE)
2609 define gb_LinkTarget__use_gio
2610 $(call gb_LinkTarget_set_include,$(1),\
2611 $$(INCLUDE) \
2612 $(GIO_CFLAGS) \
2615 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2617 endef
2619 else # ENABLE_GIO
2621 define gb_LinkTarget__use_gio
2623 endef
2625 endif # ENABLE_GIO
2627 ifeq ($(ENABLE_AVAHI),TRUE)
2629 define gb_LinkTarget__use_avahi
2630 $(call gb_LinkTarget_set_include,$(1),\
2631 $$(INCLUDE) \
2632 $(AVAHI_CFLAGS) \
2635 $(call gb_LinkTarget_add_defs,$(1),\
2636 -DENABLE_AVAHI \
2639 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2641 endef
2643 else # ENABLE_AVAHI
2645 gb_LinkTarget__use_avahi :=
2647 endif # ENABLE_AVAHI
2649 ifeq ($(ENABLE_CUPS),TRUE)
2651 define gb_LinkTarget__use_cups
2652 $(call gb_LinkTarget_add_defs,$(1),\
2653 -DENABLE_CUPS \
2656 $(call gb_LinkTarget_add_libs,$(1),\
2657 -lcups \
2660 endef
2662 else # ENABLE_CUPS
2664 define gb_LinkTarget__use_cups
2666 endef
2668 endif # ENABLE_CUPS
2670 ifeq ($(ENABLE_DBUS),TRUE)
2672 define gb_LinkTarget__use_dbus
2673 $(call gb_LinkTarget_set_include,$(1),\
2674 $$(INCLUDE) \
2675 $(DBUS_CFLAGS) \
2678 $(call gb_LinkTarget_add_libs,$(1),\
2679 $(DBUS_LIBS) \
2682 endef
2684 else # ENABLE_DBUS
2686 define gb_LinkTarget__use_dbus
2688 endef
2690 endif # ENABLE_DBUS
2693 ifneq ($(SYSTEM_LIBPNG),)
2695 define gb_LinkTarget__use_libpng
2696 $(call gb_LinkTarget_set_include,$(1),\
2697 $$(INCLUDE) \
2698 $(LIBPNG_CFLAGS) \
2701 $(call gb_LinkTarget_add_libs,$(1),\
2702 $(LIBPNG_LIBS) \
2705 endef
2707 gb_ExternalProject__use_libpng :=
2709 else # !SYSTEM_LIBPNG
2711 define gb_LinkTarget__use_libpng
2712 $(call gb_LinkTarget_set_include,$(1),\
2713 $(LIBPNG_CFLAGS) \
2714 $$(INCLUDE) \
2716 $(call gb_LinkTarget_use_static_libraries,$(1),\
2717 libpng \
2719 $(call gb_LinkTarget__use_zlib,$(1))
2721 endef
2723 define gb_ExternalProject__use_libpng
2724 $(call gb_ExternalProject_use_static_libraries,$(1),\
2725 libpng \
2728 endef
2730 endif # !SYSTEM_LIBPNG
2733 ifneq ($(SYSTEM_CURL),)
2735 define gb_LinkTarget__use_curl
2736 $(call gb_LinkTarget_add_defs,$(1),\
2737 -DSYSTEM_CURL \
2739 $(call gb_LinkTarget_set_include,$(1),\
2740 $$(INCLUDE) \
2741 $(CURL_CFLAGS) \
2743 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2745 endef
2747 else # !SYSTEM_CURL
2749 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2750 curl \
2753 define gb_LinkTarget__use_curl
2754 $(call gb_LinkTarget_use_package,$(1),curl)
2755 $(call gb_LinkTarget_set_include,$(1),\
2756 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2757 $$(INCLUDE) \
2760 ifeq ($(COM),MSC)
2761 $(call gb_LinkTarget_add_libs,$(1),\
2762 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2764 else
2765 $(call gb_LinkTarget_add_libs,$(1),\
2766 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2768 endif
2770 endef
2772 endif # SYSTEM_CURL
2774 ifeq ($(ENABLE_VALGRIND),TRUE)
2776 define gb_LinkTarget__use_valgrind
2777 $(call gb_LinkTarget_add_defs,$(1),\
2778 -DHAVE_VALGRIND_HEADERS \
2781 $(call gb_LinkTarget_set_include,$(1),\
2782 $$(INCLUDE) \
2783 $(VALGRIND_CFLAGS) \
2786 endef
2788 else # !ENABLE_VALGRIND
2790 define gb_LinkTarget__use_valgrind
2792 endef
2794 endif # ENABLE_VALGRIND
2796 ifeq ($(ENABLE_POPPLER),TRUE)
2798 ifneq ($(SYSTEM_POPPLER),)
2800 define gb_LinkTarget__use_poppler
2801 $(call gb_LinkTarget_set_include,$(1),\
2802 $(POPPLER_CFLAGS) \
2803 $$(INCLUDE) \
2806 $(call gb_LinkTarget_add_libs,$(1),\
2807 $(POPPLER_LIBS) \
2810 endef
2812 else # !SYSTEM_POPPLER
2814 define gb_LinkTarget__use_poppler
2815 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2816 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2817 $(call gb_LinkTarget_set_include,$(1),\
2818 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2819 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2820 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2821 $$(INCLUDE) \
2824 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2826 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2828 ifeq ($(OS),MACOSX)
2829 $(call gb_LinkTarget_add_libs,$(1),\
2830 -lobjc \
2832 else ifeq ($(OS),LINUX)
2833 $(call gb_LinkTarget_add_libs,$(1),\
2834 -pthread \
2836 else ifeq ($(OS),WNT)
2837 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2838 advapi32 \
2839 gdi32 \
2841 endif
2843 endef
2845 endif # SYSTEM_POPPLER
2847 endif # ENABLE_POPPLER
2850 ifneq ($(SYSTEM_CLUCENE),)
2852 define gb_LinkTarget__use_clucene
2853 $(call gb_LinkTarget_add_defs,$(1),\
2854 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2857 $(call gb_LinkTarget_set_include,$(1),\
2858 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2859 $$(INCLUDE) \
2862 $(call gb_LinkTarget_add_libs,$(1),\
2863 $(CLUCENE_LIBS) \
2866 endef
2868 else # !SYSTEM_CLUCENE
2870 define gb_LinkTarget__use_clucene
2871 $(call gb_LinkTarget_set_include,$(1),\
2872 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2873 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2874 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2875 $$(INCLUDE) \
2878 $(call gb_LinkTarget_use_libraries,$(1),\
2879 clucene \
2882 endef
2884 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2885 clucene \
2888 endif # SYSTEM_CLUCENE
2890 define gb_LinkTarget__use_gobject
2891 $(call gb_LinkTarget_add_libs,$(1),\
2892 $(GOBJECT_LIBS) \
2895 $(call gb_LinkTarget_set_include,$(1),\
2896 $$(INCLUDE) \
2897 $(GOBJECT_CFLAGS) \
2899 endef
2901 ifneq ($(SYSTEM_HSQLDB),)
2903 define gb_LinkTarget__use_hsqldb
2905 $(call gb_LinkTarget_add_defs,$(1),\
2906 -DSYSTEM_HSQLDB \
2907 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2910 endef
2912 else # !SYSTEM_HSQLDB
2914 define gb_LinkTarget__use_hsqldb
2916 endef
2918 endif # SYSTEM_HSQLDB
2920 ifeq ($(ENABLE_LDAP),TRUE)
2921 ifneq ($(SYSTEM_OPENLDAP),)
2923 define gb_LinkTarget__use_openldap
2925 $(call gb_LinkTarget_add_libs,$(1),\
2926 -lldap \
2927 -llber \
2930 endef
2932 gb_ExternalProject__use_openldap :=
2934 else # !SYSTEM_OPENLDAP
2936 define gb_LinkTarget__use_openldap
2937 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2938 $(call gb_LinkTarget_set_include,$(1),\
2939 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2940 $$(INCLUDE) \
2942 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2943 $(call gb_LinkTarget_add_libs,$(1), \
2944 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2945 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2948 endef
2949 endif
2951 define gb_ExternalProject__use_openldap
2952 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2954 endef
2956 endif # SYSTEM_OPENLDAP
2958 ifneq ($(SYSTEM_LIBTOMMATH),)
2960 define gb_LinkTarget__use_libtommath
2961 $(call gb_LinkTarget_set_include,$(1),\
2962 $(LIBTOMMATH_CFLAGS) \
2963 $$(INCLUDE) \
2965 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2967 endef
2969 else # !SYSTEM_LIBTOMMATH
2970 define gb_LinkTarget__use_libtommath
2971 $(call gb_LinkTarget_set_include,$(1),\
2972 -I${WORKDIR}/UnpackedTarball/libtommath \
2973 $$(INCLUDE) \
2975 $(call gb_LinkTarget_add_libs,$(1),\
2976 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2978 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2980 endef
2982 endif # SYSTEM_LIBTOMMATH
2984 define gb_ExternalProject__use_libtommath
2985 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2987 endef
2989 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2991 ifneq ($(SYSTEM_FIREBIRD),)
2993 define gb_LinkTarget__use_libfbembed
2994 $(call gb_LinkTarget_set_include,$(1),\
2995 $(FIREBIRD_CFLAGS) \
2996 $$(INCLUDE) \
2998 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3000 endef
3002 else # !SYSTEM_FIREBIRD
3004 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3005 firebird \
3008 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3009 #$(call gb_LinkTarget__use_libtommath,$(1))
3011 define gb_LinkTarget__use_libfbembed
3012 $(call gb_LinkTarget_use_package,$(1),firebird)
3013 $(call gb_LinkTarget_set_include,$(1),\
3014 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3015 $$(INCLUDE) \
3017 ifeq ($(COM),MSC)
3018 $(call gb_LinkTarget_add_libs,$(1),\
3019 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3021 else
3022 $(call gb_LinkTarget_add_libs,$(1),\
3023 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3025 endif
3027 endef
3030 # endef
3032 endif # SYSTEM_FIREBIRD
3034 else # !ENABLE_FIREBIRD_SDBC
3036 gb_LinkTarget__use_firebird :=
3037 # gb_LinkTarget__use_atomic_ops :=
3038 # gb_LinkTarget__use_libtommath :=
3040 endif # ENABLE_FIREBIRD_SDBC
3043 ifneq ($(SYSTEM_POSTGRESQL),)
3045 define gb_LinkTarget__use_postgresql
3047 $(call gb_LinkTarget_set_include,$(1),\
3048 $(POSTGRESQL_INC) \
3049 $$(INCLUDE) \
3052 $(call gb_LinkTarget_add_libs,$(1),\
3053 -lpq \
3056 $(call gb_LinkTarget_add_ldflags,$(1),\
3057 $(POSTGRESQL_LIB) \
3060 endef
3062 else # !SYSTEM_POSTGRESQL
3064 ifeq ($(OS),WNT)
3065 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3066 postgresql \
3068 endif # WNT
3070 define gb_LinkTarget__use_postgresql
3072 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3074 $(call gb_LinkTarget_set_include,$(1),\
3075 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3076 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3077 $$(INCLUDE) \
3080 ifeq ($(OS),WNT)
3082 $(call gb_LinkTarget_add_libs,$(1),\
3083 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3086 else # !WNT
3088 $(call gb_LinkTarget_add_libs,$(1),\
3089 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3090 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3091 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3092 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3095 endif # !WNT
3097 endef # gb_LinkTarget__use_postgresql
3099 endif # !SYSTEM_POSTGRESQL
3101 ifeq ($(ENABLE_KF5),TRUE)
3103 define gb_LinkTarget__use_kf5
3104 $(call gb_LinkTarget_set_include,$(1),\
3105 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3106 $$(INCLUDE) \
3109 $(call gb_LinkTarget_add_cxxflags,$(1),\
3110 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3113 $(call gb_LinkTarget_add_libs,$(1),\
3114 $(KF5_LIBS) \
3117 endef
3119 else # !ENABLE_KF5
3121 define gb_LinkTarget__use_kf5
3123 endef
3125 endif # ENABLE_KF5
3129 ifeq ($(ENABLE_QT5),TRUE)
3131 define gb_LinkTarget__use_qt5
3132 $(call gb_LinkTarget_set_include,$(1),\
3133 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3134 $$(INCLUDE) \
3137 $(call gb_LinkTarget_add_defs,$(1),\
3138 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3141 $(call gb_LinkTarget_add_libs,$(1),\
3142 $(QT5_LIBS) \
3145 endef
3147 else # !ENABLE_QT5
3149 define gb_LinkTarget__use_qt5
3151 endef
3153 endif # ENABLE_QT5
3155 # PYTHON
3156 # extra python_headers external because pyuno wrapper must not link python
3157 ifneq ($(SYSTEM_PYTHON),)
3159 define gb_LinkTarget__use_python_headers
3160 $(call gb_LinkTarget_add_defs,$(1),\
3161 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3164 $(call gb_LinkTarget_set_include,$(1),\
3165 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3166 $$(INCLUDE) \
3169 endef
3171 define gb_LinkTarget__use_python
3172 $(call gb_LinkTarget__use_python_headers,$(1))
3174 $(call gb_LinkTarget_add_libs,$(1),\
3175 $(PYTHON_LIBS) \
3178 endef
3180 else # !SYSTEM_PYTHON
3182 $(eval $(call gb_Helper_register_packages_for_install,python,\
3183 python3 \
3184 $(if $(filter WNT,$(OS)),libffi) \
3187 define gb_LinkTarget__use_python_headers
3188 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3189 $(call gb_LinkTarget_set_include,$(1),\
3190 -I$(call gb_UnpackedTarball_get_dir,python3) \
3191 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3192 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3193 $$(INCLUDE) \
3196 endef
3198 define gb_LinkTarget__use_python
3199 $(call gb_LinkTarget__use_python_headers,$(1))
3200 ifeq ($(OS),MACOSX)
3201 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3202 else
3203 $(call gb_LinkTarget_use_package,$(1),python3)
3204 endif
3206 ifeq ($(OS),WNT)
3207 ifeq ($(CPUNAME),X86_64)
3208 python_arch_subdir=amd64
3209 else ifeq ($(CPUNAME),AARCH64)
3210 python_arch_subdir=arm64
3211 else
3212 python_arch_subdir=win32
3213 endif
3214 $(call gb_LinkTarget_add_libs,$(1),\
3215 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3217 else ifeq ($(OS),MACOSX)
3218 $(call gb_LinkTarget_add_libs,$(1),\
3219 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3221 else
3222 $(call gb_LinkTarget_add_libs,$(1),\
3223 -L$(call gb_UnpackedTarball_get_dir,python3) \
3224 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3226 endif
3228 endef
3230 # this is only used by python currently
3231 define gb_ExternalProject__use_libffi
3232 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3234 endef
3236 endif # SYSTEM_PYTHON
3238 # ORCUS
3239 ifneq ($(SYSTEM_LIBORCUS),)
3241 define gb_LinkTarget__use_orcus
3242 $(call gb_LinkTarget_set_include,$(1),\
3243 $$(INCLUDE) \
3244 $(ORCUS_CFLAGS) \
3246 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3247 endef
3249 define gb_LinkTarget__use_orcus-parser
3251 endef
3253 else # !SYSTEM_LIBORCUS
3255 ifeq ($(COM),MSC)
3257 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3258 orcus \
3259 orcus-parser \
3262 define gb_LinkTarget__use_orcus
3263 $(call gb_LinkTarget_set_include,$(1),\
3264 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3265 $$(INCLUDE) \
3268 $(call gb_LinkTarget_use_libraries,$(1),\
3269 orcus \
3272 endef
3274 define gb_LinkTarget__use_orcus-parser
3275 $(call gb_LinkTarget_set_include,$(1),\
3276 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3277 $$(INCLUDE) \
3280 $(call gb_LinkTarget_use_libraries,$(1),\
3281 orcus-parser \
3284 endef
3286 else # !MSC
3288 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3289 liborcus \
3292 define gb_LinkTarget__use_orcus
3293 $(call gb_LinkTarget_use_package,$(1),liborcus)
3295 $(call gb_LinkTarget_set_include,$(1),\
3296 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3297 $$(INCLUDE) \
3300 $(call gb_LinkTarget_add_libs,$(1),\
3301 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3304 $(if $(SYSTEM_BOOST), \
3305 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3306 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3309 endef
3311 define gb_LinkTarget__use_orcus-parser
3312 $(call gb_LinkTarget_use_package,$(1),liborcus)
3314 $(call gb_LinkTarget_set_include,$(1),\
3315 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3316 $$(INCLUDE) \
3319 $(call gb_LinkTarget_add_libs,$(1),\
3320 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3323 endef
3325 endif # MSC
3327 endif # SYSTEM_LIBORCUS
3329 ifeq ($(ENABLE_EOT),TRUE)
3331 ifneq ($(SYSTEM_LIBEOT),)
3333 define gb_LinkTarget__use_libeot
3334 $(call gb_LinkTarget_set_include,$(1),\
3335 $$(INCLUDE) \
3336 $(LIBEOT_CFLAGS) \
3338 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3340 endef
3342 gb_ExternalProject__use_libeot :=
3344 else # !SYSTEM_LIBEOT
3346 define gb_LinkTarget__use_libeot
3347 $(call gb_LinkTarget_set_include,$(1),\
3348 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3349 $$(INCLUDE) \
3351 $(call gb_LinkTarget_add_libs,$(1),\
3352 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3354 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3356 endef
3358 define gb_ExternalProject__use_libeot
3359 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3361 endef
3363 endif # SYSTEM_LIBEOT
3365 else # !ENABLE_EOT
3367 gb_LinkTarget__use_libeot :=
3368 gb_ExternalProject__use_libeot :=
3370 endif # ENABLE_EOT
3372 ### X11 stuff ###
3374 ifeq ($(USING_X11), TRUE)
3376 define gb_LinkTarget__use_Xrandr
3377 $(call gb_LinkTarget_set_include,$(1),\
3378 $$(INCLUDE) \
3379 $(XRANDR_CFLAGS) \
3382 $(call gb_LinkTarget_add_libs,$(1),\
3383 $(XRANDR_LIBS) \
3385 endef
3387 define gb_LinkTarget__use_Xrender
3388 $(call gb_LinkTarget_set_include,$(1),\
3389 $$(INCLUDE) \
3390 $(XRENDER_CFLAGS) \
3393 $(call gb_LinkTarget_add_libs,$(1),\
3394 $(XRENDER_LIBS) \
3396 endef
3398 endif # USING_X11
3401 gb_ExternalProject__use_nss3:=
3404 ifneq ($(SYSTEM_NSS),)
3406 define gb_LinkTarget__use_nss3
3407 $(call gb_LinkTarget_add_defs,$(1),\
3408 -DSYSTEM_NSS \
3411 $(call gb_LinkTarget_set_include,$(1),\
3412 $$(INCLUDE) \
3413 $(NSS_CFLAGS) \
3416 $(call gb_LinkTarget_add_libs,$(1),\
3417 $(NSS_LIBS) \
3420 endef
3422 define gb_LinkTarget__use_plc4
3423 $(call gb_LinkTarget__use_nss3,$(1))
3425 endef
3427 define gb_LinkTarget__use_ssl3
3428 $(call gb_LinkTarget__use_nss3,$(1))
3430 endef
3432 else # !SYSTEM_NSS
3434 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3435 nss \
3438 define gb_LinkTarget__use_nss3
3439 $(call gb_LinkTarget_use_package,$(1),nss)
3440 $(call gb_LinkTarget_set_include,$(1),\
3441 $$(INCLUDE) \
3442 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3443 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3446 ifeq ($(COM),MSC)
3447 $(call gb_LinkTarget_add_libs,$(1),\
3448 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3449 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3450 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3452 else
3453 $(call gb_LinkTarget_add_libs,$(1),\
3454 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3455 -lnspr4 \
3456 -lnss3 \
3457 -lsmime3 \
3459 endif
3461 endef
3463 define gb_LinkTarget__use_plc4
3464 $(call gb_LinkTarget_use_package,$(1),nss)
3465 ifeq ($(COM),MSC)
3466 $(call gb_LinkTarget_add_libs,$(1),\
3467 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3469 else
3470 $(call gb_LinkTarget_add_libs,$(1),\
3471 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3473 endif
3475 endef
3477 define gb_LinkTarget__use_ssl3
3478 $(call gb_LinkTarget_use_package,$(1),nss)
3479 ifeq ($(COM),MSC)
3480 $(call gb_LinkTarget_add_libs,$(1),\
3481 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3483 else
3484 $(call gb_LinkTarget_add_libs,$(1),\
3485 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3487 endif
3489 endef
3491 define gb_ExternalProject__use_nss3
3492 $(call gb_ExternalProject_use_package,$(1),nss)
3494 endef
3496 endif # SYSTEM_NSS
3498 ifeq ($(ENABLE_BREAKPAD),TRUE)
3500 define gb_LinkTarget__use_breakpad
3501 $(call gb_LinkTarget_set_include,$(1),\
3502 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3503 $$(INCLUDE) \
3506 ifeq ($(COM),MSC)
3507 $(call gb_LinkTarget_use_static_libraries,$(1),\
3508 breakpad \
3510 else
3511 $(call gb_LinkTarget_add_libs,$(1),\
3512 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3514 endif
3516 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3518 endef
3520 endif # ENABLE_BREAKPAD
3522 ifeq ($(ENABLE_GPGMEPP),TRUE)
3524 ifneq ($(SYSTEM_GPGMEPP),)
3526 gb_ExternalProject__use_gpgmepp:=
3527 gb_ExternalProject__use_libassuan:=
3528 gb_ExternalProject__use_libgpg-error:=
3530 define gb_LinkTarget__use_gpgmepp
3531 $(call gb_LinkTarget_set_include,$(1),\
3532 $$(INCLUDE) \
3533 $$(GPGMEPP_CFLAGS) \
3536 $(call gb_LinkTarget_add_libs,$(1),\
3537 $(GPGMEPP_LIBS) \
3540 endef
3542 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3544 define gb_ExternalProject__use_gpgmepp
3545 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3547 endef
3548 define gb_ExternalProject__use_libassuan
3549 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3551 endef
3552 define gb_ExternalProject__use_libgpg-error
3553 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3555 endef
3557 ifneq ($(filter WNT,$(OS)),)
3559 define gb_LinkTarget__use_libgpg-error
3560 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3562 $(call gb_LinkTarget_set_include,$(1),\
3563 $(GPG_ERROR_CFLAGS) \
3564 $$(INCLUDE) \
3566 $(call gb_LinkTarget_add_libs,$(1),\
3567 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3570 endef
3572 define gb_LinkTarget__use_libassuan
3573 $(call gb_LinkTarget_use_package,$(1),libassuan)
3575 $(call gb_LinkTarget_set_include,$(1),\
3576 $(LIBASSUAN_CFLAGS) \
3577 $$(INCLUDE) \
3579 $(call gb_LinkTarget_add_libs,$(1),\
3580 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3583 endef
3585 define gb_LinkTarget__use_gpgmepp
3586 $(call gb_LinkTarget_set_include,$(1),\
3587 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3588 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3589 $$(GPG_ERROR_CFLAGS) \
3590 $$(INCLUDE) \
3592 $(call gb_LinkTarget_use_libraries,$(1),\
3593 gpgmepp \
3596 endef
3598 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3599 gpgmepp \
3600 libassuan \
3601 libgpg-error \
3604 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3605 gpgmepp \
3608 endif
3610 ifneq ($(filter MACOSX LINUX,$(OS)),)
3612 define gb_LinkTarget__use_gpgmepp
3613 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3615 $(call gb_LinkTarget_set_include,$(1),\
3616 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3617 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3618 $$(GPG_ERROR_CFLAGS) \
3619 $$(INCLUDE) \
3621 $(call gb_LinkTarget_add_libs,$(1),\
3622 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3623 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3624 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3625 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3628 endef
3630 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3631 gpgmepp \
3632 libassuan \
3633 libgpg-error \
3636 endif
3638 endif
3640 else # !ENABLE_GPGMEPP
3642 gb_ExternalProject__use_gpgmepp :=
3643 gb_ExternalProject__use_libassuan :=
3644 gb_ExternalProject__use_libgpg-error :=
3646 gb_LinkTarget__use_gpgmepp :=
3647 gb_LinkTarget__use_libassuan :=
3648 gb_LinkTarget__use_libgpg-error :=
3650 endif # ENABLE_GPGMEPP
3652 define gb_LinkTarget__use_dconf
3653 $(call gb_LinkTarget_set_include,$(1),\
3654 $$(INCLUDE) \
3655 $(DCONF_CFLAGS) \
3658 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3659 endef
3661 ### Jars ############################################################
3663 ifneq ($(SYSTEM_HSQLDB),)
3665 define gb_Jar__use_hsqldb
3666 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3667 endef
3668 define gb_JunitTest__use_hsqldb
3669 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3670 endef
3672 else # !SYSTEM_HSQLDB
3674 ifeq ($(ENABLE_JAVA),TRUE)
3675 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3676 hsqldb \
3678 endif
3680 define gb_Jar__use_hsqldb
3681 $(call gb_Jar_use_jar,$(1),hsqldb)
3682 endef
3683 define gb_JunitTest__use_hsqldb
3684 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3685 endef
3687 endif # SYSTEM_HSQLDB
3690 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3692 ifneq ($(SYSTEM_BSH),)
3694 define gb_Jar__use_bsh
3695 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3696 endef
3698 else # !SYSTEM_BSH
3700 ifeq ($(ENABLE_JAVA),TRUE)
3701 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3702 bsh \
3704 endif
3706 define gb_Jar__use_bsh
3707 $(call gb_Jar_use_jar,$(1),bsh)
3708 endef
3710 endif # SYSTEM_BSH
3712 endif
3714 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3716 ifneq ($(SYSTEM_RHINO),)
3718 define gb_Jar__use_rhino
3719 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3720 endef
3722 else # !SYSTEM_RHINO
3724 ifeq ($(ENABLE_JAVA),TRUE)
3725 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3726 js \
3728 endif
3730 define gb_Jar__use_rhino
3731 $(call gb_Jar_use_jar,$(1),js)
3732 endef
3734 endif # SYSTEM_RHINO
3736 endif
3738 ifneq ($(SYSTEM_JFREEREPORT),)
3740 define gb_Jar__use_flow-engine
3741 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3742 endef
3744 define gb_Jar__use_flute
3745 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3746 endef
3748 define gb_Jar__use_libbase
3749 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3750 endef
3752 define gb_Jar__use_libfonts
3753 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3754 endef
3756 define gb_Jar__use_libformula
3757 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3758 endef
3760 define gb_Jar__use_liblayout
3761 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3762 endef
3764 define gb_Jar__use_libloader
3765 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3766 endef
3768 define gb_Jar__use_librepository
3769 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3770 endef
3772 define gb_Jar__use_libserializer
3773 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3774 endef
3776 define gb_Jar__use_libxml
3777 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3778 endef
3780 define gb_Jar__use_sac
3781 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3782 endef
3784 else # !SYSTEM_JFREEREPORT
3786 ifeq ($(ENABLE_JAVA),TRUE)
3787 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3788 flow-engine \
3789 flute-1.1.6 \
3790 libbase-1.1.6 \
3791 libfonts-1.1.6 \
3792 libformula-1.1.7 \
3793 liblayout \
3794 libloader-1.1.6 \
3795 librepository-1.1.6 \
3796 libserializer-1.1.6 \
3797 libxml-1.1.7 \
3798 sac \
3800 endif
3802 define gb_Jar__use_flow-engine
3803 $(call gb_Jar_use_jar,$(1),flow-engine)
3804 endef
3806 define gb_Jar__use_flute
3807 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3808 endef
3810 define gb_Jar__use_libbase
3811 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3812 endef
3814 define gb_Jar__use_libfonts
3815 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3816 endef
3818 define gb_Jar__use_libformula
3819 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3820 endef
3822 define gb_Jar__use_liblayout
3823 $(call gb_Jar_use_jar,$(1),liblayout)
3824 endef
3826 define gb_Jar__use_libloader
3827 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3828 endef
3830 define gb_Jar__use_librepository
3831 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3832 endef
3834 define gb_Jar__use_libserializer
3835 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3836 endef
3838 define gb_Jar__use_libxml
3839 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3840 endef
3842 define gb_Jar__use_sac
3843 $(call gb_Jar_use_jar,$(1),sac)
3844 endef
3846 endif # SYSTEM_JFREEREPORT
3849 # Executables
3851 define gb_Executable__register_bestreversemap
3852 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3853 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
3855 endef
3857 # TODO depending on the whole URE might be overkill, but I do not have a
3858 # Windows machine to debug it...
3859 define gb_Executable__register_climaker
3860 $(call gb_Executable_add_runtime_dependencies,climaker,\
3861 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3862 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3863 $(call gb_UnoApi_get_target_for_build,udkapi) \
3864 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3866 endef
3868 define gb_Executable__register_cppumaker
3869 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3870 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3872 endef
3874 # This is used to determine what we need for 'build' platform.
3875 define gb_Executable__register_gengal
3876 $(call gb_Executable_add_runtime_dependencies,gengal,\
3877 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3878 $(call gb_Library_get_target_for_build,localedata_en) \
3879 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3880 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3881 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3882 $(call gb_Package_get_target_for_build,postprocess_registry) \
3883 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3884 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3885 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3886 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3887 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3888 $(call gb_UnoApi_get_target_for_build,offapi) \
3889 $(call gb_UnoApi_get_target_for_build,udkapi) \
3891 endef
3893 ifeq ($(SYSTEM_ICU),)
3895 define gb_Executable__register_gendict
3896 $(call gb_Executable_add_runtime_dependencies,gendict,\
3897 $(call gb_Package_get_target_for_build,icu) \
3898 $(call gb_Package_get_target_for_build,icu_ure) \
3900 endef
3902 endif
3904 define gb_Executable__register_idlc
3905 $(call gb_Executable_add_runtime_dependencies,idlc,\
3906 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3908 endef
3910 define gb_Executable__register_localize
3911 $(call gb_Executable_add_runtime_dependencies,localize,\
3912 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3913 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3916 endef
3918 # FIXME ure/services.rdb needs cleanup
3919 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3920 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3921 define gb_Executable__register_saxparser
3922 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3923 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3924 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3925 $(call gb_Rdb_get_target_for_build,saxparser) \
3926 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3927 $(call gb_UnoApi_get_target_for_build,udkapi) \
3929 endef
3931 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3932 # required due to the settings for URE_SERVICES and URE_TYPES in
3933 # cppuhelper/source/unorc
3934 define gb_Executable__register_uno
3935 $(call gb_Executable_add_runtime_dependencies,uno,\
3936 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3937 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3938 $(call gb_UnoApi_get_target_for_build,udkapi) \
3940 endef
3943 # External executables
3945 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3947 gb_ExternalExecutable__register_xmllint :=
3949 else # ! SYSTEM_LIBXML_FOR_BUILD
3951 define gb_ExternalExecutable__register_xmllint
3952 $(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),libxml2)
3953 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3954 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3955 $(call gb_Package_get_target,libxml2) \
3958 endef
3960 endif # SYSTEM_LIBXML_FOR_BUILD
3962 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3964 gb_ExternalExecutable__register_xsltproc :=
3966 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3968 define gb_ExternalExecutable__register_xsltproc
3969 $(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),libxslt)
3970 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3971 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3972 $(call gb_Package_get_target,libxml2) \
3973 $(call gb_Package_get_target,libxslt) \
3976 endef
3978 endif # SYSTEM_LIBXSLT_FOR_BUILD
3980 ifneq (,$(SYSTEM_UCPP))
3982 gb_ExternalExecutable__register_ucpp :=
3984 else # ! SYSTEM_UCPP
3986 define gb_ExternalExecutable__register_ucpp
3987 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3989 endef
3991 endif # SYSTEM_UCPP
3993 ifeq (,$(PYTHON_FOR_BUILD))
3995 define gb_ExternalExecutable__register_python
3996 ifeq ($(OS),MACOSX)
3998 # use set_external, to avoid having the command added as prerequisite for the
3999 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4000 # matching rule to build that specific file)
4001 $(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))
4002 # the Zip ensures that internal python has been built (cannot use the Package
4003 # target, as that is not used on Mac)
4004 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4006 else
4008 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4009 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4010 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4012 endif
4014 endef
4016 else
4018 define gb_ExternalExecutable__register_python
4019 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4021 endef
4023 endif # PYTHON_FOR_BUILD
4025 ifneq ($(SYSTEM_GENBRK),)
4027 define gb_ExternalExecutable__register_genbrk
4028 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4030 endef
4032 else # ! SYSTEM_GENBRK
4034 define gb_ExternalExecutable__register_genbrk
4035 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4036 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4037 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4038 $(call gb_Package_get_target_for_build,icu) \
4039 $(call gb_Package_get_target_for_build,icu_ure) \
4042 endef
4044 endif
4046 ifneq ($(SYSTEM_GENCCODE),)
4048 define gb_ExternalExecutable__register_genccode
4049 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4051 endef
4053 else # ! SYSTEM_GENCCODE
4055 define gb_ExternalExecutable__register_genccode
4056 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4057 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4058 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4059 $(call gb_Package_get_target_for_build,icu) \
4060 $(call gb_Package_get_target_for_build,icu_ure) \
4063 endef
4065 endif
4067 ifneq ($(SYSTEM_GENCMN),)
4069 define gb_ExternalExecutable__register_gencmn
4070 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4072 endef
4074 else # ! SYSTEM_GENCMN
4076 define gb_ExternalExecutable__register_gencmn
4077 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4078 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4079 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4080 $(call gb_Package_get_target_for_build,icu) \
4081 $(call gb_Package_get_target_for_build,icu_ure) \
4084 endef
4086 endif
4088 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4089 ifneq ($(SYSTEM_BZIP2),)
4091 define gb_LinkTarget__use_bzip2
4092 $(call gb_LinkTarget_set_include,$(1),\
4093 $(BZIP2_CFLAGS) \
4094 $$(INCLUDE) \
4096 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4098 endef
4100 gb_ExternalProject__use_bzip2 :=
4102 else # !SYSTEM_BZIP2
4104 define gb_LinkTarget__use_bzip2
4105 $(call gb_LinkTarget_set_include,$(1),\
4106 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4107 $$(INCLUDE) \
4110 ifeq ($(COM),MSC)
4111 $(call gb_LinkTarget_add_libs,$(1),\
4112 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4114 else
4115 $(call gb_LinkTarget_add_libs,$(1),\
4116 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4118 endif
4120 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4121 endef
4123 define gb_ExternalProject__use_bzip2
4124 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4125 endef
4127 endif
4128 endif
4130 define gb_LinkTarget__use_clew
4131 $(call gb_LinkTarget_set_include,$(1), \
4132 -I$(SRCDIR)/external/clew/source/include \
4133 $$(INCLUDE) \
4135 $(call gb_LinkTarget_use_libraries,$(1),clew)
4136 endef
4138 ifneq ($(ENABLE_PDFIUM),)
4139 define gb_LinkTarget__use_pdfium
4140 $(call gb_LinkTarget_set_include,$(1),\
4141 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4142 -DCOMPONENT_BUILD \
4143 $$(INCLUDE) \
4145 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4146 endef
4147 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4148 pdfium \
4150 endif
4152 define gb_LinkTarget__use_dtoa
4153 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4154 $(call gb_LinkTarget_set_include,$(1),\
4155 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4156 $$(INCLUDE) \
4158 $(call gb_LinkTarget_use_static_libraries,$(1),\
4159 dtoa \
4162 endef
4164 define gb_ExternalProject__use_dtoa
4165 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4167 endef
4169 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4170 $(if $(UCRT_REDISTDIR),ucrt) \
4173 ifneq ($(SYSTEM_BOX2D),)
4175 define gb_LinkTarget__use_box2d
4176 $(call gb_LinkTarget_set_include,$(1),\
4177 -DSYSTEM_BOX2D \
4178 $$(INCLUDE) \
4179 $(BOX2D_CFLAGS) \
4181 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4183 endef
4185 gb_ExternalProject__use_box2d :=
4187 else # !SYSTEM_BOX2D
4189 define gb_LinkTarget__use_box2d
4190 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4191 $(call gb_LinkTarget_set_include,$(1),\
4192 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4193 $$(INCLUDE) \
4195 $(call gb_LinkTarget_use_static_libraries,$(1),\
4196 box2d \
4199 endef
4201 define gb_ExternalProject__use_box2d
4202 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4204 endef
4206 endif # SYSTEM_BOX2D
4208 ifneq ($(SYSTEM_ZXING),)
4210 define gb_LinkTarget__use_zxing
4211 $(call gb_LinkTarget_set_include,$(1),\
4212 -DSYSTEM_ZXING \
4213 $$(INCLUDE) \
4214 $(ZXING_CFLAGS) \
4216 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4218 endef
4220 gb_ExternalProject__use_zxing :=
4222 else # !SYSTEM_ZXING
4224 ifneq ($(ENABLE_ZXING),)
4226 define gb_LinkTarget__use_zxing
4227 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4228 $(call gb_LinkTarget_set_include,$(1),\
4229 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4230 $$(INCLUDE) \
4232 $(call gb_LinkTarget_use_static_libraries,$(1),\
4233 zxing \
4236 endef
4238 define gb_ExternalProject__use_zxing
4239 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4241 endef
4243 else # !ENABLE_ZXING
4245 define gb_LinkTarget__use_zxing
4246 endef
4248 endif # ENABLE_ZXING
4250 endif # SYSTEM_ZXING
4252 # vim: set noet sw=4 ts=4: