Fix typo
[LibreOffice.git] / RepositoryExternal.mk
bloba7f6dc3897ecb1a3726884e3e03c0c705d2a97f1
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
3120 ifneq (,$(filter TRUE,$(ENABLE_KF6)))
3122 define gb_LinkTarget__use_kf6
3123 $(call gb_LinkTarget_set_include,$(1),\
3124 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF6_CFLAGS)))) \
3125 $$(INCLUDE) \
3128 $(call gb_LinkTarget_add_cxxflags,$(1),\
3129 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF6_CFLAGS))) \
3132 $(call gb_LinkTarget_add_libs,$(1),\
3133 $(KF6_LIBS) \
3136 endef
3138 else # !ENABLE_KF6
3140 define gb_LinkTarget__use_kf6
3142 endef
3144 endif # ENABLE_KF6
3146 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3148 define gb_LinkTarget__use_qt5
3149 $(call gb_LinkTarget_set_include,$(1),\
3150 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3151 $$(INCLUDE) \
3154 $(call gb_LinkTarget_add_defs,$(1),\
3155 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3158 $(call gb_LinkTarget_add_libs,$(1),\
3159 $(QT5_LIBS) \
3162 endef
3164 else # !ENABLE_QT5
3166 define gb_LinkTarget__use_qt5
3168 endef
3170 endif # ENABLE_QT5
3172 ifeq ($(ENABLE_QT6),TRUE)
3174 define gb_LinkTarget__use_qt6
3175 $(call gb_LinkTarget_set_include,$(1),\
3176 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3177 $$(INCLUDE) \
3180 $(call gb_LinkTarget_add_defs,$(1),\
3181 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3184 $(call gb_LinkTarget_add_libs,$(1),\
3185 $(QT6_LIBS) \
3188 endef
3190 else # !ENABLE_QT6
3192 define gb_LinkTarget__use_qt6
3194 endef
3196 endif # ENABLE_QT6
3199 # PYTHON
3200 # extra python_headers external because pyuno wrapper must not link python
3201 ifneq ($(SYSTEM_PYTHON),)
3203 define gb_LinkTarget__use_python_headers
3204 $(call gb_LinkTarget_add_defs,$(1),\
3205 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3208 $(call gb_LinkTarget_set_include,$(1),\
3209 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3210 $$(INCLUDE) \
3213 endef
3215 define gb_LinkTarget__use_python
3216 $(call gb_LinkTarget__use_python_headers,$(1))
3218 $(call gb_LinkTarget_add_libs,$(1),\
3219 $(PYTHON_LIBS) \
3222 endef
3224 else # !SYSTEM_PYTHON
3226 $(eval $(call gb_Helper_register_packages_for_install,python,\
3227 python3 \
3228 $(if $(filter WNT,$(OS)),libffi) \
3231 define gb_LinkTarget__use_python_headers
3232 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3233 $(call gb_LinkTarget_set_include,$(1),\
3234 -I$(call gb_UnpackedTarball_get_dir,python3) \
3235 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3236 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3237 $$(INCLUDE) \
3240 endef
3242 define gb_LinkTarget__use_python
3243 $(call gb_LinkTarget__use_python_headers,$(1))
3244 ifeq ($(OS),MACOSX)
3245 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3246 else
3247 $(call gb_LinkTarget_use_package,$(1),python3)
3248 endif
3250 ifeq ($(OS),WNT)
3251 ifeq ($(CPUNAME),X86_64)
3252 python_arch_subdir=amd64/
3253 else ifeq ($(CPUNAME),AARCH64)
3254 python_arch_subdir=arm64/
3255 else
3256 python_arch_subdir=win32/
3257 endif
3258 $(call gb_LinkTarget_add_libs,$(1),\
3259 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3261 else ifeq ($(OS),MACOSX)
3262 $(call gb_LinkTarget_add_libs,$(1),\
3263 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3265 else
3266 $(call gb_LinkTarget_add_libs,$(1),\
3267 -L$(call gb_UnpackedTarball_get_dir,python3) \
3268 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3270 endif
3272 endef
3274 # this is only used by python currently
3275 define gb_ExternalProject__use_libffi
3276 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3278 endef
3280 endif # SYSTEM_PYTHON
3282 # ORCUS
3283 ifneq ($(SYSTEM_LIBORCUS),)
3285 define gb_LinkTarget__use_orcus
3286 $(call gb_LinkTarget_set_include,$(1),\
3287 $$(INCLUDE) \
3288 $(ORCUS_CFLAGS) \
3290 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3291 endef
3293 define gb_LinkTarget__use_orcus-parser
3295 endef
3297 else # !SYSTEM_LIBORCUS
3299 ifeq ($(COM),MSC)
3301 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3302 orcus \
3303 orcus-parser \
3306 define gb_LinkTarget__use_orcus
3307 $(call gb_LinkTarget_set_include,$(1),\
3308 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3309 $$(INCLUDE) \
3312 $(call gb_LinkTarget_use_libraries,$(1),\
3313 orcus \
3316 endef
3318 define gb_LinkTarget__use_orcus-parser
3319 $(call gb_LinkTarget_set_include,$(1),\
3320 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3321 $$(INCLUDE) \
3324 $(call gb_LinkTarget_use_libraries,$(1),\
3325 orcus-parser \
3328 endef
3330 else # !MSC
3332 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3333 liborcus \
3336 define gb_LinkTarget__use_orcus
3337 $(call gb_LinkTarget_use_package,$(1),liborcus)
3339 $(call gb_LinkTarget_set_include,$(1),\
3340 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3341 $$(INCLUDE) \
3344 $(call gb_LinkTarget_add_libs,$(1),\
3345 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.18 \
3348 $(if $(SYSTEM_BOOST), \
3349 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3350 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3353 endef
3355 define gb_LinkTarget__use_orcus-parser
3356 $(call gb_LinkTarget_use_package,$(1),liborcus)
3358 $(call gb_LinkTarget_set_include,$(1),\
3359 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3360 $$(INCLUDE) \
3363 $(call gb_LinkTarget_add_libs,$(1),\
3364 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.18 \
3367 endef
3369 endif # MSC
3371 endif # SYSTEM_LIBORCUS
3373 ifeq ($(ENABLE_EOT),TRUE)
3375 ifneq ($(SYSTEM_LIBEOT),)
3377 define gb_LinkTarget__use_libeot
3378 $(call gb_LinkTarget_set_include,$(1),\
3379 $$(INCLUDE) \
3380 $(LIBEOT_CFLAGS) \
3382 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3384 endef
3386 gb_ExternalProject__use_libeot :=
3388 else # !SYSTEM_LIBEOT
3390 define gb_LinkTarget__use_libeot
3391 $(call gb_LinkTarget_set_include,$(1),\
3392 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3393 $$(INCLUDE) \
3395 $(call gb_LinkTarget_add_libs,$(1),\
3396 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3398 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3400 endef
3402 define gb_ExternalProject__use_libeot
3403 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3405 endef
3407 endif # SYSTEM_LIBEOT
3409 else # !ENABLE_EOT
3411 gb_LinkTarget__use_libeot :=
3412 gb_ExternalProject__use_libeot :=
3414 endif # ENABLE_EOT
3416 ### X11 stuff ###
3418 ifeq ($(USING_X11), TRUE)
3420 define gb_LinkTarget__use_Xrandr
3421 $(call gb_LinkTarget_set_include,$(1),\
3422 $$(INCLUDE) \
3423 $(XRANDR_CFLAGS) \
3426 $(call gb_LinkTarget_add_libs,$(1),\
3427 $(XRANDR_LIBS) \
3429 endef
3431 define gb_LinkTarget__use_Xrender
3432 $(call gb_LinkTarget_set_include,$(1),\
3433 $$(INCLUDE) \
3434 $(XRENDER_CFLAGS) \
3437 $(call gb_LinkTarget_add_libs,$(1),\
3438 $(XRENDER_LIBS) \
3440 endef
3442 endif # USING_X11
3445 gb_ExternalProject__use_nss3:=
3448 ifneq ($(SYSTEM_NSS),)
3450 define gb_LinkTarget__use_nss3
3451 $(call gb_LinkTarget_add_defs,$(1),\
3452 -DSYSTEM_NSS \
3455 $(call gb_LinkTarget_set_include,$(1),\
3456 $$(INCLUDE) \
3457 $(NSS_CFLAGS) \
3460 $(call gb_LinkTarget_add_libs,$(1),\
3461 $(NSS_LIBS) \
3464 endef
3466 define gb_LinkTarget__use_nssutil3
3467 $(call gb_LinkTarget__use_nss3,$(1))
3469 endef
3471 define gb_LinkTarget__use_plc4
3472 $(call gb_LinkTarget__use_nss3,$(1))
3474 endef
3476 define gb_LinkTarget__use_ssl3
3477 $(call gb_LinkTarget__use_nss3,$(1))
3479 endef
3481 else # !SYSTEM_NSS
3483 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3484 nss \
3487 define gb_LinkTarget__use_nss3
3488 $(call gb_LinkTarget_use_package,$(1),nss)
3489 $(call gb_LinkTarget_set_include,$(1),\
3490 $$(INCLUDE) \
3491 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3492 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3495 ifeq ($(COM),MSC)
3496 $(call gb_LinkTarget_add_libs,$(1),\
3497 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3498 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3499 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3501 else
3502 $(call gb_LinkTarget_add_libs,$(1),\
3503 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3504 -lnspr4 \
3505 -lnss3 \
3506 -lsmime3 \
3508 endif
3510 endef
3512 define gb_LinkTarget__use_plc4
3513 $(call gb_LinkTarget_use_package,$(1),nss)
3514 ifeq ($(COM),MSC)
3515 $(call gb_LinkTarget_add_libs,$(1),\
3516 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3518 else
3519 $(call gb_LinkTarget_add_libs,$(1),\
3520 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3522 endif
3524 endef
3526 define gb_LinkTarget__use_ssl3
3527 $(call gb_LinkTarget_use_package,$(1),nss)
3528 ifeq ($(COM),MSC)
3529 $(call gb_LinkTarget_add_libs,$(1),\
3530 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3532 else
3533 $(call gb_LinkTarget_add_libs,$(1),\
3534 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3536 endif
3538 endef
3540 define gb_LinkTarget__use_nssutil3
3541 $(call gb_LinkTarget_use_package,$(1),nss)
3542 $(call gb_LinkTarget_set_include,$(1),\
3543 $$(INCLUDE) \
3544 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3545 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3548 ifeq ($(COM),MSC)
3549 $(call gb_LinkTarget_add_libs,$(1),\
3550 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3552 else
3553 $(call gb_LinkTarget_add_libs,$(1),\
3554 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3555 -lnssutil3 \
3557 endif
3559 endef
3561 define gb_ExternalProject__use_nss3
3562 $(call gb_ExternalProject_use_package,$(1),nss)
3564 endef
3566 endif # SYSTEM_NSS
3568 ifeq ($(ENABLE_BREAKPAD),TRUE)
3570 define gb_LinkTarget__use_breakpad
3571 $(call gb_LinkTarget_set_include,$(1),\
3572 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3573 $$(INCLUDE) \
3576 ifeq ($(COM),MSC)
3577 $(call gb_LinkTarget_use_static_libraries,$(1),\
3578 breakpad \
3580 else
3581 $(call gb_LinkTarget_add_libs,$(1),\
3582 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3584 endif
3586 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3588 endef
3590 endif # ENABLE_BREAKPAD
3592 ifeq ($(ENABLE_GPGMEPP),TRUE)
3594 ifneq ($(SYSTEM_GPGMEPP),)
3596 gb_ExternalProject__use_gpgmepp:=
3597 gb_ExternalProject__use_libassuan:=
3598 gb_ExternalProject__use_libgpg-error:=
3600 define gb_LinkTarget__use_gpgmepp
3601 $(call gb_LinkTarget_set_include,$(1),\
3602 $$(INCLUDE) \
3603 $$(GPGMEPP_CFLAGS) \
3606 $(call gb_LinkTarget_add_libs,$(1),\
3607 $(GPGMEPP_LIBS) \
3610 endef
3612 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3614 define gb_ExternalProject__use_gpgmepp
3615 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3617 endef
3618 define gb_ExternalProject__use_libassuan
3619 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3621 endef
3622 define gb_ExternalProject__use_libgpg-error
3623 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3625 endef
3627 ifneq ($(filter WNT,$(OS)),)
3629 define gb_LinkTarget__use_libgpg-error
3630 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3632 $(call gb_LinkTarget_set_include,$(1),\
3633 $(GPG_ERROR_CFLAGS) \
3634 $$(INCLUDE) \
3636 $(call gb_LinkTarget_add_libs,$(1),\
3637 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3640 endef
3642 define gb_LinkTarget__use_libassuan
3643 $(call gb_LinkTarget_use_package,$(1),libassuan)
3645 $(call gb_LinkTarget_set_include,$(1),\
3646 $(LIBASSUAN_CFLAGS) \
3647 $$(INCLUDE) \
3649 $(call gb_LinkTarget_add_libs,$(1),\
3650 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3653 endef
3655 define gb_LinkTarget__use_gpgmepp
3656 $(call gb_LinkTarget_set_include,$(1),\
3657 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3658 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3659 $$(GPG_ERROR_CFLAGS) \
3660 $$(INCLUDE) \
3662 $(call gb_LinkTarget_use_libraries,$(1),\
3663 gpgmepp \
3666 endef
3668 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3669 gpgmepp \
3670 libassuan \
3671 libgpg-error \
3674 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3675 gpgmepp \
3678 endif
3680 ifneq ($(filter MACOSX LINUX,$(OS)),)
3682 define gb_LinkTarget__use_gpgmepp
3683 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3685 $(call gb_LinkTarget_set_include,$(1),\
3686 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3687 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3688 $$(GPG_ERROR_CFLAGS) \
3689 $$(INCLUDE) \
3691 $(call gb_LinkTarget_add_libs,$(1),\
3692 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3693 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3694 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3695 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3698 endef
3700 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3701 gpgmepp \
3702 libassuan \
3703 libgpg-error \
3706 endif
3708 endif
3710 else # !ENABLE_GPGMEPP
3712 gb_ExternalProject__use_gpgmepp :=
3713 gb_ExternalProject__use_libassuan :=
3714 gb_ExternalProject__use_libgpg-error :=
3716 gb_LinkTarget__use_gpgmepp :=
3717 gb_LinkTarget__use_libassuan :=
3718 gb_LinkTarget__use_libgpg-error :=
3720 endif # ENABLE_GPGMEPP
3722 define gb_LinkTarget__use_dconf
3723 $(call gb_LinkTarget_set_include,$(1),\
3724 $$(INCLUDE) \
3725 $(DCONF_CFLAGS) \
3728 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3729 endef
3731 ### Jars ############################################################
3733 ifneq ($(SYSTEM_HSQLDB),)
3735 define gb_Jar__use_hsqldb
3736 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3737 endef
3738 define gb_JunitTest__use_hsqldb
3739 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3740 endef
3742 else # !SYSTEM_HSQLDB
3744 ifeq ($(ENABLE_JAVA),TRUE)
3745 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3746 hsqldb \
3748 endif
3750 define gb_Jar__use_hsqldb
3751 $(call gb_Jar_use_jar,$(1),hsqldb)
3752 endef
3753 define gb_JunitTest__use_hsqldb
3754 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3755 endef
3757 endif # SYSTEM_HSQLDB
3760 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3762 ifneq ($(SYSTEM_BSH),)
3764 define gb_Jar__use_bsh
3765 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3766 endef
3768 else # !SYSTEM_BSH
3770 ifeq ($(ENABLE_JAVA),TRUE)
3771 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3772 bsh \
3774 endif
3776 define gb_Jar__use_bsh
3777 $(call gb_Jar_use_jar,$(1),bsh)
3778 endef
3780 endif # SYSTEM_BSH
3782 endif
3784 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3786 ifneq ($(SYSTEM_RHINO),)
3788 define gb_Jar__use_rhino
3789 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3790 endef
3792 else # !SYSTEM_RHINO
3794 ifeq ($(ENABLE_JAVA),TRUE)
3795 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3796 js \
3798 endif
3800 define gb_Jar__use_rhino
3801 $(call gb_Jar_use_jar,$(1),js)
3802 endef
3804 endif # SYSTEM_RHINO
3806 endif
3808 ifneq ($(SYSTEM_JFREEREPORT),)
3810 define gb_Jar__use_flow-engine
3811 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3812 endef
3814 define gb_Jar__use_flute
3815 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3816 endef
3818 define gb_Jar__use_libbase
3819 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3820 endef
3822 define gb_Jar__use_libfonts
3823 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3824 endef
3826 define gb_Jar__use_libformula
3827 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3828 endef
3830 define gb_Jar__use_liblayout
3831 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3832 endef
3834 define gb_Jar__use_libloader
3835 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3836 endef
3838 define gb_Jar__use_librepository
3839 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3840 endef
3842 define gb_Jar__use_libserializer
3843 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3844 endef
3846 define gb_Jar__use_libxml
3847 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3848 endef
3850 define gb_Jar__use_sac
3851 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3852 endef
3854 else # !SYSTEM_JFREEREPORT
3856 ifeq ($(ENABLE_JAVA),TRUE)
3857 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3858 flow-engine \
3859 flute-1.1.6 \
3860 libbase-1.1.6 \
3861 libfonts-1.1.6 \
3862 libformula-1.1.7 \
3863 liblayout \
3864 libloader-1.1.6 \
3865 librepository-1.1.6 \
3866 libserializer-1.1.6 \
3867 libxml-1.1.7 \
3868 sac \
3870 endif
3872 define gb_Jar__use_flow-engine
3873 $(call gb_Jar_use_jar,$(1),flow-engine)
3874 endef
3876 define gb_Jar__use_flute
3877 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3878 endef
3880 define gb_Jar__use_libbase
3881 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3882 endef
3884 define gb_Jar__use_libfonts
3885 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3886 endef
3888 define gb_Jar__use_libformula
3889 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3890 endef
3892 define gb_Jar__use_liblayout
3893 $(call gb_Jar_use_jar,$(1),liblayout)
3894 endef
3896 define gb_Jar__use_libloader
3897 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3898 endef
3900 define gb_Jar__use_librepository
3901 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3902 endef
3904 define gb_Jar__use_libserializer
3905 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3906 endef
3908 define gb_Jar__use_libxml
3909 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3910 endef
3912 define gb_Jar__use_sac
3913 $(call gb_Jar_use_jar,$(1),sac)
3914 endef
3916 endif # SYSTEM_JFREEREPORT
3918 # no known distro packaged Java-Websocket at present
3920 ifeq ($(ENABLE_JAVA),TRUE)
3921 $(eval $(call gb_Helper_register_jars_for_install,URE,ure, \
3922 java_websocket \
3924 endif
3926 define gb_Jar__use_java_websocket
3927 $(call gb_Jar_use_jar,$(1),java_websocket)
3928 endef
3930 # Executables
3932 define gb_Executable__register_bestreversemap
3933 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3934 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3936 endef
3938 # TODO depending on the whole URE might be overkill, but I do not have a
3939 # Windows machine to debug it...
3940 define gb_Executable__register_climaker
3941 $(call gb_Executable_add_runtime_dependencies,climaker,\
3942 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3943 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3944 $(call gb_UnoApi_get_target_for_build,udkapi) \
3945 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3947 endef
3949 define gb_Executable__register_cppumaker
3950 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3951 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3953 endef
3955 # This is used to determine what we need for 'build' platform.
3956 define gb_Executable__register_gengal
3957 $(call gb_Executable_add_runtime_dependencies,gengal,\
3958 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3959 $(call gb_Library_get_target_for_build,localedata_en) \
3960 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3961 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3962 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3963 $(call gb_Package_get_target_for_build,postprocess_registry) \
3964 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3965 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3966 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3967 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3968 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3969 $(call gb_UnoApi_get_target_for_build,offapi) \
3970 $(call gb_UnoApi_get_target_for_build,udkapi) \
3972 endef
3974 ifeq ($(SYSTEM_ICU),)
3976 define gb_Executable__register_gendict
3977 $(call gb_Executable_add_runtime_dependencies,gendict,\
3978 $(call gb_Package_get_target_for_build,icu) \
3979 $(call gb_Package_get_target_for_build,icu_ure) \
3981 endef
3983 endif
3985 define gb_Executable__register_localize
3986 $(call gb_Executable_add_runtime_dependencies,localize,\
3987 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3988 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3991 endef
3993 # FIXME ure/services.rdb needs cleanup
3994 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3995 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3996 define gb_Executable__register_saxparser
3997 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3998 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3999 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
4000 $(call gb_Rdb_get_target_for_build,saxparser) \
4001 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
4002 $(call gb_UnoApi_get_target_for_build,udkapi) \
4004 endef
4006 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
4007 # required due to the settings for URE_SERVICES and URE_TYPES in
4008 # cppuhelper/source/unorc
4009 define gb_Executable__register_uno
4010 $(call gb_Executable_add_runtime_dependencies,uno,\
4011 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4012 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4013 $(call gb_UnoApi_get_target_for_build,udkapi) \
4015 endef
4018 # External executables
4020 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4022 gb_ExternalExecutable__register_xmllint :=
4024 else # ! SYSTEM_LIBXML_FOR_BUILD
4026 define gb_ExternalExecutable__register_xmllint
4027 $(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)
4028 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4029 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4030 $(call gb_Package_get_target,libxml2) \
4033 endef
4035 endif # SYSTEM_LIBXML_FOR_BUILD
4037 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4039 gb_ExternalExecutable__register_xsltproc :=
4041 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4043 define gb_ExternalExecutable__register_xsltproc
4044 $(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)
4045 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4046 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4047 $(call gb_Package_get_target,libxml2) \
4048 $(call gb_Package_get_target,libxslt) \
4051 endef
4053 endif # SYSTEM_LIBXSLT_FOR_BUILD
4055 ifeq (,$(PYTHON_FOR_BUILD))
4057 define gb_ExternalExecutable__register_python
4058 ifeq ($(OS),MACOSX)
4060 # use set_external, to avoid having the command added as prerequisite for the
4061 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4062 # matching rule to build that specific file)
4063 $(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))
4064 # the Zip ensures that internal python has been built (cannot use the Package
4065 # target, as that is not used on Mac)
4066 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4068 else
4070 $(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))
4071 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4072 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4074 endif
4076 endef
4078 else
4080 define gb_ExternalExecutable__register_python
4081 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4083 endef
4085 endif # PYTHON_FOR_BUILD
4087 ifneq ($(SYSTEM_GENBRK),)
4089 define gb_ExternalExecutable__register_genbrk
4090 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4092 endef
4094 else # ! SYSTEM_GENBRK
4096 define gb_ExternalExecutable__register_genbrk
4097 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4098 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4099 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4100 $(call gb_Package_get_target_for_build,icu) \
4101 $(call gb_Package_get_target_for_build,icu_ure) \
4104 endef
4106 endif
4108 ifneq ($(SYSTEM_GENCCODE),)
4110 define gb_ExternalExecutable__register_genccode
4111 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4113 endef
4115 else # ! SYSTEM_GENCCODE
4117 define gb_ExternalExecutable__register_genccode
4118 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4119 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4120 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4121 $(call gb_Package_get_target_for_build,icu) \
4122 $(call gb_Package_get_target_for_build,icu_ure) \
4125 endef
4127 endif
4129 ifneq ($(SYSTEM_GENCMN),)
4131 define gb_ExternalExecutable__register_gencmn
4132 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4134 endef
4136 else # ! SYSTEM_GENCMN
4138 define gb_ExternalExecutable__register_gencmn
4139 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4140 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4141 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4142 $(call gb_Package_get_target_for_build,icu) \
4143 $(call gb_Package_get_target_for_build,icu_ure) \
4146 endef
4148 endif
4150 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4151 ifneq ($(SYSTEM_BZIP2),)
4153 define gb_LinkTarget__use_bzip2
4154 $(call gb_LinkTarget_set_include,$(1),\
4155 $(BZIP2_CFLAGS) \
4156 $$(INCLUDE) \
4158 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4160 endef
4162 gb_ExternalProject__use_bzip2 :=
4164 else # !SYSTEM_BZIP2
4166 define gb_LinkTarget__use_bzip2
4167 $(call gb_LinkTarget_set_include,$(1),\
4168 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4169 $$(INCLUDE) \
4172 ifeq ($(COM),MSC)
4173 $(call gb_LinkTarget_add_libs,$(1),\
4174 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4176 else
4177 $(call gb_LinkTarget_add_libs,$(1),\
4178 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4180 endif
4182 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4183 endef
4185 define gb_ExternalProject__use_bzip2
4186 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4187 endef
4189 endif
4190 endif
4192 define gb_LinkTarget__use_clew
4193 $(call gb_LinkTarget_set_include,$(1), \
4194 -I$(SRCDIR)/external/clew/source/include \
4195 $$(INCLUDE) \
4197 $(call gb_LinkTarget_use_libraries,$(1),clew)
4198 endef
4200 ifneq ($(ENABLE_PDFIUM),)
4201 define gb_LinkTarget__use_pdfium
4202 $(call gb_LinkTarget_set_include,$(1),\
4203 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4204 -DCOMPONENT_BUILD \
4205 $$(INCLUDE) \
4207 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4208 endef
4209 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4210 pdfium \
4212 endif
4214 ifneq ($(SYSTEM_DRAGONBOX),)
4216 define gb_LinkTarget__use_dragonbox
4217 $(call gb_LinkTarget_set_include,$(1),\
4218 $$(INCLUDE) \
4219 $$(DRAGONBOX_CFLAGS) \
4221 endef
4223 else
4225 define gb_LinkTarget__use_dragonbox
4226 $(call gb_LinkTarget_use_unpacked,$(1),dragonbox)
4227 $(call gb_LinkTarget_set_include,$(1),\
4228 -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\
4229 $$(INCLUDE) \
4231 endef
4233 endif
4235 define gb_LinkTarget__use_dtoa
4236 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4237 $(call gb_LinkTarget_set_include,$(1),\
4238 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4239 $$(INCLUDE) \
4241 $(call gb_LinkTarget_use_static_libraries,$(1),\
4242 dtoa \
4245 endef
4247 define gb_ExternalProject__use_dtoa
4248 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4250 endef
4252 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4253 $(if $(UCRT_REDISTDIR),ucrt) \
4256 ifneq ($(SYSTEM_BOX2D),)
4258 define gb_LinkTarget__use_box2d
4259 $(call gb_LinkTarget_set_include,$(1),\
4260 -DSYSTEM_BOX2D \
4261 $$(INCLUDE) \
4262 $(BOX2D_CFLAGS) \
4264 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4266 endef
4268 gb_ExternalProject__use_box2d :=
4270 else # !SYSTEM_BOX2D
4272 define gb_LinkTarget__use_box2d
4273 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4274 $(call gb_LinkTarget_set_include,$(1),\
4275 -I$(call gb_UnpackedTarball_get_dir,box2d/include/)\
4276 $$(INCLUDE) \
4278 $(call gb_LinkTarget_use_static_libraries,$(1),\
4279 box2d \
4282 endef
4284 define gb_ExternalProject__use_box2d
4285 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4287 endef
4289 endif # SYSTEM_BOX2D
4291 ifneq ($(SYSTEM_ZXING),)
4293 define gb_LinkTarget__use_zxing
4294 $(call gb_LinkTarget_set_include,$(1),\
4295 -DSYSTEM_ZXING \
4296 $$(INCLUDE) \
4297 $(ZXING_CFLAGS) \
4299 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4301 endef
4303 gb_ExternalProject__use_zxing :=
4305 else # !SYSTEM_ZXING
4307 ifneq ($(ENABLE_ZXING),)
4309 define gb_LinkTarget__use_zxing
4310 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4311 $(call gb_LinkTarget_set_include,$(1),\
4312 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4313 $$(INCLUDE) \
4315 $(call gb_LinkTarget_use_static_libraries,$(1),\
4316 zxing \
4319 endef
4321 define gb_ExternalProject__use_zxing
4322 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4324 endef
4326 else # !ENABLE_ZXING
4328 define gb_LinkTarget__use_zxing
4329 endef
4331 endif # ENABLE_ZXING
4333 endif # SYSTEM_ZXING
4336 ifneq ($(SYSTEM_FROZEN),)
4337 define gb_LinkTarget__use_frozen
4338 $(call gb_LinkTarget_set_include,$(1),\
4339 $$(INCLUDE) \
4340 $(FROZEN_CFLAGS)
4342 endef
4343 else
4344 define gb_LinkTarget__use_frozen
4345 $(call gb_LinkTarget_use_unpacked,$(1),frozen)
4346 $(call gb_LinkTarget_set_include,$(1),\
4347 -I$(call gb_UnpackedTarball_get_dir,frozen/include/)\
4348 $$(INCLUDE) \
4350 endef
4351 endif
4353 # vim: set noet sw=4 ts=4: