related tdf#150197 sw: NONE numbering still returns prefix/suffix
[LibreOffice.git] / RepositoryExternal.mk
blob938fc6bf761fc045b2c7e61900e0912a23158dd3
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/private \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
133 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
134 -I$(call gb_UnpackedTarball_get_dir,skia) \
135 -I$(SRCDIR)/external/skia/inc/ \
136 $$(INCLUDE) \
138 $(call gb_LinkTarget_use_libraries,$(1),skia)
139 $(call gb_LinkTarget_add_defs,$(1),\
140 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
141 -DSKIA_DLL \
143 endef
144 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
145 skia \
147 endif
149 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
151 define gb_LinkTarget__use_sane_headers
152 $(call gb_LinkTarget_set_include,$(1),\
153 $(if $(filter WNT,$(OS)), \
154 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
155 -I$(SRCDIR)/external/sane/inc) \
156 $$(INCLUDE) \
159 ifeq ($(OS),WNT)
160 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
161 endif
163 endef
165 else
167 gb_LinkTarget__use_sane_headers :=
169 endif
171 ifneq ($(SYSTEM_BLUEZ),)
173 gb_LinkTarget__use_bluez_bluetooth_headers :=
175 else # !SYSTEM_BLUEZ
177 define gb_LinkTarget__use_bluez_bluetooth_headers
178 $(call gb_LinkTarget_set_include,$(1),\
179 -I$(SRCDIR)/external/bluez_bluetooth/inc \
180 $$(INCLUDE) \
183 endef
185 endif # SYSTEM_BLUEZ
187 # External libraries
189 ifneq ($(SYSTEM_CPPUNIT),)
191 define gb_LinkTarget__use_cppunit
192 $(call gb_LinkTarget_set_include,$(1),\
193 $$(INCLUDE) \
194 $(CPPUNIT_CFLAGS) \
197 $(call gb_LinkTarget_add_libs,$(1),\
198 $(CPPUNIT_LIBS) \
201 endef
203 else # !SYSTEM_CPPUNIT
205 define gb_LinkTarget__use_cppunit
206 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
210 $$(INCLUDE) \
213 ifeq ($(COM),MSC)
214 $(call gb_LinkTarget_add_libs,$(1),\
215 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
217 else
218 $(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
221 endif
223 endef
225 endif # SYSTEM_CPPUNIT
228 ifeq ($(ENABLE_EPOXY),TRUE)
229 ifeq ($(SYSTEM_EPOXY),TRUE)
231 define gb_LinkTarget__use_epoxy
232 $(call gb_LinkTarget_set_include,$(1),\
233 $$(INCLUDE) \
234 $(EPOXY_CFLAGS) \
236 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
238 endef
240 gb_ExternalProject__use_epoxy :=
242 else # !SYSTEM_EPOXY
244 define gb_LinkTarget__use_epoxy
245 $(call gb_LinkTarget_set_include,$(1),\
246 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
247 $$(INCLUDE) \
250 $(call gb_LinkTarget_use_libraries,$(1),\
251 epoxy \
254 endef
256 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
257 epoxy \
260 define gb_ExternalProject__use_epoxy
261 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
263 endef
265 endif # !SYSTEM_EPOXY
266 else # !ENABLE_EPOXY
268 gb_LinkTarget__use_epoxy :=
269 gb_ExternalProject__use_epoxy :=
271 endif # !ENABLE_EPOXY
274 define gb_LinkTarget__use_iconv
275 ifeq ($(COM),MSC)
276 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
277 else
278 $(call gb_LinkTarget_add_libs,$(1),-liconv)
279 endif
280 endef
282 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
284 define gb_LinkTarget__use_mariadb-connector-c
285 $(call gb_LinkTarget_set_include,$(1),\
286 $$(INCLUDE) \
287 $(MARIADB_CFLAGS) \
289 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
291 endef
292 gb_ExternalProject__use_mariadb-connector-c :=
294 else # !SYSTEM_MARIADB_CONNECTOR_C
296 define gb_LinkTarget__use_mariadb-connector-c
297 $(call gb_LinkTarget_set_include,$(1),\
298 $$(INCLUDE) \
299 $(MARIADB_CFLAGS) \
301 $(call gb_LinkTarget_use_static_libraries,$(1),\
302 mariadb-connector-c \
304 ifeq ($(OS),MACOSX)
305 $(call gb_LinkTarget_add_libs,$(1),\
306 -liconv \
308 endif
309 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
310 ws2_32 \
311 advapi32 \
312 kernel32 \
313 shlwapi \
314 crypt32 \
317 endef
318 define gb_ExternalProject__use_mariadb-connector-c
319 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
321 endef
323 endif # SYSTEM_MARIADB_CONNECTOR_C
326 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
328 define gb_LinkTarget__use_mysql
330 $(call gb_LinkTarget_add_defs,$(1),\
331 -DSYSTEM_MARIADB \
334 $(call gb_LinkTarget_add_libs,$(1),\
335 $(MARIADB_LIBS) \
338 $(call gb_LinkTarget_set_include,$(1),\
339 $(MARIADB_CFLAGS) \
340 $$(INCLUDE) \
342 endef
344 else
346 define gb_LinkTarget__use_mysql
348 $(call gb_LinkTarget_set_include,$(1),\
349 $$(INCLUDE) \
352 endef
354 endif
356 ifneq ($(SYSTEM_ZLIB),)
358 define gb_LinkTarget__use_zlib
359 $(call gb_LinkTarget_add_defs,$(1),\
360 -DSYSTEM_ZLIB \
361 -DZLIB_CONST \
363 $(call gb_LinkTarget_add_libs,$(1),-lz)
365 endef
367 # nothing on system
368 define gb_LinkTarget__use_zlib_x64
370 endef
372 gb_ExternalProject__use_zlib :=
374 else # !SYSTEM_ZLIB
376 define gb_LinkTarget__use_zlib_multiarch
377 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
379 $(call gb_LinkTarget_add_defs,$(1), \
380 -DZLIB_CONST \
383 $(call gb_LinkTarget_set_include,$(1),\
384 $(ZLIB_CFLAGS) \
385 $$(INCLUDE) \
388 $(call gb_LinkTarget_use_static_libraries,$(1),\
389 $(2) \
392 endef
394 define gb_LinkTarget__use_zlib
395 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
397 endef
399 define gb_LinkTarget__use_zlib_x64
400 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
402 endef
404 define gb_ExternalProject__use_zlib
405 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
407 endef
409 endif # SYSTEM_ZLIB
412 ifneq ($(SYSTEM_LIBJPEG),)
414 define gb_LinkTarget__use_libjpeg
415 $(call gb_LinkTarget_set_include,$(1),\
416 $$(INCLUDE) \
417 $(LIBJPEG_CFLAGS) \
419 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
420 $(call gb_LinkTarget_set_ldflags,$(1),\
421 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
424 endef
426 gb_ExternalProject__use_libjpeg :=
428 else
430 define gb_LinkTarget__use_libjpeg
431 $(call gb_LinkTarget_set_include,$(1),\
432 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
433 $$(INCLUDE) \
435 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
437 endef
439 define gb_ExternalProject__use_libjpeg
440 $(call gb_ExternalProject_use_static_libraries,$(1),libjpeg-turbo)
442 endef
444 endif # SYSTEM_LIBJPEG
446 ifneq ($(SYSTEM_MYTHES),)
448 define gb_LinkTarget__use_mythes
449 $(call gb_LinkTarget_set_include,$(1),\
450 $$(INCLUDE) \
451 $(MYTHES_CFLAGS) \
453 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
455 endef
457 else # !SYSTEM_MYTHES
459 define gb_LinkTarget__use_mythes
460 $(call gb_LinkTarget_set_include,$(1),\
461 -I$(call gb_UnpackedTarball_get_dir,mythes) \
462 $$(INCLUDE) \
465 ifeq ($(COM),MSC)
466 $(call gb_LinkTarget_use_static_libraries,$(1),\
467 mythes \
469 else
470 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
471 $(call gb_LinkTarget_use_external_project,$(1),mythes)
472 endif
474 endef
476 endif # SYSTEM_MYTHES
479 ifneq ($(SYSTEM_EXPAT),)
481 define gb_LinkTarget__use_expat_impl
482 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
484 $(call gb_LinkTarget_add_defs,$(1),\
485 -DSYSTEM_EXPAT \
488 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
490 endef
492 gb_ExternalProject__use_expat :=
494 else # !SYSTEM_EXPAT
496 define gb_LinkTarget__use_expat_impl
497 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
499 $(call gb_LinkTarget_set_include,$(1),\
500 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
501 $$(INCLUDE) \
504 $(call gb_LinkTarget_use_static_libraries,$(1),\
505 $(2) \
508 endef
510 define gb_ExternalProject__use_expat
511 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
513 endef
515 endif # SYSTEM_EXPAT
517 define gb_LinkTarget__use_expat
518 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
520 endef
522 define gb_LinkTarget__use_expat_x64
523 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
525 endef
527 ifneq ($(SYSTEM_HYPH),)
529 define gb_LinkTarget__use_hyphen
530 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
532 endef
534 else # !SYSTEM_HYPH
536 define gb_LinkTarget__use_hyphen
537 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
538 $(call gb_LinkTarget_set_include,$(1),\
539 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
540 $$(INCLUDE) \
543 ifeq ($(COM),MSC)
544 $(call gb_LinkTarget_use_static_libraries,$(1),\
545 hyphen \
547 else
548 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
549 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
550 endif
552 endef
554 endif # SYSTEM_HYPH
556 ifneq ($(SYSTEM_HUNSPELL),)
558 define gb_LinkTarget__use_hunspell
559 $(call gb_LinkTarget_set_include,$(1),\
560 $$(INCLUDE) \
561 $(HUNSPELL_CFLAGS) \
563 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
565 endef
567 gb_ExternalProject__use_hunspell :=
569 else # !SYSTEM_HUNSPELL
570 ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
572 define gb_LinkTarget__use_hunspell
573 $(call gb_LinkTarget_add_defs,$(1),\
574 -DHUNSPELL_STATIC \
576 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
577 $(call gb_LinkTarget_set_include,$(1),\
578 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
579 $$(INCLUDE) \
582 ifeq ($(COM),MSC)
583 $(call gb_LinkTarget_use_static_libraries,$(1),\
584 hunspell \
586 else
587 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
588 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
589 endif
591 endef
593 define gb_ExternalProject__use_hunspell
594 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
596 endef
598 endif # ENABLE_WASM_STRIP_HUNSPELL
599 endif # SYSTEM_HUNSPELL
602 ifneq ($(SYSTEM_BOOST),)
604 define gb_LinkTarget__use_boost_lib
605 $(call gb_LinkTarget_set_include,$(1),\
606 $$(INCLUDE) \
607 $(BOOST_CPPFLAGS) \
610 $(call gb_LinkTarget_add_ldflags,$(1),\
611 $(BOOST_LDFLAGS) \
614 $(call gb_LinkTarget_add_libs,$(1),$(2))
616 endef
618 define gb_LinkTarget__use_boost_locale
619 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
621 endef
623 define gb_LinkTarget__use_boost_date_time
624 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
626 endef
628 define gb_LinkTarget__use_boost_filesystem
629 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
631 endef
633 gb_ExternalProject__use_boost_filesystem :=
635 define gb_LinkTarget__use_boost_iostreams
636 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
638 endef
640 gb_ExternalProject__use_boost_iostreams :=
642 define gb_LinkTarget__use_boost_system
643 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
645 endef
647 gb_ExternalProject__use_boost_system :=
649 define gb_LinkTarget__use_boost_headers
650 $(call gb_LinkTarget_set_include,$(1),\
651 $$(INCLUDE) \
652 $(BOOST_CPPFLAGS) \
655 endef
657 gb_ExternalProject__use_boost_headers:=
659 else # !SYSTEM_BOOST
661 define gb_LinkTarget__use_boost_lib
662 $(call gb_LinkTarget_add_defs,$(1),\
663 -DBOOST_ALL_NO_LIB \
666 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
668 endef
670 define gb_LinkTarget__use_boost_locale
671 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
672 $(call gb_LinkTarget_add_libs,$(1),\
673 $(if $(filter $(OS),MACOSX),-liconv) \
676 endef
678 define gb_LinkTarget__use_boost_date_time
679 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
681 endef
683 define gb_LinkTarget__use_boost_filesystem
684 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
686 endef
688 define gb_ExternalProject__use_boost_filesystem
689 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
690 endef
692 define gb_LinkTarget__use_boost_iostreams
693 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
695 endef
697 define gb_ExternalProject__use_boost_iostreams
698 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
699 endef
701 define gb_LinkTarget__use_boost_system
702 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
704 endef
706 define gb_ExternalProject__use_boost_system
707 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
708 endef
710 define gb_LinkTarget__use_boost_headers
711 $(call gb_LinkTarget_use_unpacked,$(1),boost)
712 $(call gb_LinkTarget_set_include,$(1),\
713 $(BOOST_CPPFLAGS) \
714 $$(INCLUDE) \
717 endef
719 define gb_ExternalProject__use_boost_headers
720 $(call gb_ExternalProject_use_unpacked,$(1),boost)
722 endef
724 endif # SYSTEM_BOOST
727 ifneq ($(SYSTEM_LIBCMIS),)
729 define gb_LinkTarget__use_libcmis
730 $(call gb_LinkTarget_set_include,$(1),\
731 $$(INCLUDE) \
732 $(LIBCMIS_CFLAGS) \
734 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
736 endef
738 else # !SYSTEM_LIBCMIS
740 define gb_LinkTarget__use_libcmis
741 $(call gb_LinkTarget_set_include,$(1),\
742 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
743 $$(INCLUDE) \
745 $(call gb_LinkTarget_use_static_libraries,$(1),\
746 libcmis \
749 endef
751 endif # SYSTEM_LIBCMIS
753 ifeq ($(ENABLE_JAVA),TRUE)
755 define gb_LinkTarget__use_jawt
756 $(call gb_LinkTarget_add_libs,$(1),\
757 $(JAWTLIB) \
760 endef
762 else # !ENABLE_JAVA
764 gb_LinkTarget__use_jawt :=
766 endif # ENABLE_JAVA
768 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
770 define gb_LinkTarget__use_libatomic_ops
771 $(call gb_LinkTarget_set_include,$(1),\
772 $$(INCLUDE) \
773 $(LIBATOMIC_OPS_CFLAGS) \
775 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
777 endef
778 gb_ExternalProject__use_libatomic_ops :=
780 else # !SYSTEM_LIBATOMIC_OPS
782 define gb_LinkTarget__use_libatomic_ops
783 $(call gb_LinkTarget_set_include,$(1),\
784 $(LIBATOMIC_OPS_CFLAGS) \
785 $$(INCLUDE) \
786 $(LIBATOMIC_OPS_CFLAGS) \
788 $(call gb_LinkTarget_use_external_project,$(1),\
789 libatomic_ops \
792 $(call gb_LinkTarget_add_libs,$(1),\
793 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
796 endef
798 define gb_ExternalProject__use_libatomic_ops
799 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
801 endef
803 endif # SYSTEM_LIBATOMIC_OPS
806 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
808 define gb_LinkTarget__use_libexttextcat
809 $(call gb_LinkTarget_set_include,$(1),\
810 $$(INCLUDE) \
811 $(LIBEXTTEXTCAT_CFLAGS) \
813 $(call gb_LinkTarget_add_defs,$(1),\
814 -DSYSTEM_LIBEXTTEXTCAT \
816 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
818 endef
820 else # !SYSTEM_LIBEXTTEXTCAT
822 define gb_LinkTarget__use_libexttextcat
823 $(call gb_LinkTarget_set_include,$(1),\
824 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
825 $$(INCLUDE) \
828 ifeq ($(COM),MSC)
829 $(call gb_LinkTarget_use_static_libraries,$(1),\
830 libexttextcat \
832 else
833 $(call gb_LinkTarget_add_libs,$(1),\
834 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
836 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
837 endif
840 endef
842 endif # SYSTEM_LIBEXTTEXTCAT
845 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
847 define gb_LinkTarget__use_libnumbertext
848 $(call gb_LinkTarget_set_include,$(1),\
849 $$(INCLUDE) \
850 $(LIBNUMBERTEXT_CFLAGS) \
852 $(call gb_LinkTarget_add_defs,$(1),\
853 -DSYSTEM_LIBNUMBERTEXT \
855 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
857 endef
859 else # !SYSTEM_LIBNUMBERTEXT
861 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
862 libnumbertext_numbertext \
865 define gb_LinkTarget__use_libnumbertext
866 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
867 $(call gb_LinkTarget_set_include,$(1),\
868 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
869 $$(INCLUDE) \
872 ifeq ($(COM),MSC)
873 $(call gb_LinkTarget_use_static_libraries,$(1),\
874 libnumbertext \
876 else
878 $(call gb_LinkTarget_add_libs,$(1),\
879 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
881 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
883 endif
885 endef
887 endif # SYSTEM_LIBNUMBERTEXT
890 ifneq ($(SYSTEM_LIBXML),)
892 define gb_LinkTarget__use_libxml2
893 $(call gb_LinkTarget_add_defs,$(1),\
894 -DSYSTEM_LIBXML \
896 $(call gb_LinkTarget_set_include,$(1),\
897 $$(INCLUDE) \
898 $(LIBXML_CFLAGS) \
900 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
902 endef
903 gb_ExternalProject__use_libxml2:=
905 else # !SYSTEM_LIBXML
907 $(eval $(call gb_Helper_register_packages_for_install,ure,\
908 libxml2 \
911 define gb_LinkTarget__use_libxml2
912 $(call gb_LinkTarget_use_package,$(1),libxml2)
913 $(call gb_LinkTarget_set_include,$(1),\
914 $$(INCLUDE) \
915 $(LIBXML_CFLAGS) \
918 $(call gb_LinkTarget_add_libs,$(1),\
919 $(LIBXML_LIBS) \
922 ifeq ($(COM),MSC)
923 $(call gb_LinkTarget_use_external,$(1),icu_headers)
924 endif
926 endef
927 define gb_ExternalProject__use_libxml2
928 $(call gb_ExternalProject_use_package,$(1),libxml2)
930 ifeq ($(COM),MSC)
931 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
932 endif
934 endef
936 endif # SYSTEM_LIBXML
939 ifneq ($(SYSTEM_LIBXSLT),)
941 define gb_LinkTarget__use_libxslt
942 $(call gb_LinkTarget_set_include,$(1),\
943 $$(INCLUDE) \
944 $(LIBXSLT_CFLAGS) \
946 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
948 endef
950 define gb_LinkTarget__use_libexslt
951 $(call gb_LinkTarget_set_include,$(1),\
952 $$(INCLUDE) \
953 $(LIBEXSLT_CFLAGS) \
956 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
958 endef
960 else # !SYSTEM_LIBXSLT
962 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
963 libxslt \
966 define gb_LinkTarget__use_libxslt
967 $(call gb_LinkTarget_use_package,$(1),libxslt)
968 $(call gb_LinkTarget_set_include,$(1),\
969 $$(INCLUDE) \
970 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
973 ifeq ($(COM),MSC)
974 $(call gb_LinkTarget_add_libs,$(1),\
975 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
977 else
978 $(call gb_LinkTarget_add_libs,$(1),\
979 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
981 endif
983 endef
985 define gb_LinkTarget__use_libexslt
986 $(call gb_LinkTarget_use_package,$(1),libxslt)
987 $(call gb_LinkTarget_set_include,$(1),\
988 $$(INCLUDE) \
989 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
992 ifeq ($(COM),MSC)
993 $(call gb_LinkTarget_add_libs,$(1),\
994 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
996 else
997 $(call gb_LinkTarget_add_libs,$(1),\
998 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
1000 endif
1002 endef
1004 endif # SYSTEM_LIBXSLT
1007 ifneq ($(SYSTEM_XMLSEC),)
1009 define gb_LinkTarget__use_xmlsec
1010 $(call gb_LinkTarget_add_defs,$(1),\
1011 -DSYSTEM_XMLSEC \
1013 $(call gb_LinkTarget_set_include,$(1),\
1014 $$(INCLUDE) \
1015 $(XMLSEC_CFLAGS) \
1017 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1019 endef
1021 gb_ExternalProject__use_xmlsec:=
1023 else # !SYSTEM_XMLSEC
1025 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1026 xmlsec \
1029 define gb_LinkTarget__use_xmlsec
1031 endef
1033 endif # SYSTEM_XMLSEC
1035 ifneq ($(SYSTEM_LIBLANGTAG),)
1037 define gb_LinkTarget__use_liblangtag
1038 $(call gb_LinkTarget_set_include,$(1),\
1039 $$(INCLUDE) \
1040 $(LIBLANGTAG_CFLAGS) \
1043 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1045 endef
1047 gb_ExternalProject__use_liblangtag :=
1049 else # !SYSTEM_LIBLANGTAG
1051 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1052 liblangtag_data \
1055 ifeq ($(COM),MSC)
1057 define gb_LinkTarget__use_liblangtag
1058 $(call gb_LinkTarget_set_include,$(1),\
1059 $(LIBLANGTAG_CFLAGS) \
1060 $$(INCLUDE) \
1062 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1063 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1065 endef
1067 else
1069 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1070 liblangtag \
1073 define gb_LinkTarget__use_liblangtag
1074 $(call gb_LinkTarget_set_include,$(1),\
1075 $(LIBLANGTAG_CFLAGS) \
1076 $$(INCLUDE) \
1078 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1079 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1081 endef
1083 endif # MSC
1085 define gb_ExternalProject__use_liblangtag
1086 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1088 endef
1090 endif # SYSTEM_LIBLANGTAG
1093 ifneq ($(SYSTEM_REDLAND),)
1095 define gb_LinkTarget__use_librdf
1096 $(call gb_LinkTarget_add_defs,$(1),\
1097 -DSYSTEM_REDLAND \
1099 $(call gb_LinkTarget_set_include,$(1),\
1100 $$(INCLUDE) \
1101 $(REDLAND_CFLAGS) \
1103 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1105 endef
1107 gb_LinkTarget__use_redland_headers:=
1109 gb_LinkTarget__use_raptor_headers:=
1111 gb_LinkTarget__use_rasqal_headers:=
1113 else # !SYSTEM_REDLAND
1115 define gb_LinkTarget__use_redland_headers
1116 $(call gb_LinkTarget_set_include,$(1),\
1117 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1118 $$(INCLUDE) \
1121 endef
1123 define gb_LinkTarget__use_raptor_headers
1124 $(call gb_LinkTarget_set_include,$(1),\
1125 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1126 $$(INCLUDE) \
1129 endef
1131 define gb_LinkTarget__use_rasqal_headers
1132 $(call gb_LinkTarget_set_include,$(1),\
1133 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1134 $$(INCLUDE) \
1137 endef
1139 ifneq ($(OS),ANDROID)
1141 ifeq ($(COM),MSC)
1142 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1143 raptor2 \
1144 rasqal \
1145 rdf \
1147 else
1148 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1149 raptor \
1150 rasqal \
1151 redland \
1153 endif
1155 define gb_LinkTarget__use_librdf
1156 ifeq ($(COM),MSC)
1157 $(call gb_LinkTarget_use_libraries,$(1),\
1158 raptor2 \
1159 rdf \
1161 else
1162 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1164 $(call gb_LinkTarget_add_libs,$(1),\
1165 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1166 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1167 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1169 endif
1171 endef
1173 else # ANDROID
1175 define gb_LinkTarget__use_librdf
1176 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1178 endef
1180 endif # ANDROID
1182 endif # SYSTEM_REDLAND
1184 ifneq ($(SYSTEM_CAIRO),)
1186 define gb_LinkTarget__use_cairo
1187 $(call gb_LinkTarget_set_include,$(1),\
1188 $$(INCLUDE) \
1189 $(CAIRO_CFLAGS) \
1191 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1192 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1194 endef
1196 else # !SYSTEM_CAIRO
1198 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1200 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1201 cairo \
1202 pixman \
1205 define gb_LinkTarget__use_cairo
1206 $(call gb_LinkTarget_use_package,$(1),cairo)
1207 $(call gb_LinkTarget_use_package,$(1),pixman)
1208 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1209 $(call gb_LinkTarget_set_include,$(1),\
1210 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1211 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1212 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1213 $$(INCLUDE) \
1215 $(call gb_LinkTarget_add_libs,$(1),\
1216 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1217 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1220 endef
1222 endif # !MACOSX, !WNT
1224 endif # !SYSTEM_CAIRO
1226 ifneq ($(SYSTEM_FREETYPE),)
1228 define gb_LinkTarget__use_freetype_headers
1229 $(call gb_LinkTarget_set_include,$(1),\
1230 $$(INCLUDE) \
1231 $(FREETYPE_CFLAGS) \
1234 endef
1236 gb_ExternalProject__use_freetype :=
1238 else
1240 define gb_LinkTarget__use_freetype_headers
1241 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1242 $(call gb_LinkTarget_set_include,$(1),\
1243 $(FREETYPE_CFLAGS) \
1244 $$(INCLUDE) \
1247 endef
1249 define gb_ExternalProject__use_freetype
1250 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1252 endef
1254 endif # SYSTEM_FREETYPE
1256 define gb_LinkTarget__use_freetype
1257 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1258 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1260 endef
1262 ifneq ($(SYSTEM_FONTCONFIG),)
1264 define gb_LinkTarget__use_fontconfig
1265 $(call gb_LinkTarget_set_include,$(1),\
1266 $$(INCLUDE) \
1267 $(FONTCONFIG_CFLAGS) \
1270 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1272 endef
1274 ifeq ($(OS),EMSCRIPTEN)
1275 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1276 libfontconfig_data \
1278 endif
1280 gb_ExternalProject__use_fontconfig :=
1282 else # SYSTEM_FONTCONFIG
1284 define gb_LinkTarget__use_fontconfig
1285 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1286 $(call gb_LinkTarget_set_include,$(1),\
1287 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1288 $$(INCLUDE) \
1291 $(call gb_LinkTarget_add_libs,$(1),\
1292 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1295 endef
1297 define gb_ExternalProject__use_fontconfig
1298 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1300 endef
1302 endif # SYSTEM_FONTCONFIG
1304 ifneq ($(SYSTEM_GRAPHITE),)
1306 define gb_LinkTarget__use_graphite
1307 $(call gb_LinkTarget_set_include,$(1),\
1308 $$(INCLUDE) \
1309 $(GRAPHITE_CFLAGS) \
1311 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1313 endef
1315 gb_ExternalProject__use_graphite:=
1317 else # !SYSTEM_GRAPHITE
1319 define gb_LinkTarget__use_graphite
1320 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1321 $(call gb_LinkTarget_set_include,$(1),\
1322 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1323 $$(INCLUDE) \
1325 $(call gb_LinkTarget_use_static_libraries,$(1),\
1326 graphite \
1329 endef
1331 define gb_ExternalProject__use_graphite
1332 $(call gb_ExternalProject_use_static_libraries,$(1),\
1333 graphite \
1336 endef
1337 endif # SYSTEM_GRAPHITE
1339 ifneq ($(SYSTEM_ICU),)
1341 gb_LinkTarget__use_icu_headers:=
1342 gb_ExternalProject__use_icu:=
1344 define gb_LinkTarget__use_icudata
1345 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1347 endef
1348 define gb_LinkTarget__use_icui18n
1349 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1351 endef
1352 define gb_LinkTarget__use_icuuc
1353 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1355 endef
1357 else # !SYSTEM_ICU
1359 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1360 icu_ure \
1363 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1364 icu \
1367 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1368 gb_ICU_suffix:=lo
1369 else
1370 gb_ICU_suffix:=
1371 endif
1373 define gb_LinkTarget__use_icu_headers
1374 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1375 $(call gb_LinkTarget_set_include,$(1),\
1376 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1377 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1378 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1379 $$(INCLUDE) \
1382 endef
1384 define gb_ExternalProject__use_icu
1385 $(call gb_ExternalProject_use_package,$(1),icu)
1387 endef
1389 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1390 define gb_LinkTarget__use_icudata
1391 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1393 ifeq ($(OS),WNT)
1394 $(call gb_LinkTarget_add_libs,$(1),\
1395 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1397 else
1398 $(call gb_LinkTarget_add_libs,$(1),\
1399 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1401 endif
1403 endef
1405 define gb_LinkTarget__use_icui18n
1406 $(call gb_LinkTarget_use_package,$(1),icu)
1408 ifeq ($(OS),WNT)
1409 $(call gb_LinkTarget_add_libs,$(1),\
1410 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1412 else
1413 $(call gb_LinkTarget_add_libs,$(1),\
1414 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1416 endif
1418 endef
1420 define gb_LinkTarget__use_icuuc
1421 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1423 ifeq ($(OS),WNT)
1424 $(call gb_LinkTarget_add_libs,$(1),\
1425 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1427 else
1428 $(call gb_LinkTarget_add_libs,$(1),\
1429 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1431 endif
1433 endef
1435 endif # SYSTEM_ICU
1437 ifneq ($(SYSTEM_HARFBUZZ),)
1439 define gb_LinkTarget__use_harfbuzz
1440 $(call gb_LinkTarget_set_include,$(1),\
1441 $$(INCLUDE) \
1442 $(HARFBUZZ_CFLAGS) \
1444 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1446 endef
1448 gb_ExternalProject__use_harfbuzz :=
1450 else # SYSTEM_HARFBUZZ != TRUE
1452 define gb_LinkTarget__use_harfbuzz
1453 $(call gb_LinkTarget_set_include,$(1),\
1454 $(HARFBUZZ_CFLAGS) \
1455 $$(INCLUDE) \
1457 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1458 $(call gb_LinkTarget_use_external,$(1),icuuc)
1459 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1461 endef
1463 define gb_ExternalProject__use_harfbuzz
1464 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1466 endef
1468 endif # SYSTEM_HARFBUZZ
1470 ifneq ($(ENABLE_OPENSSL),TRUE)
1472 gb_ExternalProject__use_openssl:=
1473 gb_LinkTarget__use_openssl_headers:=
1474 gb_LinkTarget__use_openssl:=
1476 else # ENABLE_OPENSSL
1478 ifneq ($(SYSTEM_OPENSSL),)
1480 gb_LinkTarget__use_openssl_headers:=
1481 gb_ExternalProject__use_openssl:=
1483 define gb_LinkTarget__use_openssl
1484 $(call gb_LinkTarget_set_include,$(1),\
1485 $$(INCLUDE) \
1486 $(OPENSSL_CFLAGS) \
1488 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1490 endef
1492 else # !SYSTEM_OPENSSL
1494 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1495 openssl \
1498 define gb_ExternalProject__use_openssl
1499 $(call gb_ExternalProject_use_package,$(1),openssl)
1501 endef
1503 define gb_LinkTarget__use_openssl_headers
1504 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1505 $(call gb_LinkTarget_set_include,$(1),\
1506 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1507 $$(INCLUDE) \
1510 endef
1512 define gb_LinkTarget__use_openssl
1513 $(call gb_LinkTarget_use_package,$(1),openssl)
1514 ifeq ($(OS),WNT)
1515 $(call gb_LinkTarget_add_libs,$(1),\
1516 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1517 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1519 else
1520 $(call gb_LinkTarget_add_libs,$(1),\
1521 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1522 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1523 $(if $(filter $(OS),LINUX),-pthread) \
1525 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1526 ifeq ($(OS),SOLARIS)
1527 $(call gb_LinkTarget_add_libs,$(1),\
1528 -lnsl \
1529 -lsocket \
1531 endif
1532 endif
1534 endef
1536 endif # SYSTEM_OPENSSL
1537 endif # ENABLE_OPENSSL
1540 ifneq ($(SYSTEM_CDR),)
1542 define gb_LinkTarget__use_cdr
1543 $(call gb_LinkTarget_set_include,$(1),\
1544 $$(INCLUDE) \
1545 $(CDR_CFLAGS) \
1547 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1549 endef
1551 else # !SYSTEM_CDR
1553 define gb_LinkTarget__use_cdr
1554 $(call gb_LinkTarget_set_include,$(1),\
1555 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1556 $$(INCLUDE) \
1558 $(call gb_LinkTarget_add_libs,$(1),\
1559 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1561 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1562 endef
1564 endif # SYSTEM_CDR
1567 ifneq ($(SYSTEM_EBOOK),)
1569 define gb_LinkTarget__use_ebook
1570 $(call gb_LinkTarget_set_include,$(1),\
1571 $$(INCLUDE) \
1572 $(EBOOK_CFLAGS) \
1574 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1576 endef
1578 gb_ExternalProject__use_ebook :=
1580 else # !SYSTEM_EBOOK
1582 define gb_LinkTarget__use_ebook
1583 $(call gb_LinkTarget_set_include,$(1),\
1584 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1585 $$(INCLUDE) \
1587 $(call gb_LinkTarget_add_libs,$(1),\
1588 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1590 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1592 endef
1594 define gb_ExternalProject__use_ebook
1595 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1597 endef
1599 endif # SYSTEM_EBOOK
1602 ifneq ($(SYSTEM_ETONYEK),)
1604 define gb_LinkTarget__use_etonyek
1605 $(call gb_LinkTarget_set_include,$(1),\
1606 $$(INCLUDE) \
1607 $(ETONYEK_CFLAGS) \
1609 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1611 endef
1613 gb_ExternalProject__use_etonyek :=
1615 else # !SYSTEM_ETONYEK
1617 ifeq ($(COM),MSC)
1619 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1620 etonyek \
1623 define gb_LinkTarget__use_etonyek
1624 $(call gb_LinkTarget_set_include,$(1),\
1625 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1626 $$(INCLUDE) \
1628 $(call gb_LinkTarget_use_libraries,$(1),\
1629 etonyek \
1632 endef
1634 else # !MSC
1636 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1637 libetonyek \
1640 define gb_LinkTarget__use_etonyek
1641 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1643 $(call gb_LinkTarget_set_include,$(1),\
1644 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1645 -DLIBETONYEK_VISIBILITY \
1646 $$(INCLUDE) \
1648 $(call gb_LinkTarget_add_libs,$(1),\
1649 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1651 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1653 endef
1655 define gb_ExternalProject__use_etonyek
1656 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1658 endef
1660 endif
1662 endif # SYSTEM_ETONYEK
1665 ifneq ($(SYSTEM_FREEHAND),)
1667 define gb_LinkTarget__use_freehand
1668 $(call gb_LinkTarget_set_include,$(1),\
1669 $$(INCLUDE) \
1670 $(FREEHAND_CFLAGS) \
1672 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1674 endef
1676 gb_ExternalProject__use_freehand :=
1678 else # !SYSTEM_FREEHAND
1680 define gb_LinkTarget__use_freehand
1681 $(call gb_LinkTarget_set_include,$(1),\
1682 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1683 $$(INCLUDE) \
1685 $(call gb_LinkTarget_add_libs,$(1),\
1686 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1688 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1690 endef
1692 define gb_ExternalProject__use_freehand
1693 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1695 endef
1697 endif # SYSTEM_FREEHAND
1700 ifneq ($(SYSTEM_ODFGEN),)
1702 define gb_LinkTarget__use_odfgen
1703 $(call gb_LinkTarget_set_include,$(1),\
1704 $$(INCLUDE) \
1705 $(ODFGEN_CFLAGS) \
1707 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1709 endef
1711 else # !SYSTEM_ODFGEN
1713 ifeq ($(COM),MSC)
1715 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1716 odfgen \
1719 define gb_LinkTarget__use_odfgen
1720 $(call gb_LinkTarget_set_include,$(1),\
1721 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1722 $$(INCLUDE) \
1724 $(call gb_LinkTarget_use_libraries,$(1),\
1725 odfgen \
1728 endef
1730 else # !MSC
1732 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1733 libodfgen \
1736 define gb_LinkTarget__use_odfgen
1737 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1739 $(call gb_LinkTarget_set_include,$(1),\
1740 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1741 -DLIBODFGEN_VISIBILITY \
1742 $$(INCLUDE) \
1744 $(call gb_LinkTarget_add_libs,$(1),\
1745 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1748 endef
1750 endif
1752 endif # SYSTEM_ODFGEN
1754 ifneq ($(SYSTEM_EPUBGEN),)
1756 define gb_LinkTarget__use_epubgen
1757 $(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
1759 $(EPUBGEN_CFLAGS) \
1761 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1763 endef
1764 gb_ExternalProject__use_epubgen :=
1766 else # !SYSTEM_EPUBGEN
1767 ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
1769 define gb_LinkTarget__use_epubgen
1770 $(call gb_LinkTarget_set_include,$(1),\
1771 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1772 $$(INCLUDE) \
1774 $(call gb_LinkTarget_add_libs,$(1),\
1775 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1777 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1779 endef
1780 define gb_ExternalProject__use_epubgen
1781 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1783 endef
1785 endif # ENABLE_WASM_STRIP_EPUB
1786 endif # SYSTEM_EPUBGEN
1788 ifneq ($(SYSTEM_REVENGE),)
1790 define gb_LinkTarget__use_revenge
1791 $(call gb_LinkTarget_set_include,$(1),\
1792 $$(INCLUDE) \
1793 $(REVENGE_CFLAGS) \
1795 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1797 endef
1799 gb_ExternalProject__use_revenge :=
1801 else # !SYSTEM_REVENGE
1803 ifeq ($(COM),MSC)
1805 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1806 revenge \
1809 define gb_LinkTarget__use_revenge
1810 $(call gb_LinkTarget_set_include,$(1),\
1811 $(REVENGE_CFLAGS) \
1812 $$(INCLUDE) \
1814 $(call gb_LinkTarget_use_libraries,$(1),\
1815 revenge \
1818 endef
1820 define gb_ExternalProject__use_revenge
1821 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1823 endef
1825 else # !MSC
1827 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1828 librevenge \
1831 define gb_LinkTarget__use_revenge
1832 $(call gb_LinkTarget_use_package,$(1),librevenge)
1834 $(call gb_LinkTarget_set_include,$(1),\
1835 $(REVENGE_CFLAGS) \
1836 -DLIBREVENGE_VISIBILITY \
1837 $$(INCLUDE) \
1839 $(call gb_LinkTarget_add_libs,$(1),\
1840 $(REVENGE_LIBS) \
1842 endef
1844 define gb_ExternalProject__use_revenge
1845 $(call gb_ExternalProject_use_package,$(1),librevenge)
1847 endef
1849 endif # MSC
1851 endif # SYSTEM_REVENGE
1854 ifneq ($(SYSTEM_ABW),)
1856 define gb_LinkTarget__use_abw
1857 $(call gb_LinkTarget_set_include,$(1),\
1858 $$(INCLUDE) \
1859 $(ABW_CFLAGS) \
1861 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1863 endef
1864 gb_ExternalProject__use_abw :=
1866 else # !SYSTEM_ABW
1868 define gb_LinkTarget__use_abw
1869 $(call gb_LinkTarget_set_include,$(1),\
1870 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1871 $$(INCLUDE) \
1873 $(call gb_LinkTarget_add_libs,$(1),\
1874 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1876 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1878 endef
1879 define gb_ExternalProject__use_abw
1880 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1882 endef
1884 endif # SYSTEM_ABW
1887 ifneq ($(SYSTEM_MSPUB),)
1889 define gb_LinkTarget__use_mspub
1890 $(call gb_LinkTarget_set_include,$(1),\
1891 $$(INCLUDE) \
1892 $(MSPUB_CFLAGS) \
1894 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1896 endef
1898 else # !SYSTEM_MSPUB
1900 define gb_LinkTarget__use_mspub
1901 $(call gb_LinkTarget_set_include,$(1),\
1902 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1903 $$(INCLUDE) \
1905 $(call gb_LinkTarget_add_libs,$(1),\
1906 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1908 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1910 endef
1912 endif # SYSTEM_MSPUB
1915 ifneq ($(SYSTEM_PAGEMAKER),)
1917 define gb_LinkTarget__use_pagemaker
1918 $(call gb_LinkTarget_set_include,$(1),\
1919 $$(INCLUDE) \
1920 $(PAGEMAKER_CFLAGS) \
1922 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1924 endef
1925 gb_ExternalProject__use_pagemaker :=
1927 else # !SYSTEM_PAGEMAKER
1929 define gb_LinkTarget__use_pagemaker
1930 $(call gb_LinkTarget_set_include,$(1),\
1931 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1932 $$(INCLUDE) \
1934 $(call gb_LinkTarget_add_libs,$(1),\
1935 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1937 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1939 endef
1940 define gb_ExternalProject__use_pagemaker
1941 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1943 endef
1945 endif # SYSTEM_PAGEMAKER
1948 ifneq ($(SYSTEM_QXP),)
1950 define gb_LinkTarget__use_qxp
1951 $(call gb_LinkTarget_set_include,$(1),\
1952 $$(INCLUDE) \
1953 $(QXP_CFLAGS) \
1955 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
1957 endef
1958 gb_ExternalProject__use_qxp :=
1960 else # !SYSTEM_QXP
1962 define gb_LinkTarget__use_qxp
1963 $(call gb_LinkTarget_set_include,$(1),\
1964 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
1965 $$(INCLUDE) \
1967 $(call gb_LinkTarget_add_libs,$(1),\
1968 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
1970 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
1972 endef
1973 define gb_ExternalProject__use_qxp
1974 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
1976 endef
1978 endif # SYSTEM_QXP
1981 ifneq ($(SYSTEM_ZMF),)
1983 define gb_LinkTarget__use_zmf
1984 $(call gb_LinkTarget_set_include,$(1),\
1985 $$(INCLUDE) \
1986 $(ZMF_CFLAGS) \
1988 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1990 endef
1991 gb_ExternalProject__use_zmf :=
1993 else # !SYSTEM_ZMF
1995 define gb_LinkTarget__use_zmf
1996 $(call gb_LinkTarget_set_include,$(1),\
1997 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
1998 $$(INCLUDE) \
2000 $(call gb_LinkTarget_add_libs,$(1),\
2001 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2003 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2005 endef
2006 define gb_ExternalProject__use_zmf
2007 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2009 endef
2011 endif # SYSTEM_ZMF
2014 ifneq ($(SYSTEM_VISIO),)
2016 define gb_LinkTarget__use_visio
2017 $(call gb_LinkTarget_set_include,$(1),\
2018 $$(INCLUDE) \
2019 $(VISIO_CFLAGS) \
2021 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2023 endef
2025 else # !SYSTEM_VISIO
2027 define gb_LinkTarget__use_visio
2028 $(call gb_LinkTarget_set_include,$(1),\
2029 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2030 $$(INCLUDE) \
2032 $(call gb_LinkTarget_add_libs,$(1),\
2033 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2035 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2037 endef
2039 endif # SYSTEM_VISIO
2042 ifneq ($(SYSTEM_WPD),)
2044 define gb_LinkTarget__use_wpd
2045 $(call gb_LinkTarget_set_include,$(1),\
2046 $$(INCLUDE) \
2047 $(WPD_CFLAGS) \
2049 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2051 endef
2052 gb_ExternalProject__use_wpd :=
2054 else # !SYSTEM_WPD
2056 ifeq ($(COM),MSC)
2058 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2059 wpd \
2062 define gb_LinkTarget__use_wpd
2063 $(call gb_LinkTarget_set_include,$(1),\
2064 $(WPD_CFLAGS) \
2065 $$(INCLUDE) \
2067 $(call gb_LinkTarget_use_libraries,$(1),\
2068 wpd \
2071 endef
2073 define gb_ExternalProject__use_wpd
2074 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2076 endef
2078 else # !MSC
2080 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2081 libwpd \
2084 define gb_LinkTarget__use_wpd
2085 $(call gb_LinkTarget_use_package,$(1),libwpd)
2087 $(call gb_LinkTarget_set_include,$(1),\
2088 $(WPD_CFLAGS) \
2089 $$(INCLUDE) \
2091 $(call gb_LinkTarget_add_libs,$(1),\
2092 $(WPD_LIBS) \
2095 endef
2097 define gb_ExternalProject__use_wpd
2098 $(call gb_ExternalProject_use_package,$(1),libwpd)
2100 endef
2102 endif # MSC
2104 endif # SYSTEM_WPD
2107 ifneq ($(SYSTEM_WPG),)
2109 define gb_LinkTarget__use_wpg
2110 $(call gb_LinkTarget_set_include,$(1),\
2111 $$(INCLUDE) \
2112 $(WPG_CFLAGS) \
2114 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2116 endef
2117 gb_ExternalProject__use_wpg :=
2119 else # !SYSTEM_WPG
2121 ifeq ($(COM),MSC)
2123 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2124 wpg \
2127 define gb_LinkTarget__use_wpg
2128 $(call gb_LinkTarget_set_include,$(1),\
2129 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2130 $$(INCLUDE) \
2132 $(call gb_LinkTarget_use_libraries,$(1),\
2133 wpg \
2136 endef
2138 else # !MSC
2140 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2141 libwpg \
2144 define gb_LinkTarget__use_wpg
2145 $(call gb_LinkTarget_use_package,$(1),libwpg)
2147 $(call gb_LinkTarget_set_include,$(1),\
2148 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2149 $$(INCLUDE) \
2151 $(call gb_LinkTarget_add_libs,$(1),\
2152 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2155 endef
2157 endif # MSC
2159 endif # SYSTEM_WPG
2162 ifneq ($(SYSTEM_WPS),)
2164 define gb_LinkTarget__use_wps
2165 $(call gb_LinkTarget_set_include,$(1),\
2166 $$(INCLUDE) \
2167 $(WPS_CFLAGS) \
2169 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2171 endef
2172 gb_ExternalProject__use_wps :=
2174 else # !SYSTEM_WPS
2176 ifeq ($(COM),MSC)
2178 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2179 wps \
2182 define gb_LinkTarget__use_wps
2183 $(call gb_LinkTarget_set_include,$(1),\
2184 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2185 $$(INCLUDE) \
2188 $(call gb_LinkTarget_use_libraries,$(1),\
2189 wps \
2192 endef
2194 else # !MSC
2196 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2197 libwps \
2200 define gb_LinkTarget__use_wps
2201 $(call gb_LinkTarget_use_package,$(1),libwps)
2203 $(call gb_LinkTarget_set_include,$(1),\
2204 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2205 $$(INCLUDE) \
2207 $(call gb_LinkTarget_add_libs,$(1),\
2208 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2211 endef
2213 endif # MSC
2215 endif # SYSTEM_WPS
2218 ifneq ($(SYSTEM_MWAW),)
2220 define gb_LinkTarget__use_mwaw
2221 $(call gb_LinkTarget_set_include,$(1),\
2222 $$(INCLUDE) \
2223 $(MWAW_CFLAGS) \
2225 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2227 endef
2229 else # !SYSTEM_MWAW
2231 ifeq ($(COM),MSC)
2233 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2234 mwaw \
2237 define gb_LinkTarget__use_mwaw
2238 $(call gb_LinkTarget_set_include,$(1),\
2239 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2240 $$(INCLUDE) \
2243 $(call gb_LinkTarget_use_libraries,$(1),\
2244 mwaw \
2247 endef
2249 else # !MSC
2251 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2252 libmwaw \
2255 define gb_LinkTarget__use_mwaw
2256 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2258 $(call gb_LinkTarget_set_include,$(1),\
2259 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2260 $$(INCLUDE) \
2262 $(call gb_LinkTarget_add_libs,$(1),\
2263 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2266 endef
2268 endif # MSC
2270 endif # SYSTEM_MWAW
2272 ifneq ($(SYSTEM_STAROFFICE),)
2274 define gb_LinkTarget__use_staroffice
2275 $(call gb_LinkTarget_set_include,$(1),\
2276 $$(INCLUDE) \
2277 $(STAROFFICE_CFLAGS) \
2279 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2281 endef
2283 else # !SYSTEM_STAROFFICE
2285 ifeq ($(COM),MSC)
2287 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2288 staroffice \
2291 define gb_LinkTarget__use_staroffice
2292 $(call gb_LinkTarget_set_include,$(1),\
2293 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2294 $$(INCLUDE) \
2297 $(call gb_LinkTarget_use_libraries,$(1),\
2298 staroffice \
2301 endef
2303 else # !MSC
2305 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2306 libstaroffice \
2309 define gb_LinkTarget__use_staroffice
2310 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2312 $(call gb_LinkTarget_set_include,$(1),\
2313 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2314 $$(INCLUDE) \
2316 $(call gb_LinkTarget_add_libs,$(1),\
2317 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2320 endef
2322 endif # MSC
2324 endif # SYSTEM_STAROFFICE
2327 ifneq ($(SYSTEM_LCMS2),)
2329 define gb_LinkTarget__use_lcms2
2330 $(call gb_LinkTarget_set_include,$(1),\
2331 $$(INCLUDE) \
2332 $(LCMS2_CFLAGS) \
2334 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2336 endef
2338 gb_ExternalProject__use_lcms2 :=
2340 else # !SYSTEM_LCMS2
2342 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2343 lcms2 \
2346 define gb_ExternalProject__use_lcms2
2347 $(call gb_ExternalProject_use_package,$(1),lcms2)
2349 endef
2351 ifeq ($(OS),ANDROID)
2353 define gb_LinkTarget__use_lcms2
2354 $(call gb_LinkTarget_use_package,$(1),lcms2)
2355 $(call gb_LinkTarget_set_include,$(1),\
2356 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2357 $$(INCLUDE) \
2360 endef
2362 else
2364 define gb_LinkTarget__use_lcms2
2365 $(call gb_LinkTarget_use_package,$(1),lcms2)
2366 $(call gb_LinkTarget_set_include,$(1),\
2367 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2368 $$(INCLUDE) \
2370 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2372 endef
2374 endif # ANDROID
2375 endif # SYSTEM_LCMS2
2377 ifneq ($(ENABLE_LPSOLVE),)
2379 ifneq ($(SYSTEM_LPSOLVE),)
2381 define gb_LinkTarget__use_lpsolve
2382 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2383 $(call gb_LinkTarget_add_defs,$(1),\
2384 -DSYSTEM_LPSOLVE \
2387 endef
2389 else # !SYSTEM_LPSOLVE
2391 define gb_LinkTarget__use_lpsolve
2392 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2393 ifeq ($(COM),MSC)
2394 $(call gb_LinkTarget_add_libs,$(1),\
2395 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2397 else
2398 $(call gb_LinkTarget_add_libs,$(1),\
2399 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2401 endif
2402 $(call gb_LinkTarget_set_include,$(1),\
2403 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2404 $$(INCLUDE) \
2407 endef
2409 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2410 lpsolve \
2413 endif # SYSTEM_LPSOLVE
2415 else
2417 gb_LinkTarget__use_lpsolve :=
2419 endif # ENABLE_LPSOLVE
2421 ifneq ($(ENABLE_COINMP),)
2423 ifneq ($(SYSTEM_COINMP),TRUE)
2425 define gb_LinkTarget__use_coinmp
2426 $(call gb_LinkTarget_use_package,$(1),coinmp)
2427 ifeq ($(COM),MSC)
2428 $(call gb_LinkTarget_add_libs,$(1),\
2429 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2431 else
2432 $(call gb_LinkTarget_add_libs,$(1),\
2433 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2434 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2435 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2436 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2437 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2438 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2439 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2441 endif
2442 $(call gb_LinkTarget_set_include,$(1),\
2443 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2444 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2445 $$(INCLUDE) \
2448 endef
2450 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2451 coinmp \
2454 else # SYSTEM_COINMP
2456 define gb_LinkTarget__use_coinmp
2457 $(call gb_LinkTarget_set_include,$(1),\
2458 $$(INCLUDE) \
2459 $(COINMP_CFLAGS) \
2461 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2463 endef
2465 endif
2467 else
2469 gb_LinkTarget__use_coinmp :=
2471 endif # ENABLE_COINMP
2473 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2475 define gb_LinkTarget__use_mDNSResponder
2476 $(call gb_LinkTarget_set_include,$(1),\
2477 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2478 $$(INCLUDE) \
2480 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2481 endef
2483 endif # MDNSRESPONDER
2485 ifeq ($(ENABLE_GIO),TRUE)
2487 define gb_LinkTarget__use_gio
2488 $(call gb_LinkTarget_set_include,$(1),\
2489 $$(INCLUDE) \
2490 $(GIO_CFLAGS) \
2493 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2495 endef
2497 else # ENABLE_GIO
2499 define gb_LinkTarget__use_gio
2501 endef
2503 endif # ENABLE_GIO
2505 ifeq ($(ENABLE_AVAHI),TRUE)
2507 define gb_LinkTarget__use_avahi
2508 $(call gb_LinkTarget_set_include,$(1),\
2509 $$(INCLUDE) \
2510 $(AVAHI_CFLAGS) \
2513 $(call gb_LinkTarget_add_defs,$(1),\
2514 -DENABLE_AVAHI \
2517 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2519 endef
2521 else # ENABLE_AVAHI
2523 gb_LinkTarget__use_avahi :=
2525 endif # ENABLE_AVAHI
2527 ifeq ($(ENABLE_CUPS),TRUE)
2529 define gb_LinkTarget__use_cups
2530 $(call gb_LinkTarget_add_defs,$(1),\
2531 -DENABLE_CUPS \
2534 $(call gb_LinkTarget_add_libs,$(1),\
2535 -lcups \
2538 endef
2540 else # ENABLE_CUPS
2542 define gb_LinkTarget__use_cups
2544 endef
2546 endif # ENABLE_CUPS
2548 ifeq ($(ENABLE_DBUS),TRUE)
2550 define gb_LinkTarget__use_dbus
2551 $(call gb_LinkTarget_set_include,$(1),\
2552 $$(INCLUDE) \
2553 $(DBUS_CFLAGS) \
2556 $(call gb_LinkTarget_add_libs,$(1),\
2557 $(DBUS_LIBS) \
2560 endef
2562 else # ENABLE_DBUS
2564 define gb_LinkTarget__use_dbus
2566 endef
2568 endif # ENABLE_DBUS
2571 ifneq ($(SYSTEM_LIBPNG),)
2573 define gb_LinkTarget__use_libpng
2574 $(call gb_LinkTarget_set_include,$(1),\
2575 $$(INCLUDE) \
2576 $(LIBPNG_CFLAGS) \
2579 $(call gb_LinkTarget_add_libs,$(1),\
2580 $(LIBPNG_LIBS) \
2583 endef
2585 gb_ExternalProject__use_libpng :=
2587 else # !SYSTEM_LIBPNG
2589 define gb_LinkTarget__use_libpng
2590 $(call gb_LinkTarget_set_include,$(1),\
2591 $(LIBPNG_CFLAGS) \
2592 $$(INCLUDE) \
2594 $(call gb_LinkTarget_use_static_libraries,$(1),\
2595 libpng \
2597 $(call gb_LinkTarget__use_zlib,$(1))
2599 endef
2601 define gb_ExternalProject__use_libpng
2602 $(call gb_ExternalProject_use_static_libraries,$(1),\
2603 libpng \
2606 endef
2608 endif # !SYSTEM_LIBPNG
2610 ifneq ($(SYSTEM_LIBTIFF),)
2612 define gb_LinkTarget__use_libtiff
2613 $(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(LIBTIFF_CFLAGS) \
2618 $(call gb_LinkTarget_add_libs,$(1),\
2619 $(LIBTIFF_LIBS) \
2622 endef
2624 gb_ExternalProject__use_libtiff :=
2626 else # !SYSTEM_LIBTIFF
2628 define gb_LinkTarget__use_libtiff
2629 $(call gb_LinkTarget_set_include,$(1),\
2630 $(LIBTIFF_CFLAGS) \
2631 $$(INCLUDE) \
2634 $(call gb_LinkTarget_set_include,$(1),\
2635 -I$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff \
2636 $$(INCLUDE) \
2638 ifeq ($(OS),WNT)
2639 $(call gb_LinkTarget_add_libs,$(1),\
2640 $(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs/libtiff$(gb_StaticLibrary_PLAINEXT) \
2642 else
2643 $(call gb_LinkTarget_add_libs,$(1),\
2644 -L$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs -ltiff \
2646 endif
2647 $(call gb_LinkTarget_use_external_project,$(1),libtiff,full)
2649 endef
2651 define gb_ExternalProject__use_libtiff
2652 $(call gb_ExternalProject_use_external_project,$(1),libtiff)
2654 endef
2656 endif # !SYSTEM_LIBTIFF
2658 ifneq ($(SYSTEM_LIBWEBP),)
2660 define gb_LinkTarget__use_libwebp
2661 $(call gb_LinkTarget_set_include,$(1),\
2662 $$(INCLUDE) \
2663 $(LIBWEBP_CFLAGS) \
2666 $(call gb_LinkTarget_add_libs,$(1),\
2667 $(LIBWEBP_LIBS) \
2670 endef
2672 gb_ExternalProject__use_libwebp :=
2674 else # !SYSTEM_LIBWEBP
2676 define gb_LinkTarget__use_libwebp
2677 $(call gb_LinkTarget_set_include,$(1),\
2678 $(LIBWEBP_CFLAGS) \
2679 $$(INCLUDE) \
2682 $(call gb_LinkTarget_set_include,$(1),\
2683 -I$(call gb_UnpackedTarball_get_dir,libwebp)/src \
2684 $$(INCLUDE) \
2686 ifeq ($(OS),WNT)
2687 $(call gb_LinkTarget_add_libs,$(1),\
2688 $(call gb_UnpackedTarball_get_dir,libwebp)/output/lib/libwebp$(if $(MSVC_USE_DEBUG_RUNTIME),_debug)$(gb_StaticLibrary_PLAINEXT) \
2690 else
2691 $(call gb_LinkTarget_add_libs,$(1),\
2692 -L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
2694 endif
2695 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
2697 endef
2699 define gb_ExternalProject__use_libwebp
2700 $(call gb_ExternalProject_use_external_project,$(1),libwebp)
2702 endef
2704 endif # !SYSTEM_LIBWEBP
2707 ifneq ($(SYSTEM_CURL),)
2709 define gb_LinkTarget__use_curl
2710 $(call gb_LinkTarget_add_defs,$(1),\
2711 -DSYSTEM_CURL \
2713 $(call gb_LinkTarget_set_include,$(1),\
2714 $$(INCLUDE) \
2715 $(CURL_CFLAGS) \
2717 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2719 endef
2721 else # !SYSTEM_CURL
2723 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2724 curl \
2727 define gb_LinkTarget__use_curl
2728 $(call gb_LinkTarget_use_package,$(1),curl)
2729 $(call gb_LinkTarget_set_include,$(1),\
2730 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2731 $$(INCLUDE) \
2734 ifeq ($(COM),MSC)
2735 $(call gb_LinkTarget_add_libs,$(1),\
2736 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2738 else
2739 $(call gb_LinkTarget_add_libs,$(1),\
2740 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2742 endif
2744 endef
2746 endif # SYSTEM_CURL
2748 ifeq ($(ENABLE_VALGRIND),TRUE)
2750 define gb_LinkTarget__use_valgrind
2751 $(call gb_LinkTarget_add_defs,$(1),\
2752 -DHAVE_VALGRIND_HEADERS \
2755 $(call gb_LinkTarget_set_include,$(1),\
2756 $$(INCLUDE) \
2757 $(VALGRIND_CFLAGS) \
2760 endef
2762 else # !ENABLE_VALGRIND
2764 define gb_LinkTarget__use_valgrind
2766 endef
2768 endif # ENABLE_VALGRIND
2770 ifeq ($(ENABLE_POPPLER),TRUE)
2772 ifneq ($(SYSTEM_POPPLER),)
2774 define gb_LinkTarget__use_poppler
2775 $(call gb_LinkTarget_set_include,$(1),\
2776 $(POPPLER_CFLAGS) \
2777 $$(INCLUDE) \
2780 $(call gb_LinkTarget_add_libs,$(1),\
2781 $(POPPLER_LIBS) \
2784 endef
2786 else # !SYSTEM_POPPLER
2788 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2789 poppler_data \
2792 define gb_LinkTarget__use_poppler
2793 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2794 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2795 $(call gb_LinkTarget_set_include,$(1),\
2796 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2797 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2798 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2799 $$(INCLUDE) \
2802 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2803 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2805 ifeq ($(OS),MACOSX)
2806 $(call gb_LinkTarget_add_libs,$(1),\
2807 -lobjc \
2809 else ifeq ($(OS),LINUX)
2810 $(call gb_LinkTarget_add_libs,$(1),\
2811 -pthread \
2813 else ifeq ($(OS),WNT)
2814 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2815 advapi32 \
2816 gdi32 \
2818 endif
2820 endef
2822 endif # SYSTEM_POPPLER
2824 endif # ENABLE_POPPLER
2827 ifneq ($(SYSTEM_CLUCENE),)
2829 define gb_LinkTarget__use_clucene
2830 $(call gb_LinkTarget_add_defs,$(1),\
2831 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2834 $(call gb_LinkTarget_set_include,$(1),\
2835 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2836 $$(INCLUDE) \
2839 $(call gb_LinkTarget_add_libs,$(1),\
2840 $(CLUCENE_LIBS) \
2843 endef
2845 else # !SYSTEM_CLUCENE
2847 define gb_LinkTarget__use_clucene
2848 $(call gb_LinkTarget_set_include,$(1),\
2849 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2850 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2851 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2852 $$(INCLUDE) \
2855 $(call gb_LinkTarget_use_libraries,$(1),\
2856 clucene \
2859 endef
2861 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2862 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2865 endif # SYSTEM_CLUCENE
2867 define gb_LinkTarget__use_gobject
2868 $(call gb_LinkTarget_add_libs,$(1),\
2869 $(GOBJECT_LIBS) \
2872 $(call gb_LinkTarget_set_include,$(1),\
2873 $$(INCLUDE) \
2874 $(GOBJECT_CFLAGS) \
2876 endef
2878 ifneq ($(SYSTEM_HSQLDB),)
2880 define gb_LinkTarget__use_hsqldb
2882 $(call gb_LinkTarget_add_defs,$(1),\
2883 -DSYSTEM_HSQLDB \
2884 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2887 endef
2889 else # !SYSTEM_HSQLDB
2891 define gb_LinkTarget__use_hsqldb
2893 endef
2895 endif # SYSTEM_HSQLDB
2897 ifeq ($(ENABLE_LDAP),TRUE)
2898 ifneq ($(SYSTEM_OPENLDAP),)
2900 define gb_LinkTarget__use_openldap
2902 $(call gb_LinkTarget_add_libs,$(1),\
2903 -lldap \
2904 -llber \
2907 endef
2909 gb_ExternalProject__use_openldap :=
2911 else # !SYSTEM_OPENLDAP
2913 define gb_LinkTarget__use_openldap
2914 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2915 $(call gb_LinkTarget_set_include,$(1),\
2916 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2917 $$(INCLUDE) \
2919 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2920 $(call gb_LinkTarget_add_libs,$(1), \
2921 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2922 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2925 endef
2926 endif
2928 define gb_ExternalProject__use_openldap
2929 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2931 endef
2933 endif # SYSTEM_OPENLDAP
2935 ifneq ($(SYSTEM_LIBTOMMATH),)
2937 define gb_LinkTarget__use_libtommath
2938 $(call gb_LinkTarget_set_include,$(1),\
2939 $(LIBTOMMATH_CFLAGS) \
2940 $$(INCLUDE) \
2942 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2944 endef
2946 else # !SYSTEM_LIBTOMMATH
2947 define gb_LinkTarget__use_libtommath
2948 $(call gb_LinkTarget_set_include,$(1),\
2949 -I${WORKDIR}/UnpackedTarball/libtommath \
2950 $$(INCLUDE) \
2952 $(call gb_LinkTarget_add_libs,$(1),\
2953 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2955 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2957 endef
2959 endif # SYSTEM_LIBTOMMATH
2961 define gb_ExternalProject__use_libtommath
2962 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2964 endef
2966 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2968 ifneq ($(SYSTEM_FIREBIRD),)
2970 define gb_LinkTarget__use_libfbembed
2971 $(call gb_LinkTarget_set_include,$(1),\
2972 $(FIREBIRD_CFLAGS) \
2973 $$(INCLUDE) \
2975 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2977 endef
2979 else # !SYSTEM_FIREBIRD
2981 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2982 firebird \
2985 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2986 #$(call gb_LinkTarget__use_libtommath,$(1))
2988 define gb_LinkTarget__use_libfbembed
2989 $(call gb_LinkTarget_use_package,$(1),firebird)
2990 $(call gb_LinkTarget_set_include,$(1),\
2991 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2992 $$(INCLUDE) \
2994 ifeq ($(COM),MSC)
2995 $(call gb_LinkTarget_add_libs,$(1),\
2996 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2998 else
2999 $(call gb_LinkTarget_add_libs,$(1),\
3000 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3002 endif
3004 endef
3007 # endef
3009 endif # SYSTEM_FIREBIRD
3011 else # !ENABLE_FIREBIRD_SDBC
3013 gb_LinkTarget__use_firebird :=
3014 # gb_LinkTarget__use_atomic_ops :=
3015 # gb_LinkTarget__use_libtommath :=
3017 endif # ENABLE_FIREBIRD_SDBC
3020 ifneq ($(SYSTEM_POSTGRESQL),)
3022 define gb_LinkTarget__use_postgresql
3024 $(call gb_LinkTarget_set_include,$(1),\
3025 $(POSTGRESQL_INC) \
3026 $$(INCLUDE) \
3029 $(call gb_LinkTarget_add_libs,$(1),\
3030 -lpq \
3033 $(call gb_LinkTarget_add_ldflags,$(1),\
3034 $(POSTGRESQL_LIB) \
3037 endef
3039 else # !SYSTEM_POSTGRESQL
3041 ifeq ($(OS),WNT)
3042 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3043 postgresql \
3045 endif # WNT
3047 define gb_LinkTarget__use_postgresql
3049 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3051 $(call gb_LinkTarget_set_include,$(1),\
3052 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3053 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3054 $$(INCLUDE) \
3057 ifeq ($(OS),WNT)
3059 $(call gb_LinkTarget_add_libs,$(1),\
3060 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3063 else # !WNT
3065 $(call gb_LinkTarget_add_libs,$(1),\
3066 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3067 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3068 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3069 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3072 endif # !WNT
3074 endef # gb_LinkTarget__use_postgresql
3076 endif # !SYSTEM_POSTGRESQL
3078 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3080 define gb_LinkTarget__use_kf5
3081 $(call gb_LinkTarget_set_include,$(1),\
3082 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3083 $$(INCLUDE) \
3086 $(call gb_LinkTarget_add_cxxflags,$(1),\
3087 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3090 $(call gb_LinkTarget_add_libs,$(1),\
3091 $(KF5_LIBS) \
3094 endef
3096 else # !ENABLE_KF5
3098 define gb_LinkTarget__use_kf5
3100 endef
3102 endif # ENABLE_KF5
3106 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3108 define gb_LinkTarget__use_qt5
3109 $(call gb_LinkTarget_set_include,$(1),\
3110 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3111 $$(INCLUDE) \
3114 $(call gb_LinkTarget_add_defs,$(1),\
3115 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3118 $(call gb_LinkTarget_add_libs,$(1),\
3119 $(QT5_LIBS) \
3122 endef
3124 else # !ENABLE_QT5
3126 define gb_LinkTarget__use_qt5
3128 endef
3130 endif # ENABLE_QT5
3132 ifeq ($(ENABLE_QT6),TRUE)
3134 define gb_LinkTarget__use_qt6
3135 $(call gb_LinkTarget_set_include,$(1),\
3136 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3137 $$(INCLUDE) \
3140 $(call gb_LinkTarget_add_defs,$(1),\
3141 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3144 $(call gb_LinkTarget_add_libs,$(1),\
3145 $(QT6_LIBS) \
3148 endef
3150 else # !ENABLE_QT6
3152 define gb_LinkTarget__use_qt6
3154 endef
3156 endif # ENABLE_QT6
3159 # PYTHON
3160 # extra python_headers external because pyuno wrapper must not link python
3161 ifneq ($(SYSTEM_PYTHON),)
3163 define gb_LinkTarget__use_python_headers
3164 $(call gb_LinkTarget_add_defs,$(1),\
3165 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3168 $(call gb_LinkTarget_set_include,$(1),\
3169 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3170 $$(INCLUDE) \
3173 endef
3175 define gb_LinkTarget__use_python
3176 $(call gb_LinkTarget__use_python_headers,$(1))
3178 $(call gb_LinkTarget_add_libs,$(1),\
3179 $(PYTHON_LIBS) \
3182 endef
3184 else # !SYSTEM_PYTHON
3186 $(eval $(call gb_Helper_register_packages_for_install,python,\
3187 python3 \
3188 $(if $(filter WNT,$(OS)),libffi) \
3191 define gb_LinkTarget__use_python_headers
3192 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3193 $(call gb_LinkTarget_set_include,$(1),\
3194 -I$(call gb_UnpackedTarball_get_dir,python3) \
3195 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3196 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3197 $$(INCLUDE) \
3200 endef
3202 define gb_LinkTarget__use_python
3203 $(call gb_LinkTarget__use_python_headers,$(1))
3204 ifeq ($(OS),MACOSX)
3205 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3206 else
3207 $(call gb_LinkTarget_use_package,$(1),python3)
3208 endif
3210 ifeq ($(OS),WNT)
3211 ifeq ($(CPUNAME),X86_64)
3212 python_arch_subdir=amd64/
3213 else ifeq ($(CPUNAME),AARCH64)
3214 python_arch_subdir=arm64/
3215 else
3216 python_arch_subdir=win32/
3217 endif
3218 $(call gb_LinkTarget_add_libs,$(1),\
3219 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3221 else ifeq ($(OS),MACOSX)
3222 $(call gb_LinkTarget_add_libs,$(1),\
3223 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3225 else
3226 $(call gb_LinkTarget_add_libs,$(1),\
3227 -L$(call gb_UnpackedTarball_get_dir,python3) \
3228 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3230 endif
3232 endef
3234 # this is only used by python currently
3235 define gb_ExternalProject__use_libffi
3236 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3238 endef
3240 endif # SYSTEM_PYTHON
3242 # ORCUS
3243 ifneq ($(SYSTEM_LIBORCUS),)
3245 define gb_LinkTarget__use_orcus
3246 $(call gb_LinkTarget_set_include,$(1),\
3247 $$(INCLUDE) \
3248 $(ORCUS_CFLAGS) \
3250 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3251 endef
3253 define gb_LinkTarget__use_orcus-parser
3255 endef
3257 else # !SYSTEM_LIBORCUS
3259 ifeq ($(COM),MSC)
3261 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3262 orcus \
3263 orcus-parser \
3266 define gb_LinkTarget__use_orcus
3267 $(call gb_LinkTarget_set_include,$(1),\
3268 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3269 $$(INCLUDE) \
3272 $(call gb_LinkTarget_use_libraries,$(1),\
3273 orcus \
3276 endef
3278 define gb_LinkTarget__use_orcus-parser
3279 $(call gb_LinkTarget_set_include,$(1),\
3280 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3281 $$(INCLUDE) \
3284 $(call gb_LinkTarget_use_libraries,$(1),\
3285 orcus-parser \
3288 endef
3290 else # !MSC
3292 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3293 liborcus \
3296 define gb_LinkTarget__use_orcus
3297 $(call gb_LinkTarget_use_package,$(1),liborcus)
3299 $(call gb_LinkTarget_set_include,$(1),\
3300 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3301 $$(INCLUDE) \
3304 $(call gb_LinkTarget_add_libs,$(1),\
3305 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
3308 $(if $(SYSTEM_BOOST), \
3309 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3310 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3313 endef
3315 define gb_LinkTarget__use_orcus-parser
3316 $(call gb_LinkTarget_use_package,$(1),liborcus)
3318 $(call gb_LinkTarget_set_include,$(1),\
3319 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3320 $$(INCLUDE) \
3323 $(call gb_LinkTarget_add_libs,$(1),\
3324 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
3327 endef
3329 endif # MSC
3331 endif # SYSTEM_LIBORCUS
3334 ifeq ($(ENABLE_LIBEOT),TRUE)
3335 ifeq ($(SYSTEM_LIBEOT),TRUE)
3337 define gb_LinkTarget__use_libeot
3338 $(call gb_LinkTarget_set_include,$(1),\
3339 $$(INCLUDE) \
3340 $(LIBEOT_CFLAGS) \
3342 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3344 endef
3346 gb_ExternalProject__use_libeot :=
3348 else # !SYSTEM_LIBEOT
3350 define gb_LinkTarget__use_libeot
3351 $(call gb_LinkTarget_set_include,$(1),\
3352 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3353 $$(INCLUDE) \
3355 $(call gb_LinkTarget_add_libs,$(1),\
3356 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3358 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3360 endef
3362 define gb_ExternalProject__use_libeot
3363 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3365 endef
3367 endif # !SYSTEM_LIBEOT
3368 else # !ENABLE_LIBEOT
3370 gb_LinkTarget__use_libeot :=
3371 gb_ExternalProject__use_libeot :=
3373 endif # !ENABLE_LIBEOT
3376 ifeq ($(USING_X11), TRUE)
3378 define gb_LinkTarget__use_Xrandr
3379 $(call gb_LinkTarget_set_include,$(1),\
3380 $$(INCLUDE) \
3381 $(XRANDR_CFLAGS) \
3384 $(call gb_LinkTarget_add_libs,$(1),\
3385 $(XRANDR_LIBS) \
3387 endef
3389 define gb_LinkTarget__use_Xrender
3390 $(call gb_LinkTarget_set_include,$(1),\
3391 $$(INCLUDE) \
3392 $(XRENDER_CFLAGS) \
3395 $(call gb_LinkTarget_add_libs,$(1),\
3396 $(XRENDER_LIBS) \
3398 endef
3400 endif # USING_X11
3403 gb_ExternalProject__use_nss3:=
3406 ifneq ($(SYSTEM_NSS),)
3408 define gb_LinkTarget__use_nss3
3409 $(call gb_LinkTarget_add_defs,$(1),\
3410 -DSYSTEM_NSS \
3413 $(call gb_LinkTarget_set_include,$(1),\
3414 $$(INCLUDE) \
3415 $(NSS_CFLAGS) \
3418 $(call gb_LinkTarget_add_libs,$(1),\
3419 $(NSS_LIBS) \
3422 endef
3424 define gb_LinkTarget__use_nssutil3
3425 $(call gb_LinkTarget__use_nss3,$(1))
3427 endef
3429 define gb_LinkTarget__use_plc4
3430 $(call gb_LinkTarget__use_nss3,$(1))
3432 endef
3434 define gb_LinkTarget__use_ssl3
3435 $(call gb_LinkTarget__use_nss3,$(1))
3437 endef
3439 else # !SYSTEM_NSS
3441 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3442 nss \
3445 define gb_LinkTarget__use_nss3
3446 $(call gb_LinkTarget_use_package,$(1),nss)
3447 $(call gb_LinkTarget_set_include,$(1),\
3448 $$(INCLUDE) \
3449 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3450 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3453 ifeq ($(COM),MSC)
3454 $(call gb_LinkTarget_add_libs,$(1),\
3455 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3456 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3457 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3459 else
3460 $(call gb_LinkTarget_add_libs,$(1),\
3461 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3462 -lnspr4 \
3463 -lnss3 \
3464 -lsmime3 \
3466 endif
3468 endef
3470 define gb_LinkTarget__use_plc4
3471 $(call gb_LinkTarget_use_package,$(1),nss)
3472 ifeq ($(COM),MSC)
3473 $(call gb_LinkTarget_add_libs,$(1),\
3474 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3476 else
3477 $(call gb_LinkTarget_add_libs,$(1),\
3478 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3480 endif
3482 endef
3484 define gb_LinkTarget__use_ssl3
3485 $(call gb_LinkTarget_use_package,$(1),nss)
3486 ifeq ($(COM),MSC)
3487 $(call gb_LinkTarget_add_libs,$(1),\
3488 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3490 else
3491 $(call gb_LinkTarget_add_libs,$(1),\
3492 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3494 endif
3496 endef
3498 define gb_LinkTarget__use_nssutil3
3499 $(call gb_LinkTarget_use_package,$(1),nss)
3500 $(call gb_LinkTarget_set_include,$(1),\
3501 $$(INCLUDE) \
3502 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3503 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3506 ifeq ($(COM),MSC)
3507 $(call gb_LinkTarget_add_libs,$(1),\
3508 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3510 else
3511 $(call gb_LinkTarget_add_libs,$(1),\
3512 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3513 -lnssutil3 \
3515 endif
3517 endef
3519 define gb_ExternalProject__use_nss3
3520 $(call gb_ExternalProject_use_package,$(1),nss)
3522 endef
3524 endif # SYSTEM_NSS
3526 ifeq ($(ENABLE_BREAKPAD),TRUE)
3528 define gb_LinkTarget__use_breakpad
3529 $(call gb_LinkTarget_set_include,$(1),\
3530 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3531 $$(INCLUDE) \
3534 ifeq ($(COM),MSC)
3535 $(call gb_LinkTarget_use_static_libraries,$(1),\
3536 breakpad \
3538 else
3539 $(call gb_LinkTarget_add_libs,$(1),\
3540 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3542 endif
3544 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3546 endef
3548 endif # ENABLE_BREAKPAD
3550 ifeq ($(ENABLE_GPGMEPP),TRUE)
3552 ifneq ($(SYSTEM_GPGMEPP),)
3554 gb_ExternalProject__use_gpgmepp:=
3555 gb_ExternalProject__use_libassuan:=
3556 gb_ExternalProject__use_libgpg-error:=
3558 define gb_LinkTarget__use_gpgmepp
3559 $(call gb_LinkTarget_set_include,$(1),\
3560 $$(INCLUDE) \
3561 $$(GPGMEPP_CFLAGS) \
3564 $(call gb_LinkTarget_add_libs,$(1),\
3565 $(GPGMEPP_LIBS) \
3568 endef
3570 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3572 define gb_ExternalProject__use_gpgmepp
3573 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3575 endef
3576 define gb_ExternalProject__use_libassuan
3577 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3579 endef
3580 define gb_ExternalProject__use_libgpg-error
3581 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3583 endef
3585 ifneq ($(filter WNT,$(OS)),)
3587 define gb_LinkTarget__use_libgpg-error
3588 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3590 $(call gb_LinkTarget_set_include,$(1),\
3591 $(GPG_ERROR_CFLAGS) \
3592 $$(INCLUDE) \
3594 $(call gb_LinkTarget_add_libs,$(1),\
3595 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3598 endef
3600 define gb_LinkTarget__use_libassuan
3601 $(call gb_LinkTarget_use_package,$(1),libassuan)
3603 $(call gb_LinkTarget_set_include,$(1),\
3604 $(LIBASSUAN_CFLAGS) \
3605 $$(INCLUDE) \
3607 $(call gb_LinkTarget_add_libs,$(1),\
3608 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3611 endef
3613 define gb_LinkTarget__use_gpgmepp
3614 $(call gb_LinkTarget_set_include,$(1),\
3615 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3616 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3617 $$(GPG_ERROR_CFLAGS) \
3618 $$(INCLUDE) \
3620 $(call gb_LinkTarget_use_libraries,$(1),\
3621 gpgmepp \
3624 endef
3626 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3627 gpgmepp \
3628 libassuan \
3629 libgpg-error \
3632 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3633 gpgmepp \
3636 endif
3638 ifneq ($(filter MACOSX LINUX,$(OS)),)
3640 define gb_LinkTarget__use_gpgmepp
3641 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3643 $(call gb_LinkTarget_set_include,$(1),\
3644 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3645 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3646 $$(GPG_ERROR_CFLAGS) \
3647 $$(INCLUDE) \
3649 $(call gb_LinkTarget_add_libs,$(1),\
3650 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3651 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3652 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3653 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3656 endef
3658 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3659 gpgmepp \
3660 libassuan \
3661 libgpg-error \
3664 endif
3666 endif
3668 else # !ENABLE_GPGMEPP
3670 gb_ExternalProject__use_gpgmepp :=
3671 gb_ExternalProject__use_libassuan :=
3672 gb_ExternalProject__use_libgpg-error :=
3674 gb_LinkTarget__use_gpgmepp :=
3675 gb_LinkTarget__use_libassuan :=
3676 gb_LinkTarget__use_libgpg-error :=
3678 endif # ENABLE_GPGMEPP
3680 define gb_LinkTarget__use_dconf
3681 $(call gb_LinkTarget_set_include,$(1),\
3682 $$(INCLUDE) \
3683 $(DCONF_CFLAGS) \
3686 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3687 endef
3689 ### Jars ############################################################
3691 ifneq ($(SYSTEM_HSQLDB),)
3693 define gb_Jar__use_hsqldb
3694 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3695 endef
3696 define gb_JunitTest__use_hsqldb
3697 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3698 endef
3700 else # !SYSTEM_HSQLDB
3702 ifeq ($(ENABLE_JAVA),TRUE)
3703 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3704 hsqldb \
3706 endif
3708 define gb_Jar__use_hsqldb
3709 $(call gb_Jar_use_jar,$(1),hsqldb)
3710 endef
3711 define gb_JunitTest__use_hsqldb
3712 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3713 endef
3715 endif # SYSTEM_HSQLDB
3718 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3720 ifneq ($(SYSTEM_BSH),)
3722 define gb_Jar__use_bsh
3723 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3724 endef
3726 else # !SYSTEM_BSH
3728 ifeq ($(ENABLE_JAVA),TRUE)
3729 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3730 bsh \
3732 endif
3734 define gb_Jar__use_bsh
3735 $(call gb_Jar_use_jar,$(1),bsh)
3736 endef
3738 endif # SYSTEM_BSH
3740 endif
3742 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3744 ifneq ($(SYSTEM_RHINO),)
3746 define gb_Jar__use_rhino
3747 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3748 endef
3750 else # !SYSTEM_RHINO
3752 ifeq ($(ENABLE_JAVA),TRUE)
3753 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3754 js \
3756 endif
3758 define gb_Jar__use_rhino
3759 $(call gb_Jar_use_jar,$(1),js)
3760 endef
3762 endif # SYSTEM_RHINO
3764 endif
3766 ifneq ($(SYSTEM_JFREEREPORT),)
3768 define gb_Jar__use_flow-engine
3769 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3770 endef
3772 define gb_Jar__use_flute
3773 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3774 endef
3776 define gb_Jar__use_libbase
3777 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3778 endef
3780 define gb_Jar__use_libfonts
3781 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3782 endef
3784 define gb_Jar__use_libformula
3785 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3786 endef
3788 define gb_Jar__use_liblayout
3789 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3790 endef
3792 define gb_Jar__use_libloader
3793 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3794 endef
3796 define gb_Jar__use_librepository
3797 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3798 endef
3800 define gb_Jar__use_libserializer
3801 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3802 endef
3804 define gb_Jar__use_libxml
3805 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3806 endef
3808 define gb_Jar__use_sac
3809 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3810 endef
3812 else # !SYSTEM_JFREEREPORT
3814 ifeq ($(ENABLE_JAVA),TRUE)
3815 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3816 flow-engine \
3817 flute-1.1.6 \
3818 libbase-1.1.6 \
3819 libfonts-1.1.6 \
3820 libformula-1.1.7 \
3821 liblayout \
3822 libloader-1.1.6 \
3823 librepository-1.1.6 \
3824 libserializer-1.1.6 \
3825 libxml-1.1.7 \
3826 sac \
3828 endif
3830 define gb_Jar__use_flow-engine
3831 $(call gb_Jar_use_jar,$(1),flow-engine)
3832 endef
3834 define gb_Jar__use_flute
3835 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3836 endef
3838 define gb_Jar__use_libbase
3839 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3840 endef
3842 define gb_Jar__use_libfonts
3843 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3844 endef
3846 define gb_Jar__use_libformula
3847 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3848 endef
3850 define gb_Jar__use_liblayout
3851 $(call gb_Jar_use_jar,$(1),liblayout)
3852 endef
3854 define gb_Jar__use_libloader
3855 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3856 endef
3858 define gb_Jar__use_librepository
3859 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3860 endef
3862 define gb_Jar__use_libserializer
3863 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3864 endef
3866 define gb_Jar__use_libxml
3867 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3868 endef
3870 define gb_Jar__use_sac
3871 $(call gb_Jar_use_jar,$(1),sac)
3872 endef
3874 endif # SYSTEM_JFREEREPORT
3877 # Executables
3879 define gb_Executable__register_bestreversemap
3880 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3881 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3883 endef
3885 # TODO depending on the whole URE might be overkill, but I do not have a
3886 # Windows machine to debug it...
3887 define gb_Executable__register_climaker
3888 $(call gb_Executable_add_runtime_dependencies,climaker,\
3889 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3890 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3891 $(call gb_UnoApi_get_target_for_build,udkapi) \
3892 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3894 endef
3896 define gb_Executable__register_cppumaker
3897 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3898 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3900 endef
3902 # This is used to determine what we need for 'build' platform.
3903 define gb_Executable__register_gengal
3904 $(call gb_Executable_add_runtime_dependencies,gengal,\
3905 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3906 $(call gb_Library_get_target_for_build,localedata_en) \
3907 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3908 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3909 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3910 $(call gb_Package_get_target_for_build,postprocess_registry) \
3911 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3912 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3913 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3914 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3915 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3916 $(call gb_UnoApi_get_target_for_build,offapi) \
3917 $(call gb_UnoApi_get_target_for_build,udkapi) \
3919 endef
3921 ifeq ($(SYSTEM_ICU),)
3923 define gb_Executable__register_gendict
3924 $(call gb_Executable_add_runtime_dependencies,gendict,\
3925 $(call gb_Package_get_target_for_build,icu) \
3926 $(call gb_Package_get_target_for_build,icu_ure) \
3928 endef
3930 endif
3932 define gb_Executable__register_localize
3933 $(call gb_Executable_add_runtime_dependencies,localize,\
3934 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3935 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3938 endef
3940 # FIXME ure/services.rdb needs cleanup
3941 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3942 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3943 define gb_Executable__register_saxparser
3944 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3945 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3946 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3947 $(call gb_Rdb_get_target_for_build,saxparser) \
3948 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3949 $(call gb_UnoApi_get_target_for_build,udkapi) \
3951 endef
3953 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3954 # required due to the settings for URE_SERVICES and URE_TYPES in
3955 # cppuhelper/source/unorc
3956 define gb_Executable__register_uno
3957 $(call gb_Executable_add_runtime_dependencies,uno,\
3958 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3959 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3960 $(call gb_UnoApi_get_target_for_build,udkapi) \
3962 endef
3965 # External executables
3967 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3969 gb_ExternalExecutable__register_xmllint :=
3971 else # ! SYSTEM_LIBXML_FOR_BUILD
3973 define gb_ExternalExecutable__register_xmllint
3974 $(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)
3975 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3976 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3977 $(call gb_Package_get_target,libxml2) \
3980 endef
3982 endif # SYSTEM_LIBXML_FOR_BUILD
3984 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3986 gb_ExternalExecutable__register_xsltproc :=
3988 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3990 define gb_ExternalExecutable__register_xsltproc
3991 $(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)
3992 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3993 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3994 $(call gb_Package_get_target,libxml2) \
3995 $(call gb_Package_get_target,libxslt) \
3998 endef
4000 endif # SYSTEM_LIBXSLT_FOR_BUILD
4002 ifeq (,$(PYTHON_FOR_BUILD))
4004 define gb_ExternalExecutable__register_python
4005 ifeq ($(OS),MACOSX)
4007 # use set_external, to avoid having the command added as prerequisite for the
4008 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4009 # matching rule to build that specific file)
4010 $(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))
4011 # the Zip ensures that internal python has been built (cannot use the Package
4012 # target, as that is not used on Mac)
4013 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4015 else
4017 $(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))
4018 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4019 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4021 endif
4023 endef
4025 else
4027 define gb_ExternalExecutable__register_python
4028 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4030 endef
4032 endif # PYTHON_FOR_BUILD
4034 ifneq ($(SYSTEM_GENBRK),)
4036 define gb_ExternalExecutable__register_genbrk
4037 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4039 endef
4041 else # ! SYSTEM_GENBRK
4043 define gb_ExternalExecutable__register_genbrk
4044 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4045 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4046 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4047 $(call gb_Package_get_target_for_build,icu) \
4048 $(call gb_Package_get_target_for_build,icu_ure) \
4051 endef
4053 endif
4055 ifneq ($(SYSTEM_GENCCODE),)
4057 define gb_ExternalExecutable__register_genccode
4058 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4060 endef
4062 else # ! SYSTEM_GENCCODE
4064 define gb_ExternalExecutable__register_genccode
4065 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4066 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4067 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4068 $(call gb_Package_get_target_for_build,icu) \
4069 $(call gb_Package_get_target_for_build,icu_ure) \
4072 endef
4074 endif
4076 ifneq ($(SYSTEM_GENCMN),)
4078 define gb_ExternalExecutable__register_gencmn
4079 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4081 endef
4083 else # ! SYSTEM_GENCMN
4085 define gb_ExternalExecutable__register_gencmn
4086 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4087 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4088 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4089 $(call gb_Package_get_target_for_build,icu) \
4090 $(call gb_Package_get_target_for_build,icu_ure) \
4093 endef
4095 endif
4097 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4098 ifneq ($(SYSTEM_BZIP2),)
4100 define gb_LinkTarget__use_bzip2
4101 $(call gb_LinkTarget_set_include,$(1),\
4102 $(BZIP2_CFLAGS) \
4103 $$(INCLUDE) \
4105 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4107 endef
4109 gb_ExternalProject__use_bzip2 :=
4111 else # !SYSTEM_BZIP2
4113 define gb_LinkTarget__use_bzip2
4114 $(call gb_LinkTarget_set_include,$(1),\
4115 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4116 $$(INCLUDE) \
4119 ifeq ($(COM),MSC)
4120 $(call gb_LinkTarget_add_libs,$(1),\
4121 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4123 else
4124 $(call gb_LinkTarget_add_libs,$(1),\
4125 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4127 endif
4129 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4130 endef
4132 define gb_ExternalProject__use_bzip2
4133 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4134 endef
4136 endif
4137 endif
4139 define gb_LinkTarget__use_clew
4140 $(call gb_LinkTarget_set_include,$(1), \
4141 -I$(SRCDIR)/external/clew/source/include \
4142 $$(INCLUDE) \
4144 $(call gb_LinkTarget_use_libraries,$(1),clew)
4145 endef
4147 ifneq ($(ENABLE_PDFIUM),)
4148 define gb_LinkTarget__use_pdfium
4149 $(call gb_LinkTarget_set_include,$(1),\
4150 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4151 -DCOMPONENT_BUILD \
4152 $$(INCLUDE) \
4154 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4155 endef
4156 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4157 pdfium \
4159 endif
4161 ifneq ($(SYSTEM_DRAGONBOX),)
4163 define gb_LinkTarget__use_dragonbox
4164 $(call gb_LinkTarget_set_include,$(1),\
4165 $$(INCLUDE) \
4166 $$(DRAGONBOX_CFLAGS) \
4168 endef
4170 else
4172 define gb_LinkTarget__use_dragonbox
4173 $(call gb_LinkTarget_use_unpacked,$(1),dragonbox)
4174 $(call gb_LinkTarget_set_include,$(1),\
4175 -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\
4176 $$(INCLUDE) \
4178 endef
4180 endif
4182 define gb_LinkTarget__use_dtoa
4183 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4184 $(call gb_LinkTarget_set_include,$(1),\
4185 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4186 $$(INCLUDE) \
4188 $(call gb_LinkTarget_use_static_libraries,$(1),\
4189 dtoa \
4192 endef
4194 define gb_ExternalProject__use_dtoa
4195 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4197 endef
4199 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4200 $(if $(UCRT_REDISTDIR),ucrt) \
4203 ifneq ($(SYSTEM_BOX2D),)
4205 define gb_LinkTarget__use_box2d
4206 $(call gb_LinkTarget_set_include,$(1),\
4207 -DSYSTEM_BOX2D \
4208 $$(INCLUDE) \
4209 $(BOX2D_CFLAGS) \
4211 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4213 endef
4215 gb_ExternalProject__use_box2d :=
4217 else # !SYSTEM_BOX2D
4219 define gb_LinkTarget__use_box2d
4220 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4221 $(call gb_LinkTarget_set_include,$(1),\
4222 -I$(call gb_UnpackedTarball_get_dir,box2d/include/)\
4223 $$(INCLUDE) \
4225 $(call gb_LinkTarget_use_static_libraries,$(1),\
4226 box2d \
4229 endef
4231 define gb_ExternalProject__use_box2d
4232 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4234 endef
4236 endif # SYSTEM_BOX2D
4238 ifneq ($(SYSTEM_ZXING),)
4240 define gb_LinkTarget__use_zxing
4241 $(call gb_LinkTarget_set_include,$(1),\
4242 -DSYSTEM_ZXING \
4243 $$(INCLUDE) \
4244 $(ZXING_CFLAGS) \
4246 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4248 endef
4250 gb_ExternalProject__use_zxing :=
4252 else # !SYSTEM_ZXING
4254 ifneq ($(ENABLE_ZXING),)
4256 define gb_LinkTarget__use_zxing
4257 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4258 $(call gb_LinkTarget_set_include,$(1),\
4259 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4260 $$(INCLUDE) \
4262 $(call gb_LinkTarget_use_static_libraries,$(1),\
4263 zxing \
4266 endef
4268 define gb_ExternalProject__use_zxing
4269 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4271 endef
4273 else # !ENABLE_ZXING
4275 define gb_LinkTarget__use_zxing
4276 endef
4278 endif # ENABLE_ZXING
4280 endif # SYSTEM_ZXING
4284 ifneq ($(SYSTEM_CUCKOO),)
4286 gb_ExternalProject__use_cuckoo_headers :=
4288 define gb_LinkTarget__use_cuckoo_headers
4289 $(call gb_LinkTarget_set_include,$(1),\
4290 $$(INCLUDE) \
4293 endef
4295 else # !SYSTEM_CUCKOO
4297 define gb_ExternalProject__use_cuckoo_headers
4298 $(call gb_ExternalProject_use_unpacked,$(1),cuckoo)
4300 endef
4302 define gb_LinkTarget__use_cuckoo_headers
4303 $(call gb_LinkTarget_use_unpacked,$(1),cuckoo)
4304 $(call gb_LinkTarget_set_include,$(1),\
4305 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4306 $$(INCLUDE) \
4309 endef
4311 endif # SYSTEM_CUCKOO
4314 # vim: set noet sw=4 ts=4: