tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / RepositoryExternal.mk
blob3ec3cd9243954a41b7c94a370891553e3ed37ecb
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 $(if $(filter EMSCRIPTEN,$(OS)), \
1217 $(call gb_UnpackedTarball_get_dir,cairo)/src/.libs/libcairo.a \
1218 $(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs/libpixman-1.a, \
1219 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1220 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1) \
1223 endef
1225 endif # !MACOSX, !WNT
1227 endif # !SYSTEM_CAIRO
1229 ifneq ($(SYSTEM_FREETYPE),)
1231 define gb_LinkTarget__use_freetype_headers
1232 $(call gb_LinkTarget_set_include,$(1),\
1233 $$(INCLUDE) \
1234 $(FREETYPE_CFLAGS) \
1237 endef
1239 gb_ExternalProject__use_freetype :=
1241 else
1243 define gb_LinkTarget__use_freetype_headers
1244 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1245 $(call gb_LinkTarget_set_include,$(1),\
1246 $(FREETYPE_CFLAGS) \
1247 $$(INCLUDE) \
1250 endef
1252 define gb_ExternalProject__use_freetype
1253 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1255 endef
1257 endif # SYSTEM_FREETYPE
1259 define gb_LinkTarget__use_freetype
1260 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1261 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1263 endef
1265 ifneq ($(SYSTEM_FONTCONFIG),)
1267 define gb_LinkTarget__use_fontconfig
1268 $(call gb_LinkTarget_set_include,$(1),\
1269 $$(INCLUDE) \
1270 $(FONTCONFIG_CFLAGS) \
1273 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1275 endef
1277 ifeq ($(OS),EMSCRIPTEN)
1278 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1279 libfontconfig_data \
1281 endif
1283 gb_ExternalProject__use_fontconfig :=
1285 else # SYSTEM_FONTCONFIG
1287 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1289 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1290 fontconfig \
1293 endif
1295 define gb_LinkTarget__use_fontconfig
1296 ifeq ($(OS),LINUX)
1297 $(call gb_LinkTarget_use_package,$(1),fontconfig)
1298 else
1299 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1300 endif
1301 $(call gb_LinkTarget_set_include,$(1),\
1302 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1303 $$(INCLUDE) \
1306 $(call gb_LinkTarget_add_libs,$(1),\
1307 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1310 endef
1312 define gb_ExternalProject__use_fontconfig
1313 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1315 endef
1317 endif # SYSTEM_FONTCONFIG
1319 ifneq ($(SYSTEM_GRAPHITE),)
1321 define gb_LinkTarget__use_graphite
1322 $(call gb_LinkTarget_set_include,$(1),\
1323 $$(INCLUDE) \
1324 $(GRAPHITE_CFLAGS) \
1326 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1328 endef
1330 gb_ExternalProject__use_graphite:=
1332 else # !SYSTEM_GRAPHITE
1334 define gb_LinkTarget__use_graphite
1335 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1336 $(call gb_LinkTarget_set_include,$(1),\
1337 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1338 $$(INCLUDE) \
1340 $(call gb_LinkTarget_use_static_libraries,$(1),\
1341 graphite \
1344 endef
1346 define gb_ExternalProject__use_graphite
1347 $(call gb_ExternalProject_use_static_libraries,$(1),\
1348 graphite \
1351 endef
1352 endif # SYSTEM_GRAPHITE
1354 ifneq ($(SYSTEM_ICU),)
1356 gb_LinkTarget__use_icu_headers:=
1357 gb_ExternalProject__use_icu:=
1359 define gb_LinkTarget__use_icudata
1360 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1362 endef
1363 define gb_LinkTarget__use_icui18n
1364 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1366 endef
1367 define gb_LinkTarget__use_icuuc
1368 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1370 endef
1372 else # !SYSTEM_ICU
1374 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1375 icu_ure \
1378 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1379 icu \
1382 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1383 gb_ICU_suffix:=lo
1384 else
1385 gb_ICU_suffix:=
1386 endif
1388 define gb_LinkTarget__use_icu_headers
1389 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1390 $(call gb_LinkTarget_set_include,$(1),\
1391 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1392 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1393 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1394 $$(INCLUDE) \
1397 endef
1399 define gb_ExternalProject__use_icu
1400 $(call gb_ExternalProject_use_package,$(1),icu)
1402 endef
1404 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1405 define gb_LinkTarget__use_icudata
1406 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1408 ifeq ($(OS),WNT)
1409 $(call gb_LinkTarget_add_libs,$(1),\
1410 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(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 -licudata$(gb_ICU_suffix) \
1416 endif
1418 endef
1420 define gb_LinkTarget__use_icui18n
1421 $(call gb_LinkTarget_use_package,$(1),icu)
1423 ifeq ($(OS),WNT)
1424 $(call gb_LinkTarget_add_libs,$(1),\
1425 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(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 -licui18n$(gb_ICU_suffix) \
1431 endif
1433 endef
1435 define gb_LinkTarget__use_icuuc
1436 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1438 ifeq ($(OS),WNT)
1439 $(call gb_LinkTarget_add_libs,$(1),\
1440 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1442 else
1443 $(call gb_LinkTarget_add_libs,$(1),\
1444 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1446 endif
1448 endef
1450 endif # SYSTEM_ICU
1452 ifneq ($(SYSTEM_HARFBUZZ),)
1454 define gb_LinkTarget__use_harfbuzz
1455 $(call gb_LinkTarget_set_include,$(1),\
1456 $$(INCLUDE) \
1457 $(HARFBUZZ_CFLAGS) \
1459 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1461 endef
1463 gb_ExternalProject__use_harfbuzz :=
1465 else # SYSTEM_HARFBUZZ != TRUE
1467 define gb_LinkTarget__use_harfbuzz
1468 $(call gb_LinkTarget_set_include,$(1),\
1469 $(HARFBUZZ_CFLAGS) \
1470 $$(INCLUDE) \
1472 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1473 $(call gb_LinkTarget_use_external,$(1),icuuc)
1474 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1476 endef
1478 define gb_ExternalProject__use_harfbuzz
1479 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1481 endef
1483 endif # SYSTEM_HARFBUZZ
1485 ifneq ($(ENABLE_OPENSSL),TRUE)
1487 gb_ExternalProject__use_openssl:=
1488 gb_LinkTarget__use_openssl_headers:=
1489 gb_LinkTarget__use_openssl:=
1491 else # ENABLE_OPENSSL
1493 ifneq ($(SYSTEM_OPENSSL),)
1495 gb_LinkTarget__use_openssl_headers:=
1496 gb_ExternalProject__use_openssl:=
1498 define gb_LinkTarget__use_openssl
1499 $(call gb_LinkTarget_set_include,$(1),\
1500 $$(INCLUDE) \
1501 $(OPENSSL_CFLAGS) \
1503 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1505 endef
1507 else # !SYSTEM_OPENSSL
1509 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1510 openssl \
1513 define gb_ExternalProject__use_openssl
1514 $(call gb_ExternalProject_use_package,$(1),openssl)
1516 endef
1518 define gb_LinkTarget__use_openssl_headers
1519 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1520 $(call gb_LinkTarget_set_include,$(1),\
1521 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1522 $$(INCLUDE) \
1525 endef
1527 define gb_LinkTarget__use_openssl
1528 $(call gb_LinkTarget_use_package,$(1),openssl)
1529 ifeq ($(OS),WNT)
1530 $(call gb_LinkTarget_add_libs,$(1),\
1531 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1532 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1534 else
1535 $(call gb_LinkTarget_add_libs,$(1),\
1536 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1537 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1538 $(if $(filter $(OS),LINUX),-pthread) \
1540 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1541 ifeq ($(OS),SOLARIS)
1542 $(call gb_LinkTarget_add_libs,$(1),\
1543 -lnsl \
1544 -lsocket \
1546 endif
1547 endif
1549 endef
1551 endif # SYSTEM_OPENSSL
1552 endif # ENABLE_OPENSSL
1555 ifneq ($(SYSTEM_CDR),)
1557 define gb_LinkTarget__use_cdr
1558 $(call gb_LinkTarget_set_include,$(1),\
1559 $$(INCLUDE) \
1560 $(CDR_CFLAGS) \
1562 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1564 endef
1566 else # !SYSTEM_CDR
1568 define gb_LinkTarget__use_cdr
1569 $(call gb_LinkTarget_set_include,$(1),\
1570 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1571 $$(INCLUDE) \
1573 $(call gb_LinkTarget_add_libs,$(1),\
1574 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1576 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1577 endef
1579 endif # SYSTEM_CDR
1582 ifneq ($(SYSTEM_EBOOK),)
1584 define gb_LinkTarget__use_ebook
1585 $(call gb_LinkTarget_set_include,$(1),\
1586 $$(INCLUDE) \
1587 $(EBOOK_CFLAGS) \
1589 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1591 endef
1593 gb_ExternalProject__use_ebook :=
1595 else # !SYSTEM_EBOOK
1597 define gb_LinkTarget__use_ebook
1598 $(call gb_LinkTarget_set_include,$(1),\
1599 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1600 $$(INCLUDE) \
1602 $(call gb_LinkTarget_add_libs,$(1),\
1603 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1605 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1607 endef
1609 define gb_ExternalProject__use_ebook
1610 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1612 endef
1614 endif # SYSTEM_EBOOK
1617 ifneq ($(SYSTEM_ETONYEK),)
1619 define gb_LinkTarget__use_etonyek
1620 $(call gb_LinkTarget_set_include,$(1),\
1621 $$(INCLUDE) \
1622 $(ETONYEK_CFLAGS) \
1624 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1626 endef
1628 gb_ExternalProject__use_etonyek :=
1630 else # !SYSTEM_ETONYEK
1632 ifeq ($(COM),MSC)
1634 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1635 etonyek \
1638 define gb_LinkTarget__use_etonyek
1639 $(call gb_LinkTarget_set_include,$(1),\
1640 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1641 $$(INCLUDE) \
1643 $(call gb_LinkTarget_use_libraries,$(1),\
1644 etonyek \
1647 endef
1649 else # !MSC
1651 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1652 libetonyek \
1655 define gb_LinkTarget__use_etonyek
1656 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1658 $(call gb_LinkTarget_set_include,$(1),\
1659 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1660 -DLIBETONYEK_VISIBILITY \
1661 $$(INCLUDE) \
1663 $(call gb_LinkTarget_add_libs,$(1),\
1664 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1666 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1668 endef
1670 define gb_ExternalProject__use_etonyek
1671 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1673 endef
1675 endif
1677 endif # SYSTEM_ETONYEK
1680 ifneq ($(SYSTEM_FREEHAND),)
1682 define gb_LinkTarget__use_freehand
1683 $(call gb_LinkTarget_set_include,$(1),\
1684 $$(INCLUDE) \
1685 $(FREEHAND_CFLAGS) \
1687 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1689 endef
1691 gb_ExternalProject__use_freehand :=
1693 else # !SYSTEM_FREEHAND
1695 define gb_LinkTarget__use_freehand
1696 $(call gb_LinkTarget_set_include,$(1),\
1697 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1698 $$(INCLUDE) \
1700 $(call gb_LinkTarget_add_libs,$(1),\
1701 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1703 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1705 endef
1707 define gb_ExternalProject__use_freehand
1708 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1710 endef
1712 endif # SYSTEM_FREEHAND
1715 ifneq ($(SYSTEM_ODFGEN),)
1717 define gb_LinkTarget__use_odfgen
1718 $(call gb_LinkTarget_set_include,$(1),\
1719 $$(INCLUDE) \
1720 $(ODFGEN_CFLAGS) \
1722 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1724 endef
1726 else # !SYSTEM_ODFGEN
1728 ifeq ($(COM),MSC)
1730 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1731 odfgen \
1734 define gb_LinkTarget__use_odfgen
1735 $(call gb_LinkTarget_set_include,$(1),\
1736 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1737 $$(INCLUDE) \
1739 $(call gb_LinkTarget_use_libraries,$(1),\
1740 odfgen \
1743 endef
1745 else # !MSC
1747 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1748 libodfgen \
1751 define gb_LinkTarget__use_odfgen
1752 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1754 $(call gb_LinkTarget_set_include,$(1),\
1755 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1756 -DLIBODFGEN_VISIBILITY \
1757 $$(INCLUDE) \
1759 $(call gb_LinkTarget_add_libs,$(1),\
1760 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1763 endef
1765 endif
1767 endif # SYSTEM_ODFGEN
1769 ifneq ($(SYSTEM_EPUBGEN),)
1771 define gb_LinkTarget__use_epubgen
1772 $(call gb_LinkTarget_set_include,$(1),\
1773 $$(INCLUDE) \
1774 $(EPUBGEN_CFLAGS) \
1776 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1778 endef
1779 gb_ExternalProject__use_epubgen :=
1781 else # !SYSTEM_EPUBGEN
1782 ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
1784 define gb_LinkTarget__use_epubgen
1785 $(call gb_LinkTarget_set_include,$(1),\
1786 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1787 $$(INCLUDE) \
1789 $(call gb_LinkTarget_add_libs,$(1),\
1790 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1792 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1794 endef
1795 define gb_ExternalProject__use_epubgen
1796 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1798 endef
1800 endif # ENABLE_WASM_STRIP_EPUB
1801 endif # SYSTEM_EPUBGEN
1803 ifneq ($(SYSTEM_REVENGE),)
1805 define gb_LinkTarget__use_revenge
1806 $(call gb_LinkTarget_set_include,$(1),\
1807 $$(INCLUDE) \
1808 $(REVENGE_CFLAGS) \
1810 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1812 endef
1814 gb_ExternalProject__use_revenge :=
1816 else # !SYSTEM_REVENGE
1818 ifeq ($(COM),MSC)
1820 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1821 revenge \
1824 define gb_LinkTarget__use_revenge
1825 $(call gb_LinkTarget_set_include,$(1),\
1826 $(REVENGE_CFLAGS) \
1827 $$(INCLUDE) \
1829 $(call gb_LinkTarget_use_libraries,$(1),\
1830 revenge \
1833 endef
1835 define gb_ExternalProject__use_revenge
1836 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1838 endef
1840 else # !MSC
1842 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1843 librevenge \
1846 define gb_LinkTarget__use_revenge
1847 $(call gb_LinkTarget_use_package,$(1),librevenge)
1849 $(call gb_LinkTarget_set_include,$(1),\
1850 $(REVENGE_CFLAGS) \
1851 -DLIBREVENGE_VISIBILITY \
1852 $$(INCLUDE) \
1854 $(call gb_LinkTarget_add_libs,$(1),\
1855 $(REVENGE_LIBS) \
1857 endef
1859 define gb_ExternalProject__use_revenge
1860 $(call gb_ExternalProject_use_package,$(1),librevenge)
1862 endef
1864 endif # MSC
1866 endif # SYSTEM_REVENGE
1869 ifneq ($(SYSTEM_ABW),)
1871 define gb_LinkTarget__use_abw
1872 $(call gb_LinkTarget_set_include,$(1),\
1873 $$(INCLUDE) \
1874 $(ABW_CFLAGS) \
1876 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1878 endef
1879 gb_ExternalProject__use_abw :=
1881 else # !SYSTEM_ABW
1883 define gb_LinkTarget__use_abw
1884 $(call gb_LinkTarget_set_include,$(1),\
1885 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1886 $$(INCLUDE) \
1888 $(call gb_LinkTarget_add_libs,$(1),\
1889 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1891 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1893 endef
1894 define gb_ExternalProject__use_abw
1895 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1897 endef
1899 endif # SYSTEM_ABW
1902 ifneq ($(SYSTEM_MSPUB),)
1904 define gb_LinkTarget__use_mspub
1905 $(call gb_LinkTarget_set_include,$(1),\
1906 $$(INCLUDE) \
1907 $(MSPUB_CFLAGS) \
1909 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1911 endef
1913 else # !SYSTEM_MSPUB
1915 define gb_LinkTarget__use_mspub
1916 $(call gb_LinkTarget_set_include,$(1),\
1917 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1918 $$(INCLUDE) \
1920 $(call gb_LinkTarget_add_libs,$(1),\
1921 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1923 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1925 endef
1927 endif # SYSTEM_MSPUB
1930 ifneq ($(SYSTEM_PAGEMAKER),)
1932 define gb_LinkTarget__use_pagemaker
1933 $(call gb_LinkTarget_set_include,$(1),\
1934 $$(INCLUDE) \
1935 $(PAGEMAKER_CFLAGS) \
1937 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1939 endef
1940 gb_ExternalProject__use_pagemaker :=
1942 else # !SYSTEM_PAGEMAKER
1944 define gb_LinkTarget__use_pagemaker
1945 $(call gb_LinkTarget_set_include,$(1),\
1946 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1947 $$(INCLUDE) \
1949 $(call gb_LinkTarget_add_libs,$(1),\
1950 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1952 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1954 endef
1955 define gb_ExternalProject__use_pagemaker
1956 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1958 endef
1960 endif # SYSTEM_PAGEMAKER
1963 ifneq ($(SYSTEM_QXP),)
1965 define gb_LinkTarget__use_qxp
1966 $(call gb_LinkTarget_set_include,$(1),\
1967 $$(INCLUDE) \
1968 $(QXP_CFLAGS) \
1970 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
1972 endef
1973 gb_ExternalProject__use_qxp :=
1975 else # !SYSTEM_QXP
1977 define gb_LinkTarget__use_qxp
1978 $(call gb_LinkTarget_set_include,$(1),\
1979 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
1980 $$(INCLUDE) \
1982 $(call gb_LinkTarget_add_libs,$(1),\
1983 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
1985 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
1987 endef
1988 define gb_ExternalProject__use_qxp
1989 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
1991 endef
1993 endif # SYSTEM_QXP
1996 ifneq ($(SYSTEM_ZMF),)
1998 define gb_LinkTarget__use_zmf
1999 $(call gb_LinkTarget_set_include,$(1),\
2000 $$(INCLUDE) \
2001 $(ZMF_CFLAGS) \
2003 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2005 endef
2006 gb_ExternalProject__use_zmf :=
2008 else # !SYSTEM_ZMF
2010 define gb_LinkTarget__use_zmf
2011 $(call gb_LinkTarget_set_include,$(1),\
2012 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2013 $$(INCLUDE) \
2015 $(call gb_LinkTarget_add_libs,$(1),\
2016 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2018 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2020 endef
2021 define gb_ExternalProject__use_zmf
2022 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2024 endef
2026 endif # SYSTEM_ZMF
2029 ifneq ($(SYSTEM_VISIO),)
2031 define gb_LinkTarget__use_visio
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(VISIO_CFLAGS) \
2036 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2038 endef
2040 else # !SYSTEM_VISIO
2042 define gb_LinkTarget__use_visio
2043 $(call gb_LinkTarget_set_include,$(1),\
2044 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2045 $$(INCLUDE) \
2047 $(call gb_LinkTarget_add_libs,$(1),\
2048 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2050 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2052 endef
2054 endif # SYSTEM_VISIO
2057 ifneq ($(SYSTEM_WPD),)
2059 define gb_LinkTarget__use_wpd
2060 $(call gb_LinkTarget_set_include,$(1),\
2061 $$(INCLUDE) \
2062 $(WPD_CFLAGS) \
2064 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2066 endef
2067 gb_ExternalProject__use_wpd :=
2069 else # !SYSTEM_WPD
2071 ifeq ($(COM),MSC)
2073 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2074 wpd \
2077 define gb_LinkTarget__use_wpd
2078 $(call gb_LinkTarget_set_include,$(1),\
2079 $(WPD_CFLAGS) \
2080 $$(INCLUDE) \
2082 $(call gb_LinkTarget_use_libraries,$(1),\
2083 wpd \
2086 endef
2088 define gb_ExternalProject__use_wpd
2089 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2091 endef
2093 else # !MSC
2095 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2096 libwpd \
2099 define gb_LinkTarget__use_wpd
2100 $(call gb_LinkTarget_use_package,$(1),libwpd)
2102 $(call gb_LinkTarget_set_include,$(1),\
2103 $(WPD_CFLAGS) \
2104 $$(INCLUDE) \
2106 $(call gb_LinkTarget_add_libs,$(1),\
2107 $(WPD_LIBS) \
2110 endef
2112 define gb_ExternalProject__use_wpd
2113 $(call gb_ExternalProject_use_package,$(1),libwpd)
2115 endef
2117 endif # MSC
2119 endif # SYSTEM_WPD
2122 ifneq ($(SYSTEM_WPG),)
2124 define gb_LinkTarget__use_wpg
2125 $(call gb_LinkTarget_set_include,$(1),\
2126 $$(INCLUDE) \
2127 $(WPG_CFLAGS) \
2129 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2131 endef
2132 gb_ExternalProject__use_wpg :=
2134 else # !SYSTEM_WPG
2136 ifeq ($(COM),MSC)
2138 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2139 wpg \
2142 define gb_LinkTarget__use_wpg
2143 $(call gb_LinkTarget_set_include,$(1),\
2144 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2145 $$(INCLUDE) \
2147 $(call gb_LinkTarget_use_libraries,$(1),\
2148 wpg \
2151 endef
2153 else # !MSC
2155 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2156 libwpg \
2159 define gb_LinkTarget__use_wpg
2160 $(call gb_LinkTarget_use_package,$(1),libwpg)
2162 $(call gb_LinkTarget_set_include,$(1),\
2163 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2164 $$(INCLUDE) \
2166 $(call gb_LinkTarget_add_libs,$(1),\
2167 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2170 endef
2172 endif # MSC
2174 endif # SYSTEM_WPG
2177 ifneq ($(SYSTEM_WPS),)
2179 define gb_LinkTarget__use_wps
2180 $(call gb_LinkTarget_set_include,$(1),\
2181 $$(INCLUDE) \
2182 $(WPS_CFLAGS) \
2184 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2186 endef
2187 gb_ExternalProject__use_wps :=
2189 else # !SYSTEM_WPS
2191 ifeq ($(COM),MSC)
2193 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2194 wps \
2197 define gb_LinkTarget__use_wps
2198 $(call gb_LinkTarget_set_include,$(1),\
2199 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2200 $$(INCLUDE) \
2203 $(call gb_LinkTarget_use_libraries,$(1),\
2204 wps \
2207 endef
2209 else # !MSC
2211 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2212 libwps \
2215 define gb_LinkTarget__use_wps
2216 $(call gb_LinkTarget_use_package,$(1),libwps)
2218 $(call gb_LinkTarget_set_include,$(1),\
2219 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2220 $$(INCLUDE) \
2222 $(call gb_LinkTarget_add_libs,$(1),\
2223 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2226 endef
2228 endif # MSC
2230 endif # SYSTEM_WPS
2233 ifneq ($(SYSTEM_MWAW),)
2235 define gb_LinkTarget__use_mwaw
2236 $(call gb_LinkTarget_set_include,$(1),\
2237 $$(INCLUDE) \
2238 $(MWAW_CFLAGS) \
2240 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2242 endef
2244 else # !SYSTEM_MWAW
2246 ifeq ($(COM),MSC)
2248 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2249 mwaw \
2252 define gb_LinkTarget__use_mwaw
2253 $(call gb_LinkTarget_set_include,$(1),\
2254 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2255 $$(INCLUDE) \
2258 $(call gb_LinkTarget_use_libraries,$(1),\
2259 mwaw \
2262 endef
2264 else # !MSC
2266 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2267 libmwaw \
2270 define gb_LinkTarget__use_mwaw
2271 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2273 $(call gb_LinkTarget_set_include,$(1),\
2274 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2275 $$(INCLUDE) \
2277 $(call gb_LinkTarget_add_libs,$(1),\
2278 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2281 endef
2283 endif # MSC
2285 endif # SYSTEM_MWAW
2287 ifneq ($(SYSTEM_STAROFFICE),)
2289 define gb_LinkTarget__use_staroffice
2290 $(call gb_LinkTarget_set_include,$(1),\
2291 $$(INCLUDE) \
2292 $(STAROFFICE_CFLAGS) \
2294 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2296 endef
2298 else # !SYSTEM_STAROFFICE
2300 ifeq ($(COM),MSC)
2302 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2303 staroffice \
2306 define gb_LinkTarget__use_staroffice
2307 $(call gb_LinkTarget_set_include,$(1),\
2308 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2309 $$(INCLUDE) \
2312 $(call gb_LinkTarget_use_libraries,$(1),\
2313 staroffice \
2316 endef
2318 else # !MSC
2320 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2321 libstaroffice \
2324 define gb_LinkTarget__use_staroffice
2325 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2327 $(call gb_LinkTarget_set_include,$(1),\
2328 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2329 $$(INCLUDE) \
2331 $(call gb_LinkTarget_add_libs,$(1),\
2332 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2335 endef
2337 endif # MSC
2339 endif # SYSTEM_STAROFFICE
2342 ifneq ($(SYSTEM_LCMS2),)
2344 define gb_LinkTarget__use_lcms2
2345 $(call gb_LinkTarget_set_include,$(1),\
2346 $$(INCLUDE) \
2347 $(LCMS2_CFLAGS) \
2349 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2351 endef
2353 gb_ExternalProject__use_lcms2 :=
2355 else # !SYSTEM_LCMS2
2357 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2358 lcms2 \
2361 define gb_ExternalProject__use_lcms2
2362 $(call gb_ExternalProject_use_package,$(1),lcms2)
2364 endef
2366 ifeq ($(OS),ANDROID)
2368 define gb_LinkTarget__use_lcms2
2369 $(call gb_LinkTarget_use_package,$(1),lcms2)
2370 $(call gb_LinkTarget_set_include,$(1),\
2371 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2372 $$(INCLUDE) \
2375 endef
2377 else
2379 define gb_LinkTarget__use_lcms2
2380 $(call gb_LinkTarget_use_package,$(1),lcms2)
2381 $(call gb_LinkTarget_set_include,$(1),\
2382 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2383 $$(INCLUDE) \
2385 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2387 endef
2389 endif # ANDROID
2390 endif # SYSTEM_LCMS2
2392 ifneq ($(ENABLE_LPSOLVE),)
2394 ifneq ($(SYSTEM_LPSOLVE),)
2396 define gb_LinkTarget__use_lpsolve
2397 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2398 $(call gb_LinkTarget_add_defs,$(1),\
2399 -DSYSTEM_LPSOLVE \
2402 endef
2404 else # !SYSTEM_LPSOLVE
2406 define gb_LinkTarget__use_lpsolve
2407 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2408 ifeq ($(COM),MSC)
2409 $(call gb_LinkTarget_add_libs,$(1),\
2410 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2412 else
2413 $(call gb_LinkTarget_add_libs,$(1),\
2414 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2416 endif
2417 $(call gb_LinkTarget_set_include,$(1),\
2418 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2419 $$(INCLUDE) \
2422 endef
2424 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2425 lpsolve \
2428 endif # SYSTEM_LPSOLVE
2430 else
2432 gb_LinkTarget__use_lpsolve :=
2434 endif # ENABLE_LPSOLVE
2436 ifneq ($(ENABLE_COINMP),)
2438 ifneq ($(SYSTEM_COINMP),TRUE)
2440 define gb_LinkTarget__use_coinmp
2441 $(call gb_LinkTarget_use_package,$(1),coinmp)
2442 ifeq ($(COM),MSC)
2443 $(call gb_LinkTarget_add_libs,$(1),\
2444 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2446 else
2447 $(call gb_LinkTarget_add_libs,$(1),\
2448 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2449 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2450 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2451 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2452 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2453 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2454 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2456 endif
2457 $(call gb_LinkTarget_set_include,$(1),\
2458 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2459 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2460 $$(INCLUDE) \
2463 endef
2465 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2466 coinmp \
2469 else # SYSTEM_COINMP
2471 define gb_LinkTarget__use_coinmp
2472 $(call gb_LinkTarget_set_include,$(1),\
2473 $$(INCLUDE) \
2474 $(COINMP_CFLAGS) \
2476 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2478 endef
2480 endif
2482 else
2484 gb_LinkTarget__use_coinmp :=
2486 endif # ENABLE_COINMP
2488 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2490 define gb_LinkTarget__use_mDNSResponder
2491 $(call gb_LinkTarget_set_include,$(1),\
2492 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2493 $$(INCLUDE) \
2495 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2496 endef
2498 endif # MDNSRESPONDER
2500 ifeq ($(ENABLE_GIO),TRUE)
2502 define gb_LinkTarget__use_gio
2503 $(call gb_LinkTarget_set_include,$(1),\
2504 $$(INCLUDE) \
2505 $(GIO_CFLAGS) \
2508 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2510 endef
2512 else # ENABLE_GIO
2514 define gb_LinkTarget__use_gio
2516 endef
2518 endif # ENABLE_GIO
2520 ifeq ($(ENABLE_AVAHI),TRUE)
2522 define gb_LinkTarget__use_avahi
2523 $(call gb_LinkTarget_set_include,$(1),\
2524 $$(INCLUDE) \
2525 $(AVAHI_CFLAGS) \
2528 $(call gb_LinkTarget_add_defs,$(1),\
2529 -DENABLE_AVAHI \
2532 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2534 endef
2536 else # ENABLE_AVAHI
2538 gb_LinkTarget__use_avahi :=
2540 endif # ENABLE_AVAHI
2542 ifeq ($(ENABLE_CUPS),TRUE)
2544 define gb_LinkTarget__use_cups
2545 $(call gb_LinkTarget_add_defs,$(1),\
2546 -DENABLE_CUPS \
2549 $(call gb_LinkTarget_add_libs,$(1),\
2550 -lcups \
2553 endef
2555 else # ENABLE_CUPS
2557 define gb_LinkTarget__use_cups
2559 endef
2561 endif # ENABLE_CUPS
2563 ifeq ($(ENABLE_DBUS),TRUE)
2565 define gb_LinkTarget__use_dbus
2566 $(call gb_LinkTarget_set_include,$(1),\
2567 $$(INCLUDE) \
2568 $(DBUS_CFLAGS) \
2571 $(call gb_LinkTarget_add_libs,$(1),\
2572 $(DBUS_LIBS) \
2575 endef
2577 else # ENABLE_DBUS
2579 define gb_LinkTarget__use_dbus
2581 endef
2583 endif # ENABLE_DBUS
2586 ifneq ($(SYSTEM_LIBPNG),)
2588 define gb_LinkTarget__use_libpng
2589 $(call gb_LinkTarget_set_include,$(1),\
2590 $$(INCLUDE) \
2591 $(LIBPNG_CFLAGS) \
2594 $(call gb_LinkTarget_add_libs,$(1),\
2595 $(LIBPNG_LIBS) \
2598 endef
2600 gb_ExternalProject__use_libpng :=
2602 else # !SYSTEM_LIBPNG
2604 define gb_LinkTarget__use_libpng
2605 $(call gb_LinkTarget_set_include,$(1),\
2606 $(LIBPNG_CFLAGS) \
2607 $$(INCLUDE) \
2609 $(call gb_LinkTarget_use_static_libraries,$(1),\
2610 libpng \
2612 $(call gb_LinkTarget__use_zlib,$(1))
2614 endef
2616 define gb_ExternalProject__use_libpng
2617 $(call gb_ExternalProject_use_static_libraries,$(1),\
2618 libpng \
2621 endef
2623 endif # !SYSTEM_LIBPNG
2625 ifneq ($(SYSTEM_LIBTIFF),)
2627 define gb_LinkTarget__use_libtiff
2628 $(call gb_LinkTarget_set_include,$(1),\
2629 $$(INCLUDE) \
2630 $(LIBTIFF_CFLAGS) \
2633 $(call gb_LinkTarget_add_libs,$(1),\
2634 $(LIBTIFF_LIBS) \
2637 endef
2639 gb_ExternalProject__use_libtiff :=
2641 else # !SYSTEM_LIBTIFF
2643 define gb_LinkTarget__use_libtiff
2644 $(call gb_LinkTarget_set_include,$(1),\
2645 $(LIBTIFF_CFLAGS) \
2646 $$(INCLUDE) \
2649 $(call gb_LinkTarget_set_include,$(1),\
2650 -I$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff \
2651 $$(INCLUDE) \
2653 ifeq ($(OS),WNT)
2654 $(call gb_LinkTarget_add_libs,$(1),\
2655 $(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs/libtiff$(gb_StaticLibrary_PLAINEXT) \
2657 else
2658 $(call gb_LinkTarget_add_libs,$(1),\
2659 -L$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs -ltiff \
2661 endif
2662 $(call gb_LinkTarget_use_external_project,$(1),libtiff,full)
2664 endef
2666 define gb_ExternalProject__use_libtiff
2667 $(call gb_ExternalProject_use_external_project,$(1),libtiff)
2669 endef
2671 endif # !SYSTEM_LIBTIFF
2673 ifneq ($(SYSTEM_LIBWEBP),)
2675 define gb_LinkTarget__use_libwebp
2676 $(call gb_LinkTarget_set_include,$(1),\
2677 $$(INCLUDE) \
2678 $(LIBWEBP_CFLAGS) \
2681 $(call gb_LinkTarget_add_libs,$(1),\
2682 $(LIBWEBP_LIBS) \
2685 endef
2687 gb_ExternalProject__use_libwebp :=
2689 else # !SYSTEM_LIBWEBP
2691 define gb_LinkTarget__use_libwebp
2692 $(call gb_LinkTarget_set_include,$(1),\
2693 $(LIBWEBP_CFLAGS) \
2694 $$(INCLUDE) \
2697 $(call gb_LinkTarget_set_include,$(1),\
2698 -I$(call gb_UnpackedTarball_get_dir,libwebp)/src \
2699 $$(INCLUDE) \
2701 ifeq ($(OS),WNT)
2702 $(call gb_LinkTarget_add_libs,$(1),\
2703 $(call gb_UnpackedTarball_get_dir,libwebp)/output/lib/libwebp$(if $(MSVC_USE_DEBUG_RUNTIME),_debug)$(gb_StaticLibrary_PLAINEXT) \
2705 else
2706 $(call gb_LinkTarget_add_libs,$(1),\
2707 -L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
2708 -L$(call gb_UnpackedTarball_get_dir,libwebp)/sharpyuv/.libs -lsharpyuv \
2710 endif
2711 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
2713 endef
2715 define gb_ExternalProject__use_libwebp
2716 $(call gb_ExternalProject_use_external_project,$(1),libwebp)
2718 endef
2720 endif # !SYSTEM_LIBWEBP
2723 ifneq ($(SYSTEM_CURL),)
2725 define gb_LinkTarget__use_curl
2726 $(call gb_LinkTarget_add_defs,$(1),\
2727 -DSYSTEM_CURL \
2729 $(call gb_LinkTarget_set_include,$(1),\
2730 $$(INCLUDE) \
2731 $(CURL_CFLAGS) \
2733 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2735 endef
2737 else # !SYSTEM_CURL
2739 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2740 curl \
2743 define gb_LinkTarget__use_curl
2744 $(call gb_LinkTarget_use_package,$(1),curl)
2745 $(call gb_LinkTarget_set_include,$(1),\
2746 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2747 $$(INCLUDE) \
2750 ifeq ($(COM),MSC)
2751 $(call gb_LinkTarget_add_libs,$(1),\
2752 $(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 \
2754 else
2755 $(call gb_LinkTarget_add_libs,$(1),\
2756 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2758 endif
2760 endef
2762 endif # SYSTEM_CURL
2764 ifeq ($(ENABLE_VALGRIND),TRUE)
2766 define gb_LinkTarget__use_valgrind
2767 $(call gb_LinkTarget_add_defs,$(1),\
2768 -DHAVE_VALGRIND_HEADERS \
2771 $(call gb_LinkTarget_set_include,$(1),\
2772 $$(INCLUDE) \
2773 $(VALGRIND_CFLAGS) \
2776 endef
2778 else # !ENABLE_VALGRIND
2780 define gb_LinkTarget__use_valgrind
2782 endef
2784 endif # ENABLE_VALGRIND
2786 ifeq ($(ENABLE_POPPLER),TRUE)
2788 ifneq ($(SYSTEM_POPPLER),)
2790 define gb_LinkTarget__use_poppler
2791 $(call gb_LinkTarget_set_include,$(1),\
2792 $(POPPLER_CFLAGS) \
2793 $$(INCLUDE) \
2796 $(call gb_LinkTarget_add_libs,$(1),\
2797 $(POPPLER_LIBS) \
2800 endef
2802 else # !SYSTEM_POPPLER
2804 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2805 poppler_data \
2808 define gb_LinkTarget__use_poppler
2809 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2810 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2811 $(call gb_LinkTarget_set_include,$(1),\
2812 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2813 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2814 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2815 $$(INCLUDE) \
2818 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2819 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2821 ifeq ($(OS),MACOSX)
2822 $(call gb_LinkTarget_add_libs,$(1),\
2823 -lobjc \
2825 else ifeq ($(OS),LINUX)
2826 $(call gb_LinkTarget_add_libs,$(1),\
2827 -pthread \
2829 else ifeq ($(OS),WNT)
2830 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2831 advapi32 \
2832 gdi32 \
2834 endif
2836 endef
2838 endif # SYSTEM_POPPLER
2840 endif # ENABLE_POPPLER
2843 ifneq ($(SYSTEM_CLUCENE),)
2845 define gb_LinkTarget__use_clucene
2846 $(call gb_LinkTarget_add_defs,$(1),\
2847 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2850 $(call gb_LinkTarget_set_include,$(1),\
2851 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2852 $$(INCLUDE) \
2855 $(call gb_LinkTarget_add_libs,$(1),\
2856 $(CLUCENE_LIBS) \
2859 endef
2861 else # !SYSTEM_CLUCENE
2863 define gb_LinkTarget__use_clucene
2864 $(call gb_LinkTarget_set_include,$(1),\
2865 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2866 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2867 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2868 $$(INCLUDE) \
2871 $(call gb_LinkTarget_use_libraries,$(1),\
2872 clucene \
2875 endef
2877 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2878 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2881 endif # SYSTEM_CLUCENE
2883 define gb_LinkTarget__use_gobject
2884 $(call gb_LinkTarget_add_libs,$(1),\
2885 $(GOBJECT_LIBS) \
2888 $(call gb_LinkTarget_set_include,$(1),\
2889 $$(INCLUDE) \
2890 $(GOBJECT_CFLAGS) \
2892 endef
2894 ifneq ($(SYSTEM_HSQLDB),)
2896 define gb_LinkTarget__use_hsqldb
2898 $(call gb_LinkTarget_add_defs,$(1),\
2899 -DSYSTEM_HSQLDB \
2900 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2903 endef
2905 else # !SYSTEM_HSQLDB
2907 define gb_LinkTarget__use_hsqldb
2909 endef
2911 endif # SYSTEM_HSQLDB
2913 ifeq ($(ENABLE_LDAP),TRUE)
2914 ifneq ($(SYSTEM_OPENLDAP),)
2916 define gb_LinkTarget__use_openldap
2918 $(call gb_LinkTarget_add_libs,$(1),\
2919 -lldap \
2920 -llber \
2923 endef
2925 gb_ExternalProject__use_openldap :=
2927 else # !SYSTEM_OPENLDAP
2929 define gb_LinkTarget__use_openldap
2930 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2931 $(call gb_LinkTarget_set_include,$(1),\
2932 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2933 $$(INCLUDE) \
2935 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2936 $(call gb_LinkTarget_add_libs,$(1), \
2937 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2938 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2941 endef
2942 endif
2944 define gb_ExternalProject__use_openldap
2945 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2947 endef
2949 endif # SYSTEM_OPENLDAP
2951 ifneq ($(SYSTEM_LIBTOMMATH),)
2953 define gb_LinkTarget__use_libtommath
2954 $(call gb_LinkTarget_set_include,$(1),\
2955 $(LIBTOMMATH_CFLAGS) \
2956 $$(INCLUDE) \
2958 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2960 endef
2962 else # !SYSTEM_LIBTOMMATH
2963 define gb_LinkTarget__use_libtommath
2964 $(call gb_LinkTarget_set_include,$(1),\
2965 -I${WORKDIR}/UnpackedTarball/libtommath \
2966 $$(INCLUDE) \
2968 $(call gb_LinkTarget_add_libs,$(1),\
2969 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2971 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2973 endef
2975 endif # SYSTEM_LIBTOMMATH
2977 define gb_ExternalProject__use_libtommath
2978 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2980 endef
2982 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2984 ifneq ($(SYSTEM_FIREBIRD),)
2986 define gb_LinkTarget__use_libfbembed
2987 $(call gb_LinkTarget_set_include,$(1),\
2988 $(FIREBIRD_CFLAGS) \
2989 $$(INCLUDE) \
2991 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2993 endef
2995 else # !SYSTEM_FIREBIRD
2997 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2998 firebird \
3001 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3002 #$(call gb_LinkTarget__use_libtommath,$(1))
3004 define gb_LinkTarget__use_libfbembed
3005 $(call gb_LinkTarget_use_package,$(1),firebird)
3006 $(call gb_LinkTarget_set_include,$(1),\
3007 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3008 $$(INCLUDE) \
3010 ifeq ($(COM),MSC)
3011 $(call gb_LinkTarget_add_libs,$(1),\
3012 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3014 else
3015 $(call gb_LinkTarget_add_libs,$(1),\
3016 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3018 endif
3020 endef
3023 # endef
3025 endif # SYSTEM_FIREBIRD
3027 else # !ENABLE_FIREBIRD_SDBC
3029 gb_LinkTarget__use_firebird :=
3030 # gb_LinkTarget__use_atomic_ops :=
3031 # gb_LinkTarget__use_libtommath :=
3033 endif # ENABLE_FIREBIRD_SDBC
3036 ifneq ($(SYSTEM_POSTGRESQL),)
3038 define gb_LinkTarget__use_postgresql
3040 $(call gb_LinkTarget_set_include,$(1),\
3041 $(POSTGRESQL_INC) \
3042 $$(INCLUDE) \
3045 $(call gb_LinkTarget_add_libs,$(1),\
3046 -lpq \
3049 $(call gb_LinkTarget_add_ldflags,$(1),\
3050 $(POSTGRESQL_LIB) \
3053 endef
3055 else # !SYSTEM_POSTGRESQL
3057 ifeq ($(OS),WNT)
3058 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3059 postgresql \
3061 endif # WNT
3063 define gb_LinkTarget__use_postgresql
3065 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3067 $(call gb_LinkTarget_set_include,$(1),\
3068 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3069 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3070 $$(INCLUDE) \
3073 ifeq ($(OS),WNT)
3075 $(call gb_LinkTarget_add_libs,$(1),\
3076 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3079 else # !WNT
3081 $(call gb_LinkTarget_add_libs,$(1),\
3082 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3083 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3084 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3085 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3088 endif # !WNT
3090 endef # gb_LinkTarget__use_postgresql
3092 endif # !SYSTEM_POSTGRESQL
3094 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3096 define gb_LinkTarget__use_kf5
3097 $(call gb_LinkTarget_set_include,$(1),\
3098 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3099 $$(INCLUDE) \
3102 $(call gb_LinkTarget_add_cxxflags,$(1),\
3103 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3106 $(call gb_LinkTarget_add_libs,$(1),\
3107 $(KF5_LIBS) \
3110 endef
3112 else # !ENABLE_KF5
3114 define gb_LinkTarget__use_kf5
3116 endef
3118 endif # ENABLE_KF5
3122 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3124 define gb_LinkTarget__use_qt5
3125 $(call gb_LinkTarget_set_include,$(1),\
3126 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3127 $$(INCLUDE) \
3130 $(call gb_LinkTarget_add_defs,$(1),\
3131 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3134 $(call gb_LinkTarget_add_libs,$(1),\
3135 $(QT5_LIBS) \
3138 endef
3140 else # !ENABLE_QT5
3142 define gb_LinkTarget__use_qt5
3144 endef
3146 endif # ENABLE_QT5
3148 ifeq ($(ENABLE_QT6),TRUE)
3150 define gb_LinkTarget__use_qt6
3151 $(call gb_LinkTarget_set_include,$(1),\
3152 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3153 $$(INCLUDE) \
3156 $(call gb_LinkTarget_add_defs,$(1),\
3157 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3160 $(call gb_LinkTarget_add_libs,$(1),\
3161 $(QT6_LIBS) \
3164 endef
3166 else # !ENABLE_QT6
3168 define gb_LinkTarget__use_qt6
3170 endef
3172 endif # ENABLE_QT6
3175 # PYTHON
3176 # extra python_headers external because pyuno wrapper must not link python
3177 ifneq ($(SYSTEM_PYTHON),)
3179 define gb_LinkTarget__use_python_headers
3180 $(call gb_LinkTarget_add_defs,$(1),\
3181 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3184 $(call gb_LinkTarget_set_include,$(1),\
3185 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3186 $$(INCLUDE) \
3189 endef
3191 define gb_LinkTarget__use_python
3192 $(call gb_LinkTarget__use_python_headers,$(1))
3194 $(call gb_LinkTarget_add_libs,$(1),\
3195 $(PYTHON_LIBS) \
3198 endef
3200 else # !SYSTEM_PYTHON
3202 $(eval $(call gb_Helper_register_packages_for_install,python,\
3203 python3 \
3204 $(if $(filter WNT,$(OS)),libffi) \
3207 define gb_LinkTarget__use_python_headers
3208 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3209 $(call gb_LinkTarget_set_include,$(1),\
3210 -I$(call gb_UnpackedTarball_get_dir,python3) \
3211 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3212 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3213 $$(INCLUDE) \
3216 endef
3218 define gb_LinkTarget__use_python
3219 $(call gb_LinkTarget__use_python_headers,$(1))
3220 ifeq ($(OS),MACOSX)
3221 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3222 else
3223 $(call gb_LinkTarget_use_package,$(1),python3)
3224 endif
3226 ifeq ($(OS),WNT)
3227 ifeq ($(CPUNAME),X86_64)
3228 python_arch_subdir=amd64/
3229 else ifeq ($(CPUNAME),AARCH64)
3230 python_arch_subdir=arm64/
3231 else
3232 python_arch_subdir=win32/
3233 endif
3234 $(call gb_LinkTarget_add_libs,$(1),\
3235 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3237 else ifeq ($(OS),MACOSX)
3238 $(call gb_LinkTarget_add_libs,$(1),\
3239 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3241 else
3242 $(call gb_LinkTarget_add_libs,$(1),\
3243 -L$(call gb_UnpackedTarball_get_dir,python3) \
3244 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3246 endif
3248 endef
3250 # this is only used by python currently
3251 define gb_ExternalProject__use_libffi
3252 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3254 endef
3256 endif # SYSTEM_PYTHON
3258 # ORCUS
3259 ifneq ($(SYSTEM_LIBORCUS),)
3261 define gb_LinkTarget__use_orcus
3262 $(call gb_LinkTarget_set_include,$(1),\
3263 $$(INCLUDE) \
3264 $(ORCUS_CFLAGS) \
3266 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3267 endef
3269 define gb_LinkTarget__use_orcus-parser
3271 endef
3273 else # !SYSTEM_LIBORCUS
3275 ifeq ($(COM),MSC)
3277 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3278 orcus \
3279 orcus-parser \
3282 define gb_LinkTarget__use_orcus
3283 $(call gb_LinkTarget_set_include,$(1),\
3284 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3285 $$(INCLUDE) \
3288 $(call gb_LinkTarget_use_libraries,$(1),\
3289 orcus \
3292 endef
3294 define gb_LinkTarget__use_orcus-parser
3295 $(call gb_LinkTarget_set_include,$(1),\
3296 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3297 $$(INCLUDE) \
3300 $(call gb_LinkTarget_use_libraries,$(1),\
3301 orcus-parser \
3304 endef
3306 else # !MSC
3308 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3309 liborcus \
3312 define gb_LinkTarget__use_orcus
3313 $(call gb_LinkTarget_use_package,$(1),liborcus)
3315 $(call gb_LinkTarget_set_include,$(1),\
3316 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3317 $$(INCLUDE) \
3320 $(call gb_LinkTarget_add_libs,$(1),\
3321 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.18 \
3324 $(if $(SYSTEM_BOOST), \
3325 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3326 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3329 endef
3331 define gb_LinkTarget__use_orcus-parser
3332 $(call gb_LinkTarget_use_package,$(1),liborcus)
3334 $(call gb_LinkTarget_set_include,$(1),\
3335 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3336 $$(INCLUDE) \
3339 $(call gb_LinkTarget_add_libs,$(1),\
3340 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.18 \
3343 endef
3345 endif # MSC
3347 endif # SYSTEM_LIBORCUS
3349 ifeq ($(ENABLE_EOT),TRUE)
3351 ifneq ($(SYSTEM_LIBEOT),)
3353 define gb_LinkTarget__use_libeot
3354 $(call gb_LinkTarget_set_include,$(1),\
3355 $$(INCLUDE) \
3356 $(LIBEOT_CFLAGS) \
3358 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3360 endef
3362 gb_ExternalProject__use_libeot :=
3364 else # !SYSTEM_LIBEOT
3366 define gb_LinkTarget__use_libeot
3367 $(call gb_LinkTarget_set_include,$(1),\
3368 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3369 $$(INCLUDE) \
3371 $(call gb_LinkTarget_add_libs,$(1),\
3372 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3374 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3376 endef
3378 define gb_ExternalProject__use_libeot
3379 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3381 endef
3383 endif # SYSTEM_LIBEOT
3385 else # !ENABLE_EOT
3387 gb_LinkTarget__use_libeot :=
3388 gb_ExternalProject__use_libeot :=
3390 endif # ENABLE_EOT
3392 ### X11 stuff ###
3394 ifeq ($(USING_X11), TRUE)
3396 define gb_LinkTarget__use_Xrandr
3397 $(call gb_LinkTarget_set_include,$(1),\
3398 $$(INCLUDE) \
3399 $(XRANDR_CFLAGS) \
3402 $(call gb_LinkTarget_add_libs,$(1),\
3403 $(XRANDR_LIBS) \
3405 endef
3407 define gb_LinkTarget__use_Xrender
3408 $(call gb_LinkTarget_set_include,$(1),\
3409 $$(INCLUDE) \
3410 $(XRENDER_CFLAGS) \
3413 $(call gb_LinkTarget_add_libs,$(1),\
3414 $(XRENDER_LIBS) \
3416 endef
3418 endif # USING_X11
3421 gb_ExternalProject__use_nss3:=
3424 ifneq ($(SYSTEM_NSS),)
3426 define gb_LinkTarget__use_nss3
3427 $(call gb_LinkTarget_add_defs,$(1),\
3428 -DSYSTEM_NSS \
3431 $(call gb_LinkTarget_set_include,$(1),\
3432 $$(INCLUDE) \
3433 $(NSS_CFLAGS) \
3436 $(call gb_LinkTarget_add_libs,$(1),\
3437 $(NSS_LIBS) \
3440 endef
3442 define gb_LinkTarget__use_nssutil3
3443 $(call gb_LinkTarget__use_nss3,$(1))
3445 endef
3447 define gb_LinkTarget__use_plc4
3448 $(call gb_LinkTarget__use_nss3,$(1))
3450 endef
3452 define gb_LinkTarget__use_ssl3
3453 $(call gb_LinkTarget__use_nss3,$(1))
3455 endef
3457 else # !SYSTEM_NSS
3459 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3460 nss \
3463 define gb_LinkTarget__use_nss3
3464 $(call gb_LinkTarget_use_package,$(1),nss)
3465 $(call gb_LinkTarget_set_include,$(1),\
3466 $$(INCLUDE) \
3467 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3468 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3471 ifeq ($(COM),MSC)
3472 $(call gb_LinkTarget_add_libs,$(1),\
3473 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3474 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3475 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3477 else
3478 $(call gb_LinkTarget_add_libs,$(1),\
3479 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3480 -lnspr4 \
3481 -lnss3 \
3482 -lsmime3 \
3484 endif
3486 endef
3488 define gb_LinkTarget__use_plc4
3489 $(call gb_LinkTarget_use_package,$(1),nss)
3490 ifeq ($(COM),MSC)
3491 $(call gb_LinkTarget_add_libs,$(1),\
3492 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3494 else
3495 $(call gb_LinkTarget_add_libs,$(1),\
3496 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3498 endif
3500 endef
3502 define gb_LinkTarget__use_ssl3
3503 $(call gb_LinkTarget_use_package,$(1),nss)
3504 ifeq ($(COM),MSC)
3505 $(call gb_LinkTarget_add_libs,$(1),\
3506 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3508 else
3509 $(call gb_LinkTarget_add_libs,$(1),\
3510 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3512 endif
3514 endef
3516 define gb_LinkTarget__use_nssutil3
3517 $(call gb_LinkTarget_use_package,$(1),nss)
3518 $(call gb_LinkTarget_set_include,$(1),\
3519 $$(INCLUDE) \
3520 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3521 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3524 ifeq ($(COM),MSC)
3525 $(call gb_LinkTarget_add_libs,$(1),\
3526 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3528 else
3529 $(call gb_LinkTarget_add_libs,$(1),\
3530 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3531 -lnssutil3 \
3533 endif
3535 endef
3537 define gb_ExternalProject__use_nss3
3538 $(call gb_ExternalProject_use_package,$(1),nss)
3540 endef
3542 endif # SYSTEM_NSS
3544 ifeq ($(ENABLE_BREAKPAD),TRUE)
3546 define gb_LinkTarget__use_breakpad
3547 $(call gb_LinkTarget_set_include,$(1),\
3548 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3549 $$(INCLUDE) \
3552 ifeq ($(COM),MSC)
3553 $(call gb_LinkTarget_use_static_libraries,$(1),\
3554 breakpad \
3556 else
3557 $(call gb_LinkTarget_add_libs,$(1),\
3558 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3560 endif
3562 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3564 endef
3566 endif # ENABLE_BREAKPAD
3568 ifeq ($(ENABLE_GPGMEPP),TRUE)
3570 ifneq ($(SYSTEM_GPGMEPP),)
3572 gb_ExternalProject__use_gpgmepp:=
3573 gb_ExternalProject__use_libassuan:=
3574 gb_ExternalProject__use_libgpg-error:=
3576 define gb_LinkTarget__use_gpgmepp
3577 $(call gb_LinkTarget_set_include,$(1),\
3578 $$(INCLUDE) \
3579 $$(GPGMEPP_CFLAGS) \
3582 $(call gb_LinkTarget_add_libs,$(1),\
3583 $(GPGMEPP_LIBS) \
3586 endef
3588 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3590 define gb_ExternalProject__use_gpgmepp
3591 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3593 endef
3594 define gb_ExternalProject__use_libassuan
3595 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3597 endef
3598 define gb_ExternalProject__use_libgpg-error
3599 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3601 endef
3603 ifneq ($(filter WNT,$(OS)),)
3605 define gb_LinkTarget__use_libgpg-error
3606 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3608 $(call gb_LinkTarget_set_include,$(1),\
3609 $(GPG_ERROR_CFLAGS) \
3610 $$(INCLUDE) \
3612 $(call gb_LinkTarget_add_libs,$(1),\
3613 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3616 endef
3618 define gb_LinkTarget__use_libassuan
3619 $(call gb_LinkTarget_use_package,$(1),libassuan)
3621 $(call gb_LinkTarget_set_include,$(1),\
3622 $(LIBASSUAN_CFLAGS) \
3623 $$(INCLUDE) \
3625 $(call gb_LinkTarget_add_libs,$(1),\
3626 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3629 endef
3631 define gb_LinkTarget__use_gpgmepp
3632 $(call gb_LinkTarget_set_include,$(1),\
3633 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3634 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3635 $$(GPG_ERROR_CFLAGS) \
3636 $$(INCLUDE) \
3638 $(call gb_LinkTarget_use_libraries,$(1),\
3639 gpgmepp \
3642 endef
3644 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3645 gpgmepp \
3646 libassuan \
3647 libgpg-error \
3650 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3651 gpgmepp \
3654 endif
3656 ifneq ($(filter MACOSX LINUX,$(OS)),)
3658 define gb_LinkTarget__use_gpgmepp
3659 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3661 $(call gb_LinkTarget_set_include,$(1),\
3662 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3663 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3664 $$(GPG_ERROR_CFLAGS) \
3665 $$(INCLUDE) \
3667 $(call gb_LinkTarget_add_libs,$(1),\
3668 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3669 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3670 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3671 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3674 endef
3676 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3677 gpgmepp \
3678 libassuan \
3679 libgpg-error \
3682 endif
3684 endif
3686 else # !ENABLE_GPGMEPP
3688 gb_ExternalProject__use_gpgmepp :=
3689 gb_ExternalProject__use_libassuan :=
3690 gb_ExternalProject__use_libgpg-error :=
3692 gb_LinkTarget__use_gpgmepp :=
3693 gb_LinkTarget__use_libassuan :=
3694 gb_LinkTarget__use_libgpg-error :=
3696 endif # ENABLE_GPGMEPP
3698 define gb_LinkTarget__use_dconf
3699 $(call gb_LinkTarget_set_include,$(1),\
3700 $$(INCLUDE) \
3701 $(DCONF_CFLAGS) \
3704 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3705 endef
3707 ### Jars ############################################################
3709 ifneq ($(SYSTEM_HSQLDB),)
3711 define gb_Jar__use_hsqldb
3712 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3713 endef
3714 define gb_JunitTest__use_hsqldb
3715 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3716 endef
3718 else # !SYSTEM_HSQLDB
3720 ifeq ($(ENABLE_JAVA),TRUE)
3721 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3722 hsqldb \
3724 endif
3726 define gb_Jar__use_hsqldb
3727 $(call gb_Jar_use_jar,$(1),hsqldb)
3728 endef
3729 define gb_JunitTest__use_hsqldb
3730 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3731 endef
3733 endif # SYSTEM_HSQLDB
3736 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3738 ifneq ($(SYSTEM_BSH),)
3740 define gb_Jar__use_bsh
3741 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3742 endef
3744 else # !SYSTEM_BSH
3746 ifeq ($(ENABLE_JAVA),TRUE)
3747 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3748 bsh \
3750 endif
3752 define gb_Jar__use_bsh
3753 $(call gb_Jar_use_jar,$(1),bsh)
3754 endef
3756 endif # SYSTEM_BSH
3758 endif
3760 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3762 ifneq ($(SYSTEM_RHINO),)
3764 define gb_Jar__use_rhino
3765 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3766 endef
3768 else # !SYSTEM_RHINO
3770 ifeq ($(ENABLE_JAVA),TRUE)
3771 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3772 js \
3774 endif
3776 define gb_Jar__use_rhino
3777 $(call gb_Jar_use_jar,$(1),js)
3778 endef
3780 endif # SYSTEM_RHINO
3782 endif
3784 ifneq ($(SYSTEM_JFREEREPORT),)
3786 define gb_Jar__use_flow-engine
3787 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3788 endef
3790 define gb_Jar__use_flute
3791 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3792 endef
3794 define gb_Jar__use_libbase
3795 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3796 endef
3798 define gb_Jar__use_libfonts
3799 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3800 endef
3802 define gb_Jar__use_libformula
3803 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3804 endef
3806 define gb_Jar__use_liblayout
3807 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3808 endef
3810 define gb_Jar__use_libloader
3811 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3812 endef
3814 define gb_Jar__use_librepository
3815 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3816 endef
3818 define gb_Jar__use_libserializer
3819 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3820 endef
3822 define gb_Jar__use_libxml
3823 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3824 endef
3826 define gb_Jar__use_sac
3827 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3828 endef
3830 else # !SYSTEM_JFREEREPORT
3832 ifeq ($(ENABLE_JAVA),TRUE)
3833 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3834 flow-engine \
3835 flute-1.1.6 \
3836 libbase-1.1.6 \
3837 libfonts-1.1.6 \
3838 libformula-1.1.7 \
3839 liblayout \
3840 libloader-1.1.6 \
3841 librepository-1.1.6 \
3842 libserializer-1.1.6 \
3843 libxml-1.1.7 \
3844 sac \
3846 endif
3848 define gb_Jar__use_flow-engine
3849 $(call gb_Jar_use_jar,$(1),flow-engine)
3850 endef
3852 define gb_Jar__use_flute
3853 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3854 endef
3856 define gb_Jar__use_libbase
3857 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3858 endef
3860 define gb_Jar__use_libfonts
3861 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3862 endef
3864 define gb_Jar__use_libformula
3865 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3866 endef
3868 define gb_Jar__use_liblayout
3869 $(call gb_Jar_use_jar,$(1),liblayout)
3870 endef
3872 define gb_Jar__use_libloader
3873 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3874 endef
3876 define gb_Jar__use_librepository
3877 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3878 endef
3880 define gb_Jar__use_libserializer
3881 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3882 endef
3884 define gb_Jar__use_libxml
3885 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3886 endef
3888 define gb_Jar__use_sac
3889 $(call gb_Jar_use_jar,$(1),sac)
3890 endef
3892 endif # SYSTEM_JFREEREPORT
3895 # Executables
3897 define gb_Executable__register_bestreversemap
3898 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3899 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3901 endef
3903 # TODO depending on the whole URE might be overkill, but I do not have a
3904 # Windows machine to debug it...
3905 define gb_Executable__register_climaker
3906 $(call gb_Executable_add_runtime_dependencies,climaker,\
3907 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3908 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3909 $(call gb_UnoApi_get_target_for_build,udkapi) \
3910 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3912 endef
3914 define gb_Executable__register_cppumaker
3915 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3916 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3918 endef
3920 # This is used to determine what we need for 'build' platform.
3921 define gb_Executable__register_gengal
3922 $(call gb_Executable_add_runtime_dependencies,gengal,\
3923 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3924 $(call gb_Library_get_target_for_build,localedata_en) \
3925 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3926 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3927 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3928 $(call gb_Package_get_target_for_build,postprocess_registry) \
3929 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3930 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3931 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3932 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3933 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3934 $(call gb_UnoApi_get_target_for_build,offapi) \
3935 $(call gb_UnoApi_get_target_for_build,udkapi) \
3937 endef
3939 ifeq ($(SYSTEM_ICU),)
3941 define gb_Executable__register_gendict
3942 $(call gb_Executable_add_runtime_dependencies,gendict,\
3943 $(call gb_Package_get_target_for_build,icu) \
3944 $(call gb_Package_get_target_for_build,icu_ure) \
3946 endef
3948 endif
3950 define gb_Executable__register_localize
3951 $(call gb_Executable_add_runtime_dependencies,localize,\
3952 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3953 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3956 endef
3958 # FIXME ure/services.rdb needs cleanup
3959 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3960 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3961 define gb_Executable__register_saxparser
3962 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3963 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3964 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3965 $(call gb_Rdb_get_target_for_build,saxparser) \
3966 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3967 $(call gb_UnoApi_get_target_for_build,udkapi) \
3969 endef
3971 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3972 # required due to the settings for URE_SERVICES and URE_TYPES in
3973 # cppuhelper/source/unorc
3974 define gb_Executable__register_uno
3975 $(call gb_Executable_add_runtime_dependencies,uno,\
3976 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3977 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3978 $(call gb_UnoApi_get_target_for_build,udkapi) \
3980 endef
3983 # External executables
3985 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3987 gb_ExternalExecutable__register_xmllint :=
3989 else # ! SYSTEM_LIBXML_FOR_BUILD
3991 define gb_ExternalExecutable__register_xmllint
3992 $(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)
3993 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3994 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3995 $(call gb_Package_get_target,libxml2) \
3998 endef
4000 endif # SYSTEM_LIBXML_FOR_BUILD
4002 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4004 gb_ExternalExecutable__register_xsltproc :=
4006 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4008 define gb_ExternalExecutable__register_xsltproc
4009 $(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)
4010 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4011 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4012 $(call gb_Package_get_target,libxml2) \
4013 $(call gb_Package_get_target,libxslt) \
4016 endef
4018 endif # SYSTEM_LIBXSLT_FOR_BUILD
4020 ifeq (,$(PYTHON_FOR_BUILD))
4022 define gb_ExternalExecutable__register_python
4023 ifeq ($(OS),MACOSX)
4025 # use set_external, to avoid having the command added as prerequisite for the
4026 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4027 # matching rule to build that specific file)
4028 $(call gb_ExternalExecutable_set_external,python,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR))
4029 # the Zip ensures that internal python has been built (cannot use the Package
4030 # target, as that is not used on Mac)
4031 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4033 else
4035 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4036 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4037 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4039 endif
4041 endef
4043 else
4045 define gb_ExternalExecutable__register_python
4046 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4048 endef
4050 endif # PYTHON_FOR_BUILD
4052 ifneq ($(SYSTEM_GENBRK),)
4054 define gb_ExternalExecutable__register_genbrk
4055 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4057 endef
4059 else # ! SYSTEM_GENBRK
4061 define gb_ExternalExecutable__register_genbrk
4062 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4063 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4064 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4065 $(call gb_Package_get_target_for_build,icu) \
4066 $(call gb_Package_get_target_for_build,icu_ure) \
4069 endef
4071 endif
4073 ifneq ($(SYSTEM_GENCCODE),)
4075 define gb_ExternalExecutable__register_genccode
4076 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4078 endef
4080 else # ! SYSTEM_GENCCODE
4082 define gb_ExternalExecutable__register_genccode
4083 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4084 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4085 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4086 $(call gb_Package_get_target_for_build,icu) \
4087 $(call gb_Package_get_target_for_build,icu_ure) \
4090 endef
4092 endif
4094 ifneq ($(SYSTEM_GENCMN),)
4096 define gb_ExternalExecutable__register_gencmn
4097 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4099 endef
4101 else # ! SYSTEM_GENCMN
4103 define gb_ExternalExecutable__register_gencmn
4104 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4105 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4106 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4107 $(call gb_Package_get_target_for_build,icu) \
4108 $(call gb_Package_get_target_for_build,icu_ure) \
4111 endef
4113 endif
4115 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4116 ifneq ($(SYSTEM_BZIP2),)
4118 define gb_LinkTarget__use_bzip2
4119 $(call gb_LinkTarget_set_include,$(1),\
4120 $(BZIP2_CFLAGS) \
4121 $$(INCLUDE) \
4123 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4125 endef
4127 gb_ExternalProject__use_bzip2 :=
4129 else # !SYSTEM_BZIP2
4131 define gb_LinkTarget__use_bzip2
4132 $(call gb_LinkTarget_set_include,$(1),\
4133 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4134 $$(INCLUDE) \
4137 ifeq ($(COM),MSC)
4138 $(call gb_LinkTarget_add_libs,$(1),\
4139 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4141 else
4142 $(call gb_LinkTarget_add_libs,$(1),\
4143 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4145 endif
4147 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4148 endef
4150 define gb_ExternalProject__use_bzip2
4151 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4152 endef
4154 endif
4155 endif
4157 define gb_LinkTarget__use_clew
4158 $(call gb_LinkTarget_set_include,$(1), \
4159 -I$(SRCDIR)/external/clew/source/include \
4160 $$(INCLUDE) \
4162 $(call gb_LinkTarget_use_libraries,$(1),clew)
4163 endef
4165 ifneq ($(ENABLE_PDFIUM),)
4166 define gb_LinkTarget__use_pdfium
4167 $(call gb_LinkTarget_set_include,$(1),\
4168 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4169 -DCOMPONENT_BUILD \
4170 $$(INCLUDE) \
4172 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4173 endef
4174 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4175 pdfium \
4177 endif
4179 ifneq ($(SYSTEM_DRAGONBOX),)
4181 define gb_LinkTarget__use_dragonbox
4182 $(call gb_LinkTarget_set_include,$(1),\
4183 $$(INCLUDE) \
4184 $$(DRAGONBOX_CFLAGS) \
4186 endef
4188 else
4190 define gb_LinkTarget__use_dragonbox
4191 $(call gb_LinkTarget_use_unpacked,$(1),dragonbox)
4192 $(call gb_LinkTarget_set_include,$(1),\
4193 -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\
4194 $$(INCLUDE) \
4196 endef
4198 endif
4200 define gb_LinkTarget__use_dtoa
4201 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4202 $(call gb_LinkTarget_set_include,$(1),\
4203 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4204 $$(INCLUDE) \
4206 $(call gb_LinkTarget_use_static_libraries,$(1),\
4207 dtoa \
4210 endef
4212 define gb_ExternalProject__use_dtoa
4213 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4215 endef
4217 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4218 $(if $(UCRT_REDISTDIR),ucrt) \
4221 ifneq ($(SYSTEM_BOX2D),)
4223 define gb_LinkTarget__use_box2d
4224 $(call gb_LinkTarget_set_include,$(1),\
4225 -DSYSTEM_BOX2D \
4226 $$(INCLUDE) \
4227 $(BOX2D_CFLAGS) \
4229 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4231 endef
4233 gb_ExternalProject__use_box2d :=
4235 else # !SYSTEM_BOX2D
4237 define gb_LinkTarget__use_box2d
4238 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4239 $(call gb_LinkTarget_set_include,$(1),\
4240 -I$(call gb_UnpackedTarball_get_dir,box2d/include/)\
4241 $$(INCLUDE) \
4243 $(call gb_LinkTarget_use_static_libraries,$(1),\
4244 box2d \
4247 endef
4249 define gb_ExternalProject__use_box2d
4250 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4252 endef
4254 endif # SYSTEM_BOX2D
4256 ifneq ($(SYSTEM_ZXING),)
4258 define gb_LinkTarget__use_zxing
4259 $(call gb_LinkTarget_set_include,$(1),\
4260 -DSYSTEM_ZXING \
4261 $$(INCLUDE) \
4262 $(ZXING_CFLAGS) \
4264 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4266 endef
4268 gb_ExternalProject__use_zxing :=
4270 else # !SYSTEM_ZXING
4272 ifneq ($(ENABLE_ZXING),)
4274 define gb_LinkTarget__use_zxing
4275 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4276 $(call gb_LinkTarget_set_include,$(1),\
4277 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4278 $$(INCLUDE) \
4280 $(call gb_LinkTarget_use_static_libraries,$(1),\
4281 zxing \
4284 endef
4286 define gb_ExternalProject__use_zxing
4287 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4289 endef
4291 else # !ENABLE_ZXING
4293 define gb_LinkTarget__use_zxing
4294 endef
4296 endif # ENABLE_ZXING
4298 endif # SYSTEM_ZXING
4300 # vim: set noet sw=4 ts=4: