Remove duplicated include
[LibreOffice.git] / RepositoryExternal.mk
blob60499758de40dd9be0139a4fa6008ad3e717f766
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 \
315 bcrypt \
318 endef
319 define gb_ExternalProject__use_mariadb-connector-c
320 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
322 endef
324 endif # SYSTEM_MARIADB_CONNECTOR_C
327 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
329 define gb_LinkTarget__use_mysql
331 $(call gb_LinkTarget_add_defs,$(1),\
332 -DSYSTEM_MARIADB \
335 $(call gb_LinkTarget_add_libs,$(1),\
336 $(MARIADB_LIBS) \
339 $(call gb_LinkTarget_set_include,$(1),\
340 $(MARIADB_CFLAGS) \
341 $$(INCLUDE) \
343 endef
345 else
347 define gb_LinkTarget__use_mysql
349 $(call gb_LinkTarget_set_include,$(1),\
350 $$(INCLUDE) \
353 endef
355 endif
357 ifneq ($(SYSTEM_ZLIB),)
359 define gb_LinkTarget__use_zlib
360 $(call gb_LinkTarget_add_defs,$(1),\
361 -DSYSTEM_ZLIB \
362 -DZLIB_CONST \
364 $(call gb_LinkTarget_add_libs,$(1),-lz)
366 endef
368 # nothing on system
369 define gb_LinkTarget__use_zlib_x64
371 endef
373 gb_ExternalProject__use_zlib :=
375 else # !SYSTEM_ZLIB
377 define gb_LinkTarget__use_zlib_multiarch
378 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
380 $(call gb_LinkTarget_add_defs,$(1), \
381 -DZLIB_CONST \
384 $(call gb_LinkTarget_set_include,$(1),\
385 $(ZLIB_CFLAGS) \
386 $$(INCLUDE) \
389 $(call gb_LinkTarget_use_static_libraries,$(1),\
390 $(2) \
393 endef
395 define gb_LinkTarget__use_zlib
396 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
398 endef
400 define gb_LinkTarget__use_zlib_x64
401 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
403 endef
405 define gb_ExternalProject__use_zlib
406 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
408 endef
410 endif # SYSTEM_ZLIB
413 ifneq ($(SYSTEM_LIBJPEG),)
415 define gb_LinkTarget__use_libjpeg
416 $(call gb_LinkTarget_set_include,$(1),\
417 $$(INCLUDE) \
418 $(LIBJPEG_CFLAGS) \
420 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
421 $(call gb_LinkTarget_set_ldflags,$(1),\
422 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
425 endef
427 gb_ExternalProject__use_libjpeg :=
429 else
431 define gb_LinkTarget__use_libjpeg
432 $(call gb_LinkTarget_set_include,$(1),\
433 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
434 $$(INCLUDE) \
436 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
438 endef
440 define gb_ExternalProject__use_libjpeg
441 $(call gb_ExternalProject_use_static_libraries,$(1),libjpeg-turbo)
443 endef
445 endif # SYSTEM_LIBJPEG
447 ifneq ($(SYSTEM_MYTHES),)
449 define gb_LinkTarget__use_mythes
450 $(call gb_LinkTarget_set_include,$(1),\
451 $$(INCLUDE) \
452 $(MYTHES_CFLAGS) \
454 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
456 endef
458 else # !SYSTEM_MYTHES
460 define gb_LinkTarget__use_mythes
461 $(call gb_LinkTarget_set_include,$(1),\
462 -I$(call gb_UnpackedTarball_get_dir,mythes) \
463 $$(INCLUDE) \
466 ifeq ($(COM),MSC)
467 $(call gb_LinkTarget_use_static_libraries,$(1),\
468 mythes \
470 else
471 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
472 $(call gb_LinkTarget_use_external_project,$(1),mythes)
473 endif
475 endef
477 endif # SYSTEM_MYTHES
480 ifneq ($(SYSTEM_EXPAT),)
482 define gb_LinkTarget__use_expat_impl
483 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
485 $(call gb_LinkTarget_add_defs,$(1),\
486 -DSYSTEM_EXPAT \
489 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
491 endef
493 gb_ExternalProject__use_expat :=
495 else # !SYSTEM_EXPAT
497 define gb_LinkTarget__use_expat_impl
498 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
500 $(call gb_LinkTarget_set_include,$(1),\
501 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
502 $$(INCLUDE) \
505 $(call gb_LinkTarget_use_static_libraries,$(1),\
506 $(2) \
509 endef
511 define gb_ExternalProject__use_expat
512 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
514 endef
516 endif # SYSTEM_EXPAT
518 define gb_LinkTarget__use_expat
519 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
521 endef
523 define gb_LinkTarget__use_expat_x64
524 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
526 endef
528 ifneq ($(SYSTEM_HYPH),)
530 define gb_LinkTarget__use_hyphen
531 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
533 endef
535 else # !SYSTEM_HYPH
537 define gb_LinkTarget__use_hyphen
538 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
539 $(call gb_LinkTarget_set_include,$(1),\
540 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
541 $$(INCLUDE) \
544 ifeq ($(COM),MSC)
545 $(call gb_LinkTarget_use_static_libraries,$(1),\
546 hyphen \
548 else
549 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
550 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
551 endif
553 endef
555 endif # SYSTEM_HYPH
557 ifneq ($(SYSTEM_HUNSPELL),)
559 define gb_LinkTarget__use_hunspell
560 $(call gb_LinkTarget_set_include,$(1),\
561 $$(INCLUDE) \
562 $(HUNSPELL_CFLAGS) \
564 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
566 endef
568 gb_ExternalProject__use_hunspell :=
570 else # !SYSTEM_HUNSPELL
571 ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
573 define gb_LinkTarget__use_hunspell
574 $(call gb_LinkTarget_add_defs,$(1),\
575 -DHUNSPELL_STATIC \
577 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
578 $(call gb_LinkTarget_set_include,$(1),\
579 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
580 $$(INCLUDE) \
583 ifeq ($(COM),MSC)
584 $(call gb_LinkTarget_use_static_libraries,$(1),\
585 hunspell \
587 else
588 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
589 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
590 endif
592 endef
594 define gb_ExternalProject__use_hunspell
595 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
597 endef
599 endif # ENABLE_WASM_STRIP_HUNSPELL
600 endif # SYSTEM_HUNSPELL
603 ifneq ($(SYSTEM_BOOST),)
605 define gb_LinkTarget__use_boost_lib
606 $(call gb_LinkTarget_set_include,$(1),\
607 $$(INCLUDE) \
608 $(BOOST_CPPFLAGS) \
611 $(call gb_LinkTarget_add_ldflags,$(1),\
612 $(BOOST_LDFLAGS) \
615 $(call gb_LinkTarget_add_libs,$(1),$(2))
617 endef
619 define gb_LinkTarget__use_boost_locale
620 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
622 endef
624 define gb_LinkTarget__use_boost_date_time
625 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
627 endef
629 define gb_LinkTarget__use_boost_filesystem
630 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
632 endef
634 gb_ExternalProject__use_boost_filesystem :=
636 define gb_LinkTarget__use_boost_iostreams
637 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
639 endef
641 gb_ExternalProject__use_boost_iostreams :=
643 define gb_LinkTarget__use_boost_system
644 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
646 endef
648 gb_ExternalProject__use_boost_system :=
650 define gb_LinkTarget__use_boost_headers
651 $(call gb_LinkTarget_set_include,$(1),\
652 $$(INCLUDE) \
653 $(BOOST_CPPFLAGS) \
656 endef
658 gb_ExternalProject__use_boost_headers:=
660 else # !SYSTEM_BOOST
662 define gb_LinkTarget__use_boost_lib
663 $(call gb_LinkTarget_add_defs,$(1),\
664 -DBOOST_ALL_NO_LIB \
667 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
669 endef
671 define gb_LinkTarget__use_boost_locale
672 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
673 $(call gb_LinkTarget_add_libs,$(1),\
674 $(if $(filter $(OS),MACOSX),-liconv) \
677 endef
679 define gb_LinkTarget__use_boost_date_time
680 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
682 endef
684 define gb_LinkTarget__use_boost_filesystem
685 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
687 endef
689 define gb_ExternalProject__use_boost_filesystem
690 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
691 endef
693 define gb_LinkTarget__use_boost_iostreams
694 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
696 endef
698 define gb_ExternalProject__use_boost_iostreams
699 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
700 endef
702 define gb_LinkTarget__use_boost_system
703 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
705 endef
707 define gb_ExternalProject__use_boost_system
708 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
709 endef
711 define gb_LinkTarget__use_boost_headers
712 $(call gb_LinkTarget_use_unpacked,$(1),boost)
713 $(call gb_LinkTarget_set_include,$(1),\
714 $(BOOST_CPPFLAGS) \
715 $$(INCLUDE) \
718 endef
720 define gb_ExternalProject__use_boost_headers
721 $(call gb_ExternalProject_use_unpacked,$(1),boost)
723 endef
725 endif # SYSTEM_BOOST
728 ifneq ($(SYSTEM_LIBCMIS),)
730 define gb_LinkTarget__use_libcmis
731 $(call gb_LinkTarget_set_include,$(1),\
732 $$(INCLUDE) \
733 $(LIBCMIS_CFLAGS) \
735 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
737 endef
739 else # !SYSTEM_LIBCMIS
741 define gb_LinkTarget__use_libcmis
742 $(call gb_LinkTarget_set_include,$(1),\
743 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
744 $$(INCLUDE) \
746 $(call gb_LinkTarget_use_static_libraries,$(1),\
747 libcmis \
750 endef
752 endif # SYSTEM_LIBCMIS
754 ifeq ($(ENABLE_JAVA),TRUE)
756 define gb_LinkTarget__use_jawt
757 $(call gb_LinkTarget_add_libs,$(1),\
758 $(JAWTLIB) \
761 endef
763 else # !ENABLE_JAVA
765 gb_LinkTarget__use_jawt :=
767 endif # ENABLE_JAVA
769 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
771 define gb_LinkTarget__use_libatomic_ops
772 $(call gb_LinkTarget_set_include,$(1),\
773 $$(INCLUDE) \
774 $(LIBATOMIC_OPS_CFLAGS) \
776 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
778 endef
779 gb_ExternalProject__use_libatomic_ops :=
781 else # !SYSTEM_LIBATOMIC_OPS
783 define gb_LinkTarget__use_libatomic_ops
784 $(call gb_LinkTarget_set_include,$(1),\
785 $(LIBATOMIC_OPS_CFLAGS) \
786 $$(INCLUDE) \
787 $(LIBATOMIC_OPS_CFLAGS) \
789 $(call gb_LinkTarget_use_external_project,$(1),\
790 libatomic_ops \
793 $(call gb_LinkTarget_add_libs,$(1),\
794 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
797 endef
799 define gb_ExternalProject__use_libatomic_ops
800 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
802 endef
804 endif # SYSTEM_LIBATOMIC_OPS
807 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
809 define gb_LinkTarget__use_libexttextcat
810 $(call gb_LinkTarget_set_include,$(1),\
811 $$(INCLUDE) \
812 $(LIBEXTTEXTCAT_CFLAGS) \
814 $(call gb_LinkTarget_add_defs,$(1),\
815 -DSYSTEM_LIBEXTTEXTCAT \
817 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
819 endef
821 else # !SYSTEM_LIBEXTTEXTCAT
823 define gb_LinkTarget__use_libexttextcat
824 $(call gb_LinkTarget_set_include,$(1),\
825 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
826 $$(INCLUDE) \
829 ifeq ($(COM),MSC)
830 $(call gb_LinkTarget_use_static_libraries,$(1),\
831 libexttextcat \
833 else
834 $(call gb_LinkTarget_add_libs,$(1),\
835 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
837 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
838 endif
841 endef
843 endif # SYSTEM_LIBEXTTEXTCAT
846 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
848 define gb_LinkTarget__use_libnumbertext
849 $(call gb_LinkTarget_set_include,$(1),\
850 $$(INCLUDE) \
851 $(LIBNUMBERTEXT_CFLAGS) \
853 $(call gb_LinkTarget_add_defs,$(1),\
854 -DSYSTEM_LIBNUMBERTEXT \
856 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
858 endef
860 else # !SYSTEM_LIBNUMBERTEXT
862 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
863 libnumbertext_numbertext \
866 define gb_LinkTarget__use_libnumbertext
867 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
868 $(call gb_LinkTarget_set_include,$(1),\
869 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
870 $$(INCLUDE) \
873 ifeq ($(COM),MSC)
874 $(call gb_LinkTarget_use_static_libraries,$(1),\
875 libnumbertext \
877 else
879 $(call gb_LinkTarget_add_libs,$(1),\
880 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
882 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
884 endif
886 endef
888 endif # SYSTEM_LIBNUMBERTEXT
891 ifneq ($(SYSTEM_LIBXML),)
893 define gb_LinkTarget__use_libxml2
894 $(call gb_LinkTarget_add_defs,$(1),\
895 -DSYSTEM_LIBXML \
897 $(call gb_LinkTarget_set_include,$(1),\
898 $$(INCLUDE) \
899 $(LIBXML_CFLAGS) \
901 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
903 endef
904 gb_ExternalProject__use_libxml2:=
906 else # !SYSTEM_LIBXML
908 $(eval $(call gb_Helper_register_packages_for_install,ure,\
909 libxml2 \
912 define gb_LinkTarget__use_libxml2
913 $(call gb_LinkTarget_use_package,$(1),libxml2)
914 $(call gb_LinkTarget_set_include,$(1),\
915 $$(INCLUDE) \
916 $(LIBXML_CFLAGS) \
919 $(call gb_LinkTarget_add_libs,$(1),\
920 $(LIBXML_LIBS) \
923 ifeq ($(COM),MSC)
924 $(call gb_LinkTarget_use_external,$(1),icu_headers)
925 endif
927 endef
928 define gb_ExternalProject__use_libxml2
929 $(call gb_ExternalProject_use_package,$(1),libxml2)
931 ifeq ($(COM),MSC)
932 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
933 endif
935 endef
937 endif # SYSTEM_LIBXML
940 ifneq ($(SYSTEM_LIBXSLT),)
942 define gb_LinkTarget__use_libxslt
943 $(call gb_LinkTarget_set_include,$(1),\
944 $$(INCLUDE) \
945 $(LIBXSLT_CFLAGS) \
947 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
949 endef
951 define gb_LinkTarget__use_libexslt
952 $(call gb_LinkTarget_set_include,$(1),\
953 $$(INCLUDE) \
954 $(LIBEXSLT_CFLAGS) \
957 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
959 endef
961 else # !SYSTEM_LIBXSLT
963 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
964 libxslt \
967 define gb_LinkTarget__use_libxslt
968 $(call gb_LinkTarget_use_package,$(1),libxslt)
969 $(call gb_LinkTarget_set_include,$(1),\
970 $$(INCLUDE) \
971 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
974 ifeq ($(COM),MSC)
975 $(call gb_LinkTarget_add_libs,$(1),\
976 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
978 else
979 $(call gb_LinkTarget_add_libs,$(1),\
980 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
982 endif
984 endef
986 define gb_LinkTarget__use_libexslt
987 $(call gb_LinkTarget_use_package,$(1),libxslt)
988 $(call gb_LinkTarget_set_include,$(1),\
989 $$(INCLUDE) \
990 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
993 ifeq ($(COM),MSC)
994 $(call gb_LinkTarget_add_libs,$(1),\
995 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
997 else
998 $(call gb_LinkTarget_add_libs,$(1),\
999 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
1001 endif
1003 endef
1005 endif # SYSTEM_LIBXSLT
1008 ifneq ($(SYSTEM_XMLSEC),)
1010 define gb_LinkTarget__use_xmlsec
1011 $(call gb_LinkTarget_add_defs,$(1),\
1012 -DSYSTEM_XMLSEC \
1014 $(call gb_LinkTarget_set_include,$(1),\
1015 $$(INCLUDE) \
1016 $(XMLSEC_CFLAGS) \
1018 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1020 endef
1022 gb_ExternalProject__use_xmlsec:=
1024 else # !SYSTEM_XMLSEC
1026 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1027 xmlsec \
1030 define gb_LinkTarget__use_xmlsec
1032 endef
1034 endif # SYSTEM_XMLSEC
1036 ifneq ($(SYSTEM_LIBLANGTAG),)
1038 define gb_LinkTarget__use_liblangtag
1039 $(call gb_LinkTarget_set_include,$(1),\
1040 $$(INCLUDE) \
1041 $(LIBLANGTAG_CFLAGS) \
1044 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1046 endef
1048 gb_ExternalProject__use_liblangtag :=
1050 else # !SYSTEM_LIBLANGTAG
1052 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1053 liblangtag_data \
1056 ifeq ($(COM),MSC)
1058 define gb_LinkTarget__use_liblangtag
1059 $(call gb_LinkTarget_set_include,$(1),\
1060 $(LIBLANGTAG_CFLAGS) \
1061 $$(INCLUDE) \
1063 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1064 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1066 endef
1068 else
1070 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1071 liblangtag \
1074 define gb_LinkTarget__use_liblangtag
1075 $(call gb_LinkTarget_set_include,$(1),\
1076 $(LIBLANGTAG_CFLAGS) \
1077 $$(INCLUDE) \
1079 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1080 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1082 endef
1084 endif # MSC
1086 define gb_ExternalProject__use_liblangtag
1087 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1089 endef
1091 endif # SYSTEM_LIBLANGTAG
1094 ifneq ($(SYSTEM_REDLAND),)
1096 define gb_LinkTarget__use_librdf
1097 $(call gb_LinkTarget_add_defs,$(1),\
1098 -DSYSTEM_REDLAND \
1100 $(call gb_LinkTarget_set_include,$(1),\
1101 $$(INCLUDE) \
1102 $(REDLAND_CFLAGS) \
1104 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1106 endef
1108 gb_LinkTarget__use_redland_headers:=
1110 gb_LinkTarget__use_raptor_headers:=
1112 gb_LinkTarget__use_rasqal_headers:=
1114 else # !SYSTEM_REDLAND
1116 define gb_LinkTarget__use_redland_headers
1117 $(call gb_LinkTarget_set_include,$(1),\
1118 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1119 $$(INCLUDE) \
1122 endef
1124 define gb_LinkTarget__use_raptor_headers
1125 $(call gb_LinkTarget_set_include,$(1),\
1126 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1127 $$(INCLUDE) \
1130 endef
1132 define gb_LinkTarget__use_rasqal_headers
1133 $(call gb_LinkTarget_set_include,$(1),\
1134 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1135 $$(INCLUDE) \
1138 endef
1140 ifneq ($(OS),ANDROID)
1142 ifeq ($(COM),MSC)
1143 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1144 raptor2 \
1145 rasqal \
1146 rdf \
1148 else
1149 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1150 raptor \
1151 rasqal \
1152 redland \
1154 endif
1156 define gb_LinkTarget__use_librdf
1157 ifeq ($(COM),MSC)
1158 $(call gb_LinkTarget_use_libraries,$(1),\
1159 raptor2 \
1160 rdf \
1162 else
1163 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1165 $(call gb_LinkTarget_add_libs,$(1),\
1166 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1167 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1168 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1170 endif
1172 endef
1174 else # ANDROID
1176 define gb_LinkTarget__use_librdf
1177 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1179 endef
1181 endif # ANDROID
1183 endif # SYSTEM_REDLAND
1185 ifneq ($(SYSTEM_CAIRO),)
1187 define gb_LinkTarget__use_cairo
1188 $(call gb_LinkTarget_set_include,$(1),\
1189 $$(INCLUDE) \
1190 $(CAIRO_CFLAGS) \
1192 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1193 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1195 endef
1197 else # !SYSTEM_CAIRO
1199 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1201 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1202 cairo \
1203 pixman \
1206 define gb_LinkTarget__use_cairo
1207 $(call gb_LinkTarget_use_package,$(1),cairo)
1208 $(call gb_LinkTarget_use_package,$(1),pixman)
1209 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1210 $(call gb_LinkTarget_set_include,$(1),\
1211 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1212 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1213 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1214 $$(INCLUDE) \
1216 $(call gb_LinkTarget_add_libs,$(1),\
1217 $(if $(filter EMSCRIPTEN,$(OS)), \
1218 $(call gb_UnpackedTarball_get_dir,cairo)/src/.libs/libcairo.a \
1219 $(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs/libpixman-1.a, \
1220 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1221 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1) \
1224 endef
1226 endif # !MACOSX, !WNT
1228 endif # !SYSTEM_CAIRO
1230 ifneq ($(SYSTEM_FREETYPE),)
1232 define gb_LinkTarget__use_freetype_headers
1233 $(call gb_LinkTarget_set_include,$(1),\
1234 $$(INCLUDE) \
1235 $(FREETYPE_CFLAGS) \
1238 endef
1240 gb_ExternalProject__use_freetype :=
1242 else
1244 define gb_LinkTarget__use_freetype_headers
1245 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1246 $(call gb_LinkTarget_set_include,$(1),\
1247 $(FREETYPE_CFLAGS) \
1248 $$(INCLUDE) \
1251 endef
1253 define gb_ExternalProject__use_freetype
1254 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1256 endef
1258 endif # SYSTEM_FREETYPE
1260 define gb_LinkTarget__use_freetype
1261 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1262 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1264 endef
1266 ifneq ($(SYSTEM_FONTCONFIG),)
1268 define gb_LinkTarget__use_fontconfig
1269 $(call gb_LinkTarget_set_include,$(1),\
1270 $$(INCLUDE) \
1271 $(FONTCONFIG_CFLAGS) \
1274 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1276 endef
1278 ifeq ($(OS),EMSCRIPTEN)
1279 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1280 libfontconfig_data \
1282 endif
1284 gb_ExternalProject__use_fontconfig :=
1286 else # SYSTEM_FONTCONFIG
1288 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1290 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1291 fontconfig \
1294 endif
1296 define gb_LinkTarget__use_fontconfig
1297 ifeq ($(OS),LINUX)
1298 $(call gb_LinkTarget_use_package,$(1),fontconfig)
1299 else
1300 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1301 endif
1302 $(call gb_LinkTarget_set_include,$(1),\
1303 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1304 $$(INCLUDE) \
1307 $(call gb_LinkTarget_add_libs,$(1),\
1308 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1311 endef
1313 define gb_ExternalProject__use_fontconfig
1314 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1316 endef
1318 endif # SYSTEM_FONTCONFIG
1320 ifneq ($(SYSTEM_GRAPHITE),)
1322 define gb_LinkTarget__use_graphite
1323 $(call gb_LinkTarget_set_include,$(1),\
1324 $$(INCLUDE) \
1325 $(GRAPHITE_CFLAGS) \
1327 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1329 endef
1331 gb_ExternalProject__use_graphite:=
1333 else # !SYSTEM_GRAPHITE
1335 define gb_LinkTarget__use_graphite
1336 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1337 $(call gb_LinkTarget_set_include,$(1),\
1338 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1339 $$(INCLUDE) \
1341 $(call gb_LinkTarget_use_static_libraries,$(1),\
1342 graphite \
1345 endef
1347 define gb_ExternalProject__use_graphite
1348 $(call gb_ExternalProject_use_static_libraries,$(1),\
1349 graphite \
1352 endef
1353 endif # SYSTEM_GRAPHITE
1355 ifneq ($(SYSTEM_ICU),)
1357 gb_LinkTarget__use_icu_headers:=
1358 gb_ExternalProject__use_icu:=
1360 define gb_LinkTarget__use_icudata
1361 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1363 endef
1364 define gb_LinkTarget__use_icui18n
1365 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1367 endef
1368 define gb_LinkTarget__use_icuuc
1369 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1371 endef
1373 else # !SYSTEM_ICU
1375 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1376 icu_ure \
1379 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1380 icu \
1383 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1384 gb_ICU_suffix:=lo
1385 else
1386 gb_ICU_suffix:=
1387 endif
1389 define gb_LinkTarget__use_icu_headers
1390 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1391 $(call gb_LinkTarget_set_include,$(1),\
1392 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1393 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1394 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1395 $$(INCLUDE) \
1398 endef
1400 define gb_ExternalProject__use_icu
1401 $(call gb_ExternalProject_use_package,$(1),icu)
1403 endef
1405 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1406 define gb_LinkTarget__use_icudata
1407 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1409 ifeq ($(OS),WNT)
1410 $(call gb_LinkTarget_add_libs,$(1),\
1411 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1413 else
1414 $(call gb_LinkTarget_add_libs,$(1),\
1415 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1417 endif
1419 endef
1421 define gb_LinkTarget__use_icui18n
1422 $(call gb_LinkTarget_use_package,$(1),icu)
1424 ifeq ($(OS),WNT)
1425 $(call gb_LinkTarget_add_libs,$(1),\
1426 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1428 else
1429 $(call gb_LinkTarget_add_libs,$(1),\
1430 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1432 endif
1434 endef
1436 define gb_LinkTarget__use_icuuc
1437 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1439 ifeq ($(OS),WNT)
1440 $(call gb_LinkTarget_add_libs,$(1),\
1441 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1443 else
1444 $(call gb_LinkTarget_add_libs,$(1),\
1445 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1447 endif
1449 endef
1451 endif # SYSTEM_ICU
1453 ifneq ($(SYSTEM_HARFBUZZ),)
1455 define gb_LinkTarget__use_harfbuzz
1456 $(call gb_LinkTarget_set_include,$(1),\
1457 $$(INCLUDE) \
1458 $(HARFBUZZ_CFLAGS) \
1460 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1462 endef
1464 gb_ExternalProject__use_harfbuzz :=
1466 else # SYSTEM_HARFBUZZ != TRUE
1468 define gb_LinkTarget__use_harfbuzz
1469 $(call gb_LinkTarget_set_include,$(1),\
1470 $(HARFBUZZ_CFLAGS) \
1471 $$(INCLUDE) \
1473 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1474 $(call gb_LinkTarget_use_external,$(1),icuuc)
1475 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1477 endef
1479 define gb_ExternalProject__use_harfbuzz
1480 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1482 endef
1484 endif # SYSTEM_HARFBUZZ
1486 ifneq ($(ENABLE_OPENSSL),TRUE)
1488 gb_ExternalProject__use_openssl:=
1489 gb_LinkTarget__use_openssl_headers:=
1490 gb_LinkTarget__use_openssl:=
1492 else # ENABLE_OPENSSL
1494 ifneq ($(SYSTEM_OPENSSL),)
1496 gb_LinkTarget__use_openssl_headers:=
1497 gb_ExternalProject__use_openssl:=
1499 define gb_LinkTarget__use_openssl
1500 $(call gb_LinkTarget_set_include,$(1),\
1501 $$(INCLUDE) \
1502 $(OPENSSL_CFLAGS) \
1504 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1506 endef
1508 else # !SYSTEM_OPENSSL
1510 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1511 openssl \
1514 define gb_ExternalProject__use_openssl
1515 $(call gb_ExternalProject_use_package,$(1),openssl)
1517 endef
1519 define gb_LinkTarget__use_openssl_headers
1520 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1521 $(call gb_LinkTarget_set_include,$(1),\
1522 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1523 $$(INCLUDE) \
1526 endef
1528 define gb_LinkTarget__use_openssl
1529 $(call gb_LinkTarget_use_package,$(1),openssl)
1530 ifeq ($(OS),WNT)
1531 $(call gb_LinkTarget_add_libs,$(1),\
1532 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1533 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1535 else
1536 $(call gb_LinkTarget_add_libs,$(1),\
1537 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1538 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1539 $(if $(filter $(OS),LINUX),-pthread) \
1541 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1542 ifeq ($(OS),SOLARIS)
1543 $(call gb_LinkTarget_add_libs,$(1),\
1544 -lnsl \
1545 -lsocket \
1547 endif
1548 endif
1550 endef
1552 endif # SYSTEM_OPENSSL
1553 endif # ENABLE_OPENSSL
1556 ifneq ($(SYSTEM_ARGON2),)
1558 define gb_LinkTarget__use_argon2
1559 $(call gb_LinkTarget_set_include,$(1),\
1560 $(ARGON2_CFLAGS) \
1561 $$(INCLUDE) \
1563 $(call gb_LinkTarget_add_libs,$(1),$(ARGON2_LIBS))
1565 endef
1567 else # !SYSTEM_ARGON2
1569 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1570 argon2 \
1573 define gb_LinkTarget__use_argon2
1574 $(call gb_LinkTarget_set_include,$(1),\
1575 $(ARGON2_CFLAGS) \
1576 $$(INCLUDE) \
1578 $(call gb_LinkTarget_add_libs,$(1),$(ARGON2_LIBS))
1579 $(call gb_LinkTarget_use_package,$(1),argon2)
1580 endef
1582 endif # SYSTEM_ARGON2
1585 ifneq ($(SYSTEM_CDR),)
1587 define gb_LinkTarget__use_cdr
1588 $(call gb_LinkTarget_set_include,$(1),\
1589 $$(INCLUDE) \
1590 $(CDR_CFLAGS) \
1592 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1594 endef
1596 else # !SYSTEM_CDR
1598 define gb_LinkTarget__use_cdr
1599 $(call gb_LinkTarget_set_include,$(1),\
1600 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1601 $$(INCLUDE) \
1603 $(call gb_LinkTarget_add_libs,$(1),\
1604 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1606 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1607 endef
1609 endif # SYSTEM_CDR
1612 ifneq ($(SYSTEM_EBOOK),)
1614 define gb_LinkTarget__use_ebook
1615 $(call gb_LinkTarget_set_include,$(1),\
1616 $$(INCLUDE) \
1617 $(EBOOK_CFLAGS) \
1619 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1621 endef
1623 gb_ExternalProject__use_ebook :=
1625 else # !SYSTEM_EBOOK
1627 define gb_LinkTarget__use_ebook
1628 $(call gb_LinkTarget_set_include,$(1),\
1629 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1630 $$(INCLUDE) \
1632 $(call gb_LinkTarget_add_libs,$(1),\
1633 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1635 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1637 endef
1639 define gb_ExternalProject__use_ebook
1640 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1642 endef
1644 endif # SYSTEM_EBOOK
1647 ifneq ($(SYSTEM_ETONYEK),)
1649 define gb_LinkTarget__use_etonyek
1650 $(call gb_LinkTarget_set_include,$(1),\
1651 $$(INCLUDE) \
1652 $(ETONYEK_CFLAGS) \
1654 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1656 endef
1658 gb_ExternalProject__use_etonyek :=
1660 else # !SYSTEM_ETONYEK
1662 ifeq ($(COM),MSC)
1664 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1665 etonyek \
1668 define gb_LinkTarget__use_etonyek
1669 $(call gb_LinkTarget_set_include,$(1),\
1670 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1671 $$(INCLUDE) \
1673 $(call gb_LinkTarget_use_libraries,$(1),\
1674 etonyek \
1677 endef
1679 else # !MSC
1681 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1682 libetonyek \
1685 define gb_LinkTarget__use_etonyek
1686 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1688 $(call gb_LinkTarget_set_include,$(1),\
1689 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1690 -DLIBETONYEK_VISIBILITY \
1691 $$(INCLUDE) \
1693 $(call gb_LinkTarget_add_libs,$(1),\
1694 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1696 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1698 endef
1700 define gb_ExternalProject__use_etonyek
1701 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1703 endef
1705 endif
1707 endif # SYSTEM_ETONYEK
1710 ifneq ($(SYSTEM_FREEHAND),)
1712 define gb_LinkTarget__use_freehand
1713 $(call gb_LinkTarget_set_include,$(1),\
1714 $$(INCLUDE) \
1715 $(FREEHAND_CFLAGS) \
1717 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1719 endef
1721 gb_ExternalProject__use_freehand :=
1723 else # !SYSTEM_FREEHAND
1725 define gb_LinkTarget__use_freehand
1726 $(call gb_LinkTarget_set_include,$(1),\
1727 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1728 $$(INCLUDE) \
1730 $(call gb_LinkTarget_add_libs,$(1),\
1731 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1733 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1735 endef
1737 define gb_ExternalProject__use_freehand
1738 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1740 endef
1742 endif # SYSTEM_FREEHAND
1745 ifneq ($(SYSTEM_ODFGEN),)
1747 define gb_LinkTarget__use_odfgen
1748 $(call gb_LinkTarget_set_include,$(1),\
1749 $$(INCLUDE) \
1750 $(ODFGEN_CFLAGS) \
1752 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1754 endef
1756 else # !SYSTEM_ODFGEN
1758 ifeq ($(COM),MSC)
1760 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1761 odfgen \
1764 define gb_LinkTarget__use_odfgen
1765 $(call gb_LinkTarget_set_include,$(1),\
1766 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1767 $$(INCLUDE) \
1769 $(call gb_LinkTarget_use_libraries,$(1),\
1770 odfgen \
1773 endef
1775 else # !MSC
1777 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1778 libodfgen \
1781 define gb_LinkTarget__use_odfgen
1782 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1784 $(call gb_LinkTarget_set_include,$(1),\
1785 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1786 -DLIBODFGEN_VISIBILITY \
1787 $$(INCLUDE) \
1789 $(call gb_LinkTarget_add_libs,$(1),\
1790 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1793 endef
1795 endif
1797 endif # SYSTEM_ODFGEN
1799 ifneq ($(SYSTEM_EPUBGEN),)
1801 define gb_LinkTarget__use_epubgen
1802 $(call gb_LinkTarget_set_include,$(1),\
1803 $$(INCLUDE) \
1804 $(EPUBGEN_CFLAGS) \
1806 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1808 endef
1809 gb_ExternalProject__use_epubgen :=
1811 else # !SYSTEM_EPUBGEN
1812 ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
1814 define gb_LinkTarget__use_epubgen
1815 $(call gb_LinkTarget_set_include,$(1),\
1816 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1817 $$(INCLUDE) \
1819 $(call gb_LinkTarget_add_libs,$(1),\
1820 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1822 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1824 endef
1825 define gb_ExternalProject__use_epubgen
1826 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1828 endef
1830 endif # ENABLE_WASM_STRIP_EPUB
1831 endif # SYSTEM_EPUBGEN
1833 ifneq ($(SYSTEM_REVENGE),)
1835 define gb_LinkTarget__use_revenge
1836 $(call gb_LinkTarget_set_include,$(1),\
1837 $$(INCLUDE) \
1838 $(REVENGE_CFLAGS) \
1840 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1842 endef
1844 gb_ExternalProject__use_revenge :=
1846 else # !SYSTEM_REVENGE
1848 ifeq ($(COM),MSC)
1850 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1851 revenge \
1854 define gb_LinkTarget__use_revenge
1855 $(call gb_LinkTarget_set_include,$(1),\
1856 $(REVENGE_CFLAGS) \
1857 $$(INCLUDE) \
1859 $(call gb_LinkTarget_use_libraries,$(1),\
1860 revenge \
1863 endef
1865 define gb_ExternalProject__use_revenge
1866 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1868 endef
1870 else # !MSC
1872 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1873 librevenge \
1876 define gb_LinkTarget__use_revenge
1877 $(call gb_LinkTarget_use_package,$(1),librevenge)
1879 $(call gb_LinkTarget_set_include,$(1),\
1880 $(REVENGE_CFLAGS) \
1881 -DLIBREVENGE_VISIBILITY \
1882 $$(INCLUDE) \
1884 $(call gb_LinkTarget_add_libs,$(1),\
1885 $(REVENGE_LIBS) \
1887 endef
1889 define gb_ExternalProject__use_revenge
1890 $(call gb_ExternalProject_use_package,$(1),librevenge)
1892 endef
1894 endif # MSC
1896 endif # SYSTEM_REVENGE
1899 ifneq ($(SYSTEM_ABW),)
1901 define gb_LinkTarget__use_abw
1902 $(call gb_LinkTarget_set_include,$(1),\
1903 $$(INCLUDE) \
1904 $(ABW_CFLAGS) \
1906 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1908 endef
1909 gb_ExternalProject__use_abw :=
1911 else # !SYSTEM_ABW
1913 define gb_LinkTarget__use_abw
1914 $(call gb_LinkTarget_set_include,$(1),\
1915 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1916 $$(INCLUDE) \
1918 $(call gb_LinkTarget_add_libs,$(1),\
1919 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1921 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1923 endef
1924 define gb_ExternalProject__use_abw
1925 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1927 endef
1929 endif # SYSTEM_ABW
1932 ifneq ($(SYSTEM_MSPUB),)
1934 define gb_LinkTarget__use_mspub
1935 $(call gb_LinkTarget_set_include,$(1),\
1936 $$(INCLUDE) \
1937 $(MSPUB_CFLAGS) \
1939 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1941 endef
1943 else # !SYSTEM_MSPUB
1945 define gb_LinkTarget__use_mspub
1946 $(call gb_LinkTarget_set_include,$(1),\
1947 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1948 $$(INCLUDE) \
1950 $(call gb_LinkTarget_add_libs,$(1),\
1951 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1953 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1955 endef
1957 endif # SYSTEM_MSPUB
1960 ifneq ($(SYSTEM_PAGEMAKER),)
1962 define gb_LinkTarget__use_pagemaker
1963 $(call gb_LinkTarget_set_include,$(1),\
1964 $$(INCLUDE) \
1965 $(PAGEMAKER_CFLAGS) \
1967 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1969 endef
1970 gb_ExternalProject__use_pagemaker :=
1972 else # !SYSTEM_PAGEMAKER
1974 define gb_LinkTarget__use_pagemaker
1975 $(call gb_LinkTarget_set_include,$(1),\
1976 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1977 $$(INCLUDE) \
1979 $(call gb_LinkTarget_add_libs,$(1),\
1980 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1982 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1984 endef
1985 define gb_ExternalProject__use_pagemaker
1986 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1988 endef
1990 endif # SYSTEM_PAGEMAKER
1993 ifneq ($(SYSTEM_QXP),)
1995 define gb_LinkTarget__use_qxp
1996 $(call gb_LinkTarget_set_include,$(1),\
1997 $$(INCLUDE) \
1998 $(QXP_CFLAGS) \
2000 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2002 endef
2003 gb_ExternalProject__use_qxp :=
2005 else # !SYSTEM_QXP
2007 define gb_LinkTarget__use_qxp
2008 $(call gb_LinkTarget_set_include,$(1),\
2009 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2010 $$(INCLUDE) \
2012 $(call gb_LinkTarget_add_libs,$(1),\
2013 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2015 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2017 endef
2018 define gb_ExternalProject__use_qxp
2019 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2021 endef
2023 endif # SYSTEM_QXP
2026 ifneq ($(SYSTEM_ZMF),)
2028 define gb_LinkTarget__use_zmf
2029 $(call gb_LinkTarget_set_include,$(1),\
2030 $$(INCLUDE) \
2031 $(ZMF_CFLAGS) \
2033 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2035 endef
2036 gb_ExternalProject__use_zmf :=
2038 else # !SYSTEM_ZMF
2040 define gb_LinkTarget__use_zmf
2041 $(call gb_LinkTarget_set_include,$(1),\
2042 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2043 $$(INCLUDE) \
2045 $(call gb_LinkTarget_add_libs,$(1),\
2046 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2048 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2050 endef
2051 define gb_ExternalProject__use_zmf
2052 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2054 endef
2056 endif # SYSTEM_ZMF
2059 ifneq ($(SYSTEM_VISIO),)
2061 define gb_LinkTarget__use_visio
2062 $(call gb_LinkTarget_set_include,$(1),\
2063 $$(INCLUDE) \
2064 $(VISIO_CFLAGS) \
2066 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2068 endef
2070 else # !SYSTEM_VISIO
2072 define gb_LinkTarget__use_visio
2073 $(call gb_LinkTarget_set_include,$(1),\
2074 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2075 $$(INCLUDE) \
2077 $(call gb_LinkTarget_add_libs,$(1),\
2078 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2080 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2082 endef
2084 endif # SYSTEM_VISIO
2087 ifneq ($(SYSTEM_WPD),)
2089 define gb_LinkTarget__use_wpd
2090 $(call gb_LinkTarget_set_include,$(1),\
2091 $$(INCLUDE) \
2092 $(WPD_CFLAGS) \
2094 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2096 endef
2097 gb_ExternalProject__use_wpd :=
2099 else # !SYSTEM_WPD
2101 ifeq ($(COM),MSC)
2103 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2104 wpd \
2107 define gb_LinkTarget__use_wpd
2108 $(call gb_LinkTarget_set_include,$(1),\
2109 $(WPD_CFLAGS) \
2110 $$(INCLUDE) \
2112 $(call gb_LinkTarget_use_libraries,$(1),\
2113 wpd \
2116 endef
2118 define gb_ExternalProject__use_wpd
2119 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2121 endef
2123 else # !MSC
2125 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2126 libwpd \
2129 define gb_LinkTarget__use_wpd
2130 $(call gb_LinkTarget_use_package,$(1),libwpd)
2132 $(call gb_LinkTarget_set_include,$(1),\
2133 $(WPD_CFLAGS) \
2134 $$(INCLUDE) \
2136 $(call gb_LinkTarget_add_libs,$(1),\
2137 $(WPD_LIBS) \
2140 endef
2142 define gb_ExternalProject__use_wpd
2143 $(call gb_ExternalProject_use_package,$(1),libwpd)
2145 endef
2147 endif # MSC
2149 endif # SYSTEM_WPD
2152 ifneq ($(SYSTEM_WPG),)
2154 define gb_LinkTarget__use_wpg
2155 $(call gb_LinkTarget_set_include,$(1),\
2156 $$(INCLUDE) \
2157 $(WPG_CFLAGS) \
2159 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2161 endef
2162 gb_ExternalProject__use_wpg :=
2164 else # !SYSTEM_WPG
2166 ifeq ($(COM),MSC)
2168 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2169 wpg \
2172 define gb_LinkTarget__use_wpg
2173 $(call gb_LinkTarget_set_include,$(1),\
2174 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2175 $$(INCLUDE) \
2177 $(call gb_LinkTarget_use_libraries,$(1),\
2178 wpg \
2181 endef
2183 else # !MSC
2185 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2186 libwpg \
2189 define gb_LinkTarget__use_wpg
2190 $(call gb_LinkTarget_use_package,$(1),libwpg)
2192 $(call gb_LinkTarget_set_include,$(1),\
2193 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2194 $$(INCLUDE) \
2196 $(call gb_LinkTarget_add_libs,$(1),\
2197 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2200 endef
2202 endif # MSC
2204 endif # SYSTEM_WPG
2207 ifneq ($(SYSTEM_WPS),)
2209 define gb_LinkTarget__use_wps
2210 $(call gb_LinkTarget_set_include,$(1),\
2211 $$(INCLUDE) \
2212 $(WPS_CFLAGS) \
2214 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2216 endef
2217 gb_ExternalProject__use_wps :=
2219 else # !SYSTEM_WPS
2221 ifeq ($(COM),MSC)
2223 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2224 wps \
2227 define gb_LinkTarget__use_wps
2228 $(call gb_LinkTarget_set_include,$(1),\
2229 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2230 $$(INCLUDE) \
2233 $(call gb_LinkTarget_use_libraries,$(1),\
2234 wps \
2237 endef
2239 else # !MSC
2241 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2242 libwps \
2245 define gb_LinkTarget__use_wps
2246 $(call gb_LinkTarget_use_package,$(1),libwps)
2248 $(call gb_LinkTarget_set_include,$(1),\
2249 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2250 $$(INCLUDE) \
2252 $(call gb_LinkTarget_add_libs,$(1),\
2253 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2256 endef
2258 endif # MSC
2260 endif # SYSTEM_WPS
2263 ifneq ($(SYSTEM_MWAW),)
2265 define gb_LinkTarget__use_mwaw
2266 $(call gb_LinkTarget_set_include,$(1),\
2267 $$(INCLUDE) \
2268 $(MWAW_CFLAGS) \
2270 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2272 endef
2274 else # !SYSTEM_MWAW
2276 ifeq ($(COM),MSC)
2278 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2279 mwaw \
2282 define gb_LinkTarget__use_mwaw
2283 $(call gb_LinkTarget_set_include,$(1),\
2284 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2285 $$(INCLUDE) \
2288 $(call gb_LinkTarget_use_libraries,$(1),\
2289 mwaw \
2292 endef
2294 else # !MSC
2296 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2297 libmwaw \
2300 define gb_LinkTarget__use_mwaw
2301 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2303 $(call gb_LinkTarget_set_include,$(1),\
2304 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2305 $$(INCLUDE) \
2307 $(call gb_LinkTarget_add_libs,$(1),\
2308 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2311 endef
2313 endif # MSC
2315 endif # SYSTEM_MWAW
2317 ifneq ($(SYSTEM_STAROFFICE),)
2319 define gb_LinkTarget__use_staroffice
2320 $(call gb_LinkTarget_set_include,$(1),\
2321 $$(INCLUDE) \
2322 $(STAROFFICE_CFLAGS) \
2324 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2326 endef
2328 else # !SYSTEM_STAROFFICE
2330 ifeq ($(COM),MSC)
2332 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2333 staroffice \
2336 define gb_LinkTarget__use_staroffice
2337 $(call gb_LinkTarget_set_include,$(1),\
2338 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2339 $$(INCLUDE) \
2342 $(call gb_LinkTarget_use_libraries,$(1),\
2343 staroffice \
2346 endef
2348 else # !MSC
2350 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2351 libstaroffice \
2354 define gb_LinkTarget__use_staroffice
2355 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2357 $(call gb_LinkTarget_set_include,$(1),\
2358 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2359 $$(INCLUDE) \
2361 $(call gb_LinkTarget_add_libs,$(1),\
2362 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2365 endef
2367 endif # MSC
2369 endif # SYSTEM_STAROFFICE
2372 ifneq ($(SYSTEM_LCMS2),)
2374 define gb_LinkTarget__use_lcms2
2375 $(call gb_LinkTarget_set_include,$(1),\
2376 $$(INCLUDE) \
2377 $(LCMS2_CFLAGS) \
2379 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2381 endef
2383 gb_ExternalProject__use_lcms2 :=
2385 else # !SYSTEM_LCMS2
2387 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2388 lcms2 \
2391 define gb_ExternalProject__use_lcms2
2392 $(call gb_ExternalProject_use_package,$(1),lcms2)
2394 endef
2396 ifeq ($(OS),ANDROID)
2398 define gb_LinkTarget__use_lcms2
2399 $(call gb_LinkTarget_use_package,$(1),lcms2)
2400 $(call gb_LinkTarget_set_include,$(1),\
2401 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2402 $$(INCLUDE) \
2405 endef
2407 else
2409 define gb_LinkTarget__use_lcms2
2410 $(call gb_LinkTarget_use_package,$(1),lcms2)
2411 $(call gb_LinkTarget_set_include,$(1),\
2412 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2413 $$(INCLUDE) \
2415 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2417 endef
2419 endif # ANDROID
2420 endif # SYSTEM_LCMS2
2422 ifneq ($(ENABLE_LPSOLVE),)
2424 ifneq ($(SYSTEM_LPSOLVE),)
2426 define gb_LinkTarget__use_lpsolve
2427 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2428 $(call gb_LinkTarget_add_defs,$(1),\
2429 -DSYSTEM_LPSOLVE \
2432 endef
2434 else # !SYSTEM_LPSOLVE
2436 define gb_LinkTarget__use_lpsolve
2437 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2438 ifeq ($(COM),MSC)
2439 $(call gb_LinkTarget_add_libs,$(1),\
2440 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2442 else
2443 $(call gb_LinkTarget_add_libs,$(1),\
2444 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2446 endif
2447 $(call gb_LinkTarget_set_include,$(1),\
2448 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2449 $$(INCLUDE) \
2452 endef
2454 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2455 lpsolve \
2458 endif # SYSTEM_LPSOLVE
2460 else
2462 gb_LinkTarget__use_lpsolve :=
2464 endif # ENABLE_LPSOLVE
2466 ifneq ($(ENABLE_COINMP),)
2468 ifneq ($(SYSTEM_COINMP),TRUE)
2470 define gb_LinkTarget__use_coinmp
2471 $(call gb_LinkTarget_use_package,$(1),coinmp)
2472 ifeq ($(COM),MSC)
2473 $(call gb_LinkTarget_add_libs,$(1),\
2474 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2476 else
2477 $(call gb_LinkTarget_add_libs,$(1),\
2478 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2479 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2480 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2481 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2482 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2483 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2484 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2486 endif
2487 $(call gb_LinkTarget_set_include,$(1),\
2488 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2489 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2490 $$(INCLUDE) \
2493 endef
2495 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2496 coinmp \
2499 else # SYSTEM_COINMP
2501 define gb_LinkTarget__use_coinmp
2502 $(call gb_LinkTarget_set_include,$(1),\
2503 $$(INCLUDE) \
2504 $(COINMP_CFLAGS) \
2506 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2508 endef
2510 endif
2512 else
2514 gb_LinkTarget__use_coinmp :=
2516 endif # ENABLE_COINMP
2518 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2520 define gb_LinkTarget__use_mDNSResponder
2521 $(call gb_LinkTarget_set_include,$(1),\
2522 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2523 $$(INCLUDE) \
2525 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2526 endef
2528 endif # MDNSRESPONDER
2530 ifeq ($(ENABLE_GIO),TRUE)
2532 define gb_LinkTarget__use_gio
2533 $(call gb_LinkTarget_set_include,$(1),\
2534 $$(INCLUDE) \
2535 $(GIO_CFLAGS) \
2538 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2540 endef
2542 else # ENABLE_GIO
2544 define gb_LinkTarget__use_gio
2546 endef
2548 endif # ENABLE_GIO
2550 ifeq ($(ENABLE_AVAHI),TRUE)
2552 define gb_LinkTarget__use_avahi
2553 $(call gb_LinkTarget_set_include,$(1),\
2554 $$(INCLUDE) \
2555 $(AVAHI_CFLAGS) \
2558 $(call gb_LinkTarget_add_defs,$(1),\
2559 -DENABLE_AVAHI \
2562 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2564 endef
2566 else # ENABLE_AVAHI
2568 gb_LinkTarget__use_avahi :=
2570 endif # ENABLE_AVAHI
2572 ifeq ($(ENABLE_CUPS),TRUE)
2574 define gb_LinkTarget__use_cups
2575 $(call gb_LinkTarget_add_defs,$(1),\
2576 -DENABLE_CUPS \
2579 $(call gb_LinkTarget_add_libs,$(1),\
2580 -lcups \
2583 endef
2585 else # ENABLE_CUPS
2587 define gb_LinkTarget__use_cups
2589 endef
2591 endif # ENABLE_CUPS
2593 ifeq ($(ENABLE_DBUS),TRUE)
2595 define gb_LinkTarget__use_dbus
2596 $(call gb_LinkTarget_set_include,$(1),\
2597 $$(INCLUDE) \
2598 $(DBUS_CFLAGS) \
2601 $(call gb_LinkTarget_add_libs,$(1),\
2602 $(DBUS_LIBS) \
2605 endef
2607 else # ENABLE_DBUS
2609 define gb_LinkTarget__use_dbus
2611 endef
2613 endif # ENABLE_DBUS
2616 ifneq ($(SYSTEM_LIBPNG),)
2618 define gb_LinkTarget__use_libpng
2619 $(call gb_LinkTarget_set_include,$(1),\
2620 $$(INCLUDE) \
2621 $(LIBPNG_CFLAGS) \
2624 $(call gb_LinkTarget_add_libs,$(1),\
2625 $(LIBPNG_LIBS) \
2628 endef
2630 gb_ExternalProject__use_libpng :=
2632 else # !SYSTEM_LIBPNG
2634 define gb_LinkTarget__use_libpng
2635 $(call gb_LinkTarget_set_include,$(1),\
2636 $(LIBPNG_CFLAGS) \
2637 $$(INCLUDE) \
2639 $(call gb_LinkTarget_use_static_libraries,$(1),\
2640 libpng \
2642 $(call gb_LinkTarget__use_zlib,$(1))
2644 endef
2646 define gb_ExternalProject__use_libpng
2647 $(call gb_ExternalProject_use_static_libraries,$(1),\
2648 libpng \
2651 endef
2653 endif # !SYSTEM_LIBPNG
2655 ifneq ($(SYSTEM_LIBTIFF),)
2657 define gb_LinkTarget__use_libtiff
2658 $(call gb_LinkTarget_set_include,$(1),\
2659 $$(INCLUDE) \
2660 $(LIBTIFF_CFLAGS) \
2663 $(call gb_LinkTarget_add_libs,$(1),\
2664 $(LIBTIFF_LIBS) \
2667 endef
2669 gb_ExternalProject__use_libtiff :=
2671 else # !SYSTEM_LIBTIFF
2673 define gb_LinkTarget__use_libtiff
2674 $(call gb_LinkTarget_set_include,$(1),\
2675 $(LIBTIFF_CFLAGS) \
2676 $$(INCLUDE) \
2679 $(call gb_LinkTarget_set_include,$(1),\
2680 -I$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff \
2681 $$(INCLUDE) \
2683 ifeq ($(OS),WNT)
2684 $(call gb_LinkTarget_add_libs,$(1),\
2685 $(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs/libtiff$(gb_StaticLibrary_PLAINEXT) \
2687 else
2688 $(call gb_LinkTarget_add_libs,$(1),\
2689 -L$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs -ltiff \
2691 endif
2692 $(call gb_LinkTarget_use_external_project,$(1),libtiff,full)
2694 endef
2696 define gb_ExternalProject__use_libtiff
2697 $(call gb_ExternalProject_use_external_project,$(1),libtiff)
2699 endef
2701 endif # !SYSTEM_LIBTIFF
2703 ifneq ($(SYSTEM_LIBWEBP),)
2705 define gb_LinkTarget__use_libwebp
2706 $(call gb_LinkTarget_set_include,$(1),\
2707 $$(INCLUDE) \
2708 $(LIBWEBP_CFLAGS) \
2711 $(call gb_LinkTarget_add_libs,$(1),\
2712 $(LIBWEBP_LIBS) \
2715 endef
2717 gb_ExternalProject__use_libwebp :=
2719 else # !SYSTEM_LIBWEBP
2721 define gb_LinkTarget__use_libwebp
2722 $(call gb_LinkTarget_set_include,$(1),\
2723 $(LIBWEBP_CFLAGS) \
2724 $$(INCLUDE) \
2727 $(call gb_LinkTarget_set_include,$(1),\
2728 -I$(call gb_UnpackedTarball_get_dir,libwebp)/src \
2729 $$(INCLUDE) \
2731 ifeq ($(OS),WNT)
2732 $(call gb_LinkTarget_add_libs,$(1),\
2733 $(call gb_UnpackedTarball_get_dir,libwebp)/output/lib/libwebp$(if $(MSVC_USE_DEBUG_RUNTIME),_debug)$(gb_StaticLibrary_PLAINEXT) \
2735 else
2736 $(call gb_LinkTarget_add_libs,$(1),\
2737 -L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
2738 -L$(call gb_UnpackedTarball_get_dir,libwebp)/sharpyuv/.libs -lsharpyuv \
2740 endif
2741 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
2743 endef
2745 define gb_ExternalProject__use_libwebp
2746 $(call gb_ExternalProject_use_external_project,$(1),libwebp)
2748 endef
2750 endif # !SYSTEM_LIBWEBP
2753 ifneq ($(SYSTEM_CURL),)
2755 define gb_LinkTarget__use_curl
2756 $(call gb_LinkTarget_add_defs,$(1),\
2757 -DSYSTEM_CURL \
2759 $(call gb_LinkTarget_set_include,$(1),\
2760 $$(INCLUDE) \
2761 $(CURL_CFLAGS) \
2763 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2765 endef
2767 else # !SYSTEM_CURL
2769 $(if $(ENABLE_CURL),\
2770 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2771 curl \
2774 define gb_LinkTarget__use_curl
2775 $(call gb_LinkTarget_use_package,$(1),curl)
2776 $(call gb_LinkTarget_set_include,$(1),\
2777 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2778 $$(INCLUDE) \
2781 ifeq ($(COM),MSC)
2782 $(call gb_LinkTarget_add_libs,$(1),\
2783 $(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 \
2785 else
2786 $(call gb_LinkTarget_add_libs,$(1),\
2787 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2789 endif
2791 endef
2793 endif # SYSTEM_CURL
2795 ifeq ($(ENABLE_VALGRIND),TRUE)
2797 define gb_LinkTarget__use_valgrind
2798 $(call gb_LinkTarget_add_defs,$(1),\
2799 -DHAVE_VALGRIND_HEADERS \
2802 $(call gb_LinkTarget_set_include,$(1),\
2803 $$(INCLUDE) \
2804 $(VALGRIND_CFLAGS) \
2807 endef
2809 else # !ENABLE_VALGRIND
2811 define gb_LinkTarget__use_valgrind
2813 endef
2815 endif # ENABLE_VALGRIND
2817 ifeq ($(ENABLE_POPPLER),TRUE)
2819 ifneq ($(SYSTEM_POPPLER),)
2821 define gb_LinkTarget__use_poppler
2822 $(call gb_LinkTarget_set_include,$(1),\
2823 $(POPPLER_CFLAGS) \
2824 $$(INCLUDE) \
2827 $(call gb_LinkTarget_add_libs,$(1),\
2828 $(POPPLER_LIBS) \
2831 endef
2833 else # !SYSTEM_POPPLER
2835 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2836 poppler_data \
2839 define gb_LinkTarget__use_poppler
2840 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2841 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2842 $(call gb_LinkTarget_set_include,$(1),\
2843 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2844 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2845 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2846 $$(INCLUDE) \
2849 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2850 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2852 ifeq ($(OS),MACOSX)
2853 $(call gb_LinkTarget_add_libs,$(1),\
2854 -lobjc \
2856 else ifeq ($(OS),LINUX)
2857 $(call gb_LinkTarget_add_libs,$(1),\
2858 -pthread \
2860 else ifeq ($(OS),WNT)
2861 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2862 advapi32 \
2863 gdi32 \
2865 endif
2867 endef
2869 endif # SYSTEM_POPPLER
2871 endif # ENABLE_POPPLER
2874 ifneq ($(SYSTEM_CLUCENE),)
2876 define gb_LinkTarget__use_clucene
2877 $(call gb_LinkTarget_add_defs,$(1),\
2878 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2879 -DSYSTEM_CLUCENE \
2882 $(call gb_LinkTarget_set_include,$(1),\
2883 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2884 $$(INCLUDE) \
2887 $(call gb_LinkTarget_add_libs,$(1),\
2888 $(CLUCENE_LIBS) \
2891 endef
2893 else # !SYSTEM_CLUCENE
2895 define gb_LinkTarget__use_clucene
2896 $(call gb_LinkTarget_set_include,$(1),\
2897 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2898 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2899 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2900 $$(INCLUDE) \
2903 $(call gb_LinkTarget_use_libraries,$(1),\
2904 clucene \
2907 endef
2909 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2910 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2913 endif # SYSTEM_CLUCENE
2915 define gb_LinkTarget__use_gobject
2916 $(call gb_LinkTarget_add_libs,$(1),\
2917 $(GOBJECT_LIBS) \
2920 $(call gb_LinkTarget_set_include,$(1),\
2921 $$(INCLUDE) \
2922 $(GOBJECT_CFLAGS) \
2924 endef
2926 ifneq ($(SYSTEM_HSQLDB),)
2928 define gb_LinkTarget__use_hsqldb
2930 $(call gb_LinkTarget_add_defs,$(1),\
2931 -DSYSTEM_HSQLDB \
2932 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2935 endef
2937 else # !SYSTEM_HSQLDB
2939 define gb_LinkTarget__use_hsqldb
2941 endef
2943 endif # SYSTEM_HSQLDB
2945 ifeq ($(ENABLE_LDAP),TRUE)
2946 ifneq ($(SYSTEM_OPENLDAP),)
2948 define gb_LinkTarget__use_openldap
2950 $(call gb_LinkTarget_add_libs,$(1),\
2951 -lldap \
2952 -llber \
2955 endef
2957 gb_ExternalProject__use_openldap :=
2959 else # !SYSTEM_OPENLDAP
2961 define gb_LinkTarget__use_openldap
2962 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2963 $(call gb_LinkTarget_set_include,$(1),\
2964 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2965 $$(INCLUDE) \
2967 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2968 $(call gb_LinkTarget_add_libs,$(1), \
2969 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2970 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2973 endef
2974 endif
2976 define gb_ExternalProject__use_openldap
2977 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2979 endef
2981 endif # SYSTEM_OPENLDAP
2983 ifneq ($(SYSTEM_LIBTOMMATH),)
2985 define gb_LinkTarget__use_libtommath
2986 $(call gb_LinkTarget_set_include,$(1),\
2987 $(LIBTOMMATH_CFLAGS) \
2988 $$(INCLUDE) \
2990 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2992 endef
2994 else # !SYSTEM_LIBTOMMATH
2995 define gb_LinkTarget__use_libtommath
2996 $(call gb_LinkTarget_set_include,$(1),\
2997 -I${WORKDIR}/UnpackedTarball/libtommath \
2998 $$(INCLUDE) \
3000 $(call gb_LinkTarget_add_libs,$(1),\
3001 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
3003 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
3005 endef
3007 endif # SYSTEM_LIBTOMMATH
3009 define gb_ExternalProject__use_libtommath
3010 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
3012 endef
3014 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
3016 ifneq ($(SYSTEM_FIREBIRD),)
3018 define gb_LinkTarget__use_libfbembed
3019 $(call gb_LinkTarget_set_include,$(1),\
3020 $(FIREBIRD_CFLAGS) \
3021 $$(INCLUDE) \
3023 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3025 endef
3027 else # !SYSTEM_FIREBIRD
3029 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3030 firebird \
3033 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3034 #$(call gb_LinkTarget__use_libtommath,$(1))
3036 define gb_LinkTarget__use_libfbembed
3037 $(call gb_LinkTarget_use_package,$(1),firebird)
3038 $(call gb_LinkTarget_set_include,$(1),\
3039 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3040 $$(INCLUDE) \
3042 ifeq ($(COM),MSC)
3043 $(call gb_LinkTarget_add_libs,$(1),\
3044 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3046 else
3047 $(call gb_LinkTarget_add_libs,$(1),\
3048 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3050 endif
3052 endef
3055 # endef
3057 endif # SYSTEM_FIREBIRD
3059 else # !ENABLE_FIREBIRD_SDBC
3061 gb_LinkTarget__use_firebird :=
3062 # gb_LinkTarget__use_atomic_ops :=
3063 # gb_LinkTarget__use_libtommath :=
3065 endif # ENABLE_FIREBIRD_SDBC
3068 ifneq ($(SYSTEM_POSTGRESQL),)
3070 define gb_LinkTarget__use_postgresql
3072 $(call gb_LinkTarget_set_include,$(1),\
3073 $(POSTGRESQL_INC) \
3074 $$(INCLUDE) \
3077 $(call gb_LinkTarget_add_libs,$(1),\
3078 -lpq \
3081 $(call gb_LinkTarget_add_ldflags,$(1),\
3082 $(POSTGRESQL_LIB) \
3085 endef
3087 else # !SYSTEM_POSTGRESQL
3089 ifeq ($(OS),WNT)
3090 $(if $(MPL_SUBSET),,\
3091 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3092 postgresql \
3094 endif # WNT
3096 define gb_LinkTarget__use_postgresql
3098 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3100 $(call gb_LinkTarget_set_include,$(1),\
3101 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3102 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3103 $$(INCLUDE) \
3106 ifeq ($(OS),WNT)
3108 $(call gb_LinkTarget_add_libs,$(1),\
3109 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3112 else # !WNT
3114 $(call gb_LinkTarget_add_libs,$(1),\
3115 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3116 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3117 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3118 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3121 endif # !WNT
3123 endef # gb_LinkTarget__use_postgresql
3125 endif # !SYSTEM_POSTGRESQL
3127 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3129 define gb_LinkTarget__use_kf5
3130 $(call gb_LinkTarget_set_include,$(1),\
3131 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3132 $$(INCLUDE) \
3135 $(call gb_LinkTarget_add_cxxflags,$(1),\
3136 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3139 $(call gb_LinkTarget_add_libs,$(1),\
3140 $(KF5_LIBS) \
3143 endef
3145 else # !ENABLE_KF5
3147 define gb_LinkTarget__use_kf5
3149 endef
3151 endif # ENABLE_KF5
3153 ifneq (,$(filter TRUE,$(ENABLE_KF6)))
3155 define gb_LinkTarget__use_kf6
3156 $(call gb_LinkTarget_set_include,$(1),\
3157 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF6_CFLAGS)))) \
3158 $$(INCLUDE) \
3161 $(call gb_LinkTarget_add_cxxflags,$(1),\
3162 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF6_CFLAGS))) \
3165 $(call gb_LinkTarget_add_libs,$(1),\
3166 $(KF6_LIBS) \
3169 endef
3171 else # !ENABLE_KF6
3173 define gb_LinkTarget__use_kf6
3175 endef
3177 endif # ENABLE_KF6
3179 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3181 define gb_LinkTarget__use_qt5
3182 $(call gb_LinkTarget_set_include,$(1),\
3183 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3184 $$(INCLUDE) \
3187 $(call gb_LinkTarget_add_defs,$(1),\
3188 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3191 $(call gb_LinkTarget_add_libs,$(1),\
3192 $(QT5_LIBS) \
3195 endef
3197 else # !ENABLE_QT5
3199 define gb_LinkTarget__use_qt5
3201 endef
3203 endif # ENABLE_QT5
3205 ifeq ($(ENABLE_QT6),TRUE)
3207 define gb_LinkTarget__use_qt6
3208 $(call gb_LinkTarget_set_include,$(1),\
3209 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3210 $$(INCLUDE) \
3213 $(call gb_LinkTarget_add_defs,$(1),\
3214 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3217 $(call gb_LinkTarget_add_libs,$(1),\
3218 $(QT6_LIBS) \
3221 endef
3223 else # !ENABLE_QT6
3225 define gb_LinkTarget__use_qt6
3227 endef
3229 endif # ENABLE_QT6
3232 # PYTHON
3233 # extra python_headers external because pyuno wrapper must not link python
3234 ifneq ($(SYSTEM_PYTHON),)
3236 define gb_LinkTarget__use_python_headers
3237 $(call gb_LinkTarget_add_defs,$(1),\
3238 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3241 $(call gb_LinkTarget_set_include,$(1),\
3242 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3243 $$(INCLUDE) \
3246 endef
3248 define gb_LinkTarget__use_python
3249 $(call gb_LinkTarget__use_python_headers,$(1))
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 $(PYTHON_LIBS) \
3255 endef
3257 else # !SYSTEM_PYTHON
3259 $(eval $(call gb_Helper_register_packages_for_install,python,\
3260 python3 \
3261 $(if $(filter WNT,$(OS)),libffi) \
3264 define gb_LinkTarget__use_python_headers
3265 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3266 $(call gb_LinkTarget_set_include,$(1),\
3267 -I$(call gb_UnpackedTarball_get_dir,python3) \
3268 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3269 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3270 $$(INCLUDE) \
3273 endef
3275 define gb_LinkTarget__use_python
3276 $(call gb_LinkTarget__use_python_headers,$(1))
3277 ifeq ($(OS),MACOSX)
3278 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3279 else
3280 $(call gb_LinkTarget_use_package,$(1),python3)
3281 endif
3283 ifeq ($(OS),WNT)
3284 ifeq ($(CPUNAME),X86_64)
3285 python_arch_subdir=amd64/
3286 else ifeq ($(CPUNAME),AARCH64)
3287 python_arch_subdir=arm64/
3288 else
3289 python_arch_subdir=win32/
3290 endif
3291 $(call gb_LinkTarget_add_libs,$(1),\
3292 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3294 else ifeq ($(OS),MACOSX)
3295 $(call gb_LinkTarget_add_libs,$(1),\
3296 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3298 else
3299 $(call gb_LinkTarget_add_libs,$(1),\
3300 -L$(call gb_UnpackedTarball_get_dir,python3) \
3301 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3303 endif
3305 endef
3307 # this is only used by python currently
3308 define gb_ExternalProject__use_libffi
3309 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3311 endef
3313 endif # SYSTEM_PYTHON
3315 # ORCUS
3316 ifneq ($(SYSTEM_LIBORCUS),)
3318 define gb_LinkTarget__use_orcus
3319 $(call gb_LinkTarget_set_include,$(1),\
3320 $$(INCLUDE) \
3321 $(ORCUS_CFLAGS) \
3323 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3324 endef
3326 define gb_LinkTarget__use_orcus-parser
3328 endef
3330 else # !SYSTEM_LIBORCUS
3332 ifeq ($(COM),MSC)
3334 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3335 orcus \
3336 orcus-parser \
3339 define gb_LinkTarget__use_orcus
3340 $(call gb_LinkTarget_set_include,$(1),\
3341 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3342 $$(INCLUDE) \
3345 $(call gb_LinkTarget_use_libraries,$(1),\
3346 orcus \
3349 endef
3351 define gb_LinkTarget__use_orcus-parser
3352 $(call gb_LinkTarget_set_include,$(1),\
3353 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3354 $$(INCLUDE) \
3357 $(call gb_LinkTarget_use_libraries,$(1),\
3358 orcus-parser \
3361 endef
3363 else # !MSC
3365 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3366 liborcus \
3369 define gb_LinkTarget__use_orcus
3370 $(call gb_LinkTarget_use_package,$(1),liborcus)
3372 $(call gb_LinkTarget_set_include,$(1),\
3373 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3374 $$(INCLUDE) \
3377 $(call gb_LinkTarget_add_libs,$(1),\
3378 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.18 \
3381 $(if $(SYSTEM_BOOST), \
3382 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3383 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3386 endef
3388 define gb_LinkTarget__use_orcus-parser
3389 $(call gb_LinkTarget_use_package,$(1),liborcus)
3391 $(call gb_LinkTarget_set_include,$(1),\
3392 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3393 $$(INCLUDE) \
3396 $(call gb_LinkTarget_add_libs,$(1),\
3397 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.18 \
3400 endef
3402 endif # MSC
3404 endif # SYSTEM_LIBORCUS
3406 ifeq ($(ENABLE_EOT),TRUE)
3408 ifneq ($(SYSTEM_LIBEOT),)
3410 define gb_LinkTarget__use_libeot
3411 $(call gb_LinkTarget_set_include,$(1),\
3412 $$(INCLUDE) \
3413 $(LIBEOT_CFLAGS) \
3415 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3417 endef
3419 gb_ExternalProject__use_libeot :=
3421 else # !SYSTEM_LIBEOT
3423 define gb_LinkTarget__use_libeot
3424 $(call gb_LinkTarget_set_include,$(1),\
3425 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3426 $$(INCLUDE) \
3428 $(call gb_LinkTarget_add_libs,$(1),\
3429 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3431 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3433 endef
3435 define gb_ExternalProject__use_libeot
3436 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3438 endef
3440 endif # SYSTEM_LIBEOT
3442 else # !ENABLE_EOT
3444 gb_LinkTarget__use_libeot :=
3445 gb_ExternalProject__use_libeot :=
3447 endif # ENABLE_EOT
3449 ### X11 stuff ###
3451 ifeq ($(USING_X11), TRUE)
3453 define gb_LinkTarget__use_Xrandr
3454 $(call gb_LinkTarget_set_include,$(1),\
3455 $$(INCLUDE) \
3456 $(XRANDR_CFLAGS) \
3459 $(call gb_LinkTarget_add_libs,$(1),\
3460 $(XRANDR_LIBS) \
3462 endef
3464 define gb_LinkTarget__use_Xrender
3465 $(call gb_LinkTarget_set_include,$(1),\
3466 $$(INCLUDE) \
3467 $(XRENDER_CFLAGS) \
3470 $(call gb_LinkTarget_add_libs,$(1),\
3471 $(XRENDER_LIBS) \
3473 endef
3475 endif # USING_X11
3478 gb_ExternalProject__use_nss3:=
3481 ifneq ($(SYSTEM_NSS),)
3483 define gb_LinkTarget__use_nss3
3484 $(call gb_LinkTarget_add_defs,$(1),\
3485 -DSYSTEM_NSS \
3488 $(call gb_LinkTarget_set_include,$(1),\
3489 $$(INCLUDE) \
3490 $(NSS_CFLAGS) \
3493 $(call gb_LinkTarget_add_libs,$(1),\
3494 $(NSS_LIBS) \
3497 endef
3499 define gb_LinkTarget__use_nssutil3
3500 $(call gb_LinkTarget__use_nss3,$(1))
3502 endef
3504 define gb_LinkTarget__use_plc4
3505 $(call gb_LinkTarget__use_nss3,$(1))
3507 endef
3509 define gb_LinkTarget__use_ssl3
3510 $(call gb_LinkTarget__use_nss3,$(1))
3512 endef
3514 else # !SYSTEM_NSS
3516 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3517 nss \
3520 define gb_LinkTarget__use_nss3
3521 $(call gb_LinkTarget_use_package,$(1),nss)
3522 $(call gb_LinkTarget_set_include,$(1),\
3523 $$(INCLUDE) \
3524 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3525 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3528 ifeq ($(COM),MSC)
3529 $(call gb_LinkTarget_add_libs,$(1),\
3530 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3531 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3532 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3534 else
3535 $(call gb_LinkTarget_add_libs,$(1),\
3536 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3537 -lnspr4 \
3538 -lnss3 \
3539 -lsmime3 \
3541 endif
3543 endef
3545 define gb_LinkTarget__use_plc4
3546 $(call gb_LinkTarget_use_package,$(1),nss)
3547 ifeq ($(COM),MSC)
3548 $(call gb_LinkTarget_add_libs,$(1),\
3549 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3551 else
3552 $(call gb_LinkTarget_add_libs,$(1),\
3553 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3555 endif
3557 endef
3559 define gb_LinkTarget__use_ssl3
3560 $(call gb_LinkTarget_use_package,$(1),nss)
3561 ifeq ($(COM),MSC)
3562 $(call gb_LinkTarget_add_libs,$(1),\
3563 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3565 else
3566 $(call gb_LinkTarget_add_libs,$(1),\
3567 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3569 endif
3571 endef
3573 define gb_LinkTarget__use_nssutil3
3574 $(call gb_LinkTarget_use_package,$(1),nss)
3575 $(call gb_LinkTarget_set_include,$(1),\
3576 $$(INCLUDE) \
3577 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3578 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3581 ifeq ($(COM),MSC)
3582 $(call gb_LinkTarget_add_libs,$(1),\
3583 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3585 else
3586 $(call gb_LinkTarget_add_libs,$(1),\
3587 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3588 -lnssutil3 \
3590 endif
3592 endef
3594 define gb_ExternalProject__use_nss3
3595 $(call gb_ExternalProject_use_package,$(1),nss)
3597 endef
3599 endif # SYSTEM_NSS
3601 ifeq ($(ENABLE_BREAKPAD),TRUE)
3603 define gb_LinkTarget__use_breakpad
3604 $(call gb_LinkTarget_set_include,$(1),\
3605 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3606 $$(INCLUDE) \
3609 ifeq ($(COM),MSC)
3610 $(call gb_LinkTarget_use_static_libraries,$(1),\
3611 breakpad \
3613 else
3614 $(call gb_LinkTarget_add_libs,$(1),\
3615 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3617 endif
3619 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3621 endef
3623 endif # ENABLE_BREAKPAD
3625 ifeq ($(ENABLE_GPGMEPP),TRUE)
3627 ifneq ($(SYSTEM_GPGMEPP),)
3629 gb_ExternalProject__use_gpgmepp:=
3630 gb_ExternalProject__use_libassuan:=
3631 gb_ExternalProject__use_libgpg-error:=
3633 define gb_LinkTarget__use_gpgmepp
3634 $(call gb_LinkTarget_set_include,$(1),\
3635 $$(INCLUDE) \
3636 $$(GPGMEPP_CFLAGS) \
3639 $(call gb_LinkTarget_add_libs,$(1),\
3640 $(GPGMEPP_LIBS) \
3643 endef
3645 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3647 define gb_ExternalProject__use_gpgmepp
3648 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3650 endef
3651 define gb_ExternalProject__use_libassuan
3652 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3654 endef
3655 define gb_ExternalProject__use_libgpg-error
3656 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3658 endef
3660 ifneq ($(filter WNT,$(OS)),)
3662 define gb_LinkTarget__use_libgpg-error
3663 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3665 $(call gb_LinkTarget_set_include,$(1),\
3666 $(GPG_ERROR_CFLAGS) \
3667 $$(INCLUDE) \
3669 $(call gb_LinkTarget_add_libs,$(1),\
3670 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3673 endef
3675 define gb_LinkTarget__use_libassuan
3676 $(call gb_LinkTarget_use_package,$(1),libassuan)
3678 $(call gb_LinkTarget_set_include,$(1),\
3679 $(LIBASSUAN_CFLAGS) \
3680 $$(INCLUDE) \
3682 $(call gb_LinkTarget_add_libs,$(1),\
3683 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3686 endef
3688 define gb_LinkTarget__use_gpgmepp
3689 $(call gb_LinkTarget_set_include,$(1),\
3690 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3691 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3692 $$(GPG_ERROR_CFLAGS) \
3693 $$(INCLUDE) \
3695 $(call gb_LinkTarget_use_libraries,$(1),\
3696 gpgmepp \
3699 endef
3701 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3702 gpgmepp \
3703 libassuan \
3704 libgpg-error \
3707 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3708 gpgmepp \
3711 endif
3713 ifneq ($(filter MACOSX LINUX,$(OS)),)
3715 define gb_LinkTarget__use_gpgmepp
3716 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3718 $(call gb_LinkTarget_set_include,$(1),\
3719 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3720 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3721 $$(GPG_ERROR_CFLAGS) \
3722 $$(INCLUDE) \
3724 $(call gb_LinkTarget_add_libs,$(1),\
3725 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3726 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3727 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3728 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3731 endef
3733 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3734 gpgmepp \
3735 libassuan \
3736 libgpg-error \
3739 endif
3741 endif
3743 else # !ENABLE_GPGMEPP
3745 gb_ExternalProject__use_gpgmepp :=
3746 gb_ExternalProject__use_libassuan :=
3747 gb_ExternalProject__use_libgpg-error :=
3749 gb_LinkTarget__use_gpgmepp :=
3750 gb_LinkTarget__use_libassuan :=
3751 gb_LinkTarget__use_libgpg-error :=
3753 endif # ENABLE_GPGMEPP
3755 define gb_LinkTarget__use_dconf
3756 $(call gb_LinkTarget_set_include,$(1),\
3757 $$(INCLUDE) \
3758 $(DCONF_CFLAGS) \
3761 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3762 endef
3764 ### Jars ############################################################
3766 ifneq ($(SYSTEM_HSQLDB),)
3768 define gb_Jar__use_hsqldb
3769 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3770 endef
3771 define gb_JunitTest__use_hsqldb
3772 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3773 endef
3775 else # !SYSTEM_HSQLDB
3777 ifeq ($(ENABLE_JAVA),TRUE)
3778 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3779 hsqldb \
3781 endif
3783 define gb_Jar__use_hsqldb
3784 $(call gb_Jar_use_jar,$(1),hsqldb)
3785 endef
3786 define gb_JunitTest__use_hsqldb
3787 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3788 endef
3790 endif # SYSTEM_HSQLDB
3793 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3795 ifneq ($(SYSTEM_BSH),)
3797 define gb_Jar__use_bsh
3798 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3799 endef
3801 else # !SYSTEM_BSH
3803 ifeq ($(ENABLE_JAVA),TRUE)
3804 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3805 bsh \
3807 endif
3809 define gb_Jar__use_bsh
3810 $(call gb_Jar_use_jar,$(1),bsh)
3811 endef
3813 endif # SYSTEM_BSH
3815 endif
3817 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3819 ifneq ($(SYSTEM_RHINO),)
3821 define gb_Jar__use_rhino
3822 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3823 endef
3825 else # !SYSTEM_RHINO
3827 ifeq ($(ENABLE_JAVA),TRUE)
3828 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3829 js \
3831 endif
3833 define gb_Jar__use_rhino
3834 $(call gb_Jar_use_jar,$(1),js)
3835 endef
3837 endif # SYSTEM_RHINO
3839 endif
3841 ifneq ($(SYSTEM_JFREEREPORT),)
3843 define gb_Jar__use_flow-engine
3844 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3845 endef
3847 define gb_Jar__use_flute
3848 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3849 endef
3851 define gb_Jar__use_libbase
3852 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3853 endef
3855 define gb_Jar__use_libfonts
3856 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3857 endef
3859 define gb_Jar__use_libformula
3860 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3861 endef
3863 define gb_Jar__use_liblayout
3864 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3865 endef
3867 define gb_Jar__use_libloader
3868 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3869 endef
3871 define gb_Jar__use_librepository
3872 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3873 endef
3875 define gb_Jar__use_libserializer
3876 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3877 endef
3879 define gb_Jar__use_libxml
3880 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3881 endef
3883 define gb_Jar__use_sac
3884 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3885 endef
3887 else # !SYSTEM_JFREEREPORT
3889 ifeq ($(ENABLE_JAVA),TRUE)
3890 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3891 flow-engine \
3892 flute-1.1.6 \
3893 libbase-1.1.6 \
3894 libfonts-1.1.6 \
3895 libformula-1.1.7 \
3896 liblayout \
3897 libloader-1.1.6 \
3898 librepository-1.1.6 \
3899 libserializer-1.1.6 \
3900 libxml-1.1.7 \
3901 sac \
3903 endif
3905 define gb_Jar__use_flow-engine
3906 $(call gb_Jar_use_jar,$(1),flow-engine)
3907 endef
3909 define gb_Jar__use_flute
3910 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3911 endef
3913 define gb_Jar__use_libbase
3914 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3915 endef
3917 define gb_Jar__use_libfonts
3918 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3919 endef
3921 define gb_Jar__use_libformula
3922 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3923 endef
3925 define gb_Jar__use_liblayout
3926 $(call gb_Jar_use_jar,$(1),liblayout)
3927 endef
3929 define gb_Jar__use_libloader
3930 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3931 endef
3933 define gb_Jar__use_librepository
3934 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3935 endef
3937 define gb_Jar__use_libserializer
3938 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3939 endef
3941 define gb_Jar__use_libxml
3942 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3943 endef
3945 define gb_Jar__use_sac
3946 $(call gb_Jar_use_jar,$(1),sac)
3947 endef
3949 endif # SYSTEM_JFREEREPORT
3951 # no known distro packaged Java-Websocket at present
3953 ifeq ($(ENABLE_JAVA),TRUE)
3954 $(eval $(call gb_Helper_register_jars_for_install,URE,ure, \
3955 java_websocket \
3957 endif
3959 define gb_Jar__use_java_websocket
3960 $(call gb_Jar_use_jar,$(1),java_websocket)
3961 endef
3963 # Executables
3965 define gb_Executable__register_bestreversemap
3966 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3967 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3969 endef
3971 # TODO depending on the whole URE might be overkill, but I do not have a
3972 # Windows machine to debug it...
3973 define gb_Executable__register_climaker
3974 $(call gb_Executable_add_runtime_dependencies,climaker,\
3975 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3976 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3977 $(call gb_UnoApi_get_target_for_build,udkapi) \
3978 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3980 endef
3982 define gb_Executable__register_cppumaker
3983 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3984 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3986 endef
3988 # This is used to determine what we need for 'build' platform.
3989 define gb_Executable__register_gengal
3990 $(call gb_Executable_add_runtime_dependencies,gengal,\
3991 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3992 $(call gb_Library_get_target_for_build,localedata_en) \
3993 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3994 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3995 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3996 $(call gb_Package_get_target_for_build,postprocess_registry) \
3997 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3998 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3999 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
4000 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4001 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
4002 $(call gb_UnoApi_get_target_for_build,offapi) \
4003 $(call gb_UnoApi_get_target_for_build,udkapi) \
4005 endef
4007 ifeq ($(SYSTEM_ICU),)
4009 define gb_Executable__register_gendict
4010 $(call gb_Executable_add_runtime_dependencies,gendict,\
4011 $(call gb_Package_get_target_for_build,icu) \
4012 $(call gb_Package_get_target_for_build,icu_ure) \
4014 endef
4016 endif
4018 define gb_Executable__register_localize
4019 $(call gb_Executable_add_runtime_dependencies,localize,\
4020 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
4021 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
4024 endef
4026 # FIXME ure/services.rdb needs cleanup
4027 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
4028 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
4029 define gb_Executable__register_saxparser
4030 $(call gb_Executable_add_runtime_dependencies,saxparser,\
4031 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4032 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
4033 $(call gb_Rdb_get_target_for_build,saxparser) \
4034 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
4035 $(call gb_UnoApi_get_target_for_build,udkapi) \
4037 endef
4039 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
4040 # required due to the settings for URE_SERVICES and URE_TYPES in
4041 # cppuhelper/source/unorc
4042 define gb_Executable__register_uno
4043 $(call gb_Executable_add_runtime_dependencies,uno,\
4044 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
4045 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
4046 $(call gb_UnoApi_get_target_for_build,udkapi) \
4048 endef
4051 # External executables
4053 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4055 gb_ExternalExecutable__register_xmllint :=
4057 else # ! SYSTEM_LIBXML_FOR_BUILD
4059 define gb_ExternalExecutable__register_xmllint
4060 $(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)
4061 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4062 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4063 $(call gb_Package_get_target,libxml2) \
4066 endef
4068 endif # SYSTEM_LIBXML_FOR_BUILD
4070 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4072 gb_ExternalExecutable__register_xsltproc :=
4074 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4076 define gb_ExternalExecutable__register_xsltproc
4077 $(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)
4078 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4079 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4080 $(call gb_Package_get_target,libxml2) \
4081 $(call gb_Package_get_target,libxslt) \
4084 endef
4086 endif # SYSTEM_LIBXSLT_FOR_BUILD
4088 ifeq (,$(PYTHON_FOR_BUILD))
4090 define gb_ExternalExecutable__register_python
4091 ifeq ($(OS),MACOSX)
4093 # use set_external, to avoid having the command added as prerequisite for the
4094 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4095 # matching rule to build that specific file)
4096 $(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))
4097 # the Zip ensures that internal python has been built (cannot use the Package
4098 # target, as that is not used on Mac)
4099 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4101 else
4103 $(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))
4104 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4105 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4107 endif
4109 endef
4111 else
4113 define gb_ExternalExecutable__register_python
4114 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4116 endef
4118 endif # PYTHON_FOR_BUILD
4120 ifneq ($(SYSTEM_GENBRK),)
4122 define gb_ExternalExecutable__register_genbrk
4123 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4125 endef
4127 else # ! SYSTEM_GENBRK
4129 define gb_ExternalExecutable__register_genbrk
4130 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4131 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4132 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4133 $(call gb_Package_get_target_for_build,icu) \
4134 $(call gb_Package_get_target_for_build,icu_ure) \
4137 endef
4139 endif
4141 ifneq ($(SYSTEM_GENCCODE),)
4143 define gb_ExternalExecutable__register_genccode
4144 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4146 endef
4148 else # ! SYSTEM_GENCCODE
4150 define gb_ExternalExecutable__register_genccode
4151 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4152 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4153 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4154 $(call gb_Package_get_target_for_build,icu) \
4155 $(call gb_Package_get_target_for_build,icu_ure) \
4158 endef
4160 endif
4162 ifneq ($(SYSTEM_GENCMN),)
4164 define gb_ExternalExecutable__register_gencmn
4165 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4167 endef
4169 else # ! SYSTEM_GENCMN
4171 define gb_ExternalExecutable__register_gencmn
4172 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4173 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4174 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4175 $(call gb_Package_get_target_for_build,icu) \
4176 $(call gb_Package_get_target_for_build,icu_ure) \
4179 endef
4181 endif
4183 ifneq ($(SYSTEM_BZIP2),)
4185 define gb_LinkTarget__use_bzip2
4186 $(call gb_LinkTarget_set_include,$(1),\
4187 $(BZIP2_CFLAGS) \
4188 $$(INCLUDE) \
4190 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4192 endef
4194 gb_ExternalProject__use_bzip2 :=
4196 else # !SYSTEM_BZIP2
4198 define gb_LinkTarget__use_bzip2
4199 $(call gb_LinkTarget_set_include,$(1),\
4200 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4201 $$(INCLUDE) \
4204 ifeq ($(COM),MSC)
4205 $(call gb_LinkTarget_add_libs,$(1),\
4206 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4208 else
4209 $(call gb_LinkTarget_add_libs,$(1),\
4210 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4212 endif
4214 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4215 endef
4217 define gb_ExternalProject__use_bzip2
4218 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4219 endef
4221 endif # SYSTEM_BZIP2
4223 define gb_LinkTarget__use_clew
4224 $(call gb_LinkTarget_set_include,$(1), \
4225 -I$(SRCDIR)/external/clew/source/include \
4226 $$(INCLUDE) \
4228 $(call gb_LinkTarget_use_libraries,$(1),clew)
4229 endef
4231 ifneq ($(ENABLE_PDFIUM),)
4232 define gb_LinkTarget__use_pdfium
4233 $(call gb_LinkTarget_set_include,$(1),\
4234 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4235 -DCOMPONENT_BUILD \
4236 $$(INCLUDE) \
4238 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4239 endef
4240 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4241 pdfium \
4243 endif
4245 ifneq ($(SYSTEM_DRAGONBOX),)
4247 define gb_LinkTarget__use_dragonbox
4248 $(call gb_LinkTarget_set_include,$(1),\
4249 $$(INCLUDE) \
4250 $$(DRAGONBOX_CFLAGS) \
4252 endef
4254 else
4256 define gb_LinkTarget__use_dragonbox
4257 $(call gb_LinkTarget_use_unpacked,$(1),dragonbox)
4258 $(call gb_LinkTarget_set_include,$(1),\
4259 -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\
4260 $$(INCLUDE) \
4262 endef
4264 endif
4266 define gb_LinkTarget__use_dtoa
4267 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4268 $(call gb_LinkTarget_set_include,$(1),\
4269 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4270 $$(INCLUDE) \
4272 $(call gb_LinkTarget_use_static_libraries,$(1),\
4273 dtoa \
4276 endef
4278 define gb_ExternalProject__use_dtoa
4279 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4281 endef
4283 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4284 $(if $(UCRT_REDISTDIR),ucrt) \
4287 ifneq ($(SYSTEM_BOX2D),)
4289 define gb_LinkTarget__use_box2d
4290 $(call gb_LinkTarget_set_include,$(1),\
4291 -DSYSTEM_BOX2D \
4292 $$(INCLUDE) \
4293 $(BOX2D_CFLAGS) \
4295 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4297 endef
4299 gb_ExternalProject__use_box2d :=
4301 else # !SYSTEM_BOX2D
4303 define gb_LinkTarget__use_box2d
4304 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4305 $(call gb_LinkTarget_set_include,$(1),\
4306 -I$(call gb_UnpackedTarball_get_dir,box2d/include/)\
4307 $$(INCLUDE) \
4309 $(call gb_LinkTarget_use_static_libraries,$(1),\
4310 box2d \
4313 endef
4315 define gb_ExternalProject__use_box2d
4316 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4318 endef
4320 endif # SYSTEM_BOX2D
4322 ifneq ($(SYSTEM_ZXCVBN),)
4323 define gb_LinkTarget__use_zxcvbn-c
4324 $(call gb_LinkTarget_set_include,$(1),\
4325 -DSYSTEM_ZXCVBN \
4326 $$(INCLUDE) \
4328 $(call gb_LinkTarget_add_libs,$(1),-lzxcvbn)
4329 endef
4331 else
4333 define gb_LinkTarget__use_zxcvbn-c
4334 $(call gb_LinkTarget_use_unpacked,$(1),zxcvbn-c)
4335 $(call gb_LinkTarget_set_include,$(1),\
4336 -I$(call gb_UnpackedTarball_get_dir,zxcvbn-c)\
4337 $$(INCLUDE) \
4339 $(call gb_LinkTarget_use_static_libraries,$(1),\
4340 zxcvbn-c \
4342 endef
4343 endif
4346 ifneq ($(SYSTEM_ZXING),)
4348 define gb_LinkTarget__use_zxing
4349 $(call gb_LinkTarget_set_include,$(1),\
4350 -DSYSTEM_ZXING \
4351 $$(INCLUDE) \
4352 $(ZXING_CFLAGS) \
4354 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4356 endef
4358 gb_ExternalProject__use_zxing :=
4360 else # !SYSTEM_ZXING
4362 ifneq ($(ENABLE_ZXING),)
4364 define gb_LinkTarget__use_zxing
4365 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4366 $(call gb_LinkTarget_set_include,$(1),\
4367 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4368 $$(INCLUDE) \
4370 $(call gb_LinkTarget_use_static_libraries,$(1),\
4371 zxing \
4374 endef
4376 define gb_ExternalProject__use_zxing
4377 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4379 endef
4381 else # !ENABLE_ZXING
4383 define gb_LinkTarget__use_zxing
4384 endef
4386 endif # ENABLE_ZXING
4388 endif # SYSTEM_ZXING
4391 ifneq ($(SYSTEM_FROZEN),)
4392 define gb_LinkTarget__use_frozen
4393 $(call gb_LinkTarget_set_include,$(1),\
4394 $$(INCLUDE) \
4395 $(FROZEN_CFLAGS)
4397 endef
4398 else
4399 define gb_LinkTarget__use_frozen
4400 $(call gb_LinkTarget_use_unpacked,$(1),frozen)
4401 $(call gb_LinkTarget_set_include,$(1),\
4402 -I$(call gb_UnpackedTarball_get_dir,frozen/include/)\
4403 $$(INCLUDE) \
4405 endef
4406 endif
4408 # vim: set noet sw=4 ts=4: