Fix build
[LibreOffice.git] / RepositoryExternal.mk
blobe391bc5ff7c19da10b2b243a578125971d70addf
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 define gb_LinkTarget__use_glm_headers
94 $(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
98 endef
100 gb_ExternalProject__use_glm_headers :=
102 else
104 define gb_LinkTarget__use_glm_headers
105 $(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
108 $(call gb_LinkTarget_use_unpacked,$(1),glm)
109 $(call gb_LinkTarget_set_include,$(1),\
110 $(GLM_CFLAGS) \
111 $$(INCLUDE) \
114 endef
116 define gb_ExternalProject__use_glm_headers
117 $(call gb_ExternalProject_use_unpacked,$(1),glm)
119 endef
121 endif
123 ifneq ($(ENABLE_SKIA),)
124 define gb_LinkTarget__use_skia
125 $(call gb_LinkTarget_set_include,$(1),\
126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/private \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
133 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
134 -I$(call gb_UnpackedTarball_get_dir,skia) \
135 -I$(SRCDIR)/external/skia/inc/ \
136 $$(INCLUDE) \
138 $(call gb_LinkTarget_use_libraries,$(1),skia)
139 $(call gb_LinkTarget_add_defs,$(1),\
140 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
141 -DSKIA_DLL \
143 endef
144 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
145 skia \
147 endif
149 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
151 define gb_LinkTarget__use_sane_headers
152 $(call gb_LinkTarget_set_include,$(1),\
153 $(if $(filter WNT,$(OS)), \
154 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
155 -I$(SRCDIR)/external/sane/inc) \
156 $$(INCLUDE) \
159 ifeq ($(OS),WNT)
160 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
161 endif
163 endef
165 else
167 gb_LinkTarget__use_sane_headers :=
169 endif
171 ifneq ($(SYSTEM_BLUEZ),)
173 gb_LinkTarget__use_bluez_bluetooth_headers :=
175 else # !SYSTEM_BLUEZ
177 define gb_LinkTarget__use_bluez_bluetooth_headers
178 $(call gb_LinkTarget_set_include,$(1),\
179 -I$(SRCDIR)/external/bluez_bluetooth/inc \
180 $$(INCLUDE) \
183 endef
185 endif # SYSTEM_BLUEZ
187 # External libraries
189 ifneq ($(SYSTEM_CPPUNIT),)
191 define gb_LinkTarget__use_cppunit
192 $(call gb_LinkTarget_set_include,$(1),\
193 $$(INCLUDE) \
194 $(CPPUNIT_CFLAGS) \
197 $(call gb_LinkTarget_add_libs,$(1),\
198 $(CPPUNIT_LIBS) \
201 endef
203 else # !SYSTEM_CPPUNIT
205 define gb_LinkTarget__use_cppunit
206 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
210 $$(INCLUDE) \
213 ifeq ($(COM),MSC)
214 $(call gb_LinkTarget_add_libs,$(1),\
215 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
217 else
218 $(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
221 endif
223 endef
225 endif # SYSTEM_CPPUNIT
228 ifeq ($(ENABLE_EPOXY),TRUE)
229 ifeq ($(SYSTEM_EPOXY),TRUE)
231 define gb_LinkTarget__use_epoxy
232 $(call gb_LinkTarget_set_include,$(1),\
233 $$(INCLUDE) \
234 $(EPOXY_CFLAGS) \
236 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
238 endef
240 gb_ExternalProject__use_epoxy :=
242 else # !SYSTEM_EPOXY
244 define gb_LinkTarget__use_epoxy
245 $(call gb_LinkTarget_set_include,$(1),\
246 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
247 $$(INCLUDE) \
250 $(call gb_LinkTarget_use_libraries,$(1),\
251 epoxy \
254 endef
256 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
257 epoxy \
260 define gb_ExternalProject__use_epoxy
261 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
263 endef
265 endif # !SYSTEM_EPOXY
266 else # !ENABLE_EPOXY
268 gb_LinkTarget__use_epoxy :=
269 gb_ExternalProject__use_epoxy :=
271 endif # !ENABLE_EPOXY
274 define gb_LinkTarget__use_iconv
275 ifeq ($(COM),MSC)
276 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
277 else
278 $(call gb_LinkTarget_add_libs,$(1),-liconv)
279 endif
280 endef
282 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
284 define gb_LinkTarget__use_mariadb-connector-c
285 $(call gb_LinkTarget_set_include,$(1),\
286 $$(INCLUDE) \
287 $(MARIADB_CFLAGS) \
289 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
291 endef
292 gb_ExternalProject__use_mariadb-connector-c :=
294 else # !SYSTEM_MARIADB_CONNECTOR_C
296 define gb_LinkTarget__use_mariadb-connector-c
297 $(call gb_LinkTarget_set_include,$(1),\
298 $$(INCLUDE) \
299 $(MARIADB_CFLAGS) \
301 $(call gb_LinkTarget_use_static_libraries,$(1),\
302 mariadb-connector-c \
304 ifeq ($(OS),MACOSX)
305 $(call gb_LinkTarget_add_libs,$(1),\
306 -liconv \
308 endif
309 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
310 ws2_32 \
311 advapi32 \
312 kernel32 \
313 shlwapi \
314 crypt32 \
317 endef
318 define gb_ExternalProject__use_mariadb-connector-c
319 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
321 endef
323 endif # SYSTEM_MARIADB_CONNECTOR_C
326 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
328 define gb_LinkTarget__use_mysql
330 $(call gb_LinkTarget_add_defs,$(1),\
331 -DSYSTEM_MARIADB \
334 $(call gb_LinkTarget_add_libs,$(1),\
335 $(MARIADB_LIBS) \
338 $(call gb_LinkTarget_set_include,$(1),\
339 $(MARIADB_CFLAGS) \
340 $$(INCLUDE) \
342 endef
344 else
346 define gb_LinkTarget__use_mysql
348 $(call gb_LinkTarget_set_include,$(1),\
349 $$(INCLUDE) \
352 endef
354 endif
356 ifneq ($(SYSTEM_ZLIB),)
358 define gb_LinkTarget__use_zlib
359 $(call gb_LinkTarget_add_defs,$(1),\
360 -DSYSTEM_ZLIB \
361 -DZLIB_CONST \
363 $(call gb_LinkTarget_add_libs,$(1),-lz)
365 endef
367 # nothing on system
368 define gb_LinkTarget__use_zlib_x64
370 endef
372 gb_ExternalProject__use_zlib :=
374 else # !SYSTEM_ZLIB
376 define gb_LinkTarget__use_zlib_multiarch
377 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
379 $(call gb_LinkTarget_add_defs,$(1), \
380 -DZLIB_CONST \
383 $(call gb_LinkTarget_set_include,$(1),\
384 $(ZLIB_CFLAGS) \
385 $$(INCLUDE) \
388 $(call gb_LinkTarget_use_static_libraries,$(1),\
389 $(2) \
392 endef
394 define gb_LinkTarget__use_zlib
395 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
397 endef
399 define gb_LinkTarget__use_zlib_x64
400 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
402 endef
404 define gb_ExternalProject__use_zlib
405 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
407 endef
409 endif # SYSTEM_ZLIB
412 ifneq ($(SYSTEM_LIBJPEG),)
414 define gb_LinkTarget__use_libjpeg
415 $(call gb_LinkTarget_set_include,$(1),\
416 $$(INCLUDE) \
417 $(LIBJPEG_CFLAGS) \
419 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
420 $(call gb_LinkTarget_set_ldflags,$(1),\
421 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
424 endef
426 gb_ExternalProject__use_libjpeg :=
428 else
430 define gb_LinkTarget__use_libjpeg
431 $(call gb_LinkTarget_set_include,$(1),\
432 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
433 $$(INCLUDE) \
435 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
437 endef
439 define gb_ExternalProject__use_libjpeg
440 $(call gb_ExternalProject_use_static_libraries,$(1),libjpeg-turbo)
442 endef
444 endif # SYSTEM_LIBJPEG
446 ifneq ($(SYSTEM_MYTHES),)
448 define gb_LinkTarget__use_mythes
449 $(call gb_LinkTarget_set_include,$(1),\
450 $$(INCLUDE) \
451 $(MYTHES_CFLAGS) \
453 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
455 endef
457 else # !SYSTEM_MYTHES
459 define gb_LinkTarget__use_mythes
460 $(call gb_LinkTarget_set_include,$(1),\
461 -I$(call gb_UnpackedTarball_get_dir,mythes) \
462 $$(INCLUDE) \
465 ifeq ($(COM),MSC)
466 $(call gb_LinkTarget_use_static_libraries,$(1),\
467 mythes \
469 else
470 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
471 $(call gb_LinkTarget_use_external_project,$(1),mythes)
472 endif
474 endef
476 endif # SYSTEM_MYTHES
479 ifneq ($(SYSTEM_EXPAT),)
481 define gb_LinkTarget__use_expat_impl
482 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
484 $(call gb_LinkTarget_add_defs,$(1),\
485 -DSYSTEM_EXPAT \
488 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
490 endef
492 gb_ExternalProject__use_expat :=
494 else # !SYSTEM_EXPAT
496 define gb_LinkTarget__use_expat_impl
497 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
499 $(call gb_LinkTarget_set_include,$(1),\
500 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
501 $$(INCLUDE) \
504 $(call gb_LinkTarget_use_static_libraries,$(1),\
505 $(2) \
508 endef
510 define gb_ExternalProject__use_expat
511 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
513 endef
515 endif # SYSTEM_EXPAT
517 define gb_LinkTarget__use_expat
518 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
520 endef
522 define gb_LinkTarget__use_expat_x64
523 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
525 endef
527 ifneq ($(SYSTEM_HYPH),)
529 define gb_LinkTarget__use_hyphen
530 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
532 endef
534 else # !SYSTEM_HYPH
536 define gb_LinkTarget__use_hyphen
537 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
538 $(call gb_LinkTarget_set_include,$(1),\
539 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
540 $$(INCLUDE) \
543 ifeq ($(COM),MSC)
544 $(call gb_LinkTarget_use_static_libraries,$(1),\
545 hyphen \
547 else
548 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
549 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
550 endif
552 endef
554 endif # SYSTEM_HYPH
556 ifneq ($(SYSTEM_HUNSPELL),)
558 define gb_LinkTarget__use_hunspell
559 $(call gb_LinkTarget_set_include,$(1),\
560 $$(INCLUDE) \
561 $(HUNSPELL_CFLAGS) \
563 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
565 endef
567 gb_ExternalProject__use_hunspell :=
569 else # !SYSTEM_HUNSPELL
571 define gb_LinkTarget__use_hunspell
572 $(call gb_LinkTarget_add_defs,$(1),\
573 -DHUNSPELL_STATIC \
575 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
576 $(call gb_LinkTarget_set_include,$(1),\
577 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
578 $$(INCLUDE) \
581 ifeq ($(COM),MSC)
582 $(call gb_LinkTarget_use_static_libraries,$(1),\
583 hunspell \
585 else
586 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
587 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
588 endif
590 endef
592 define gb_ExternalProject__use_hunspell
593 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
595 endef
597 endif # SYSTEM_HUNSPELL
600 ifneq ($(SYSTEM_BOOST),)
602 define gb_LinkTarget__use_boost_lib
603 $(call gb_LinkTarget_set_include,$(1),\
604 $$(INCLUDE) \
605 $(BOOST_CPPFLAGS) \
608 $(call gb_LinkTarget_add_ldflags,$(1),\
609 $(BOOST_LDFLAGS) \
612 $(call gb_LinkTarget_add_libs,$(1),$(2))
614 endef
616 define gb_LinkTarget__use_boost_locale
617 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
619 endef
621 define gb_LinkTarget__use_boost_date_time
622 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
624 endef
626 define gb_LinkTarget__use_boost_filesystem
627 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
629 endef
631 gb_ExternalProject__use_boost_filesystem :=
633 define gb_LinkTarget__use_boost_iostreams
634 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
636 endef
638 gb_ExternalProject__use_boost_iostreams :=
640 define gb_LinkTarget__use_boost_system
641 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
643 endef
645 gb_ExternalProject__use_boost_system :=
647 define gb_LinkTarget__use_boost_headers
648 $(call gb_LinkTarget_set_include,$(1),\
649 $$(INCLUDE) \
650 $(BOOST_CPPFLAGS) \
653 endef
655 gb_ExternalProject__use_boost_headers:=
657 else # !SYSTEM_BOOST
659 define gb_LinkTarget__use_boost_lib
660 $(call gb_LinkTarget_add_defs,$(1),\
661 -DBOOST_ALL_NO_LIB \
664 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
666 endef
668 define gb_LinkTarget__use_boost_locale
669 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
670 $(call gb_LinkTarget_add_libs,$(1),\
671 $(if $(filter $(OS),MACOSX),-liconv) \
674 endef
676 define gb_LinkTarget__use_boost_date_time
677 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
679 endef
681 define gb_LinkTarget__use_boost_filesystem
682 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
684 endef
686 define gb_ExternalProject__use_boost_filesystem
687 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
688 endef
690 define gb_LinkTarget__use_boost_iostreams
691 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
693 endef
695 define gb_ExternalProject__use_boost_iostreams
696 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
697 endef
699 define gb_LinkTarget__use_boost_system
700 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
702 endef
704 define gb_ExternalProject__use_boost_system
705 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
706 endef
708 define gb_LinkTarget__use_boost_headers
709 $(call gb_LinkTarget_use_unpacked,$(1),boost)
710 $(call gb_LinkTarget_set_include,$(1),\
711 $(BOOST_CPPFLAGS) \
712 $$(INCLUDE) \
715 endef
717 define gb_ExternalProject__use_boost_headers
718 $(call gb_ExternalProject_use_unpacked,$(1),boost)
720 endef
722 endif # SYSTEM_BOOST
725 ifneq ($(SYSTEM_LIBCMIS),)
727 define gb_LinkTarget__use_libcmis
728 $(call gb_LinkTarget_set_include,$(1),\
729 $$(INCLUDE) \
730 $(LIBCMIS_CFLAGS) \
732 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
734 endef
736 else # !SYSTEM_LIBCMIS
738 define gb_LinkTarget__use_libcmis
739 $(call gb_LinkTarget_set_include,$(1),\
740 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
741 $$(INCLUDE) \
743 $(call gb_LinkTarget_use_static_libraries,$(1),\
744 libcmis \
747 endef
749 endif # SYSTEM_LIBCMIS
751 ifeq ($(ENABLE_JAVA),TRUE)
753 define gb_LinkTarget__use_jawt
754 $(call gb_LinkTarget_add_libs,$(1),\
755 $(JAWTLIB) \
758 endef
760 else # !ENABLE_JAVA
762 gb_LinkTarget__use_jawt :=
764 endif # ENABLE_JAVA
766 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
768 define gb_LinkTarget__use_libatomic_ops
769 $(call gb_LinkTarget_set_include,$(1),\
770 $$(INCLUDE) \
771 $(LIBATOMIC_OPS_CFLAGS) \
773 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
775 endef
776 gb_ExternalProject__use_libatomic_ops :=
778 else # !SYSTEM_LIBATOMIC_OPS
780 define gb_LinkTarget__use_libatomic_ops
781 $(call gb_LinkTarget_set_include,$(1),\
782 $(LIBATOMIC_OPS_CFLAGS) \
783 $$(INCLUDE) \
784 $(LIBATOMIC_OPS_CFLAGS) \
786 $(call gb_LinkTarget_use_external_project,$(1),\
787 libatomic_ops \
790 $(call gb_LinkTarget_add_libs,$(1),\
791 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
794 endef
796 define gb_ExternalProject__use_libatomic_ops
797 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
799 endef
801 endif # SYSTEM_LIBATOMIC_OPS
804 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
806 define gb_LinkTarget__use_libexttextcat
807 $(call gb_LinkTarget_set_include,$(1),\
808 $$(INCLUDE) \
809 $(LIBEXTTEXTCAT_CFLAGS) \
811 $(call gb_LinkTarget_add_defs,$(1),\
812 -DSYSTEM_LIBEXTTEXTCAT \
814 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
816 endef
818 else # !SYSTEM_LIBEXTTEXTCAT
820 define gb_LinkTarget__use_libexttextcat
821 $(call gb_LinkTarget_set_include,$(1),\
822 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
823 $$(INCLUDE) \
826 ifeq ($(COM),MSC)
827 $(call gb_LinkTarget_use_static_libraries,$(1),\
828 libexttextcat \
830 else
831 $(call gb_LinkTarget_add_libs,$(1),\
832 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
834 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
835 endif
838 endef
840 endif # SYSTEM_LIBEXTTEXTCAT
843 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
845 define gb_LinkTarget__use_libnumbertext
846 $(call gb_LinkTarget_set_include,$(1),\
847 $$(INCLUDE) \
848 $(LIBNUMBERTEXT_CFLAGS) \
850 $(call gb_LinkTarget_add_defs,$(1),\
851 -DSYSTEM_LIBNUMBERTEXT \
853 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
855 endef
857 else # !SYSTEM_LIBNUMBERTEXT
859 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
860 libnumbertext_numbertext \
863 define gb_LinkTarget__use_libnumbertext
864 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
865 $(call gb_LinkTarget_set_include,$(1),\
866 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
867 $$(INCLUDE) \
870 ifeq ($(COM),MSC)
871 $(call gb_LinkTarget_use_static_libraries,$(1),\
872 libnumbertext \
874 else
876 $(call gb_LinkTarget_add_libs,$(1),\
877 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
879 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
881 endif
883 endef
885 endif # SYSTEM_LIBNUMBERTEXT
888 ifneq ($(SYSTEM_LIBXML),)
890 define gb_LinkTarget__use_libxml2
891 $(call gb_LinkTarget_add_defs,$(1),\
892 -DSYSTEM_LIBXML \
894 $(call gb_LinkTarget_set_include,$(1),\
895 $$(INCLUDE) \
896 $(LIBXML_CFLAGS) \
898 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
900 endef
901 gb_ExternalProject__use_libxml2:=
903 else # !SYSTEM_LIBXML
905 $(eval $(call gb_Helper_register_packages_for_install,ure,\
906 libxml2 \
909 define gb_LinkTarget__use_libxml2
910 $(call gb_LinkTarget_use_package,$(1),libxml2)
911 $(call gb_LinkTarget_set_include,$(1),\
912 $$(INCLUDE) \
913 $(LIBXML_CFLAGS) \
916 $(call gb_LinkTarget_add_libs,$(1),\
917 $(LIBXML_LIBS) \
920 ifeq ($(COM),MSC)
921 $(call gb_LinkTarget_use_external,$(1),icu_headers)
922 endif
924 endef
925 define gb_ExternalProject__use_libxml2
926 $(call gb_ExternalProject_use_package,$(1),libxml2)
928 ifeq ($(COM),MSC)
929 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
930 endif
932 endef
934 endif # SYSTEM_LIBXML
937 ifneq ($(SYSTEM_LIBXSLT),)
939 define gb_LinkTarget__use_libxslt
940 $(call gb_LinkTarget_set_include,$(1),\
941 $$(INCLUDE) \
942 $(LIBXSLT_CFLAGS) \
944 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
946 endef
948 define gb_LinkTarget__use_libexslt
949 $(call gb_LinkTarget_set_include,$(1),\
950 $$(INCLUDE) \
951 $(LIBEXSLT_CFLAGS) \
954 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
956 endef
958 else # !SYSTEM_LIBXSLT
960 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
961 libxslt \
964 define gb_LinkTarget__use_libxslt
965 $(call gb_LinkTarget_use_package,$(1),libxslt)
966 $(call gb_LinkTarget_set_include,$(1),\
967 $$(INCLUDE) \
968 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
971 ifeq ($(COM),MSC)
972 $(call gb_LinkTarget_add_libs,$(1),\
973 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
975 else
976 $(call gb_LinkTarget_add_libs,$(1),\
977 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
979 endif
981 endef
983 define gb_LinkTarget__use_libexslt
984 $(call gb_LinkTarget_use_package,$(1),libxslt)
985 $(call gb_LinkTarget_set_include,$(1),\
986 $$(INCLUDE) \
987 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
990 ifeq ($(COM),MSC)
991 $(call gb_LinkTarget_add_libs,$(1),\
992 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
994 else
995 $(call gb_LinkTarget_add_libs,$(1),\
996 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
998 endif
1000 endef
1002 endif # SYSTEM_LIBXSLT
1005 ifneq ($(SYSTEM_XMLSEC),)
1007 define gb_LinkTarget__use_xmlsec
1008 $(call gb_LinkTarget_add_defs,$(1),\
1009 -DSYSTEM_XMLSEC \
1011 $(call gb_LinkTarget_set_include,$(1),\
1012 $$(INCLUDE) \
1013 $(XMLSEC_CFLAGS) \
1015 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1017 endef
1019 gb_ExternalProject__use_xmlsec:=
1021 else # !SYSTEM_XMLSEC
1023 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1024 xmlsec \
1027 define gb_LinkTarget__use_xmlsec
1029 endef
1031 endif # SYSTEM_XMLSEC
1033 ifneq ($(SYSTEM_LIBLANGTAG),)
1035 define gb_LinkTarget__use_liblangtag
1036 $(call gb_LinkTarget_set_include,$(1),\
1037 $$(INCLUDE) \
1038 $(LIBLANGTAG_CFLAGS) \
1041 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1043 endef
1045 gb_ExternalProject__use_liblangtag :=
1047 else # !SYSTEM_LIBLANGTAG
1049 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1050 liblangtag_data \
1053 ifeq ($(COM),MSC)
1055 define gb_LinkTarget__use_liblangtag
1056 $(call gb_LinkTarget_set_include,$(1),\
1057 $(LIBLANGTAG_CFLAGS) \
1058 $$(INCLUDE) \
1060 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1061 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1063 endef
1065 else
1067 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1068 liblangtag \
1071 define gb_LinkTarget__use_liblangtag
1072 $(call gb_LinkTarget_set_include,$(1),\
1073 $(LIBLANGTAG_CFLAGS) \
1074 $$(INCLUDE) \
1076 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1077 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1079 endef
1081 endif # MSC
1083 define gb_ExternalProject__use_liblangtag
1084 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1086 endef
1088 endif # SYSTEM_LIBLANGTAG
1091 ifneq ($(SYSTEM_REDLAND),)
1093 define gb_LinkTarget__use_librdf
1094 $(call gb_LinkTarget_add_defs,$(1),\
1095 -DSYSTEM_REDLAND \
1097 $(call gb_LinkTarget_set_include,$(1),\
1098 $$(INCLUDE) \
1099 $(REDLAND_CFLAGS) \
1101 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1103 endef
1105 gb_LinkTarget__use_redland_headers:=
1107 gb_LinkTarget__use_raptor_headers:=
1109 gb_LinkTarget__use_rasqal_headers:=
1111 else # !SYSTEM_REDLAND
1113 define gb_LinkTarget__use_redland_headers
1114 $(call gb_LinkTarget_set_include,$(1),\
1115 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1116 $$(INCLUDE) \
1119 endef
1121 define gb_LinkTarget__use_raptor_headers
1122 $(call gb_LinkTarget_set_include,$(1),\
1123 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1124 $$(INCLUDE) \
1127 endef
1129 define gb_LinkTarget__use_rasqal_headers
1130 $(call gb_LinkTarget_set_include,$(1),\
1131 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1132 $$(INCLUDE) \
1135 endef
1137 ifneq ($(OS),ANDROID)
1139 ifeq ($(COM),MSC)
1140 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1141 raptor2 \
1142 rasqal \
1143 rdf \
1145 else
1146 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1147 raptor \
1148 rasqal \
1149 redland \
1151 endif
1153 define gb_LinkTarget__use_librdf
1154 ifeq ($(COM),MSC)
1155 $(call gb_LinkTarget_use_libraries,$(1),\
1156 raptor2 \
1157 rdf \
1159 else
1160 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1162 $(call gb_LinkTarget_add_libs,$(1),\
1163 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1164 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1165 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1167 endif
1169 endef
1171 else # ANDROID
1173 define gb_LinkTarget__use_librdf
1174 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1176 endef
1178 endif # ANDROID
1180 endif # SYSTEM_REDLAND
1182 ifneq ($(SYSTEM_CAIRO),)
1184 define gb_LinkTarget__use_cairo
1185 $(call gb_LinkTarget_set_include,$(1),\
1186 $$(INCLUDE) \
1187 $(CAIRO_CFLAGS) \
1189 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1190 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1192 endef
1194 else # !SYSTEM_CAIRO
1196 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1198 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1199 cairo \
1200 pixman \
1203 define gb_LinkTarget__use_cairo
1204 $(call gb_LinkTarget_use_package,$(1),cairo)
1205 $(call gb_LinkTarget_use_package,$(1),pixman)
1206 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1207 $(call gb_LinkTarget_set_include,$(1),\
1208 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1209 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1210 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1211 $$(INCLUDE) \
1213 $(call gb_LinkTarget_add_libs,$(1),\
1214 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1215 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1218 endef
1220 endif # !MACOSX, !WNT
1222 endif # !SYSTEM_CAIRO
1224 ifneq ($(SYSTEM_FREETYPE),)
1226 define gb_LinkTarget__use_freetype_headers
1227 $(call gb_LinkTarget_set_include,$(1),\
1228 $$(INCLUDE) \
1229 $(FREETYPE_CFLAGS) \
1232 endef
1234 gb_ExternalProject__use_freetype :=
1236 else
1238 define gb_LinkTarget__use_freetype_headers
1239 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1240 $(call gb_LinkTarget_set_include,$(1),\
1241 $(FREETYPE_CFLAGS) \
1242 $$(INCLUDE) \
1245 endef
1247 define gb_ExternalProject__use_freetype
1248 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1250 endef
1252 endif # SYSTEM_FREETYPE
1254 define gb_LinkTarget__use_freetype
1255 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1256 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1258 endef
1260 ifneq ($(SYSTEM_FONTCONFIG),)
1262 define gb_LinkTarget__use_fontconfig
1263 $(call gb_LinkTarget_set_include,$(1),\
1264 $$(INCLUDE) \
1265 $(FONTCONFIG_CFLAGS) \
1268 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1270 endef
1272 gb_ExternalProject__use_fontconfig :=
1274 else
1276 define gb_LinkTarget__use_fontconfig
1277 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1278 $(call gb_LinkTarget_set_include,$(1),\
1279 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1280 $$(INCLUDE) \
1283 $(call gb_LinkTarget_add_libs,$(1),\
1284 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1287 endef
1289 define gb_ExternalProject__use_fontconfig
1290 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1292 endef
1294 endif # SYSTEM_FONTCONFIG
1296 ifneq ($(SYSTEM_GRAPHITE),)
1298 define gb_LinkTarget__use_graphite
1299 $(call gb_LinkTarget_set_include,$(1),\
1300 $$(INCLUDE) \
1301 $(GRAPHITE_CFLAGS) \
1303 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1305 endef
1307 gb_ExternalProject__use_graphite:=
1309 else # !SYSTEM_GRAPHITE
1311 define gb_LinkTarget__use_graphite
1312 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1313 $(call gb_LinkTarget_set_include,$(1),\
1314 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1315 $$(INCLUDE) \
1317 $(call gb_LinkTarget_use_static_libraries,$(1),\
1318 graphite \
1321 endef
1323 define gb_ExternalProject__use_graphite
1324 $(call gb_ExternalProject_use_static_libraries,$(1),\
1325 graphite \
1328 endef
1329 endif # SYSTEM_GRAPHITE
1331 ifneq ($(SYSTEM_ICU),)
1333 gb_LinkTarget__use_icu_headers:=
1334 gb_ExternalProject__use_icu:=
1336 define gb_LinkTarget__use_icudata
1337 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1339 endef
1340 define gb_LinkTarget__use_icui18n
1341 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1343 endef
1344 define gb_LinkTarget__use_icuuc
1345 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1347 endef
1349 else # !SYSTEM_ICU
1351 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1352 icu_ure \
1355 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1356 icu \
1359 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1360 gb_ICU_suffix:=lo
1361 else
1362 gb_ICU_suffix:=
1363 endif
1365 define gb_LinkTarget__use_icu_headers
1366 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1367 $(call gb_LinkTarget_set_include,$(1),\
1368 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1369 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1370 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1371 $$(INCLUDE) \
1374 endef
1376 define gb_ExternalProject__use_icu
1377 $(call gb_ExternalProject_use_package,$(1),icu)
1379 endef
1381 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1382 define gb_LinkTarget__use_icudata
1383 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1385 ifeq ($(OS),WNT)
1386 $(call gb_LinkTarget_add_libs,$(1),\
1387 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1389 else
1390 $(call gb_LinkTarget_add_libs,$(1),\
1391 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1393 endif
1395 endef
1397 define gb_LinkTarget__use_icui18n
1398 $(call gb_LinkTarget_use_package,$(1),icu)
1400 ifeq ($(OS),WNT)
1401 $(call gb_LinkTarget_add_libs,$(1),\
1402 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1404 else
1405 $(call gb_LinkTarget_add_libs,$(1),\
1406 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1408 endif
1410 endef
1412 define gb_LinkTarget__use_icuuc
1413 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1415 ifeq ($(OS),WNT)
1416 $(call gb_LinkTarget_add_libs,$(1),\
1417 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1419 else
1420 $(call gb_LinkTarget_add_libs,$(1),\
1421 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1423 endif
1425 endef
1427 endif # SYSTEM_ICU
1429 ifneq ($(SYSTEM_HARFBUZZ),)
1431 define gb_LinkTarget__use_harfbuzz
1432 $(call gb_LinkTarget_set_include,$(1),\
1433 $$(INCLUDE) \
1434 $(HARFBUZZ_CFLAGS) \
1436 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1438 endef
1440 gb_ExternalProject__use_harfbuzz :=
1442 else # SYSTEM_HARFBUZZ != TRUE
1444 define gb_LinkTarget__use_harfbuzz
1445 $(call gb_LinkTarget_set_include,$(1),\
1446 $(HARFBUZZ_CFLAGS) \
1447 $$(INCLUDE) \
1449 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1450 $(call gb_LinkTarget_use_external,$(1),icuuc)
1451 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1453 endef
1455 define gb_ExternalProject__use_harfbuzz
1456 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1458 endef
1460 endif # SYSTEM_HARFBUZZ
1462 ifneq ($(ENABLE_OPENSSL),TRUE)
1464 gb_ExternalProject__use_openssl:=
1465 gb_LinkTarget__use_openssl_headers:=
1466 gb_LinkTarget__use_openssl:=
1468 else # ENABLE_OPENSSL
1470 ifneq ($(SYSTEM_OPENSSL),)
1472 gb_LinkTarget__use_openssl_headers:=
1473 gb_ExternalProject__use_openssl:=
1475 define gb_LinkTarget__use_openssl
1476 $(call gb_LinkTarget_set_include,$(1),\
1477 $$(INCLUDE) \
1478 $(OPENSSL_CFLAGS) \
1480 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1482 endef
1484 else # !SYSTEM_OPENSSL
1486 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1487 openssl \
1490 define gb_ExternalProject__use_openssl
1491 $(call gb_ExternalProject_use_package,$(1),openssl)
1493 endef
1495 define gb_LinkTarget__use_openssl_headers
1496 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1497 $(call gb_LinkTarget_set_include,$(1),\
1498 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1499 $$(INCLUDE) \
1502 endef
1504 define gb_LinkTarget__use_openssl
1505 $(call gb_LinkTarget_use_package,$(1),openssl)
1506 ifeq ($(OS),WNT)
1507 $(call gb_LinkTarget_add_libs,$(1),\
1508 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1509 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1511 else
1512 $(call gb_LinkTarget_add_libs,$(1),\
1513 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1514 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1515 $(if $(filter $(OS),LINUX),-pthread) \
1517 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1518 ifeq ($(OS),SOLARIS)
1519 $(call gb_LinkTarget_add_libs,$(1),\
1520 -lnsl \
1521 -lsocket \
1523 endif
1524 endif
1526 endef
1528 endif # SYSTEM_OPENSSL
1529 endif # ENABLE_OPENSSL
1532 ifneq ($(SYSTEM_CDR),)
1534 define gb_LinkTarget__use_cdr
1535 $(call gb_LinkTarget_set_include,$(1),\
1536 $$(INCLUDE) \
1537 $(CDR_CFLAGS) \
1539 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1541 endef
1543 else # !SYSTEM_CDR
1545 define gb_LinkTarget__use_cdr
1546 $(call gb_LinkTarget_set_include,$(1),\
1547 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1548 $$(INCLUDE) \
1550 $(call gb_LinkTarget_add_libs,$(1),\
1551 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1553 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1554 endef
1556 endif # SYSTEM_CDR
1559 ifneq ($(SYSTEM_EBOOK),)
1561 define gb_LinkTarget__use_ebook
1562 $(call gb_LinkTarget_set_include,$(1),\
1563 $$(INCLUDE) \
1564 $(EBOOK_CFLAGS) \
1566 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1568 endef
1570 gb_ExternalProject__use_ebook :=
1572 else # !SYSTEM_EBOOK
1574 define gb_LinkTarget__use_ebook
1575 $(call gb_LinkTarget_set_include,$(1),\
1576 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1577 $$(INCLUDE) \
1579 $(call gb_LinkTarget_add_libs,$(1),\
1580 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1582 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1584 endef
1586 define gb_ExternalProject__use_ebook
1587 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1589 endef
1591 endif # SYSTEM_EBOOK
1594 ifneq ($(SYSTEM_ETONYEK),)
1596 define gb_LinkTarget__use_etonyek
1597 $(call gb_LinkTarget_set_include,$(1),\
1598 $$(INCLUDE) \
1599 $(ETONYEK_CFLAGS) \
1601 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1603 endef
1605 gb_ExternalProject__use_etonyek :=
1607 else # !SYSTEM_ETONYEK
1609 ifeq ($(COM),MSC)
1611 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1612 etonyek \
1615 define gb_LinkTarget__use_etonyek
1616 $(call gb_LinkTarget_set_include,$(1),\
1617 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1618 $$(INCLUDE) \
1620 $(call gb_LinkTarget_use_libraries,$(1),\
1621 etonyek \
1624 endef
1626 else # !MSC
1628 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1629 libetonyek \
1632 define gb_LinkTarget__use_etonyek
1633 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1635 $(call gb_LinkTarget_set_include,$(1),\
1636 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1637 -DLIBETONYEK_VISIBILITY \
1638 $$(INCLUDE) \
1640 $(call gb_LinkTarget_add_libs,$(1),\
1641 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1643 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1645 endef
1647 define gb_ExternalProject__use_etonyek
1648 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1650 endef
1652 endif
1654 endif # SYSTEM_ETONYEK
1657 ifneq ($(SYSTEM_FREEHAND),)
1659 define gb_LinkTarget__use_freehand
1660 $(call gb_LinkTarget_set_include,$(1),\
1661 $$(INCLUDE) \
1662 $(FREEHAND_CFLAGS) \
1664 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1666 endef
1668 gb_ExternalProject__use_freehand :=
1670 else # !SYSTEM_FREEHAND
1672 define gb_LinkTarget__use_freehand
1673 $(call gb_LinkTarget_set_include,$(1),\
1674 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1675 $$(INCLUDE) \
1677 $(call gb_LinkTarget_add_libs,$(1),\
1678 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1680 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1682 endef
1684 define gb_ExternalProject__use_freehand
1685 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1687 endef
1689 endif # SYSTEM_FREEHAND
1692 ifneq ($(SYSTEM_ODFGEN),)
1694 define gb_LinkTarget__use_odfgen
1695 $(call gb_LinkTarget_set_include,$(1),\
1696 $$(INCLUDE) \
1697 $(ODFGEN_CFLAGS) \
1699 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1701 endef
1703 else # !SYSTEM_ODFGEN
1705 ifeq ($(COM),MSC)
1707 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1708 odfgen \
1711 define gb_LinkTarget__use_odfgen
1712 $(call gb_LinkTarget_set_include,$(1),\
1713 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1714 $$(INCLUDE) \
1716 $(call gb_LinkTarget_use_libraries,$(1),\
1717 odfgen \
1720 endef
1722 else # !MSC
1724 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1725 libodfgen \
1728 define gb_LinkTarget__use_odfgen
1729 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1731 $(call gb_LinkTarget_set_include,$(1),\
1732 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1733 -DLIBODFGEN_VISIBILITY \
1734 $$(INCLUDE) \
1736 $(call gb_LinkTarget_add_libs,$(1),\
1737 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1740 endef
1742 endif
1744 endif # SYSTEM_ODFGEN
1746 ifneq ($(SYSTEM_EPUBGEN),)
1748 define gb_LinkTarget__use_epubgen
1749 $(call gb_LinkTarget_set_include,$(1),\
1750 $$(INCLUDE) \
1751 $(EPUBGEN_CFLAGS) \
1753 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1755 endef
1756 gb_ExternalProject__use_epubgen :=
1758 else # !SYSTEM_EPUBGEN
1760 define gb_LinkTarget__use_epubgen
1761 $(call gb_LinkTarget_set_include,$(1),\
1762 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1763 $$(INCLUDE) \
1765 $(call gb_LinkTarget_add_libs,$(1),\
1766 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1768 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1770 endef
1771 define gb_ExternalProject__use_epubgen
1772 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1774 endef
1776 endif # SYSTEM_EPUBGEN
1778 ifneq ($(SYSTEM_REVENGE),)
1780 define gb_LinkTarget__use_revenge
1781 $(call gb_LinkTarget_set_include,$(1),\
1782 $$(INCLUDE) \
1783 $(REVENGE_CFLAGS) \
1785 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1787 endef
1789 gb_ExternalProject__use_revenge :=
1791 else # !SYSTEM_REVENGE
1793 ifeq ($(COM),MSC)
1795 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1796 revenge \
1799 define gb_LinkTarget__use_revenge
1800 $(call gb_LinkTarget_set_include,$(1),\
1801 $(REVENGE_CFLAGS) \
1802 $$(INCLUDE) \
1804 $(call gb_LinkTarget_use_libraries,$(1),\
1805 revenge \
1808 endef
1810 define gb_ExternalProject__use_revenge
1811 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1813 endef
1815 else # !MSC
1817 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1818 librevenge \
1821 define gb_LinkTarget__use_revenge
1822 $(call gb_LinkTarget_use_package,$(1),librevenge)
1824 $(call gb_LinkTarget_set_include,$(1),\
1825 $(REVENGE_CFLAGS) \
1826 -DLIBREVENGE_VISIBILITY \
1827 $$(INCLUDE) \
1829 $(call gb_LinkTarget_add_libs,$(1),\
1830 $(REVENGE_LIBS) \
1832 endef
1834 define gb_ExternalProject__use_revenge
1835 $(call gb_ExternalProject_use_package,$(1),librevenge)
1837 endef
1839 endif # MSC
1841 endif # SYSTEM_REVENGE
1844 ifneq ($(SYSTEM_ABW),)
1846 define gb_LinkTarget__use_abw
1847 $(call gb_LinkTarget_set_include,$(1),\
1848 $$(INCLUDE) \
1849 $(ABW_CFLAGS) \
1851 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1853 endef
1854 gb_ExternalProject__use_abw :=
1856 else # !SYSTEM_ABW
1858 define gb_LinkTarget__use_abw
1859 $(call gb_LinkTarget_set_include,$(1),\
1860 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1861 $$(INCLUDE) \
1863 $(call gb_LinkTarget_add_libs,$(1),\
1864 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1866 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1868 endef
1869 define gb_ExternalProject__use_abw
1870 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1872 endef
1874 endif # SYSTEM_ABW
1877 ifneq ($(SYSTEM_MSPUB),)
1879 define gb_LinkTarget__use_mspub
1880 $(call gb_LinkTarget_set_include,$(1),\
1881 $$(INCLUDE) \
1882 $(MSPUB_CFLAGS) \
1884 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1886 endef
1888 else # !SYSTEM_MSPUB
1890 define gb_LinkTarget__use_mspub
1891 $(call gb_LinkTarget_set_include,$(1),\
1892 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1893 $$(INCLUDE) \
1895 $(call gb_LinkTarget_add_libs,$(1),\
1896 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1898 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1900 endef
1902 endif # SYSTEM_MSPUB
1905 ifneq ($(SYSTEM_PAGEMAKER),)
1907 define gb_LinkTarget__use_pagemaker
1908 $(call gb_LinkTarget_set_include,$(1),\
1909 $$(INCLUDE) \
1910 $(PAGEMAKER_CFLAGS) \
1912 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1914 endef
1915 gb_ExternalProject__use_pagemaker :=
1917 else # !SYSTEM_PAGEMAKER
1919 define gb_LinkTarget__use_pagemaker
1920 $(call gb_LinkTarget_set_include,$(1),\
1921 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1922 $$(INCLUDE) \
1924 $(call gb_LinkTarget_add_libs,$(1),\
1925 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1927 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1929 endef
1930 define gb_ExternalProject__use_pagemaker
1931 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1933 endef
1935 endif # SYSTEM_PAGEMAKER
1938 ifneq ($(SYSTEM_QXP),)
1940 define gb_LinkTarget__use_qxp
1941 $(call gb_LinkTarget_set_include,$(1),\
1942 $$(INCLUDE) \
1943 $(QXP_CFLAGS) \
1945 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
1947 endef
1948 gb_ExternalProject__use_qxp :=
1950 else # !SYSTEM_QXP
1952 define gb_LinkTarget__use_qxp
1953 $(call gb_LinkTarget_set_include,$(1),\
1954 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
1955 $$(INCLUDE) \
1957 $(call gb_LinkTarget_add_libs,$(1),\
1958 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
1960 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
1962 endef
1963 define gb_ExternalProject__use_qxp
1964 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
1966 endef
1968 endif # SYSTEM_QXP
1971 ifneq ($(SYSTEM_ZMF),)
1973 define gb_LinkTarget__use_zmf
1974 $(call gb_LinkTarget_set_include,$(1),\
1975 $$(INCLUDE) \
1976 $(ZMF_CFLAGS) \
1978 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1980 endef
1981 gb_ExternalProject__use_zmf :=
1983 else # !SYSTEM_ZMF
1985 define gb_LinkTarget__use_zmf
1986 $(call gb_LinkTarget_set_include,$(1),\
1987 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
1988 $$(INCLUDE) \
1990 $(call gb_LinkTarget_add_libs,$(1),\
1991 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
1993 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
1995 endef
1996 define gb_ExternalProject__use_zmf
1997 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
1999 endef
2001 endif # SYSTEM_ZMF
2004 ifneq ($(SYSTEM_VISIO),)
2006 define gb_LinkTarget__use_visio
2007 $(call gb_LinkTarget_set_include,$(1),\
2008 $$(INCLUDE) \
2009 $(VISIO_CFLAGS) \
2011 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2013 endef
2015 else # !SYSTEM_VISIO
2017 define gb_LinkTarget__use_visio
2018 $(call gb_LinkTarget_set_include,$(1),\
2019 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2020 $$(INCLUDE) \
2022 $(call gb_LinkTarget_add_libs,$(1),\
2023 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2025 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2027 endef
2029 endif # SYSTEM_VISIO
2032 ifneq ($(SYSTEM_WPD),)
2034 define gb_LinkTarget__use_wpd
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 $$(INCLUDE) \
2037 $(WPD_CFLAGS) \
2039 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2041 endef
2042 gb_ExternalProject__use_wpd :=
2044 else # !SYSTEM_WPD
2046 ifeq ($(COM),MSC)
2048 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2049 wpd \
2052 define gb_LinkTarget__use_wpd
2053 $(call gb_LinkTarget_set_include,$(1),\
2054 $(WPD_CFLAGS) \
2055 $$(INCLUDE) \
2057 $(call gb_LinkTarget_use_libraries,$(1),\
2058 wpd \
2061 endef
2063 define gb_ExternalProject__use_wpd
2064 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2066 endef
2068 else # !MSC
2070 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2071 libwpd \
2074 define gb_LinkTarget__use_wpd
2075 $(call gb_LinkTarget_use_package,$(1),libwpd)
2077 $(call gb_LinkTarget_set_include,$(1),\
2078 $(WPD_CFLAGS) \
2079 $$(INCLUDE) \
2081 $(call gb_LinkTarget_add_libs,$(1),\
2082 $(WPD_LIBS) \
2085 endef
2087 define gb_ExternalProject__use_wpd
2088 $(call gb_ExternalProject_use_package,$(1),libwpd)
2090 endef
2092 endif # MSC
2094 endif # SYSTEM_WPD
2097 ifneq ($(SYSTEM_WPG),)
2099 define gb_LinkTarget__use_wpg
2100 $(call gb_LinkTarget_set_include,$(1),\
2101 $$(INCLUDE) \
2102 $(WPG_CFLAGS) \
2104 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2106 endef
2107 gb_ExternalProject__use_wpg :=
2109 else # !SYSTEM_WPG
2111 ifeq ($(COM),MSC)
2113 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2114 wpg \
2117 define gb_LinkTarget__use_wpg
2118 $(call gb_LinkTarget_set_include,$(1),\
2119 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2120 $$(INCLUDE) \
2122 $(call gb_LinkTarget_use_libraries,$(1),\
2123 wpg \
2126 endef
2128 else # !MSC
2130 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2131 libwpg \
2134 define gb_LinkTarget__use_wpg
2135 $(call gb_LinkTarget_use_package,$(1),libwpg)
2137 $(call gb_LinkTarget_set_include,$(1),\
2138 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2139 $$(INCLUDE) \
2141 $(call gb_LinkTarget_add_libs,$(1),\
2142 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2145 endef
2147 endif # MSC
2149 endif # SYSTEM_WPG
2152 ifneq ($(SYSTEM_WPS),)
2154 define gb_LinkTarget__use_wps
2155 $(call gb_LinkTarget_set_include,$(1),\
2156 $$(INCLUDE) \
2157 $(WPS_CFLAGS) \
2159 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2161 endef
2162 gb_ExternalProject__use_wps :=
2164 else # !SYSTEM_WPS
2166 ifeq ($(COM),MSC)
2168 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2169 wps \
2172 define gb_LinkTarget__use_wps
2173 $(call gb_LinkTarget_set_include,$(1),\
2174 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2175 $$(INCLUDE) \
2178 $(call gb_LinkTarget_use_libraries,$(1),\
2179 wps \
2182 endef
2184 else # !MSC
2186 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2187 libwps \
2190 define gb_LinkTarget__use_wps
2191 $(call gb_LinkTarget_use_package,$(1),libwps)
2193 $(call gb_LinkTarget_set_include,$(1),\
2194 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2195 $$(INCLUDE) \
2197 $(call gb_LinkTarget_add_libs,$(1),\
2198 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2201 endef
2203 endif # MSC
2205 endif # SYSTEM_WPS
2208 ifneq ($(SYSTEM_MWAW),)
2210 define gb_LinkTarget__use_mwaw
2211 $(call gb_LinkTarget_set_include,$(1),\
2212 $$(INCLUDE) \
2213 $(MWAW_CFLAGS) \
2215 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2217 endef
2219 else # !SYSTEM_MWAW
2221 ifeq ($(COM),MSC)
2223 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2224 mwaw \
2227 define gb_LinkTarget__use_mwaw
2228 $(call gb_LinkTarget_set_include,$(1),\
2229 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2230 $$(INCLUDE) \
2233 $(call gb_LinkTarget_use_libraries,$(1),\
2234 mwaw \
2237 endef
2239 else # !MSC
2241 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2242 libmwaw \
2245 define gb_LinkTarget__use_mwaw
2246 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2248 $(call gb_LinkTarget_set_include,$(1),\
2249 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2250 $$(INCLUDE) \
2252 $(call gb_LinkTarget_add_libs,$(1),\
2253 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2256 endef
2258 endif # MSC
2260 endif # SYSTEM_MWAW
2262 ifneq ($(SYSTEM_STAROFFICE),)
2264 define gb_LinkTarget__use_staroffice
2265 $(call gb_LinkTarget_set_include,$(1),\
2266 $$(INCLUDE) \
2267 $(STAROFFICE_CFLAGS) \
2269 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2271 endef
2273 else # !SYSTEM_STAROFFICE
2275 ifeq ($(COM),MSC)
2277 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2278 staroffice \
2281 define gb_LinkTarget__use_staroffice
2282 $(call gb_LinkTarget_set_include,$(1),\
2283 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2284 $$(INCLUDE) \
2287 $(call gb_LinkTarget_use_libraries,$(1),\
2288 staroffice \
2291 endef
2293 else # !MSC
2295 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2296 libstaroffice \
2299 define gb_LinkTarget__use_staroffice
2300 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2302 $(call gb_LinkTarget_set_include,$(1),\
2303 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2304 $$(INCLUDE) \
2306 $(call gb_LinkTarget_add_libs,$(1),\
2307 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2310 endef
2312 endif # MSC
2314 endif # SYSTEM_STAROFFICE
2317 ifneq ($(SYSTEM_LCMS2),)
2319 define gb_LinkTarget__use_lcms2
2320 $(call gb_LinkTarget_set_include,$(1),\
2321 $$(INCLUDE) \
2322 $(LCMS2_CFLAGS) \
2324 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2326 endef
2328 gb_ExternalProject__use_lcms2 :=
2330 else # !SYSTEM_LCMS2
2332 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2333 lcms2 \
2336 define gb_ExternalProject__use_lcms2
2337 $(call gb_ExternalProject_use_package,$(1),lcms2)
2339 endef
2341 ifeq ($(OS),ANDROID)
2343 define gb_LinkTarget__use_lcms2
2344 $(call gb_LinkTarget_use_package,$(1),lcms2)
2345 $(call gb_LinkTarget_set_include,$(1),\
2346 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2347 $$(INCLUDE) \
2350 endef
2352 else
2354 define gb_LinkTarget__use_lcms2
2355 $(call gb_LinkTarget_use_package,$(1),lcms2)
2356 $(call gb_LinkTarget_set_include,$(1),\
2357 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2358 $$(INCLUDE) \
2360 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2362 endef
2364 endif # ANDROID
2365 endif # SYSTEM_LCMS2
2367 ifneq ($(ENABLE_LPSOLVE),)
2369 ifneq ($(SYSTEM_LPSOLVE),)
2371 define gb_LinkTarget__use_lpsolve
2372 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2373 $(call gb_LinkTarget_add_defs,$(1),\
2374 -DSYSTEM_LPSOLVE \
2377 endef
2379 else # !SYSTEM_LPSOLVE
2381 define gb_LinkTarget__use_lpsolve
2382 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2383 ifeq ($(COM),MSC)
2384 $(call gb_LinkTarget_add_libs,$(1),\
2385 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2387 else
2388 $(call gb_LinkTarget_add_libs,$(1),\
2389 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2391 endif
2392 $(call gb_LinkTarget_set_include,$(1),\
2393 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2394 $$(INCLUDE) \
2397 endef
2399 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2400 lpsolve \
2403 endif # SYSTEM_LPSOLVE
2405 else
2407 gb_LinkTarget__use_lpsolve :=
2409 endif # ENABLE_LPSOLVE
2411 ifneq ($(ENABLE_COINMP),)
2413 ifneq ($(SYSTEM_COINMP),TRUE)
2415 define gb_LinkTarget__use_coinmp
2416 $(call gb_LinkTarget_use_package,$(1),coinmp)
2417 ifeq ($(COM),MSC)
2418 $(call gb_LinkTarget_add_libs,$(1),\
2419 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2421 else
2422 $(call gb_LinkTarget_add_libs,$(1),\
2423 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2424 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2425 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2426 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2427 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2428 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2429 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2431 endif
2432 $(call gb_LinkTarget_set_include,$(1),\
2433 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2434 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2435 $$(INCLUDE) \
2438 endef
2440 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2441 coinmp \
2444 else # SYSTEM_COINMP
2446 define gb_LinkTarget__use_coinmp
2447 $(call gb_LinkTarget_set_include,$(1),\
2448 $$(INCLUDE) \
2449 $(COINMP_CFLAGS) \
2451 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2453 endef
2455 endif
2457 else
2459 gb_LinkTarget__use_coinmp :=
2461 endif # ENABLE_COINMP
2463 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2465 define gb_LinkTarget__use_mDNSResponder
2466 $(call gb_LinkTarget_set_include,$(1),\
2467 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2468 $$(INCLUDE) \
2470 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2471 endef
2473 endif # MDNSRESPONDER
2475 ifeq ($(ENABLE_GIO),TRUE)
2477 define gb_LinkTarget__use_gio
2478 $(call gb_LinkTarget_set_include,$(1),\
2479 $$(INCLUDE) \
2480 $(GIO_CFLAGS) \
2483 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2485 endef
2487 else # ENABLE_GIO
2489 define gb_LinkTarget__use_gio
2491 endef
2493 endif # ENABLE_GIO
2495 ifeq ($(ENABLE_AVAHI),TRUE)
2497 define gb_LinkTarget__use_avahi
2498 $(call gb_LinkTarget_set_include,$(1),\
2499 $$(INCLUDE) \
2500 $(AVAHI_CFLAGS) \
2503 $(call gb_LinkTarget_add_defs,$(1),\
2504 -DENABLE_AVAHI \
2507 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2509 endef
2511 else # ENABLE_AVAHI
2513 gb_LinkTarget__use_avahi :=
2515 endif # ENABLE_AVAHI
2517 ifeq ($(ENABLE_CUPS),TRUE)
2519 define gb_LinkTarget__use_cups
2520 $(call gb_LinkTarget_add_defs,$(1),\
2521 -DENABLE_CUPS \
2524 $(call gb_LinkTarget_add_libs,$(1),\
2525 -lcups \
2528 endef
2530 else # ENABLE_CUPS
2532 define gb_LinkTarget__use_cups
2534 endef
2536 endif # ENABLE_CUPS
2538 ifeq ($(ENABLE_DBUS),TRUE)
2540 define gb_LinkTarget__use_dbus
2541 $(call gb_LinkTarget_set_include,$(1),\
2542 $$(INCLUDE) \
2543 $(DBUS_CFLAGS) \
2546 $(call gb_LinkTarget_add_libs,$(1),\
2547 $(DBUS_LIBS) \
2550 endef
2552 else # ENABLE_DBUS
2554 define gb_LinkTarget__use_dbus
2556 endef
2558 endif # ENABLE_DBUS
2561 ifneq ($(SYSTEM_LIBPNG),)
2563 define gb_LinkTarget__use_libpng
2564 $(call gb_LinkTarget_set_include,$(1),\
2565 $$(INCLUDE) \
2566 $(LIBPNG_CFLAGS) \
2569 $(call gb_LinkTarget_add_libs,$(1),\
2570 $(LIBPNG_LIBS) \
2573 endef
2575 gb_ExternalProject__use_libpng :=
2577 else # !SYSTEM_LIBPNG
2579 define gb_LinkTarget__use_libpng
2580 $(call gb_LinkTarget_set_include,$(1),\
2581 $(LIBPNG_CFLAGS) \
2582 $$(INCLUDE) \
2584 $(call gb_LinkTarget_use_static_libraries,$(1),\
2585 libpng \
2587 $(call gb_LinkTarget__use_zlib,$(1))
2589 endef
2591 define gb_ExternalProject__use_libpng
2592 $(call gb_ExternalProject_use_static_libraries,$(1),\
2593 libpng \
2596 endef
2598 endif # !SYSTEM_LIBPNG
2601 ifneq ($(SYSTEM_CURL),)
2603 define gb_LinkTarget__use_curl
2604 $(call gb_LinkTarget_add_defs,$(1),\
2605 -DSYSTEM_CURL \
2607 $(call gb_LinkTarget_set_include,$(1),\
2608 $$(INCLUDE) \
2609 $(CURL_CFLAGS) \
2611 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2613 endef
2615 else # !SYSTEM_CURL
2617 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2618 curl \
2621 define gb_LinkTarget__use_curl
2622 $(call gb_LinkTarget_use_package,$(1),curl)
2623 $(call gb_LinkTarget_set_include,$(1),\
2624 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2625 $$(INCLUDE) \
2628 ifeq ($(COM),MSC)
2629 $(call gb_LinkTarget_add_libs,$(1),\
2630 $(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 \
2632 else
2633 $(call gb_LinkTarget_add_libs,$(1),\
2634 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2636 endif
2638 endef
2640 endif # SYSTEM_CURL
2642 ifeq ($(ENABLE_VALGRIND),TRUE)
2644 define gb_LinkTarget__use_valgrind
2645 $(call gb_LinkTarget_add_defs,$(1),\
2646 -DHAVE_VALGRIND_HEADERS \
2649 $(call gb_LinkTarget_set_include,$(1),\
2650 $$(INCLUDE) \
2651 $(VALGRIND_CFLAGS) \
2654 endef
2656 else # !ENABLE_VALGRIND
2658 define gb_LinkTarget__use_valgrind
2660 endef
2662 endif # ENABLE_VALGRIND
2664 ifeq ($(ENABLE_POPPLER),TRUE)
2666 ifneq ($(SYSTEM_POPPLER),)
2668 define gb_LinkTarget__use_poppler
2669 $(call gb_LinkTarget_set_include,$(1),\
2670 $(POPPLER_CFLAGS) \
2671 $$(INCLUDE) \
2674 $(call gb_LinkTarget_add_libs,$(1),\
2675 $(POPPLER_LIBS) \
2678 endef
2680 else # !SYSTEM_POPPLER
2682 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2683 poppler_data \
2686 define gb_LinkTarget__use_poppler
2687 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2688 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2689 $(call gb_LinkTarget_set_include,$(1),\
2690 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2691 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2692 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2693 $$(INCLUDE) \
2696 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2697 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2699 ifeq ($(OS),MACOSX)
2700 $(call gb_LinkTarget_add_libs,$(1),\
2701 -lobjc \
2703 else ifeq ($(OS),LINUX)
2704 $(call gb_LinkTarget_add_libs,$(1),\
2705 -pthread \
2707 else ifeq ($(OS),WNT)
2708 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2709 advapi32 \
2710 gdi32 \
2712 endif
2714 endef
2716 endif # SYSTEM_POPPLER
2718 endif # ENABLE_POPPLER
2721 ifneq ($(SYSTEM_CLUCENE),)
2723 define gb_LinkTarget__use_clucene
2724 $(call gb_LinkTarget_add_defs,$(1),\
2725 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2728 $(call gb_LinkTarget_set_include,$(1),\
2729 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2730 $$(INCLUDE) \
2733 $(call gb_LinkTarget_add_libs,$(1),\
2734 $(CLUCENE_LIBS) \
2737 endef
2739 else # !SYSTEM_CLUCENE
2741 define gb_LinkTarget__use_clucene
2742 $(call gb_LinkTarget_set_include,$(1),\
2743 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2744 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2745 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2746 $$(INCLUDE) \
2749 $(call gb_LinkTarget_use_libraries,$(1),\
2750 clucene \
2753 endef
2755 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2756 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2759 endif # SYSTEM_CLUCENE
2761 define gb_LinkTarget__use_gobject
2762 $(call gb_LinkTarget_add_libs,$(1),\
2763 $(GOBJECT_LIBS) \
2766 $(call gb_LinkTarget_set_include,$(1),\
2767 $$(INCLUDE) \
2768 $(GOBJECT_CFLAGS) \
2770 endef
2772 ifneq ($(SYSTEM_HSQLDB),)
2774 define gb_LinkTarget__use_hsqldb
2776 $(call gb_LinkTarget_add_defs,$(1),\
2777 -DSYSTEM_HSQLDB \
2778 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2781 endef
2783 else # !SYSTEM_HSQLDB
2785 define gb_LinkTarget__use_hsqldb
2787 endef
2789 endif # SYSTEM_HSQLDB
2791 ifeq ($(ENABLE_LDAP),TRUE)
2792 ifneq ($(SYSTEM_OPENLDAP),)
2794 define gb_LinkTarget__use_openldap
2796 $(call gb_LinkTarget_add_libs,$(1),\
2797 -lldap \
2798 -llber \
2801 endef
2803 gb_ExternalProject__use_openldap :=
2805 else # !SYSTEM_OPENLDAP
2807 define gb_LinkTarget__use_openldap
2808 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2809 $(call gb_LinkTarget_set_include,$(1),\
2810 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2811 $$(INCLUDE) \
2813 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2814 $(call gb_LinkTarget_add_libs,$(1), \
2815 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2816 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2819 endef
2820 endif
2822 define gb_ExternalProject__use_openldap
2823 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2825 endef
2827 endif # SYSTEM_OPENLDAP
2829 ifneq ($(SYSTEM_LIBTOMMATH),)
2831 define gb_LinkTarget__use_libtommath
2832 $(call gb_LinkTarget_set_include,$(1),\
2833 $(LIBTOMMATH_CFLAGS) \
2834 $$(INCLUDE) \
2836 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2838 endef
2840 else # !SYSTEM_LIBTOMMATH
2841 define gb_LinkTarget__use_libtommath
2842 $(call gb_LinkTarget_set_include,$(1),\
2843 -I${WORKDIR}/UnpackedTarball/libtommath \
2844 $$(INCLUDE) \
2846 $(call gb_LinkTarget_add_libs,$(1),\
2847 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2849 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2851 endef
2853 endif # SYSTEM_LIBTOMMATH
2855 define gb_ExternalProject__use_libtommath
2856 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2858 endef
2860 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2862 ifneq ($(SYSTEM_FIREBIRD),)
2864 define gb_LinkTarget__use_libfbembed
2865 $(call gb_LinkTarget_set_include,$(1),\
2866 $(FIREBIRD_CFLAGS) \
2867 $$(INCLUDE) \
2869 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2871 endef
2873 else # !SYSTEM_FIREBIRD
2875 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2876 firebird \
2879 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2880 #$(call gb_LinkTarget__use_libtommath,$(1))
2882 define gb_LinkTarget__use_libfbembed
2883 $(call gb_LinkTarget_use_package,$(1),firebird)
2884 $(call gb_LinkTarget_set_include,$(1),\
2885 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2886 $$(INCLUDE) \
2888 ifeq ($(COM),MSC)
2889 $(call gb_LinkTarget_add_libs,$(1),\
2890 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2892 else
2893 $(call gb_LinkTarget_add_libs,$(1),\
2894 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2896 endif
2898 endef
2901 # endef
2903 endif # SYSTEM_FIREBIRD
2905 else # !ENABLE_FIREBIRD_SDBC
2907 gb_LinkTarget__use_firebird :=
2908 # gb_LinkTarget__use_atomic_ops :=
2909 # gb_LinkTarget__use_libtommath :=
2911 endif # ENABLE_FIREBIRD_SDBC
2914 ifneq ($(SYSTEM_POSTGRESQL),)
2916 define gb_LinkTarget__use_postgresql
2918 $(call gb_LinkTarget_set_include,$(1),\
2919 $(POSTGRESQL_INC) \
2920 $$(INCLUDE) \
2923 $(call gb_LinkTarget_add_libs,$(1),\
2924 -lpq \
2927 $(call gb_LinkTarget_add_ldflags,$(1),\
2928 $(POSTGRESQL_LIB) \
2931 endef
2933 else # !SYSTEM_POSTGRESQL
2935 ifeq ($(OS),WNT)
2936 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
2937 postgresql \
2939 endif # WNT
2941 define gb_LinkTarget__use_postgresql
2943 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
2945 $(call gb_LinkTarget_set_include,$(1),\
2946 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2947 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2948 $$(INCLUDE) \
2951 ifeq ($(OS),WNT)
2953 $(call gb_LinkTarget_add_libs,$(1),\
2954 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
2957 else # !WNT
2959 $(call gb_LinkTarget_add_libs,$(1),\
2960 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2961 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
2962 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
2963 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
2966 endif # !WNT
2968 endef # gb_LinkTarget__use_postgresql
2970 endif # !SYSTEM_POSTGRESQL
2972 ifeq ($(ENABLE_KF5),TRUE)
2974 define gb_LinkTarget__use_kf5
2975 $(call gb_LinkTarget_set_include,$(1),\
2976 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
2977 $$(INCLUDE) \
2980 $(call gb_LinkTarget_add_cxxflags,$(1),\
2981 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
2984 $(call gb_LinkTarget_add_libs,$(1),\
2985 $(KF5_LIBS) \
2988 endef
2990 else # !ENABLE_KF5
2992 define gb_LinkTarget__use_kf5
2994 endef
2996 endif # ENABLE_KF5
3000 ifeq ($(ENABLE_QT5),TRUE)
3002 define gb_LinkTarget__use_qt5
3003 $(call gb_LinkTarget_set_include,$(1),\
3004 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3005 $$(INCLUDE) \
3008 $(call gb_LinkTarget_add_defs,$(1),\
3009 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3012 $(call gb_LinkTarget_add_libs,$(1),\
3013 $(QT5_LIBS) \
3016 endef
3018 else # !ENABLE_QT5
3020 define gb_LinkTarget__use_qt5
3022 endef
3024 endif # ENABLE_QT5
3026 ifeq ($(ENABLE_QT6),TRUE)
3028 define gb_LinkTarget__use_qt6
3029 $(call gb_LinkTarget_set_include,$(1),\
3030 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3031 $$(INCLUDE) \
3034 $(call gb_LinkTarget_add_defs,$(1),\
3035 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3038 $(call gb_LinkTarget_add_libs,$(1),\
3039 $(QT6_LIBS) \
3042 endef
3044 else # !ENABLE_QT6
3046 define gb_LinkTarget__use_qt6
3048 endef
3050 endif # ENABLE_QT6
3053 # PYTHON
3054 # extra python_headers external because pyuno wrapper must not link python
3055 ifneq ($(SYSTEM_PYTHON),)
3057 define gb_LinkTarget__use_python_headers
3058 $(call gb_LinkTarget_add_defs,$(1),\
3059 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3062 $(call gb_LinkTarget_set_include,$(1),\
3063 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3064 $$(INCLUDE) \
3067 endef
3069 define gb_LinkTarget__use_python
3070 $(call gb_LinkTarget__use_python_headers,$(1))
3072 $(call gb_LinkTarget_add_libs,$(1),\
3073 $(PYTHON_LIBS) \
3076 endef
3078 else # !SYSTEM_PYTHON
3080 $(eval $(call gb_Helper_register_packages_for_install,python,\
3081 python3 \
3082 $(if $(filter WNT,$(OS)),libffi) \
3085 define gb_LinkTarget__use_python_headers
3086 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3087 $(call gb_LinkTarget_set_include,$(1),\
3088 -I$(call gb_UnpackedTarball_get_dir,python3) \
3089 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3090 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3091 $$(INCLUDE) \
3094 endef
3096 define gb_LinkTarget__use_python
3097 $(call gb_LinkTarget__use_python_headers,$(1))
3098 ifeq ($(OS),MACOSX)
3099 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3100 else
3101 $(call gb_LinkTarget_use_package,$(1),python3)
3102 endif
3104 ifeq ($(OS),WNT)
3105 ifeq ($(CPUNAME),X86_64)
3106 python_arch_subdir=amd64
3107 else ifeq ($(CPUNAME),AARCH64)
3108 python_arch_subdir=arm64
3109 else
3110 python_arch_subdir=win32
3111 endif
3112 $(call gb_LinkTarget_add_libs,$(1),\
3113 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3115 else ifeq ($(OS),MACOSX)
3116 $(call gb_LinkTarget_add_libs,$(1),\
3117 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3119 else
3120 $(call gb_LinkTarget_add_libs,$(1),\
3121 -L$(call gb_UnpackedTarball_get_dir,python3) \
3122 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3124 endif
3126 endef
3128 # this is only used by python currently
3129 define gb_ExternalProject__use_libffi
3130 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3132 endef
3134 endif # SYSTEM_PYTHON
3136 # ORCUS
3137 ifneq ($(SYSTEM_LIBORCUS),)
3139 define gb_LinkTarget__use_orcus
3140 $(call gb_LinkTarget_set_include,$(1),\
3141 $$(INCLUDE) \
3142 $(ORCUS_CFLAGS) \
3144 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3145 endef
3147 define gb_LinkTarget__use_orcus-parser
3149 endef
3151 else # !SYSTEM_LIBORCUS
3153 ifeq ($(COM),MSC)
3155 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3156 orcus \
3157 orcus-parser \
3160 define gb_LinkTarget__use_orcus
3161 $(call gb_LinkTarget_set_include,$(1),\
3162 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3163 $$(INCLUDE) \
3166 $(call gb_LinkTarget_use_libraries,$(1),\
3167 orcus \
3170 endef
3172 define gb_LinkTarget__use_orcus-parser
3173 $(call gb_LinkTarget_set_include,$(1),\
3174 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3175 $$(INCLUDE) \
3178 $(call gb_LinkTarget_use_libraries,$(1),\
3179 orcus-parser \
3182 endef
3184 else # !MSC
3186 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3187 liborcus \
3190 define gb_LinkTarget__use_orcus
3191 $(call gb_LinkTarget_use_package,$(1),liborcus)
3193 $(call gb_LinkTarget_set_include,$(1),\
3194 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3195 $$(INCLUDE) \
3198 $(call gb_LinkTarget_add_libs,$(1),\
3199 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
3202 $(if $(SYSTEM_BOOST), \
3203 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3204 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3207 endef
3209 define gb_LinkTarget__use_orcus-parser
3210 $(call gb_LinkTarget_use_package,$(1),liborcus)
3212 $(call gb_LinkTarget_set_include,$(1),\
3213 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3214 $$(INCLUDE) \
3217 $(call gb_LinkTarget_add_libs,$(1),\
3218 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
3221 endef
3223 endif # MSC
3225 endif # SYSTEM_LIBORCUS
3228 ifeq ($(ENABLE_LIBEOT),TRUE)
3229 ifeq ($(SYSTEM_LIBEOT),TRUE)
3231 define gb_LinkTarget__use_libeot
3232 $(call gb_LinkTarget_set_include,$(1),\
3233 $$(INCLUDE) \
3234 $(LIBEOT_CFLAGS) \
3236 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3238 endef
3240 gb_ExternalProject__use_libeot :=
3242 else # !SYSTEM_LIBEOT
3244 define gb_LinkTarget__use_libeot
3245 $(call gb_LinkTarget_set_include,$(1),\
3246 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3247 $$(INCLUDE) \
3249 $(call gb_LinkTarget_add_libs,$(1),\
3250 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3252 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3254 endef
3256 define gb_ExternalProject__use_libeot
3257 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3259 endef
3261 endif # !SYSTEM_LIBEOT
3262 else # !ENABLE_LIBEOT
3264 gb_LinkTarget__use_libeot :=
3265 gb_ExternalProject__use_libeot :=
3267 endif # !ENABLE_LIBEOT
3270 ifeq ($(USING_X11), TRUE)
3272 define gb_LinkTarget__use_Xrandr
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 $$(INCLUDE) \
3275 $(XRANDR_CFLAGS) \
3278 $(call gb_LinkTarget_add_libs,$(1),\
3279 $(XRANDR_LIBS) \
3281 endef
3283 define gb_LinkTarget__use_Xrender
3284 $(call gb_LinkTarget_set_include,$(1),\
3285 $$(INCLUDE) \
3286 $(XRENDER_CFLAGS) \
3289 $(call gb_LinkTarget_add_libs,$(1),\
3290 $(XRENDER_LIBS) \
3292 endef
3294 endif # USING_X11
3297 gb_ExternalProject__use_nss3:=
3300 ifneq ($(SYSTEM_NSS),)
3302 define gb_LinkTarget__use_nss3
3303 $(call gb_LinkTarget_add_defs,$(1),\
3304 -DSYSTEM_NSS \
3307 $(call gb_LinkTarget_set_include,$(1),\
3308 $$(INCLUDE) \
3309 $(NSS_CFLAGS) \
3312 $(call gb_LinkTarget_add_libs,$(1),\
3313 $(NSS_LIBS) \
3316 endef
3318 define gb_LinkTarget__use_nssutil3
3319 $(call gb_LinkTarget__use_nss3,$(1))
3321 endef
3323 define gb_LinkTarget__use_plc4
3324 $(call gb_LinkTarget__use_nss3,$(1))
3326 endef
3328 define gb_LinkTarget__use_ssl3
3329 $(call gb_LinkTarget__use_nss3,$(1))
3331 endef
3333 else # !SYSTEM_NSS
3335 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3336 nss \
3339 define gb_LinkTarget__use_nss3
3340 $(call gb_LinkTarget_use_package,$(1),nss)
3341 $(call gb_LinkTarget_set_include,$(1),\
3342 $$(INCLUDE) \
3343 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3344 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3347 ifeq ($(COM),MSC)
3348 $(call gb_LinkTarget_add_libs,$(1),\
3349 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3350 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3351 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3353 else
3354 $(call gb_LinkTarget_add_libs,$(1),\
3355 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3356 -lnspr4 \
3357 -lnss3 \
3358 -lsmime3 \
3360 endif
3362 endef
3364 define gb_LinkTarget__use_plc4
3365 $(call gb_LinkTarget_use_package,$(1),nss)
3366 ifeq ($(COM),MSC)
3367 $(call gb_LinkTarget_add_libs,$(1),\
3368 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3370 else
3371 $(call gb_LinkTarget_add_libs,$(1),\
3372 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3374 endif
3376 endef
3378 define gb_LinkTarget__use_ssl3
3379 $(call gb_LinkTarget_use_package,$(1),nss)
3380 ifeq ($(COM),MSC)
3381 $(call gb_LinkTarget_add_libs,$(1),\
3382 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3384 else
3385 $(call gb_LinkTarget_add_libs,$(1),\
3386 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3388 endif
3390 endef
3392 define gb_LinkTarget__use_nssutil3
3393 $(call gb_LinkTarget_use_package,$(1),nss)
3394 $(call gb_LinkTarget_set_include,$(1),\
3395 $$(INCLUDE) \
3396 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3397 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3400 ifeq ($(COM),MSC)
3401 $(call gb_LinkTarget_add_libs,$(1),\
3402 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3404 else
3405 $(call gb_LinkTarget_add_libs,$(1),\
3406 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3407 -lnssutil3 \
3409 endif
3411 endef
3413 define gb_ExternalProject__use_nss3
3414 $(call gb_ExternalProject_use_package,$(1),nss)
3416 endef
3418 endif # SYSTEM_NSS
3420 ifeq ($(ENABLE_BREAKPAD),TRUE)
3422 define gb_LinkTarget__use_breakpad
3423 $(call gb_LinkTarget_set_include,$(1),\
3424 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3425 $$(INCLUDE) \
3428 ifeq ($(COM),MSC)
3429 $(call gb_LinkTarget_use_static_libraries,$(1),\
3430 breakpad \
3432 else
3433 $(call gb_LinkTarget_add_libs,$(1),\
3434 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3436 endif
3438 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3440 endef
3442 endif # ENABLE_BREAKPAD
3444 ifeq ($(ENABLE_GPGMEPP),TRUE)
3446 ifneq ($(SYSTEM_GPGMEPP),)
3448 gb_ExternalProject__use_gpgmepp:=
3449 gb_ExternalProject__use_libassuan:=
3450 gb_ExternalProject__use_libgpg-error:=
3452 define gb_LinkTarget__use_gpgmepp
3453 $(call gb_LinkTarget_set_include,$(1),\
3454 $$(INCLUDE) \
3455 $$(GPGMEPP_CFLAGS) \
3458 $(call gb_LinkTarget_add_libs,$(1),\
3459 $(GPGMEPP_LIBS) \
3462 endef
3464 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3466 define gb_ExternalProject__use_gpgmepp
3467 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3469 endef
3470 define gb_ExternalProject__use_libassuan
3471 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3473 endef
3474 define gb_ExternalProject__use_libgpg-error
3475 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3477 endef
3479 ifneq ($(filter WNT,$(OS)),)
3481 define gb_LinkTarget__use_libgpg-error
3482 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3484 $(call gb_LinkTarget_set_include,$(1),\
3485 $(GPG_ERROR_CFLAGS) \
3486 $$(INCLUDE) \
3488 $(call gb_LinkTarget_add_libs,$(1),\
3489 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3492 endef
3494 define gb_LinkTarget__use_libassuan
3495 $(call gb_LinkTarget_use_package,$(1),libassuan)
3497 $(call gb_LinkTarget_set_include,$(1),\
3498 $(LIBASSUAN_CFLAGS) \
3499 $$(INCLUDE) \
3501 $(call gb_LinkTarget_add_libs,$(1),\
3502 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3505 endef
3507 define gb_LinkTarget__use_gpgmepp
3508 $(call gb_LinkTarget_set_include,$(1),\
3509 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3510 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3511 $$(GPG_ERROR_CFLAGS) \
3512 $$(INCLUDE) \
3514 $(call gb_LinkTarget_use_libraries,$(1),\
3515 gpgmepp \
3518 endef
3520 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3521 gpgmepp \
3522 libassuan \
3523 libgpg-error \
3526 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3527 gpgmepp \
3530 endif
3532 ifneq ($(filter MACOSX LINUX,$(OS)),)
3534 define gb_LinkTarget__use_gpgmepp
3535 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3537 $(call gb_LinkTarget_set_include,$(1),\
3538 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3539 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3540 $$(GPG_ERROR_CFLAGS) \
3541 $$(INCLUDE) \
3543 $(call gb_LinkTarget_add_libs,$(1),\
3544 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3545 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3546 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3547 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3550 endef
3552 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3553 gpgmepp \
3554 libassuan \
3555 libgpg-error \
3558 endif
3560 endif
3562 else # !ENABLE_GPGMEPP
3564 gb_ExternalProject__use_gpgmepp :=
3565 gb_ExternalProject__use_libassuan :=
3566 gb_ExternalProject__use_libgpg-error :=
3568 gb_LinkTarget__use_gpgmepp :=
3569 gb_LinkTarget__use_libassuan :=
3570 gb_LinkTarget__use_libgpg-error :=
3572 endif # ENABLE_GPGMEPP
3574 define gb_LinkTarget__use_dconf
3575 $(call gb_LinkTarget_set_include,$(1),\
3576 $$(INCLUDE) \
3577 $(DCONF_CFLAGS) \
3580 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3581 endef
3583 ### Jars ############################################################
3585 ifneq ($(SYSTEM_HSQLDB),)
3587 define gb_Jar__use_hsqldb
3588 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3589 endef
3590 define gb_JunitTest__use_hsqldb
3591 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3592 endef
3594 else # !SYSTEM_HSQLDB
3596 ifeq ($(ENABLE_JAVA),TRUE)
3597 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3598 hsqldb \
3600 endif
3602 define gb_Jar__use_hsqldb
3603 $(call gb_Jar_use_jar,$(1),hsqldb)
3604 endef
3605 define gb_JunitTest__use_hsqldb
3606 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3607 endef
3609 endif # SYSTEM_HSQLDB
3612 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3614 ifneq ($(SYSTEM_BSH),)
3616 define gb_Jar__use_bsh
3617 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3618 endef
3620 else # !SYSTEM_BSH
3622 ifeq ($(ENABLE_JAVA),TRUE)
3623 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3624 bsh \
3626 endif
3628 define gb_Jar__use_bsh
3629 $(call gb_Jar_use_jar,$(1),bsh)
3630 endef
3632 endif # SYSTEM_BSH
3634 endif
3636 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3638 ifneq ($(SYSTEM_RHINO),)
3640 define gb_Jar__use_rhino
3641 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3642 endef
3644 else # !SYSTEM_RHINO
3646 ifeq ($(ENABLE_JAVA),TRUE)
3647 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3648 js \
3650 endif
3652 define gb_Jar__use_rhino
3653 $(call gb_Jar_use_jar,$(1),js)
3654 endef
3656 endif # SYSTEM_RHINO
3658 endif
3660 ifneq ($(SYSTEM_JFREEREPORT),)
3662 define gb_Jar__use_flow-engine
3663 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3664 endef
3666 define gb_Jar__use_flute
3667 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3668 endef
3670 define gb_Jar__use_libbase
3671 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3672 endef
3674 define gb_Jar__use_libfonts
3675 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3676 endef
3678 define gb_Jar__use_libformula
3679 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3680 endef
3682 define gb_Jar__use_liblayout
3683 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3684 endef
3686 define gb_Jar__use_libloader
3687 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3688 endef
3690 define gb_Jar__use_librepository
3691 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3692 endef
3694 define gb_Jar__use_libserializer
3695 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3696 endef
3698 define gb_Jar__use_libxml
3699 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3700 endef
3702 define gb_Jar__use_sac
3703 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3704 endef
3706 else # !SYSTEM_JFREEREPORT
3708 ifeq ($(ENABLE_JAVA),TRUE)
3709 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3710 flow-engine \
3711 flute-1.1.6 \
3712 libbase-1.1.6 \
3713 libfonts-1.1.6 \
3714 libformula-1.1.7 \
3715 liblayout \
3716 libloader-1.1.6 \
3717 librepository-1.1.6 \
3718 libserializer-1.1.6 \
3719 libxml-1.1.7 \
3720 sac \
3722 endif
3724 define gb_Jar__use_flow-engine
3725 $(call gb_Jar_use_jar,$(1),flow-engine)
3726 endef
3728 define gb_Jar__use_flute
3729 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3730 endef
3732 define gb_Jar__use_libbase
3733 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3734 endef
3736 define gb_Jar__use_libfonts
3737 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3738 endef
3740 define gb_Jar__use_libformula
3741 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3742 endef
3744 define gb_Jar__use_liblayout
3745 $(call gb_Jar_use_jar,$(1),liblayout)
3746 endef
3748 define gb_Jar__use_libloader
3749 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3750 endef
3752 define gb_Jar__use_librepository
3753 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3754 endef
3756 define gb_Jar__use_libserializer
3757 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3758 endef
3760 define gb_Jar__use_libxml
3761 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3762 endef
3764 define gb_Jar__use_sac
3765 $(call gb_Jar_use_jar,$(1),sac)
3766 endef
3768 endif # SYSTEM_JFREEREPORT
3771 # Executables
3773 define gb_Executable__register_bestreversemap
3774 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3775 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3777 endef
3779 # TODO depending on the whole URE might be overkill, but I do not have a
3780 # Windows machine to debug it...
3781 define gb_Executable__register_climaker
3782 $(call gb_Executable_add_runtime_dependencies,climaker,\
3783 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3784 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3785 $(call gb_UnoApi_get_target_for_build,udkapi) \
3786 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3788 endef
3790 define gb_Executable__register_cppumaker
3791 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3792 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3794 endef
3796 # This is used to determine what we need for 'build' platform.
3797 define gb_Executable__register_gengal
3798 $(call gb_Executable_add_runtime_dependencies,gengal,\
3799 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3800 $(call gb_Library_get_target_for_build,localedata_en) \
3801 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3802 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3803 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3804 $(call gb_Package_get_target_for_build,postprocess_registry) \
3805 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3806 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3807 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3808 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3809 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3810 $(call gb_UnoApi_get_target_for_build,offapi) \
3811 $(call gb_UnoApi_get_target_for_build,udkapi) \
3813 endef
3815 ifeq ($(SYSTEM_ICU),)
3817 define gb_Executable__register_gendict
3818 $(call gb_Executable_add_runtime_dependencies,gendict,\
3819 $(call gb_Package_get_target_for_build,icu) \
3820 $(call gb_Package_get_target_for_build,icu_ure) \
3822 endef
3824 endif
3826 define gb_Executable__register_idlc
3827 $(call gb_Executable_add_runtime_dependencies,idlc,\
3828 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3830 endef
3832 define gb_Executable__register_localize
3833 $(call gb_Executable_add_runtime_dependencies,localize,\
3834 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3835 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3838 endef
3840 # FIXME ure/services.rdb needs cleanup
3841 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3842 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3843 define gb_Executable__register_saxparser
3844 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3845 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3846 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3847 $(call gb_Rdb_get_target_for_build,saxparser) \
3848 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3849 $(call gb_UnoApi_get_target_for_build,udkapi) \
3851 endef
3853 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3854 # required due to the settings for URE_SERVICES and URE_TYPES in
3855 # cppuhelper/source/unorc
3856 define gb_Executable__register_uno
3857 $(call gb_Executable_add_runtime_dependencies,uno,\
3858 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3859 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3860 $(call gb_UnoApi_get_target_for_build,udkapi) \
3862 endef
3865 # External executables
3867 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3869 gb_ExternalExecutable__register_xmllint :=
3871 else # ! SYSTEM_LIBXML_FOR_BUILD
3873 define gb_ExternalExecutable__register_xmllint
3874 $(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)
3875 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3876 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3877 $(call gb_Package_get_target,libxml2) \
3880 endef
3882 endif # SYSTEM_LIBXML_FOR_BUILD
3884 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3886 gb_ExternalExecutable__register_xsltproc :=
3888 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3890 define gb_ExternalExecutable__register_xsltproc
3891 $(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)
3892 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3893 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3894 $(call gb_Package_get_target,libxml2) \
3895 $(call gb_Package_get_target,libxslt) \
3898 endef
3900 endif # SYSTEM_LIBXSLT_FOR_BUILD
3902 ifneq (,$(SYSTEM_UCPP))
3904 gb_ExternalExecutable__register_ucpp :=
3906 else # ! SYSTEM_UCPP
3908 define gb_ExternalExecutable__register_ucpp
3909 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3911 endef
3913 endif # SYSTEM_UCPP
3915 ifeq (,$(PYTHON_FOR_BUILD))
3917 define gb_ExternalExecutable__register_python
3918 ifeq ($(OS),MACOSX)
3920 # use set_external, to avoid having the command added as prerequisite for the
3921 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3922 # matching rule to build that specific file)
3923 $(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))
3924 # the Zip ensures that internal python has been built (cannot use the Package
3925 # target, as that is not used on Mac)
3926 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3928 else
3930 $(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))
3931 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3932 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3934 endif
3936 endef
3938 else
3940 define gb_ExternalExecutable__register_python
3941 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3943 endef
3945 endif # PYTHON_FOR_BUILD
3947 ifneq ($(SYSTEM_GENBRK),)
3949 define gb_ExternalExecutable__register_genbrk
3950 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3952 endef
3954 else # ! SYSTEM_GENBRK
3956 define gb_ExternalExecutable__register_genbrk
3957 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3958 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3959 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3960 $(call gb_Package_get_target_for_build,icu) \
3961 $(call gb_Package_get_target_for_build,icu_ure) \
3964 endef
3966 endif
3968 ifneq ($(SYSTEM_GENCCODE),)
3970 define gb_ExternalExecutable__register_genccode
3971 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3973 endef
3975 else # ! SYSTEM_GENCCODE
3977 define gb_ExternalExecutable__register_genccode
3978 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3979 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3980 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3981 $(call gb_Package_get_target_for_build,icu) \
3982 $(call gb_Package_get_target_for_build,icu_ure) \
3985 endef
3987 endif
3989 ifneq ($(SYSTEM_GENCMN),)
3991 define gb_ExternalExecutable__register_gencmn
3992 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3994 endef
3996 else # ! SYSTEM_GENCMN
3998 define gb_ExternalExecutable__register_gencmn
3999 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4000 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4001 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4002 $(call gb_Package_get_target_for_build,icu) \
4003 $(call gb_Package_get_target_for_build,icu_ure) \
4006 endef
4008 endif
4010 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4011 ifneq ($(SYSTEM_BZIP2),)
4013 define gb_LinkTarget__use_bzip2
4014 $(call gb_LinkTarget_set_include,$(1),\
4015 $(BZIP2_CFLAGS) \
4016 $$(INCLUDE) \
4018 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4020 endef
4022 gb_ExternalProject__use_bzip2 :=
4024 else # !SYSTEM_BZIP2
4026 define gb_LinkTarget__use_bzip2
4027 $(call gb_LinkTarget_set_include,$(1),\
4028 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4029 $$(INCLUDE) \
4032 ifeq ($(COM),MSC)
4033 $(call gb_LinkTarget_add_libs,$(1),\
4034 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4036 else
4037 $(call gb_LinkTarget_add_libs,$(1),\
4038 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4040 endif
4042 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4043 endef
4045 define gb_ExternalProject__use_bzip2
4046 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4047 endef
4049 endif
4050 endif
4052 define gb_LinkTarget__use_clew
4053 $(call gb_LinkTarget_set_include,$(1), \
4054 -I$(SRCDIR)/external/clew/source/include \
4055 $$(INCLUDE) \
4057 $(call gb_LinkTarget_use_libraries,$(1),clew)
4058 endef
4060 ifneq ($(ENABLE_PDFIUM),)
4061 define gb_LinkTarget__use_pdfium
4062 $(call gb_LinkTarget_set_include,$(1),\
4063 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4064 -DCOMPONENT_BUILD \
4065 $$(INCLUDE) \
4067 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4068 endef
4069 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4070 pdfium \
4072 endif
4074 define gb_LinkTarget__use_dtoa
4075 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4076 $(call gb_LinkTarget_set_include,$(1),\
4077 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4078 $$(INCLUDE) \
4080 $(call gb_LinkTarget_use_static_libraries,$(1),\
4081 dtoa \
4084 endef
4086 define gb_ExternalProject__use_dtoa
4087 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4089 endef
4091 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4092 $(if $(UCRT_REDISTDIR),ucrt) \
4095 ifneq ($(SYSTEM_BOX2D),)
4097 define gb_LinkTarget__use_box2d
4098 $(call gb_LinkTarget_set_include,$(1),\
4099 -DSYSTEM_BOX2D \
4100 $$(INCLUDE) \
4101 $(BOX2D_CFLAGS) \
4103 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4105 endef
4107 gb_ExternalProject__use_box2d :=
4109 else # !SYSTEM_BOX2D
4111 define gb_LinkTarget__use_box2d
4112 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4113 $(call gb_LinkTarget_set_include,$(1),\
4114 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4115 $$(INCLUDE) \
4117 $(call gb_LinkTarget_use_static_libraries,$(1),\
4118 box2d \
4121 endef
4123 define gb_ExternalProject__use_box2d
4124 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4126 endef
4128 endif # SYSTEM_BOX2D
4130 ifneq ($(SYSTEM_ZXING),)
4132 define gb_LinkTarget__use_zxing
4133 $(call gb_LinkTarget_set_include,$(1),\
4134 -DSYSTEM_ZXING \
4135 $$(INCLUDE) \
4136 $(ZXING_CFLAGS) \
4138 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4140 endef
4142 gb_ExternalProject__use_zxing :=
4144 else # !SYSTEM_ZXING
4146 ifneq ($(ENABLE_ZXING),)
4148 define gb_LinkTarget__use_zxing
4149 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4150 $(call gb_LinkTarget_set_include,$(1),\
4151 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4152 $$(INCLUDE) \
4154 $(call gb_LinkTarget_use_static_libraries,$(1),\
4155 zxing \
4158 endef
4160 define gb_ExternalProject__use_zxing
4161 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4163 endef
4165 else # !ENABLE_ZXING
4167 define gb_LinkTarget__use_zxing
4168 endef
4170 endif # ENABLE_ZXING
4172 endif # SYSTEM_ZXING
4176 ifneq ($(SYSTEM_CUCKOO),)
4178 gb_ExternalProject__use_cuckoo_headers :=
4180 define gb_LinkTarget__use_cuckoo_headers
4181 $(call gb_LinkTarget_set_include,$(1),\
4182 $$(INCLUDE) \
4185 endef
4187 else # !SYSTEM_CUCKOO
4189 define gb_ExternalProject__use_cuckoo_headers
4190 $(call gb_ExternalProject_use_unpacked,$(1),cuckoo)
4192 endef
4194 define gb_LinkTarget__use_cuckoo_headers
4195 $(call gb_LinkTarget_use_unpacked,$(1),cuckoo)
4196 $(call gb_LinkTarget_set_include,$(1),\
4197 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4198 $$(INCLUDE) \
4201 endef
4203 endif # SYSTEM_CUCKOO
4206 # vim: set noet sw=4 ts=4: