delay, collect and compress LOK invalidations for Writer views
[LibreOffice.git] / RepositoryExternal.mk
blob4c45caa7e746759f8497bffd458822ec4f0331a0
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 ifeq ($(ENABLE_QT6),TRUE)
3157 define gb_LinkTarget__use_qt6
3158 $(call gb_LinkTarget_set_include,$(1),\
3159 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3160 $$(INCLUDE) \
3163 $(call gb_LinkTarget_add_defs,$(1),\
3164 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3167 $(call gb_LinkTarget_add_libs,$(1),\
3168 $(QT6_LIBS) \
3171 endef
3173 else # !ENABLE_QT6
3175 define gb_LinkTarget__use_qt6
3177 endef
3179 endif # ENABLE_QT6
3182 # PYTHON
3183 # extra python_headers external because pyuno wrapper must not link python
3184 ifneq ($(SYSTEM_PYTHON),)
3186 define gb_LinkTarget__use_python_headers
3187 $(call gb_LinkTarget_add_defs,$(1),\
3188 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3191 $(call gb_LinkTarget_set_include,$(1),\
3192 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3193 $$(INCLUDE) \
3196 endef
3198 define gb_LinkTarget__use_python
3199 $(call gb_LinkTarget__use_python_headers,$(1))
3201 $(call gb_LinkTarget_add_libs,$(1),\
3202 $(PYTHON_LIBS) \
3205 endef
3207 else # !SYSTEM_PYTHON
3209 $(eval $(call gb_Helper_register_packages_for_install,python,\
3210 python3 \
3211 $(if $(filter WNT,$(OS)),libffi) \
3214 define gb_LinkTarget__use_python_headers
3215 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3216 $(call gb_LinkTarget_set_include,$(1),\
3217 -I$(call gb_UnpackedTarball_get_dir,python3) \
3218 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3219 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3220 $$(INCLUDE) \
3223 endef
3225 define gb_LinkTarget__use_python
3226 $(call gb_LinkTarget__use_python_headers,$(1))
3227 ifeq ($(OS),MACOSX)
3228 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3229 else
3230 $(call gb_LinkTarget_use_package,$(1),python3)
3231 endif
3233 ifeq ($(OS),WNT)
3234 ifeq ($(CPUNAME),X86_64)
3235 python_arch_subdir=amd64
3236 else ifeq ($(CPUNAME),AARCH64)
3237 python_arch_subdir=arm64
3238 else
3239 python_arch_subdir=win32
3240 endif
3241 $(call gb_LinkTarget_add_libs,$(1),\
3242 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3244 else ifeq ($(OS),MACOSX)
3245 $(call gb_LinkTarget_add_libs,$(1),\
3246 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3248 else
3249 $(call gb_LinkTarget_add_libs,$(1),\
3250 -L$(call gb_UnpackedTarball_get_dir,python3) \
3251 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3253 endif
3255 endef
3257 # this is only used by python currently
3258 define gb_ExternalProject__use_libffi
3259 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3261 endef
3263 endif # SYSTEM_PYTHON
3265 # ORCUS
3266 ifneq ($(SYSTEM_LIBORCUS),)
3268 define gb_LinkTarget__use_orcus
3269 $(call gb_LinkTarget_set_include,$(1),\
3270 $$(INCLUDE) \
3271 $(ORCUS_CFLAGS) \
3273 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3274 endef
3276 define gb_LinkTarget__use_orcus-parser
3278 endef
3280 else # !SYSTEM_LIBORCUS
3282 ifeq ($(COM),MSC)
3284 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3285 orcus \
3286 orcus-parser \
3289 define gb_LinkTarget__use_orcus
3290 $(call gb_LinkTarget_set_include,$(1),\
3291 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3292 $$(INCLUDE) \
3295 $(call gb_LinkTarget_use_libraries,$(1),\
3296 orcus \
3299 endef
3301 define gb_LinkTarget__use_orcus-parser
3302 $(call gb_LinkTarget_set_include,$(1),\
3303 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3304 $$(INCLUDE) \
3307 $(call gb_LinkTarget_use_libraries,$(1),\
3308 orcus-parser \
3311 endef
3313 else # !MSC
3315 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3316 liborcus \
3319 define gb_LinkTarget__use_orcus
3320 $(call gb_LinkTarget_use_package,$(1),liborcus)
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3324 $$(INCLUDE) \
3327 $(call gb_LinkTarget_add_libs,$(1),\
3328 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3331 $(if $(SYSTEM_BOOST), \
3332 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3333 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3336 endef
3338 define gb_LinkTarget__use_orcus-parser
3339 $(call gb_LinkTarget_use_package,$(1),liborcus)
3341 $(call gb_LinkTarget_set_include,$(1),\
3342 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3343 $$(INCLUDE) \
3346 $(call gb_LinkTarget_add_libs,$(1),\
3347 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3350 endef
3352 endif # MSC
3354 endif # SYSTEM_LIBORCUS
3356 ifeq ($(ENABLE_EOT),TRUE)
3358 ifneq ($(SYSTEM_LIBEOT),)
3360 define gb_LinkTarget__use_libeot
3361 $(call gb_LinkTarget_set_include,$(1),\
3362 $$(INCLUDE) \
3363 $(LIBEOT_CFLAGS) \
3365 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3367 endef
3369 gb_ExternalProject__use_libeot :=
3371 else # !SYSTEM_LIBEOT
3373 define gb_LinkTarget__use_libeot
3374 $(call gb_LinkTarget_set_include,$(1),\
3375 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3376 $$(INCLUDE) \
3378 $(call gb_LinkTarget_add_libs,$(1),\
3379 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3381 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3383 endef
3385 define gb_ExternalProject__use_libeot
3386 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3388 endef
3390 endif # SYSTEM_LIBEOT
3392 else # !ENABLE_EOT
3394 gb_LinkTarget__use_libeot :=
3395 gb_ExternalProject__use_libeot :=
3397 endif # ENABLE_EOT
3399 ### X11 stuff ###
3401 ifeq ($(USING_X11), TRUE)
3403 define gb_LinkTarget__use_Xrandr
3404 $(call gb_LinkTarget_set_include,$(1),\
3405 $$(INCLUDE) \
3406 $(XRANDR_CFLAGS) \
3409 $(call gb_LinkTarget_add_libs,$(1),\
3410 $(XRANDR_LIBS) \
3412 endef
3414 define gb_LinkTarget__use_Xrender
3415 $(call gb_LinkTarget_set_include,$(1),\
3416 $$(INCLUDE) \
3417 $(XRENDER_CFLAGS) \
3420 $(call gb_LinkTarget_add_libs,$(1),\
3421 $(XRENDER_LIBS) \
3423 endef
3425 endif # USING_X11
3428 gb_ExternalProject__use_nss3:=
3431 ifneq ($(SYSTEM_NSS),)
3433 define gb_LinkTarget__use_nss3
3434 $(call gb_LinkTarget_add_defs,$(1),\
3435 -DSYSTEM_NSS \
3438 $(call gb_LinkTarget_set_include,$(1),\
3439 $$(INCLUDE) \
3440 $(NSS_CFLAGS) \
3443 $(call gb_LinkTarget_add_libs,$(1),\
3444 $(NSS_LIBS) \
3447 endef
3449 define gb_LinkTarget__use_plc4
3450 $(call gb_LinkTarget__use_nss3,$(1))
3452 endef
3454 define gb_LinkTarget__use_ssl3
3455 $(call gb_LinkTarget__use_nss3,$(1))
3457 endef
3459 else # !SYSTEM_NSS
3461 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3462 nss \
3465 define gb_LinkTarget__use_nss3
3466 $(call gb_LinkTarget_use_package,$(1),nss)
3467 $(call gb_LinkTarget_set_include,$(1),\
3468 $$(INCLUDE) \
3469 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3470 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3473 ifeq ($(COM),MSC)
3474 $(call gb_LinkTarget_add_libs,$(1),\
3475 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3476 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3477 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3479 else
3480 $(call gb_LinkTarget_add_libs,$(1),\
3481 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3482 -lnspr4 \
3483 -lnss3 \
3484 -lsmime3 \
3486 endif
3488 endef
3490 define gb_LinkTarget__use_plc4
3491 $(call gb_LinkTarget_use_package,$(1),nss)
3492 ifeq ($(COM),MSC)
3493 $(call gb_LinkTarget_add_libs,$(1),\
3494 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3496 else
3497 $(call gb_LinkTarget_add_libs,$(1),\
3498 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3500 endif
3502 endef
3504 define gb_LinkTarget__use_ssl3
3505 $(call gb_LinkTarget_use_package,$(1),nss)
3506 ifeq ($(COM),MSC)
3507 $(call gb_LinkTarget_add_libs,$(1),\
3508 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3510 else
3511 $(call gb_LinkTarget_add_libs,$(1),\
3512 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3514 endif
3516 endef
3518 define gb_ExternalProject__use_nss3
3519 $(call gb_ExternalProject_use_package,$(1),nss)
3521 endef
3523 endif # SYSTEM_NSS
3525 ifeq ($(ENABLE_BREAKPAD),TRUE)
3527 define gb_LinkTarget__use_breakpad
3528 $(call gb_LinkTarget_set_include,$(1),\
3529 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3530 $$(INCLUDE) \
3533 ifeq ($(COM),MSC)
3534 $(call gb_LinkTarget_use_static_libraries,$(1),\
3535 breakpad \
3537 else
3538 $(call gb_LinkTarget_add_libs,$(1),\
3539 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3541 endif
3543 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3545 endef
3547 endif # ENABLE_BREAKPAD
3549 ifeq ($(ENABLE_GPGMEPP),TRUE)
3551 ifneq ($(SYSTEM_GPGMEPP),)
3553 gb_ExternalProject__use_gpgmepp:=
3554 gb_ExternalProject__use_libassuan:=
3555 gb_ExternalProject__use_libgpg-error:=
3557 define gb_LinkTarget__use_gpgmepp
3558 $(call gb_LinkTarget_set_include,$(1),\
3559 $$(INCLUDE) \
3560 $$(GPGMEPP_CFLAGS) \
3563 $(call gb_LinkTarget_add_libs,$(1),\
3564 $(GPGMEPP_LIBS) \
3567 endef
3569 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3571 define gb_ExternalProject__use_gpgmepp
3572 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3574 endef
3575 define gb_ExternalProject__use_libassuan
3576 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3578 endef
3579 define gb_ExternalProject__use_libgpg-error
3580 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3582 endef
3584 ifneq ($(filter WNT,$(OS)),)
3586 define gb_LinkTarget__use_libgpg-error
3587 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3589 $(call gb_LinkTarget_set_include,$(1),\
3590 $(GPG_ERROR_CFLAGS) \
3591 $$(INCLUDE) \
3593 $(call gb_LinkTarget_add_libs,$(1),\
3594 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3597 endef
3599 define gb_LinkTarget__use_libassuan
3600 $(call gb_LinkTarget_use_package,$(1),libassuan)
3602 $(call gb_LinkTarget_set_include,$(1),\
3603 $(LIBASSUAN_CFLAGS) \
3604 $$(INCLUDE) \
3606 $(call gb_LinkTarget_add_libs,$(1),\
3607 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3610 endef
3612 define gb_LinkTarget__use_gpgmepp
3613 $(call gb_LinkTarget_set_include,$(1),\
3614 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3615 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3616 $$(GPG_ERROR_CFLAGS) \
3617 $$(INCLUDE) \
3619 $(call gb_LinkTarget_use_libraries,$(1),\
3620 gpgmepp \
3623 endef
3625 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3626 gpgmepp \
3627 libassuan \
3628 libgpg-error \
3631 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3632 gpgmepp \
3635 endif
3637 ifneq ($(filter MACOSX LINUX,$(OS)),)
3639 define gb_LinkTarget__use_gpgmepp
3640 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3642 $(call gb_LinkTarget_set_include,$(1),\
3643 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3644 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3645 $$(GPG_ERROR_CFLAGS) \
3646 $$(INCLUDE) \
3648 $(call gb_LinkTarget_add_libs,$(1),\
3649 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3650 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3651 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3652 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3655 endef
3657 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3658 gpgmepp \
3659 libassuan \
3660 libgpg-error \
3663 endif
3665 endif
3667 else # !ENABLE_GPGMEPP
3669 gb_ExternalProject__use_gpgmepp :=
3670 gb_ExternalProject__use_libassuan :=
3671 gb_ExternalProject__use_libgpg-error :=
3673 gb_LinkTarget__use_gpgmepp :=
3674 gb_LinkTarget__use_libassuan :=
3675 gb_LinkTarget__use_libgpg-error :=
3677 endif # ENABLE_GPGMEPP
3679 define gb_LinkTarget__use_dconf
3680 $(call gb_LinkTarget_set_include,$(1),\
3681 $$(INCLUDE) \
3682 $(DCONF_CFLAGS) \
3685 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3686 endef
3688 ### Jars ############################################################
3690 ifneq ($(SYSTEM_HSQLDB),)
3692 define gb_Jar__use_hsqldb
3693 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3694 endef
3695 define gb_JunitTest__use_hsqldb
3696 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3697 endef
3699 else # !SYSTEM_HSQLDB
3701 ifeq ($(ENABLE_JAVA),TRUE)
3702 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3703 hsqldb \
3705 endif
3707 define gb_Jar__use_hsqldb
3708 $(call gb_Jar_use_jar,$(1),hsqldb)
3709 endef
3710 define gb_JunitTest__use_hsqldb
3711 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3712 endef
3714 endif # SYSTEM_HSQLDB
3717 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3719 ifneq ($(SYSTEM_BSH),)
3721 define gb_Jar__use_bsh
3722 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3723 endef
3725 else # !SYSTEM_BSH
3727 ifeq ($(ENABLE_JAVA),TRUE)
3728 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3729 bsh \
3731 endif
3733 define gb_Jar__use_bsh
3734 $(call gb_Jar_use_jar,$(1),bsh)
3735 endef
3737 endif # SYSTEM_BSH
3739 endif
3741 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3743 ifneq ($(SYSTEM_RHINO),)
3745 define gb_Jar__use_rhino
3746 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3747 endef
3749 else # !SYSTEM_RHINO
3751 ifeq ($(ENABLE_JAVA),TRUE)
3752 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3753 js \
3755 endif
3757 define gb_Jar__use_rhino
3758 $(call gb_Jar_use_jar,$(1),js)
3759 endef
3761 endif # SYSTEM_RHINO
3763 endif
3765 ifneq ($(SYSTEM_JFREEREPORT),)
3767 define gb_Jar__use_flow-engine
3768 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3769 endef
3771 define gb_Jar__use_flute
3772 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3773 endef
3775 define gb_Jar__use_libbase
3776 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3777 endef
3779 define gb_Jar__use_libfonts
3780 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3781 endef
3783 define gb_Jar__use_libformula
3784 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3785 endef
3787 define gb_Jar__use_liblayout
3788 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3789 endef
3791 define gb_Jar__use_libloader
3792 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3793 endef
3795 define gb_Jar__use_librepository
3796 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3797 endef
3799 define gb_Jar__use_libserializer
3800 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3801 endef
3803 define gb_Jar__use_libxml
3804 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3805 endef
3807 define gb_Jar__use_sac
3808 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3809 endef
3811 else # !SYSTEM_JFREEREPORT
3813 ifeq ($(ENABLE_JAVA),TRUE)
3814 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3815 flow-engine \
3816 flute-1.1.6 \
3817 libbase-1.1.6 \
3818 libfonts-1.1.6 \
3819 libformula-1.1.7 \
3820 liblayout \
3821 libloader-1.1.6 \
3822 librepository-1.1.6 \
3823 libserializer-1.1.6 \
3824 libxml-1.1.7 \
3825 sac \
3827 endif
3829 define gb_Jar__use_flow-engine
3830 $(call gb_Jar_use_jar,$(1),flow-engine)
3831 endef
3833 define gb_Jar__use_flute
3834 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3835 endef
3837 define gb_Jar__use_libbase
3838 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3839 endef
3841 define gb_Jar__use_libfonts
3842 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3843 endef
3845 define gb_Jar__use_libformula
3846 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3847 endef
3849 define gb_Jar__use_liblayout
3850 $(call gb_Jar_use_jar,$(1),liblayout)
3851 endef
3853 define gb_Jar__use_libloader
3854 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3855 endef
3857 define gb_Jar__use_librepository
3858 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3859 endef
3861 define gb_Jar__use_libserializer
3862 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3863 endef
3865 define gb_Jar__use_libxml
3866 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3867 endef
3869 define gb_Jar__use_sac
3870 $(call gb_Jar_use_jar,$(1),sac)
3871 endef
3873 endif # SYSTEM_JFREEREPORT
3876 # Executables
3878 define gb_Executable__register_bestreversemap
3879 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3880 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
3882 endef
3884 # TODO depending on the whole URE might be overkill, but I do not have a
3885 # Windows machine to debug it...
3886 define gb_Executable__register_climaker
3887 $(call gb_Executable_add_runtime_dependencies,climaker,\
3888 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3889 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3890 $(call gb_UnoApi_get_target_for_build,udkapi) \
3891 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3893 endef
3895 define gb_Executable__register_cppumaker
3896 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3897 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3899 endef
3901 # This is used to determine what we need for 'build' platform.
3902 define gb_Executable__register_gengal
3903 $(call gb_Executable_add_runtime_dependencies,gengal,\
3904 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3905 $(call gb_Library_get_target_for_build,localedata_en) \
3906 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3907 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3908 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3909 $(call gb_Package_get_target_for_build,postprocess_registry) \
3910 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3911 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3912 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3913 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3914 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3915 $(call gb_UnoApi_get_target_for_build,offapi) \
3916 $(call gb_UnoApi_get_target_for_build,udkapi) \
3918 endef
3920 ifeq ($(SYSTEM_ICU),)
3922 define gb_Executable__register_gendict
3923 $(call gb_Executable_add_runtime_dependencies,gendict,\
3924 $(call gb_Package_get_target_for_build,icu) \
3925 $(call gb_Package_get_target_for_build,icu_ure) \
3927 endef
3929 endif
3931 define gb_Executable__register_idlc
3932 $(call gb_Executable_add_runtime_dependencies,idlc,\
3933 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3935 endef
3937 define gb_Executable__register_localize
3938 $(call gb_Executable_add_runtime_dependencies,localize,\
3939 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3940 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3943 endef
3945 # FIXME ure/services.rdb needs cleanup
3946 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3947 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3948 define gb_Executable__register_saxparser
3949 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3950 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3951 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3952 $(call gb_Rdb_get_target_for_build,saxparser) \
3953 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3954 $(call gb_UnoApi_get_target_for_build,udkapi) \
3956 endef
3958 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3959 # required due to the settings for URE_SERVICES and URE_TYPES in
3960 # cppuhelper/source/unorc
3961 define gb_Executable__register_uno
3962 $(call gb_Executable_add_runtime_dependencies,uno,\
3963 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3964 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3965 $(call gb_UnoApi_get_target_for_build,udkapi) \
3967 endef
3970 # External executables
3972 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3974 gb_ExternalExecutable__register_xmllint :=
3976 else # ! SYSTEM_LIBXML_FOR_BUILD
3978 define gb_ExternalExecutable__register_xmllint
3979 $(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)
3980 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3981 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3982 $(call gb_Package_get_target,libxml2) \
3985 endef
3987 endif # SYSTEM_LIBXML_FOR_BUILD
3989 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3991 gb_ExternalExecutable__register_xsltproc :=
3993 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3995 define gb_ExternalExecutable__register_xsltproc
3996 $(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)
3997 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3998 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3999 $(call gb_Package_get_target,libxml2) \
4000 $(call gb_Package_get_target,libxslt) \
4003 endef
4005 endif # SYSTEM_LIBXSLT_FOR_BUILD
4007 ifneq (,$(SYSTEM_UCPP))
4009 gb_ExternalExecutable__register_ucpp :=
4011 else # ! SYSTEM_UCPP
4013 define gb_ExternalExecutable__register_ucpp
4014 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4016 endef
4018 endif # SYSTEM_UCPP
4020 ifeq (,$(PYTHON_FOR_BUILD))
4022 define gb_ExternalExecutable__register_python
4023 ifeq ($(OS),MACOSX)
4025 # use set_external, to avoid having the command added as prerequisite for the
4026 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4027 # matching rule to build that specific file)
4028 $(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))
4029 # the Zip ensures that internal python has been built (cannot use the Package
4030 # target, as that is not used on Mac)
4031 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4033 else
4035 $(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))
4036 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4037 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4039 endif
4041 endef
4043 else
4045 define gb_ExternalExecutable__register_python
4046 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4048 endef
4050 endif # PYTHON_FOR_BUILD
4052 ifneq ($(SYSTEM_GENBRK),)
4054 define gb_ExternalExecutable__register_genbrk
4055 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4057 endef
4059 else # ! SYSTEM_GENBRK
4061 define gb_ExternalExecutable__register_genbrk
4062 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4063 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4064 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4065 $(call gb_Package_get_target_for_build,icu) \
4066 $(call gb_Package_get_target_for_build,icu_ure) \
4069 endef
4071 endif
4073 ifneq ($(SYSTEM_GENCCODE),)
4075 define gb_ExternalExecutable__register_genccode
4076 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4078 endef
4080 else # ! SYSTEM_GENCCODE
4082 define gb_ExternalExecutable__register_genccode
4083 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4084 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4085 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4086 $(call gb_Package_get_target_for_build,icu) \
4087 $(call gb_Package_get_target_for_build,icu_ure) \
4090 endef
4092 endif
4094 ifneq ($(SYSTEM_GENCMN),)
4096 define gb_ExternalExecutable__register_gencmn
4097 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4099 endef
4101 else # ! SYSTEM_GENCMN
4103 define gb_ExternalExecutable__register_gencmn
4104 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4105 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4106 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4107 $(call gb_Package_get_target_for_build,icu) \
4108 $(call gb_Package_get_target_for_build,icu_ure) \
4111 endef
4113 endif
4115 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4116 ifneq ($(SYSTEM_BZIP2),)
4118 define gb_LinkTarget__use_bzip2
4119 $(call gb_LinkTarget_set_include,$(1),\
4120 $(BZIP2_CFLAGS) \
4121 $$(INCLUDE) \
4123 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4125 endef
4127 gb_ExternalProject__use_bzip2 :=
4129 else # !SYSTEM_BZIP2
4131 define gb_LinkTarget__use_bzip2
4132 $(call gb_LinkTarget_set_include,$(1),\
4133 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4134 $$(INCLUDE) \
4137 ifeq ($(COM),MSC)
4138 $(call gb_LinkTarget_add_libs,$(1),\
4139 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4141 else
4142 $(call gb_LinkTarget_add_libs,$(1),\
4143 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4145 endif
4147 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4148 endef
4150 define gb_ExternalProject__use_bzip2
4151 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4152 endef
4154 endif
4155 endif
4157 define gb_LinkTarget__use_clew
4158 $(call gb_LinkTarget_set_include,$(1), \
4159 -I$(SRCDIR)/external/clew/source/include \
4160 $$(INCLUDE) \
4162 $(call gb_LinkTarget_use_libraries,$(1),clew)
4163 endef
4165 ifneq ($(ENABLE_PDFIUM),)
4166 define gb_LinkTarget__use_pdfium
4167 $(call gb_LinkTarget_set_include,$(1),\
4168 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4169 -DCOMPONENT_BUILD \
4170 $$(INCLUDE) \
4172 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4173 endef
4174 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4175 pdfium \
4177 endif
4179 define gb_LinkTarget__use_dtoa
4180 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4181 $(call gb_LinkTarget_set_include,$(1),\
4182 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4183 $$(INCLUDE) \
4185 $(call gb_LinkTarget_use_static_libraries,$(1),\
4186 dtoa \
4189 endef
4191 define gb_ExternalProject__use_dtoa
4192 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4194 endef
4196 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4197 $(if $(UCRT_REDISTDIR),ucrt) \
4200 ifneq ($(SYSTEM_BOX2D),)
4202 define gb_LinkTarget__use_box2d
4203 $(call gb_LinkTarget_set_include,$(1),\
4204 -DSYSTEM_BOX2D \
4205 $$(INCLUDE) \
4206 $(BOX2D_CFLAGS) \
4208 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4210 endef
4212 gb_ExternalProject__use_box2d :=
4214 else # !SYSTEM_BOX2D
4216 define gb_LinkTarget__use_box2d
4217 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4218 $(call gb_LinkTarget_set_include,$(1),\
4219 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4220 $$(INCLUDE) \
4222 $(call gb_LinkTarget_use_static_libraries,$(1),\
4223 box2d \
4226 endef
4228 define gb_ExternalProject__use_box2d
4229 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4231 endef
4233 endif # SYSTEM_BOX2D
4235 ifneq ($(SYSTEM_ZXING),)
4237 define gb_LinkTarget__use_zxing
4238 $(call gb_LinkTarget_set_include,$(1),\
4239 -DSYSTEM_ZXING \
4240 $$(INCLUDE) \
4241 $(ZXING_CFLAGS) \
4243 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4245 endef
4247 gb_ExternalProject__use_zxing :=
4249 else # !SYSTEM_ZXING
4251 ifneq ($(ENABLE_ZXING),)
4253 define gb_LinkTarget__use_zxing
4254 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4255 $(call gb_LinkTarget_set_include,$(1),\
4256 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4257 $$(INCLUDE) \
4259 $(call gb_LinkTarget_use_static_libraries,$(1),\
4260 zxing \
4263 endef
4265 define gb_ExternalProject__use_zxing
4266 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4268 endef
4270 else # !ENABLE_ZXING
4272 define gb_LinkTarget__use_zxing
4273 endef
4275 endif # ENABLE_ZXING
4277 endif # SYSTEM_ZXING
4281 ifneq ($(SYSTEM_CUCKOO),)
4283 gb_ExternalProject__use_cuckoo_headers :=
4285 define gb_LinkTarget__use_cuckoo_headers
4286 $(call gb_LinkTarget_set_include,$(1),\
4287 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4288 $$(INCLUDE) \
4291 endef
4293 else # !SYSTEM_CUCKOO
4295 define gb_ExternalProject__use_cuckoo_headers
4296 $(call gb_ExternalProject_use_unpacked,$(1),cuckoo)
4298 endef
4300 define gb_LinkTarget__use_cuckoo_headers
4301 $(call gb_LinkTarget_use_unpacked,$(1),cuckoo)
4302 $(call gb_LinkTarget_set_include,$(1),\
4303 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4304 $$(INCLUDE) \
4307 endef
4309 endif # SYSTEM_CUCKOO
4312 # vim: set noet sw=4 ts=4: