sc: copy cache values when clone color conditional format
[LibreOffice.git] / RepositoryExternal.mk
blob64d8d1ac1aa7001a05dd5eae133fde5b314f0bb7
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/third_party/vulkan \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
133 -I$(call gb_UnpackedTarball_get_dir,skia) \
134 -I$(SRCDIR)/external/skia/inc/ \
135 $$(INCLUDE) \
137 $(call gb_LinkTarget_use_libraries,$(1),skia)
138 $(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
142 endef
143 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
144 skia \
146 endif
148 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
150 define gb_LinkTarget__use_sane_headers
151 $(call gb_LinkTarget_set_include,$(1),\
152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
158 ifeq ($(OS),WNT)
159 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160 endif
162 endef
164 else
166 gb_LinkTarget__use_sane_headers :=
168 endif
170 ifneq ($(SYSTEM_BLUEZ),)
172 gb_LinkTarget__use_bluez_bluetooth_headers :=
174 else # !SYSTEM_BLUEZ
176 define gb_LinkTarget__use_bluez_bluetooth_headers
177 $(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
182 endef
184 endif # SYSTEM_BLUEZ
186 # External libraries
188 ifneq ($(SYSTEM_CPPUNIT),)
190 define gb_LinkTarget__use_cppunit
191 $(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
196 $(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
200 endef
202 else # !SYSTEM_CPPUNIT
204 define gb_LinkTarget__use_cppunit
205 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
209 $$(INCLUDE) \
212 ifeq ($(COM),MSC)
213 $(call gb_LinkTarget_add_libs,$(1),\
214 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
216 else
217 $(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
220 endif
222 endef
224 endif # SYSTEM_CPPUNIT
226 ifneq ($(SYSTEM_EPOXY),)
228 define gb_LinkTarget__use_epoxy
229 $(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
231 $(EPOXY_CFLAGS) \
233 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
235 endef
237 gb_ExternalProject__use_epoxy :=
239 else # !SYSTEM_EPOXY
241 define gb_LinkTarget__use_epoxy
242 $(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
247 $(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
251 endef
253 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
257 define gb_ExternalProject__use_epoxy
258 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
260 endef
262 endif # SYSTEM_EPOXY
264 define gb_LinkTarget__use_iconv
265 ifeq ($(COM),MSC)
266 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267 else
268 $(call gb_LinkTarget_add_libs,$(1),-liconv)
269 endif
270 endef
272 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
274 define gb_LinkTarget__use_mariadb-connector-c
275 $(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
279 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
281 endef
282 gb_ExternalProject__use_mariadb-connector-c :=
284 else # !SYSTEM_MARIADB_CONNECTOR_C
286 define gb_LinkTarget__use_mariadb-connector-c
287 $(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
291 $(call gb_LinkTarget_use_static_libraries,$(1),\
292 mariadb-connector-c \
294 ifeq ($(OS),MACOSX)
295 $(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
298 endif
299 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
307 endef
308 define gb_ExternalProject__use_mariadb-connector-c
309 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
311 endef
313 endif # SYSTEM_MARIADB_CONNECTOR_C
316 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DSYSTEM_MARIADB \
324 $(call gb_LinkTarget_add_libs,$(1),\
325 $(MARIADB_LIBS) \
328 $(call gb_LinkTarget_set_include,$(1),\
329 $(MARIADB_CFLAGS) \
330 $$(INCLUDE) \
332 endef
334 else
336 define gb_LinkTarget__use_mysql
338 $(call gb_LinkTarget_set_include,$(1),\
339 $$(INCLUDE) \
342 endef
344 endif
346 ifneq ($(SYSTEM_ZLIB),)
348 define gb_LinkTarget__use_zlib
349 $(call gb_LinkTarget_add_defs,$(1),\
350 -DSYSTEM_ZLIB \
351 -DZLIB_CONST \
353 $(call gb_LinkTarget_add_libs,$(1),-lz)
355 endef
357 # nothing on system
358 define gb_LinkTarget__use_zlib_x64
360 endef
362 gb_ExternalProject__use_zlib :=
364 else # !SYSTEM_ZLIB
366 define gb_LinkTarget__use_zlib_multiarch
367 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
369 $(call gb_LinkTarget_add_defs,$(1), \
370 -DZLIB_CONST \
373 $(call gb_LinkTarget_set_include,$(1),\
374 $(ZLIB_CFLAGS) \
375 $$(INCLUDE) \
378 $(call gb_LinkTarget_use_static_libraries,$(1),\
379 $(2) \
382 endef
384 define gb_LinkTarget__use_zlib
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
387 endef
389 define gb_LinkTarget__use_zlib_x64
390 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
392 endef
394 define gb_ExternalProject__use_zlib
395 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
397 endef
399 endif # SYSTEM_ZLIB
402 ifneq ($(SYSTEM_LIBJPEG),)
404 define gb_LinkTarget__use_libjpeg
405 $(call gb_LinkTarget_set_include,$(1),\
406 $$(INCLUDE) \
407 $(LIBJPEG_CFLAGS) \
409 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
410 $(call gb_LinkTarget_set_ldflags,$(1),\
411 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
414 endef
416 gb_ExternalProject__use_libjpeg :=
418 else
420 define gb_LinkTarget__use_libjpeg
421 $(call gb_LinkTarget_set_include,$(1),\
422 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
423 $$(INCLUDE) \
425 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
427 endef
429 define gb_ExternalProject__use_libjpeg
430 $(call gb_ExternalProject_use_static_libraries,$(1),libjpeg-turbo)
432 endef
434 endif # SYSTEM_LIBJPEG
436 ifneq ($(SYSTEM_MYTHES),)
438 define gb_LinkTarget__use_mythes
439 $(call gb_LinkTarget_set_include,$(1),\
440 $$(INCLUDE) \
441 $(MYTHES_CFLAGS) \
443 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
445 endef
447 else # !SYSTEM_MYTHES
449 define gb_LinkTarget__use_mythes
450 $(call gb_LinkTarget_set_include,$(1),\
451 -I$(call gb_UnpackedTarball_get_dir,mythes) \
452 $$(INCLUDE) \
455 ifeq ($(COM),MSC)
456 $(call gb_LinkTarget_use_static_libraries,$(1),\
457 mythes \
459 else
460 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
461 $(call gb_LinkTarget_use_external_project,$(1),mythes)
462 endif
464 endef
466 endif # SYSTEM_MYTHES
469 ifneq ($(SYSTEM_EXPAT),)
471 define gb_LinkTarget__use_expat_impl
472 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
474 $(call gb_LinkTarget_add_defs,$(1),\
475 -DSYSTEM_EXPAT \
478 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
480 endef
482 gb_ExternalProject__use_expat :=
484 else # !SYSTEM_EXPAT
486 define gb_LinkTarget__use_expat_impl
487 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
489 $(call gb_LinkTarget_set_include,$(1),\
490 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
491 $$(INCLUDE) \
494 $(call gb_LinkTarget_use_static_libraries,$(1),\
495 $(2) \
498 endef
500 define gb_ExternalProject__use_expat
501 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
503 endef
505 endif # SYSTEM_EXPAT
507 define gb_LinkTarget__use_expat
508 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
510 endef
512 define gb_LinkTarget__use_expat_x64
513 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
515 endef
517 ifneq ($(SYSTEM_HYPH),)
519 define gb_LinkTarget__use_hyphen
520 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
522 endef
524 else # !SYSTEM_HYPH
526 define gb_LinkTarget__use_hyphen
527 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
528 $(call gb_LinkTarget_set_include,$(1),\
529 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
530 $$(INCLUDE) \
533 ifeq ($(COM),MSC)
534 $(call gb_LinkTarget_use_static_libraries,$(1),\
535 hyphen \
537 else
538 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
539 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
540 endif
542 endef
544 endif # SYSTEM_HYPH
546 ifneq ($(SYSTEM_HUNSPELL),)
548 define gb_LinkTarget__use_hunspell
549 $(call gb_LinkTarget_set_include,$(1),\
550 $$(INCLUDE) \
551 $(HUNSPELL_CFLAGS) \
553 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
555 endef
557 gb_ExternalProject__use_hunspell :=
559 else # !SYSTEM_HUNSPELL
561 define gb_LinkTarget__use_hunspell
562 $(call gb_LinkTarget_add_defs,$(1),\
563 -DHUNSPELL_STATIC \
565 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
566 $(call gb_LinkTarget_set_include,$(1),\
567 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
568 $$(INCLUDE) \
571 ifeq ($(COM),MSC)
572 $(call gb_LinkTarget_use_static_libraries,$(1),\
573 hunspell \
575 else
576 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
577 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
578 endif
580 endef
582 define gb_ExternalProject__use_hunspell
583 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
585 endef
587 endif # SYSTEM_HUNSPELL
590 ifneq ($(SYSTEM_BOOST),)
592 define gb_LinkTarget__use_boost_lib
593 $(call gb_LinkTarget_set_include,$(1),\
594 $$(INCLUDE) \
595 $(BOOST_CPPFLAGS) \
598 $(call gb_LinkTarget_add_ldflags,$(1),\
599 $(BOOST_LDFLAGS) \
602 $(call gb_LinkTarget_add_libs,$(1),$(2))
604 endef
606 define gb_LinkTarget__use_boost_locale
607 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
609 endef
611 define gb_LinkTarget__use_boost_date_time
612 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
614 endef
616 define gb_LinkTarget__use_boost_filesystem
617 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
619 endef
621 gb_ExternalProject__use_boost_filesystem :=
623 define gb_LinkTarget__use_boost_iostreams
624 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
626 endef
628 gb_ExternalProject__use_boost_iostreams :=
630 define gb_LinkTarget__use_boost_system
631 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
633 endef
635 gb_ExternalProject__use_boost_system :=
637 define gb_LinkTarget__use_boost_headers
638 $(call gb_LinkTarget_set_include,$(1),\
639 $$(INCLUDE) \
640 $(BOOST_CPPFLAGS) \
643 endef
645 gb_ExternalProject__use_boost_headers:=
647 else # !SYSTEM_BOOST
649 define gb_LinkTarget__use_boost_lib
650 $(call gb_LinkTarget_add_defs,$(1),\
651 -DBOOST_ALL_NO_LIB \
654 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
656 endef
658 define gb_LinkTarget__use_boost_locale
659 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
660 $(call gb_LinkTarget_add_libs,$(1),\
661 $(if $(filter $(OS),MACOSX),-liconv) \
664 endef
666 define gb_LinkTarget__use_boost_date_time
667 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
669 endef
671 define gb_LinkTarget__use_boost_filesystem
672 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
674 endef
676 define gb_ExternalProject__use_boost_filesystem
677 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
678 endef
680 define gb_LinkTarget__use_boost_iostreams
681 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
683 endef
685 define gb_ExternalProject__use_boost_iostreams
686 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
687 endef
689 define gb_LinkTarget__use_boost_system
690 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
692 endef
694 define gb_ExternalProject__use_boost_system
695 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
696 endef
698 define gb_LinkTarget__use_boost_headers
699 $(call gb_LinkTarget_use_unpacked,$(1),boost)
700 $(call gb_LinkTarget_set_include,$(1),\
701 $(BOOST_CPPFLAGS) \
702 $$(INCLUDE) \
705 endef
707 define gb_ExternalProject__use_boost_headers
708 $(call gb_ExternalProject_use_unpacked,$(1),boost)
710 endef
712 endif # SYSTEM_BOOST
715 ifneq ($(SYSTEM_LIBCMIS),)
717 define gb_LinkTarget__use_libcmis
718 $(call gb_LinkTarget_set_include,$(1),\
719 $$(INCLUDE) \
720 $(LIBCMIS_CFLAGS) \
722 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
724 endef
726 else # !SYSTEM_LIBCMIS
728 define gb_LinkTarget__use_libcmis
729 $(call gb_LinkTarget_set_include,$(1),\
730 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
731 $$(INCLUDE) \
733 $(call gb_LinkTarget_use_static_libraries,$(1),\
734 libcmis \
737 endef
739 endif # SYSTEM_LIBCMIS
741 ifeq ($(ENABLE_JAVA),TRUE)
743 define gb_LinkTarget__use_jawt
744 $(call gb_LinkTarget_add_libs,$(1),\
745 $(JAWTLIB) \
748 endef
750 else # !ENABLE_JAVA
752 gb_LinkTarget__use_jawt :=
754 endif # ENABLE_JAVA
756 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
758 define gb_LinkTarget__use_libatomic_ops
759 $(call gb_LinkTarget_set_include,$(1),\
760 $$(INCLUDE) \
761 $(LIBATOMIC_OPS_CFLAGS) \
763 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
765 endef
766 gb_ExternalProject__use_libatomic_ops :=
768 else # !SYSTEM_LIBATOMIC_OPS
770 define gb_LinkTarget__use_libatomic_ops
771 $(call gb_LinkTarget_set_include,$(1),\
772 $(LIBATOMIC_OPS_CFLAGS) \
773 $$(INCLUDE) \
774 $(LIBATOMIC_OPS_CFLAGS) \
776 $(call gb_LinkTarget_use_external_project,$(1),\
777 libatomic_ops \
780 $(call gb_LinkTarget_add_libs,$(1),\
781 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
784 endef
786 define gb_ExternalProject__use_libatomic_ops
787 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
789 endef
791 endif # SYSTEM_LIBATOMIC_OPS
794 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
796 define gb_LinkTarget__use_libexttextcat
797 $(call gb_LinkTarget_set_include,$(1),\
798 $$(INCLUDE) \
799 $(LIBEXTTEXTCAT_CFLAGS) \
801 $(call gb_LinkTarget_add_defs,$(1),\
802 -DSYSTEM_LIBEXTTEXTCAT \
804 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
806 endef
808 else # !SYSTEM_LIBEXTTEXTCAT
810 define gb_LinkTarget__use_libexttextcat
811 $(call gb_LinkTarget_set_include,$(1),\
812 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
813 $$(INCLUDE) \
816 ifeq ($(COM),MSC)
817 $(call gb_LinkTarget_use_static_libraries,$(1),\
818 libexttextcat \
820 else
821 $(call gb_LinkTarget_add_libs,$(1),\
822 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
824 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
825 endif
828 endef
830 endif # SYSTEM_LIBEXTTEXTCAT
833 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
835 define gb_LinkTarget__use_libnumbertext
836 $(call gb_LinkTarget_set_include,$(1),\
837 $$(INCLUDE) \
838 $(LIBNUMBERTEXT_CFLAGS) \
840 $(call gb_LinkTarget_add_defs,$(1),\
841 -DSYSTEM_LIBNUMBERTEXT \
843 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
845 endef
847 else # !SYSTEM_LIBNUMBERTEXT
849 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
850 libnumbertext_numbertext \
853 define gb_LinkTarget__use_libnumbertext
854 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
855 $(call gb_LinkTarget_set_include,$(1),\
856 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
857 $$(INCLUDE) \
860 ifeq ($(COM),MSC)
861 $(call gb_LinkTarget_use_static_libraries,$(1),\
862 libnumbertext \
864 else
866 $(call gb_LinkTarget_add_libs,$(1),\
867 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
869 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
871 endif
873 endef
875 endif # SYSTEM_LIBNUMBERTEXT
878 ifneq ($(SYSTEM_LIBXML),)
880 define gb_LinkTarget__use_libxml2
881 $(call gb_LinkTarget_add_defs,$(1),\
882 -DSYSTEM_LIBXML \
884 $(call gb_LinkTarget_set_include,$(1),\
885 $$(INCLUDE) \
886 $(LIBXML_CFLAGS) \
888 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
890 endef
891 gb_ExternalProject__use_libxml2:=
893 else # !SYSTEM_LIBXML
895 $(eval $(call gb_Helper_register_packages_for_install,ure,\
896 libxml2 \
899 define gb_LinkTarget__use_libxml2
900 $(call gb_LinkTarget_use_package,$(1),libxml2)
901 $(call gb_LinkTarget_set_include,$(1),\
902 $$(INCLUDE) \
903 $(LIBXML_CFLAGS) \
906 $(call gb_LinkTarget_add_libs,$(1),\
907 $(LIBXML_LIBS) \
910 ifeq ($(COM),MSC)
911 $(call gb_LinkTarget_use_external,$(1),icu_headers)
912 endif
914 endef
915 define gb_ExternalProject__use_libxml2
916 $(call gb_ExternalProject_use_package,$(1),libxml2)
918 ifeq ($(COM),MSC)
919 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
920 endif
922 endef
924 endif # SYSTEM_LIBXML
927 ifneq ($(SYSTEM_LIBXSLT),)
929 define gb_LinkTarget__use_libxslt
930 $(call gb_LinkTarget_set_include,$(1),\
931 $$(INCLUDE) \
932 $(LIBXSLT_CFLAGS) \
934 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
936 endef
938 define gb_LinkTarget__use_libexslt
939 $(call gb_LinkTarget_set_include,$(1),\
940 $$(INCLUDE) \
941 $(LIBEXSLT_CFLAGS) \
944 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
946 endef
948 else # !SYSTEM_LIBXSLT
950 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
951 libxslt \
954 define gb_LinkTarget__use_libxslt
955 $(call gb_LinkTarget_use_package,$(1),libxslt)
956 $(call gb_LinkTarget_set_include,$(1),\
957 $$(INCLUDE) \
958 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
961 ifeq ($(COM),MSC)
962 $(call gb_LinkTarget_add_libs,$(1),\
963 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
965 else
966 $(call gb_LinkTarget_add_libs,$(1),\
967 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
969 endif
971 endef
973 define gb_LinkTarget__use_libexslt
974 $(call gb_LinkTarget_use_package,$(1),libxslt)
975 $(call gb_LinkTarget_set_include,$(1),\
976 $$(INCLUDE) \
977 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
980 ifeq ($(COM),MSC)
981 $(call gb_LinkTarget_add_libs,$(1),\
982 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
984 else
985 $(call gb_LinkTarget_add_libs,$(1),\
986 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
988 endif
990 endef
992 endif # SYSTEM_LIBXSLT
995 ifneq ($(SYSTEM_XMLSEC),)
997 define gb_LinkTarget__use_xmlsec
998 $(call gb_LinkTarget_add_defs,$(1),\
999 -DSYSTEM_XMLSEC \
1001 $(call gb_LinkTarget_set_include,$(1),\
1002 $$(INCLUDE) \
1003 $(XMLSEC_CFLAGS) \
1005 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1007 endef
1009 gb_ExternalProject__use_xmlsec:=
1011 else # !SYSTEM_XMLSEC
1013 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1014 xmlsec \
1017 define gb_LinkTarget__use_xmlsec
1019 endef
1021 endif # SYSTEM_XMLSEC
1023 ifneq ($(SYSTEM_LIBLANGTAG),)
1025 define gb_LinkTarget__use_liblangtag
1026 $(call gb_LinkTarget_set_include,$(1),\
1027 $$(INCLUDE) \
1028 $(LIBLANGTAG_CFLAGS) \
1031 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1033 endef
1035 gb_ExternalProject__use_liblangtag :=
1037 else # !SYSTEM_LIBLANGTAG
1039 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1040 liblangtag_data \
1043 ifeq ($(COM),MSC)
1045 define gb_LinkTarget__use_liblangtag
1046 $(call gb_LinkTarget_set_include,$(1),\
1047 $(LIBLANGTAG_CFLAGS) \
1048 $$(INCLUDE) \
1050 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1051 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1053 endef
1055 else
1057 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1058 liblangtag \
1061 define gb_LinkTarget__use_liblangtag
1062 $(call gb_LinkTarget_set_include,$(1),\
1063 $(LIBLANGTAG_CFLAGS) \
1064 $$(INCLUDE) \
1066 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1067 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1069 endef
1071 endif # MSC
1073 define gb_ExternalProject__use_liblangtag
1074 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1076 endef
1078 endif # SYSTEM_LIBLANGTAG
1081 gb_ExternalProject__use_apr :=
1083 ifeq ($(WITH_WEBDAV),serf)
1085 define gb_LinkTarget__use_apr
1086 $(call gb_LinkTarget_set_include,$(1),\
1087 $$(INCLUDE) \
1088 $(APR_CFLAGS) \
1090 $(call gb_LinkTarget_add_libs,$(1),\
1091 $(APR_LIBS) \
1092 $(if $(filter $(OS),LINUX),-lpthread) \
1093 $(if $(filter $(OS),MACOSX),-liconv) \
1096 ifeq ($(SYSTEM_APR),)
1097 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1098 mswsock \
1099 rpcrt4 \
1100 shell32 \
1102 $(call gb_LinkTarget_add_defs,$(1),\
1103 -DAPR_DECLARE_STATIC \
1104 -DAPU_DECLARE_STATIC \
1106 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1107 endif
1109 endef
1111 define gb_ExternalProject__use_apr
1112 ifeq ($(SYSTEM_APR),)
1113 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1114 endif
1116 endef
1118 ifneq ($(SYSTEM_SERF),)
1120 define gb_LinkTarget__use_serf
1121 $(call gb_LinkTarget_add_defs,$(1),\
1122 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1125 $(call gb_LinkTarget_set_include,$(1),\
1126 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1127 $$(INCLUDE) \
1130 $(call gb_LinkTarget_add_libs,$(1),\
1131 $(SERF_LIBS) \
1134 endef
1136 else # !SYSTEM_SERF
1138 define gb_LinkTarget__use_serf
1139 $(call gb_LinkTarget_set_include,$(1),\
1140 -I$(call gb_UnpackedTarball_get_dir,serf) \
1141 $$(INCLUDE) \
1144 $(call gb_LinkTarget_use_static_libraries,$(1),\
1145 serf \
1148 endef
1150 endif # SYSTEM_SERF
1152 else ifeq ($(WITH_WEBDAV),neon)
1154 ifneq ($(SYSTEM_NEON),)
1156 define gb_LinkTarget__use_neon
1157 $(call gb_LinkTarget_add_defs,$(1),\
1158 -DNEON_VERSION=0x$(NEON_VERSION) \
1159 -DSYSTEM_NEON \
1161 $(call gb_LinkTarget_set_include,$(1),\
1162 $$(INCLUDE) \
1163 $(NEON_CFLAGS) \
1166 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1168 endef
1170 else # !SYSTEM_NEON
1172 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1173 neon \
1176 define gb_LinkTarget__use_neon
1177 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1178 $(call gb_LinkTarget_set_include,$(1),\
1179 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1180 $$(INCLUDE) \
1182 $(call gb_LinkTarget_use_libraries,$(1),\
1183 neon \
1186 endef
1188 endif # SYSTEM_NEON
1190 endif # WITH_WEBDAV
1192 ifneq ($(SYSTEM_REDLAND),)
1194 define gb_LinkTarget__use_librdf
1195 $(call gb_LinkTarget_add_defs,$(1),\
1196 -DSYSTEM_REDLAND \
1198 $(call gb_LinkTarget_set_include,$(1),\
1199 $$(INCLUDE) \
1200 $(REDLAND_CFLAGS) \
1202 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1204 endef
1206 gb_LinkTarget__use_redland_headers:=
1208 gb_LinkTarget__use_raptor_headers:=
1210 gb_LinkTarget__use_rasqal_headers:=
1212 else # !SYSTEM_REDLAND
1214 define gb_LinkTarget__use_redland_headers
1215 $(call gb_LinkTarget_set_include,$(1),\
1216 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1217 $$(INCLUDE) \
1220 endef
1222 define gb_LinkTarget__use_raptor_headers
1223 $(call gb_LinkTarget_set_include,$(1),\
1224 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1225 $$(INCLUDE) \
1228 endef
1230 define gb_LinkTarget__use_rasqal_headers
1231 $(call gb_LinkTarget_set_include,$(1),\
1232 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1233 $$(INCLUDE) \
1236 endef
1238 ifneq ($(OS),ANDROID)
1240 ifeq ($(COM),MSC)
1241 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1242 raptor2 \
1243 rasqal \
1244 rdf \
1246 else
1247 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1248 raptor \
1249 rasqal \
1250 redland \
1252 endif
1254 define gb_LinkTarget__use_librdf
1255 ifeq ($(COM),MSC)
1256 $(call gb_LinkTarget_use_libraries,$(1),\
1257 raptor2 \
1258 rdf \
1260 else
1261 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1263 $(call gb_LinkTarget_add_libs,$(1),\
1264 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1265 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1266 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1268 endif
1270 endef
1272 else # ANDROID
1274 define gb_LinkTarget__use_librdf
1275 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1277 endef
1279 endif # ANDROID
1281 endif # SYSTEM_REDLAND
1283 ifneq ($(SYSTEM_CAIRO),)
1285 define gb_LinkTarget__use_cairo
1286 $(call gb_LinkTarget_set_include,$(1),\
1287 $$(INCLUDE) \
1288 $(CAIRO_CFLAGS) \
1290 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1291 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1293 endef
1295 else # !SYSTEM_CAIRO
1297 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1299 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1300 cairo \
1301 pixman \
1304 define gb_LinkTarget__use_cairo
1305 $(call gb_LinkTarget_use_package,$(1),cairo)
1306 $(call gb_LinkTarget_use_package,$(1),pixman)
1307 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1308 $(call gb_LinkTarget_set_include,$(1),\
1309 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1310 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1311 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1312 $$(INCLUDE) \
1314 $(call gb_LinkTarget_add_libs,$(1),\
1315 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1316 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1319 endef
1321 endif # !MACOSX, !WNT
1323 endif # !SYSTEM_CAIRO
1325 ifneq ($(SYSTEM_FREETYPE),)
1327 define gb_LinkTarget__use_freetype_headers
1328 $(call gb_LinkTarget_set_include,$(1),\
1329 $$(INCLUDE) \
1330 $(FREETYPE_CFLAGS) \
1333 endef
1335 gb_ExternalProject__use_freetype :=
1337 else
1339 define gb_LinkTarget__use_freetype_headers
1340 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1341 $(call gb_LinkTarget_set_include,$(1),\
1342 $(FREETYPE_CFLAGS) \
1343 $$(INCLUDE) \
1346 endef
1348 define gb_ExternalProject__use_freetype
1349 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1351 endef
1353 endif # SYSTEM_FREETYPE
1355 define gb_LinkTarget__use_freetype
1356 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1357 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1359 endef
1361 ifneq ($(SYSTEM_FONTCONFIG),)
1363 define gb_LinkTarget__use_fontconfig
1364 $(call gb_LinkTarget_set_include,$(1),\
1365 $$(INCLUDE) \
1366 $(FONTCONFIG_CFLAGS) \
1369 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1371 endef
1373 gb_ExternalProject__use_fontconfig :=
1375 else
1377 define gb_LinkTarget__use_fontconfig
1378 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1379 $(call gb_LinkTarget_set_include,$(1),\
1380 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1381 $$(INCLUDE) \
1384 $(call gb_LinkTarget_add_libs,$(1),\
1385 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1388 endef
1390 define gb_ExternalProject__use_fontconfig
1391 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1393 endef
1395 endif # SYSTEM_FONTCONFIG
1397 ifneq ($(SYSTEM_GRAPHITE),)
1399 define gb_LinkTarget__use_graphite
1400 $(call gb_LinkTarget_set_include,$(1),\
1401 $$(INCLUDE) \
1402 $(GRAPHITE_CFLAGS) \
1404 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1406 endef
1408 gb_ExternalProject__use_graphite:=
1410 else # !SYSTEM_GRAPHITE
1412 define gb_LinkTarget__use_graphite
1413 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1414 $(call gb_LinkTarget_set_include,$(1),\
1415 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1416 $$(INCLUDE) \
1418 $(call gb_LinkTarget_use_static_libraries,$(1),\
1419 graphite \
1422 endef
1424 define gb_ExternalProject__use_graphite
1425 $(call gb_ExternalProject_use_static_libraries,$(1),\
1426 graphite \
1429 endef
1430 endif # SYSTEM_GRAPHITE
1432 ifneq ($(SYSTEM_ICU),)
1434 gb_LinkTarget__use_icu_headers:=
1435 gb_ExternalProject__use_icu:=
1437 define gb_LinkTarget__use_icudata
1438 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1440 endef
1441 define gb_LinkTarget__use_icui18n
1442 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1444 endef
1445 define gb_LinkTarget__use_icuuc
1446 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1448 endef
1450 else # !SYSTEM_ICU
1452 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1453 icu_ure \
1456 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1457 icu \
1460 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1461 gb_ICU_suffix:=lo
1462 else
1463 gb_ICU_suffix:=
1464 endif
1466 define gb_LinkTarget__use_icu_headers
1467 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1468 $(call gb_LinkTarget_set_include,$(1),\
1469 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1470 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1471 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1472 $$(INCLUDE) \
1475 endef
1477 define gb_ExternalProject__use_icu
1478 $(call gb_ExternalProject_use_package,$(1),icu)
1480 endef
1482 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1483 define gb_LinkTarget__use_icudata
1484 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1486 ifeq ($(OS),WNT)
1487 $(call gb_LinkTarget_add_libs,$(1),\
1488 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1490 else
1491 $(call gb_LinkTarget_add_libs,$(1),\
1492 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1494 endif
1496 endef
1498 define gb_LinkTarget__use_icui18n
1499 $(call gb_LinkTarget_use_package,$(1),icu)
1501 ifeq ($(OS),WNT)
1502 $(call gb_LinkTarget_add_libs,$(1),\
1503 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1505 else
1506 $(call gb_LinkTarget_add_libs,$(1),\
1507 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1509 endif
1511 endef
1513 define gb_LinkTarget__use_icuuc
1514 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1516 ifeq ($(OS),WNT)
1517 $(call gb_LinkTarget_add_libs,$(1),\
1518 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1520 else
1521 $(call gb_LinkTarget_add_libs,$(1),\
1522 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1524 endif
1526 endef
1528 endif # SYSTEM_ICU
1530 ifneq ($(SYSTEM_HARFBUZZ),)
1532 define gb_LinkTarget__use_harfbuzz
1533 $(call gb_LinkTarget_set_include,$(1),\
1534 $$(INCLUDE) \
1535 $(HARFBUZZ_CFLAGS) \
1537 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1539 endef
1541 gb_ExternalProject__use_harfbuzz :=
1543 else # SYSTEM_HARFBUZZ != TRUE
1545 define gb_LinkTarget__use_harfbuzz
1546 $(call gb_LinkTarget_set_include,$(1),\
1547 $(HARFBUZZ_CFLAGS) \
1548 $$(INCLUDE) \
1550 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1551 $(call gb_LinkTarget_use_external,$(1),icuuc)
1552 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1554 endef
1556 define gb_ExternalProject__use_harfbuzz
1557 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1559 endef
1561 endif # SYSTEM_HARFBUZZ
1563 ifneq ($(ENABLE_OPENSSL),TRUE)
1565 gb_ExternalProject__use_openssl:=
1566 gb_LinkTarget__use_openssl_headers:=
1567 gb_LinkTarget__use_openssl:=
1569 else # ENABLE_OPENSSL
1571 ifneq ($(SYSTEM_OPENSSL),)
1573 gb_LinkTarget__use_openssl_headers:=
1574 gb_ExternalProject__use_openssl:=
1576 define gb_LinkTarget__use_openssl
1577 $(call gb_LinkTarget_set_include,$(1),\
1578 $$(INCLUDE) \
1579 $(OPENSSL_CFLAGS) \
1581 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1583 endef
1585 else # !SYSTEM_OPENSSL
1587 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1588 openssl \
1591 define gb_ExternalProject__use_openssl
1592 $(call gb_ExternalProject_use_package,$(1),openssl)
1594 endef
1596 define gb_LinkTarget__use_openssl_headers
1597 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1598 $(call gb_LinkTarget_set_include,$(1),\
1599 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1600 $$(INCLUDE) \
1603 endef
1605 define gb_LinkTarget__use_openssl
1606 $(call gb_LinkTarget_use_package,$(1),openssl)
1607 ifeq ($(OS),WNT)
1608 $(call gb_LinkTarget_add_libs,$(1),\
1609 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1610 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1612 else
1613 $(call gb_LinkTarget_add_libs,$(1),\
1614 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1615 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1616 $(if $(filter $(OS),LINUX),-pthread) \
1618 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1619 ifeq ($(OS),SOLARIS)
1620 $(call gb_LinkTarget_add_libs,$(1),\
1621 -lnsl \
1622 -lsocket \
1624 endif
1625 endif
1627 endef
1629 endif # SYSTEM_OPENSSL
1630 endif # ENABLE_OPENSSL
1633 ifneq ($(ENABLE_OPENSSL),TRUE)
1635 define gb_LinkTarget__use_gnutls
1636 $(call gb_LinkTarget_set_include,$(1),\
1637 $$(INCLUDE) \
1638 $(GNUTLS_CFLAGS) \
1641 $(call gb_LinkTarget_add_defs,$(1),\
1642 -DDISABLE_OPENSSL \
1645 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1647 endef
1649 define gb_LinkTarget__use_libgcrypt
1650 $(call gb_LinkTarget_set_include,$(1),\
1651 $$(INCLUDE) \
1652 $(LIBGCRYPT_CFLAGS) \
1655 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1657 endef
1659 else # ENABLE_OPENSSL
1661 gb_LinkTarget__use_gnutls:=
1662 gb_LinkTarget__use_libgcrypt:=
1664 endif # ENABLE_OPENSSL
1667 ifneq ($(SYSTEM_CDR),)
1669 define gb_LinkTarget__use_cdr
1670 $(call gb_LinkTarget_set_include,$(1),\
1671 $$(INCLUDE) \
1672 $(CDR_CFLAGS) \
1674 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1676 endef
1678 else # !SYSTEM_CDR
1680 define gb_LinkTarget__use_cdr
1681 $(call gb_LinkTarget_set_include,$(1),\
1682 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1683 $$(INCLUDE) \
1685 $(call gb_LinkTarget_add_libs,$(1),\
1686 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1688 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1689 endef
1691 endif # SYSTEM_CDR
1694 ifneq ($(SYSTEM_EBOOK),)
1696 define gb_LinkTarget__use_ebook
1697 $(call gb_LinkTarget_set_include,$(1),\
1698 $$(INCLUDE) \
1699 $(EBOOK_CFLAGS) \
1701 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1703 endef
1705 gb_ExternalProject__use_ebook :=
1707 else # !SYSTEM_EBOOK
1709 define gb_LinkTarget__use_ebook
1710 $(call gb_LinkTarget_set_include,$(1),\
1711 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1712 $$(INCLUDE) \
1714 $(call gb_LinkTarget_add_libs,$(1),\
1715 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1717 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1719 endef
1721 define gb_ExternalProject__use_ebook
1722 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1724 endef
1726 endif # SYSTEM_EBOOK
1729 ifneq ($(SYSTEM_ETONYEK),)
1731 define gb_LinkTarget__use_etonyek
1732 $(call gb_LinkTarget_set_include,$(1),\
1733 $$(INCLUDE) \
1734 $(ETONYEK_CFLAGS) \
1736 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1738 endef
1740 gb_ExternalProject__use_etonyek :=
1742 else # !SYSTEM_ETONYEK
1744 ifeq ($(COM),MSC)
1746 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1747 etonyek \
1750 define gb_LinkTarget__use_etonyek
1751 $(call gb_LinkTarget_set_include,$(1),\
1752 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1753 $$(INCLUDE) \
1755 $(call gb_LinkTarget_use_libraries,$(1),\
1756 etonyek \
1759 endef
1761 else # !MSC
1763 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1764 libetonyek \
1767 define gb_LinkTarget__use_etonyek
1768 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1770 $(call gb_LinkTarget_set_include,$(1),\
1771 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1772 -DLIBETONYEK_VISIBILITY \
1773 $$(INCLUDE) \
1775 $(call gb_LinkTarget_add_libs,$(1),\
1776 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1778 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1780 endef
1782 define gb_ExternalProject__use_etonyek
1783 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1785 endef
1787 endif
1789 endif # SYSTEM_ETONYEK
1792 ifneq ($(SYSTEM_FREEHAND),)
1794 define gb_LinkTarget__use_freehand
1795 $(call gb_LinkTarget_set_include,$(1),\
1796 $$(INCLUDE) \
1797 $(FREEHAND_CFLAGS) \
1799 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1801 endef
1803 gb_ExternalProject__use_freehand :=
1805 else # !SYSTEM_FREEHAND
1807 define gb_LinkTarget__use_freehand
1808 $(call gb_LinkTarget_set_include,$(1),\
1809 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1810 $$(INCLUDE) \
1812 $(call gb_LinkTarget_add_libs,$(1),\
1813 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1815 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1817 endef
1819 define gb_ExternalProject__use_freehand
1820 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1822 endef
1824 endif # SYSTEM_FREEHAND
1827 ifneq ($(SYSTEM_ODFGEN),)
1829 define gb_LinkTarget__use_odfgen
1830 $(call gb_LinkTarget_set_include,$(1),\
1831 $$(INCLUDE) \
1832 $(ODFGEN_CFLAGS) \
1834 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1836 endef
1838 else # !SYSTEM_ODFGEN
1840 ifeq ($(COM),MSC)
1842 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1843 odfgen \
1846 define gb_LinkTarget__use_odfgen
1847 $(call gb_LinkTarget_set_include,$(1),\
1848 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1849 $$(INCLUDE) \
1851 $(call gb_LinkTarget_use_libraries,$(1),\
1852 odfgen \
1855 endef
1857 else # !MSC
1859 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1860 libodfgen \
1863 define gb_LinkTarget__use_odfgen
1864 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1866 $(call gb_LinkTarget_set_include,$(1),\
1867 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1868 -DLIBODFGEN_VISIBILITY \
1869 $$(INCLUDE) \
1871 $(call gb_LinkTarget_add_libs,$(1),\
1872 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1875 endef
1877 endif
1879 endif # SYSTEM_ODFGEN
1881 ifneq ($(SYSTEM_EPUBGEN),)
1883 define gb_LinkTarget__use_epubgen
1884 $(call gb_LinkTarget_set_include,$(1),\
1885 $$(INCLUDE) \
1886 $(EPUBGEN_CFLAGS) \
1888 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1890 endef
1891 gb_ExternalProject__use_epubgen :=
1893 else # !SYSTEM_EPUBGEN
1895 define gb_LinkTarget__use_epubgen
1896 $(call gb_LinkTarget_set_include,$(1),\
1897 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1898 $$(INCLUDE) \
1900 $(call gb_LinkTarget_add_libs,$(1),\
1901 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1903 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1905 endef
1906 define gb_ExternalProject__use_epubgen
1907 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1909 endef
1911 endif # SYSTEM_EPUBGEN
1913 ifneq ($(SYSTEM_REVENGE),)
1915 define gb_LinkTarget__use_revenge
1916 $(call gb_LinkTarget_set_include,$(1),\
1917 $$(INCLUDE) \
1918 $(REVENGE_CFLAGS) \
1920 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1922 endef
1924 gb_ExternalProject__use_revenge :=
1926 else # !SYSTEM_REVENGE
1928 ifeq ($(COM),MSC)
1930 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1931 revenge \
1934 define gb_LinkTarget__use_revenge
1935 $(call gb_LinkTarget_set_include,$(1),\
1936 $(REVENGE_CFLAGS) \
1937 $$(INCLUDE) \
1939 $(call gb_LinkTarget_use_libraries,$(1),\
1940 revenge \
1943 endef
1945 define gb_ExternalProject__use_revenge
1946 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1948 endef
1950 else # !MSC
1952 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1953 librevenge \
1956 define gb_LinkTarget__use_revenge
1957 $(call gb_LinkTarget_use_package,$(1),librevenge)
1959 $(call gb_LinkTarget_set_include,$(1),\
1960 $(REVENGE_CFLAGS) \
1961 -DLIBREVENGE_VISIBILITY \
1962 $$(INCLUDE) \
1964 $(call gb_LinkTarget_add_libs,$(1),\
1965 $(REVENGE_LIBS) \
1967 endef
1969 define gb_ExternalProject__use_revenge
1970 $(call gb_ExternalProject_use_package,$(1),librevenge)
1972 endef
1974 endif # MSC
1976 endif # SYSTEM_REVENGE
1979 ifneq ($(SYSTEM_ABW),)
1981 define gb_LinkTarget__use_abw
1982 $(call gb_LinkTarget_set_include,$(1),\
1983 $$(INCLUDE) \
1984 $(ABW_CFLAGS) \
1986 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1988 endef
1989 gb_ExternalProject__use_abw :=
1991 else # !SYSTEM_ABW
1993 define gb_LinkTarget__use_abw
1994 $(call gb_LinkTarget_set_include,$(1),\
1995 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1996 $$(INCLUDE) \
1998 $(call gb_LinkTarget_add_libs,$(1),\
1999 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
2001 $(call gb_LinkTarget_use_external_project,$(1),libabw)
2003 endef
2004 define gb_ExternalProject__use_abw
2005 $(call gb_ExternalProject_use_external_project,$(1),libabw)
2007 endef
2009 endif # SYSTEM_ABW
2012 ifneq ($(SYSTEM_MSPUB),)
2014 define gb_LinkTarget__use_mspub
2015 $(call gb_LinkTarget_set_include,$(1),\
2016 $$(INCLUDE) \
2017 $(MSPUB_CFLAGS) \
2019 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2021 endef
2023 else # !SYSTEM_MSPUB
2025 define gb_LinkTarget__use_mspub
2026 $(call gb_LinkTarget_set_include,$(1),\
2027 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2028 $$(INCLUDE) \
2030 $(call gb_LinkTarget_add_libs,$(1),\
2031 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2033 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2035 endef
2037 endif # SYSTEM_MSPUB
2040 ifneq ($(SYSTEM_PAGEMAKER),)
2042 define gb_LinkTarget__use_pagemaker
2043 $(call gb_LinkTarget_set_include,$(1),\
2044 $$(INCLUDE) \
2045 $(PAGEMAKER_CFLAGS) \
2047 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2049 endef
2050 gb_ExternalProject__use_pagemaker :=
2052 else # !SYSTEM_PAGEMAKER
2054 define gb_LinkTarget__use_pagemaker
2055 $(call gb_LinkTarget_set_include,$(1),\
2056 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2057 $$(INCLUDE) \
2059 $(call gb_LinkTarget_add_libs,$(1),\
2060 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2062 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2064 endef
2065 define gb_ExternalProject__use_pagemaker
2066 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2068 endef
2070 endif # SYSTEM_PAGEMAKER
2073 ifneq ($(SYSTEM_QXP),)
2075 define gb_LinkTarget__use_qxp
2076 $(call gb_LinkTarget_set_include,$(1),\
2077 $$(INCLUDE) \
2078 $(QXP_CFLAGS) \
2080 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2082 endef
2083 gb_ExternalProject__use_qxp :=
2085 else # !SYSTEM_QXP
2087 define gb_LinkTarget__use_qxp
2088 $(call gb_LinkTarget_set_include,$(1),\
2089 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2090 $$(INCLUDE) \
2092 $(call gb_LinkTarget_add_libs,$(1),\
2093 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2095 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2097 endef
2098 define gb_ExternalProject__use_qxp
2099 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2101 endef
2103 endif # SYSTEM_QXP
2106 ifneq ($(SYSTEM_ZMF),)
2108 define gb_LinkTarget__use_zmf
2109 $(call gb_LinkTarget_set_include,$(1),\
2110 $$(INCLUDE) \
2111 $(ZMF_CFLAGS) \
2113 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2115 endef
2116 gb_ExternalProject__use_zmf :=
2118 else # !SYSTEM_ZMF
2120 define gb_LinkTarget__use_zmf
2121 $(call gb_LinkTarget_set_include,$(1),\
2122 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2123 $$(INCLUDE) \
2125 $(call gb_LinkTarget_add_libs,$(1),\
2126 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2128 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2130 endef
2131 define gb_ExternalProject__use_zmf
2132 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2134 endef
2136 endif # SYSTEM_ZMF
2139 ifneq ($(SYSTEM_VISIO),)
2141 define gb_LinkTarget__use_visio
2142 $(call gb_LinkTarget_set_include,$(1),\
2143 $$(INCLUDE) \
2144 $(VISIO_CFLAGS) \
2146 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2148 endef
2150 else # !SYSTEM_VISIO
2152 define gb_LinkTarget__use_visio
2153 $(call gb_LinkTarget_set_include,$(1),\
2154 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2155 $$(INCLUDE) \
2157 $(call gb_LinkTarget_add_libs,$(1),\
2158 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2160 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2162 endef
2164 endif # SYSTEM_VISIO
2167 ifneq ($(SYSTEM_WPD),)
2169 define gb_LinkTarget__use_wpd
2170 $(call gb_LinkTarget_set_include,$(1),\
2171 $$(INCLUDE) \
2172 $(WPD_CFLAGS) \
2174 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2176 endef
2177 gb_ExternalProject__use_wpd :=
2179 else # !SYSTEM_WPD
2181 ifeq ($(COM),MSC)
2183 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2184 wpd \
2187 define gb_LinkTarget__use_wpd
2188 $(call gb_LinkTarget_set_include,$(1),\
2189 $(WPD_CFLAGS) \
2190 $$(INCLUDE) \
2192 $(call gb_LinkTarget_use_libraries,$(1),\
2193 wpd \
2196 endef
2198 define gb_ExternalProject__use_wpd
2199 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2201 endef
2203 else # !MSC
2205 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2206 libwpd \
2209 define gb_LinkTarget__use_wpd
2210 $(call gb_LinkTarget_use_package,$(1),libwpd)
2212 $(call gb_LinkTarget_set_include,$(1),\
2213 $(WPD_CFLAGS) \
2214 $$(INCLUDE) \
2216 $(call gb_LinkTarget_add_libs,$(1),\
2217 $(WPD_LIBS) \
2220 endef
2222 define gb_ExternalProject__use_wpd
2223 $(call gb_ExternalProject_use_package,$(1),libwpd)
2225 endef
2227 endif # MSC
2229 endif # SYSTEM_WPD
2232 ifneq ($(SYSTEM_WPG),)
2234 define gb_LinkTarget__use_wpg
2235 $(call gb_LinkTarget_set_include,$(1),\
2236 $$(INCLUDE) \
2237 $(WPG_CFLAGS) \
2239 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2241 endef
2242 gb_ExternalProject__use_wpg :=
2244 else # !SYSTEM_WPG
2246 ifeq ($(COM),MSC)
2248 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2249 wpg \
2252 define gb_LinkTarget__use_wpg
2253 $(call gb_LinkTarget_set_include,$(1),\
2254 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2255 $$(INCLUDE) \
2257 $(call gb_LinkTarget_use_libraries,$(1),\
2258 wpg \
2261 endef
2263 else # !MSC
2265 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2266 libwpg \
2269 define gb_LinkTarget__use_wpg
2270 $(call gb_LinkTarget_use_package,$(1),libwpg)
2272 $(call gb_LinkTarget_set_include,$(1),\
2273 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2274 $$(INCLUDE) \
2276 $(call gb_LinkTarget_add_libs,$(1),\
2277 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2280 endef
2282 endif # MSC
2284 endif # SYSTEM_WPG
2287 ifneq ($(SYSTEM_WPS),)
2289 define gb_LinkTarget__use_wps
2290 $(call gb_LinkTarget_set_include,$(1),\
2291 $$(INCLUDE) \
2292 $(WPS_CFLAGS) \
2294 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2296 endef
2297 gb_ExternalProject__use_wps :=
2299 else # !SYSTEM_WPS
2301 ifeq ($(COM),MSC)
2303 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2304 wps \
2307 define gb_LinkTarget__use_wps
2308 $(call gb_LinkTarget_set_include,$(1),\
2309 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2310 $$(INCLUDE) \
2313 $(call gb_LinkTarget_use_libraries,$(1),\
2314 wps \
2317 endef
2319 else # !MSC
2321 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2322 libwps \
2325 define gb_LinkTarget__use_wps
2326 $(call gb_LinkTarget_use_package,$(1),libwps)
2328 $(call gb_LinkTarget_set_include,$(1),\
2329 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2330 $$(INCLUDE) \
2332 $(call gb_LinkTarget_add_libs,$(1),\
2333 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2336 endef
2338 endif # MSC
2340 endif # SYSTEM_WPS
2343 ifneq ($(SYSTEM_MWAW),)
2345 define gb_LinkTarget__use_mwaw
2346 $(call gb_LinkTarget_set_include,$(1),\
2347 $$(INCLUDE) \
2348 $(MWAW_CFLAGS) \
2350 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2352 endef
2354 else # !SYSTEM_MWAW
2356 ifeq ($(COM),MSC)
2358 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2359 mwaw \
2362 define gb_LinkTarget__use_mwaw
2363 $(call gb_LinkTarget_set_include,$(1),\
2364 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2365 $$(INCLUDE) \
2368 $(call gb_LinkTarget_use_libraries,$(1),\
2369 mwaw \
2372 endef
2374 else # !MSC
2376 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2377 libmwaw \
2380 define gb_LinkTarget__use_mwaw
2381 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2383 $(call gb_LinkTarget_set_include,$(1),\
2384 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2385 $$(INCLUDE) \
2387 $(call gb_LinkTarget_add_libs,$(1),\
2388 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2391 endef
2393 endif # MSC
2395 endif # SYSTEM_MWAW
2397 ifneq ($(SYSTEM_STAROFFICE),)
2399 define gb_LinkTarget__use_staroffice
2400 $(call gb_LinkTarget_set_include,$(1),\
2401 $$(INCLUDE) \
2402 $(STAROFFICE_CFLAGS) \
2404 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2406 endef
2408 else # !SYSTEM_STAROFFICE
2410 ifeq ($(COM),MSC)
2412 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2413 staroffice \
2416 define gb_LinkTarget__use_staroffice
2417 $(call gb_LinkTarget_set_include,$(1),\
2418 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2419 $$(INCLUDE) \
2422 $(call gb_LinkTarget_use_libraries,$(1),\
2423 staroffice \
2426 endef
2428 else # !MSC
2430 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2431 libstaroffice \
2434 define gb_LinkTarget__use_staroffice
2435 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2437 $(call gb_LinkTarget_set_include,$(1),\
2438 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2439 $$(INCLUDE) \
2441 $(call gb_LinkTarget_add_libs,$(1),\
2442 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2445 endef
2447 endif # MSC
2449 endif # SYSTEM_STAROFFICE
2452 ifneq ($(SYSTEM_LCMS2),)
2454 define gb_LinkTarget__use_lcms2
2455 $(call gb_LinkTarget_set_include,$(1),\
2456 $$(INCLUDE) \
2457 $(LCMS2_CFLAGS) \
2459 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2461 endef
2463 gb_ExternalProject__use_lcms2 :=
2465 else # !SYSTEM_LCMS2
2467 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2468 lcms2 \
2471 define gb_ExternalProject__use_lcms2
2472 $(call gb_ExternalProject_use_package,$(1),lcms2)
2474 endef
2476 ifeq ($(OS),ANDROID)
2478 define gb_LinkTarget__use_lcms2
2479 $(call gb_LinkTarget_use_package,$(1),lcms2)
2480 $(call gb_LinkTarget_set_include,$(1),\
2481 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2482 $$(INCLUDE) \
2485 endef
2487 else
2489 define gb_LinkTarget__use_lcms2
2490 $(call gb_LinkTarget_use_package,$(1),lcms2)
2491 $(call gb_LinkTarget_set_include,$(1),\
2492 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2493 $$(INCLUDE) \
2495 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2497 endef
2499 endif # ANDROID
2500 endif # SYSTEM_LCMS2
2502 ifneq ($(ENABLE_LPSOLVE),)
2504 ifneq ($(SYSTEM_LPSOLVE),)
2506 define gb_LinkTarget__use_lpsolve
2507 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2508 $(call gb_LinkTarget_add_defs,$(1),\
2509 -DSYSTEM_LPSOLVE \
2512 endef
2514 else # !SYSTEM_LPSOLVE
2516 define gb_LinkTarget__use_lpsolve
2517 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2518 ifeq ($(COM),MSC)
2519 $(call gb_LinkTarget_add_libs,$(1),\
2520 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2522 else
2523 $(call gb_LinkTarget_add_libs,$(1),\
2524 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2526 endif
2527 $(call gb_LinkTarget_set_include,$(1),\
2528 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2529 $$(INCLUDE) \
2532 endef
2534 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2535 lpsolve \
2538 endif # SYSTEM_LPSOLVE
2540 else
2542 gb_LinkTarget__use_lpsolve :=
2544 endif # ENABLE_LPSOLVE
2546 ifneq ($(ENABLE_COINMP),)
2548 ifneq ($(SYSTEM_COINMP),TRUE)
2550 define gb_LinkTarget__use_coinmp
2551 $(call gb_LinkTarget_use_package,$(1),coinmp)
2552 ifeq ($(COM),MSC)
2553 $(call gb_LinkTarget_add_libs,$(1),\
2554 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2556 else
2557 $(call gb_LinkTarget_add_libs,$(1),\
2558 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2559 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2560 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2561 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2562 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2563 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2564 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2566 endif
2567 $(call gb_LinkTarget_set_include,$(1),\
2568 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2569 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2570 $$(INCLUDE) \
2573 endef
2575 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2576 coinmp \
2579 else # SYSTEM_COINMP
2581 define gb_LinkTarget__use_coinmp
2582 $(call gb_LinkTarget_set_include,$(1),\
2583 $$(INCLUDE) \
2584 $(COINMP_CFLAGS) \
2586 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2588 endef
2590 endif
2592 else
2594 gb_LinkTarget__use_coinmp :=
2596 endif # ENABLE_COINMP
2598 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2600 define gb_LinkTarget__use_mDNSResponder
2601 $(call gb_LinkTarget_set_include,$(1),\
2602 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2603 $$(INCLUDE) \
2605 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2606 endef
2608 endif # MDNSRESPONDER
2610 ifeq ($(ENABLE_GIO),TRUE)
2612 define gb_LinkTarget__use_gio
2613 $(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(GIO_CFLAGS) \
2618 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2620 endef
2622 else # ENABLE_GIO
2624 define gb_LinkTarget__use_gio
2626 endef
2628 endif # ENABLE_GIO
2630 ifeq ($(ENABLE_AVAHI),TRUE)
2632 define gb_LinkTarget__use_avahi
2633 $(call gb_LinkTarget_set_include,$(1),\
2634 $$(INCLUDE) \
2635 $(AVAHI_CFLAGS) \
2638 $(call gb_LinkTarget_add_defs,$(1),\
2639 -DENABLE_AVAHI \
2642 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2644 endef
2646 else # ENABLE_AVAHI
2648 gb_LinkTarget__use_avahi :=
2650 endif # ENABLE_AVAHI
2652 ifeq ($(ENABLE_CUPS),TRUE)
2654 define gb_LinkTarget__use_cups
2655 $(call gb_LinkTarget_add_defs,$(1),\
2656 -DENABLE_CUPS \
2659 $(call gb_LinkTarget_add_libs,$(1),\
2660 -lcups \
2663 endef
2665 else # ENABLE_CUPS
2667 define gb_LinkTarget__use_cups
2669 endef
2671 endif # ENABLE_CUPS
2673 ifeq ($(ENABLE_DBUS),TRUE)
2675 define gb_LinkTarget__use_dbus
2676 $(call gb_LinkTarget_set_include,$(1),\
2677 $$(INCLUDE) \
2678 $(DBUS_CFLAGS) \
2681 $(call gb_LinkTarget_add_libs,$(1),\
2682 $(DBUS_LIBS) \
2685 endef
2687 else # ENABLE_DBUS
2689 define gb_LinkTarget__use_dbus
2691 endef
2693 endif # ENABLE_DBUS
2696 ifneq ($(SYSTEM_LIBPNG),)
2698 define gb_LinkTarget__use_libpng
2699 $(call gb_LinkTarget_set_include,$(1),\
2700 $$(INCLUDE) \
2701 $(LIBPNG_CFLAGS) \
2704 $(call gb_LinkTarget_add_libs,$(1),\
2705 $(LIBPNG_LIBS) \
2708 endef
2710 gb_ExternalProject__use_libpng :=
2712 else # !SYSTEM_LIBPNG
2714 define gb_LinkTarget__use_libpng
2715 $(call gb_LinkTarget_set_include,$(1),\
2716 $(LIBPNG_CFLAGS) \
2717 $$(INCLUDE) \
2719 $(call gb_LinkTarget_use_static_libraries,$(1),\
2720 libpng \
2722 $(call gb_LinkTarget__use_zlib,$(1))
2724 endef
2726 define gb_ExternalProject__use_libpng
2727 $(call gb_ExternalProject_use_static_libraries,$(1),\
2728 libpng \
2731 endef
2733 endif # !SYSTEM_LIBPNG
2736 ifneq ($(SYSTEM_CURL),)
2738 define gb_LinkTarget__use_curl
2739 $(call gb_LinkTarget_add_defs,$(1),\
2740 -DSYSTEM_CURL \
2742 $(call gb_LinkTarget_set_include,$(1),\
2743 $$(INCLUDE) \
2744 $(CURL_CFLAGS) \
2746 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2748 endef
2750 else # !SYSTEM_CURL
2752 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2753 curl \
2756 define gb_LinkTarget__use_curl
2757 $(call gb_LinkTarget_use_package,$(1),curl)
2758 $(call gb_LinkTarget_set_include,$(1),\
2759 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2760 $$(INCLUDE) \
2763 ifeq ($(COM),MSC)
2764 $(call gb_LinkTarget_add_libs,$(1),\
2765 $(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 \
2767 else
2768 $(call gb_LinkTarget_add_libs,$(1),\
2769 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2771 endif
2773 endef
2775 endif # SYSTEM_CURL
2777 ifeq ($(ENABLE_VALGRIND),TRUE)
2779 define gb_LinkTarget__use_valgrind
2780 $(call gb_LinkTarget_add_defs,$(1),\
2781 -DHAVE_VALGRIND_HEADERS \
2784 $(call gb_LinkTarget_set_include,$(1),\
2785 $$(INCLUDE) \
2786 $(VALGRIND_CFLAGS) \
2789 endef
2791 else # !ENABLE_VALGRIND
2793 define gb_LinkTarget__use_valgrind
2795 endef
2797 endif # ENABLE_VALGRIND
2799 ifeq ($(ENABLE_POPPLER),TRUE)
2801 ifneq ($(SYSTEM_POPPLER),)
2803 define gb_LinkTarget__use_poppler
2804 $(call gb_LinkTarget_set_include,$(1),\
2805 $(POPPLER_CFLAGS) \
2806 $$(INCLUDE) \
2809 $(call gb_LinkTarget_add_libs,$(1),\
2810 $(POPPLER_LIBS) \
2813 endef
2815 else # !SYSTEM_POPPLER
2817 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2818 poppler_data \
2821 define gb_LinkTarget__use_poppler
2822 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2823 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2824 $(call gb_LinkTarget_set_include,$(1),\
2825 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2826 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2827 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2828 $$(INCLUDE) \
2831 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2832 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2834 ifeq ($(OS),MACOSX)
2835 $(call gb_LinkTarget_add_libs,$(1),\
2836 -lobjc \
2838 else ifeq ($(OS),LINUX)
2839 $(call gb_LinkTarget_add_libs,$(1),\
2840 -pthread \
2842 else ifeq ($(OS),WNT)
2843 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2844 advapi32 \
2845 gdi32 \
2847 endif
2849 endef
2851 endif # SYSTEM_POPPLER
2853 endif # ENABLE_POPPLER
2856 ifneq ($(SYSTEM_CLUCENE),)
2858 define gb_LinkTarget__use_clucene
2859 $(call gb_LinkTarget_add_defs,$(1),\
2860 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2863 $(call gb_LinkTarget_set_include,$(1),\
2864 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2865 $$(INCLUDE) \
2868 $(call gb_LinkTarget_add_libs,$(1),\
2869 $(CLUCENE_LIBS) \
2872 endef
2874 else # !SYSTEM_CLUCENE
2876 define gb_LinkTarget__use_clucene
2877 $(call gb_LinkTarget_set_include,$(1),\
2878 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2879 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2880 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2881 $$(INCLUDE) \
2884 $(call gb_LinkTarget_use_libraries,$(1),\
2885 clucene \
2888 endef
2890 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2891 clucene \
2894 endif # SYSTEM_CLUCENE
2896 define gb_LinkTarget__use_gobject
2897 $(call gb_LinkTarget_add_libs,$(1),\
2898 $(GOBJECT_LIBS) \
2901 $(call gb_LinkTarget_set_include,$(1),\
2902 $$(INCLUDE) \
2903 $(GOBJECT_CFLAGS) \
2905 endef
2907 ifneq ($(SYSTEM_HSQLDB),)
2909 define gb_LinkTarget__use_hsqldb
2911 $(call gb_LinkTarget_add_defs,$(1),\
2912 -DSYSTEM_HSQLDB \
2913 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2916 endef
2918 else # !SYSTEM_HSQLDB
2920 define gb_LinkTarget__use_hsqldb
2922 endef
2924 endif # SYSTEM_HSQLDB
2926 ifeq ($(ENABLE_LDAP),TRUE)
2927 ifneq ($(SYSTEM_OPENLDAP),)
2929 define gb_LinkTarget__use_openldap
2931 $(call gb_LinkTarget_add_libs,$(1),\
2932 -lldap \
2933 -llber \
2936 endef
2938 gb_ExternalProject__use_openldap :=
2940 else # !SYSTEM_OPENLDAP
2942 define gb_LinkTarget__use_openldap
2943 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2944 $(call gb_LinkTarget_set_include,$(1),\
2945 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2946 $$(INCLUDE) \
2948 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2949 $(call gb_LinkTarget_add_libs,$(1), \
2950 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2951 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2954 endef
2955 endif
2957 define gb_ExternalProject__use_openldap
2958 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2960 endef
2962 endif # SYSTEM_OPENLDAP
2964 ifneq ($(SYSTEM_LIBTOMMATH),)
2966 define gb_LinkTarget__use_libtommath
2967 $(call gb_LinkTarget_set_include,$(1),\
2968 $(LIBTOMMATH_CFLAGS) \
2969 $$(INCLUDE) \
2971 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2973 endef
2975 else # !SYSTEM_LIBTOMMATH
2976 define gb_LinkTarget__use_libtommath
2977 $(call gb_LinkTarget_set_include,$(1),\
2978 -I${WORKDIR}/UnpackedTarball/libtommath \
2979 $$(INCLUDE) \
2981 $(call gb_LinkTarget_add_libs,$(1),\
2982 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2984 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2986 endef
2988 endif # SYSTEM_LIBTOMMATH
2990 define gb_ExternalProject__use_libtommath
2991 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2993 endef
2995 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2997 ifneq ($(SYSTEM_FIREBIRD),)
2999 define gb_LinkTarget__use_libfbembed
3000 $(call gb_LinkTarget_set_include,$(1),\
3001 $(FIREBIRD_CFLAGS) \
3002 $$(INCLUDE) \
3004 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3006 endef
3008 else # !SYSTEM_FIREBIRD
3010 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3011 firebird \
3014 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3015 #$(call gb_LinkTarget__use_libtommath,$(1))
3017 define gb_LinkTarget__use_libfbembed
3018 $(call gb_LinkTarget_use_package,$(1),firebird)
3019 $(call gb_LinkTarget_set_include,$(1),\
3020 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3021 $$(INCLUDE) \
3023 ifeq ($(COM),MSC)
3024 $(call gb_LinkTarget_add_libs,$(1),\
3025 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3027 else
3028 $(call gb_LinkTarget_add_libs,$(1),\
3029 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3031 endif
3033 endef
3036 # endef
3038 endif # SYSTEM_FIREBIRD
3040 else # !ENABLE_FIREBIRD_SDBC
3042 gb_LinkTarget__use_firebird :=
3043 # gb_LinkTarget__use_atomic_ops :=
3044 # gb_LinkTarget__use_libtommath :=
3046 endif # ENABLE_FIREBIRD_SDBC
3049 ifneq ($(SYSTEM_POSTGRESQL),)
3051 define gb_LinkTarget__use_postgresql
3053 $(call gb_LinkTarget_set_include,$(1),\
3054 $(POSTGRESQL_INC) \
3055 $$(INCLUDE) \
3058 $(call gb_LinkTarget_add_libs,$(1),\
3059 -lpq \
3062 $(call gb_LinkTarget_add_ldflags,$(1),\
3063 $(POSTGRESQL_LIB) \
3066 endef
3068 else # !SYSTEM_POSTGRESQL
3070 ifeq ($(OS),WNT)
3071 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3072 postgresql \
3074 endif # WNT
3076 define gb_LinkTarget__use_postgresql
3078 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3080 $(call gb_LinkTarget_set_include,$(1),\
3081 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3082 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3083 $$(INCLUDE) \
3086 ifeq ($(OS),WNT)
3088 $(call gb_LinkTarget_add_libs,$(1),\
3089 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3092 else # !WNT
3094 $(call gb_LinkTarget_add_libs,$(1),\
3095 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3096 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3097 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3098 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3101 endif # !WNT
3103 endef # gb_LinkTarget__use_postgresql
3105 endif # !SYSTEM_POSTGRESQL
3107 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3109 define gb_LinkTarget__use_kf5
3110 $(call gb_LinkTarget_set_include,$(1),\
3111 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3112 $$(INCLUDE) \
3115 $(call gb_LinkTarget_add_cxxflags,$(1),\
3116 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3119 $(call gb_LinkTarget_add_libs,$(1),\
3120 $(KF5_LIBS) \
3123 endef
3125 else # !ENABLE_KF5
3127 define gb_LinkTarget__use_kf5
3129 endef
3131 endif # ENABLE_KF5
3135 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3137 define gb_LinkTarget__use_qt5
3138 $(call gb_LinkTarget_set_include,$(1),\
3139 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3140 $$(INCLUDE) \
3143 $(call gb_LinkTarget_add_defs,$(1),\
3144 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3147 $(call gb_LinkTarget_add_libs,$(1),\
3148 $(QT5_LIBS) \
3151 endef
3153 else # !ENABLE_QT5
3155 define gb_LinkTarget__use_qt5
3157 endef
3159 endif # ENABLE_QT5
3161 ifeq ($(ENABLE_QT6),TRUE)
3163 define gb_LinkTarget__use_qt6
3164 $(call gb_LinkTarget_set_include,$(1),\
3165 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3166 $$(INCLUDE) \
3169 $(call gb_LinkTarget_add_defs,$(1),\
3170 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3173 $(call gb_LinkTarget_add_libs,$(1),\
3174 $(QT6_LIBS) \
3177 endef
3179 else # !ENABLE_QT6
3181 define gb_LinkTarget__use_qt6
3183 endef
3185 endif # ENABLE_QT6
3188 # PYTHON
3189 # extra python_headers external because pyuno wrapper must not link python
3190 ifneq ($(SYSTEM_PYTHON),)
3192 define gb_LinkTarget__use_python_headers
3193 $(call gb_LinkTarget_add_defs,$(1),\
3194 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3197 $(call gb_LinkTarget_set_include,$(1),\
3198 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3199 $$(INCLUDE) \
3202 endef
3204 define gb_LinkTarget__use_python
3205 $(call gb_LinkTarget__use_python_headers,$(1))
3207 $(call gb_LinkTarget_add_libs,$(1),\
3208 $(PYTHON_LIBS) \
3211 endef
3213 else # !SYSTEM_PYTHON
3215 $(eval $(call gb_Helper_register_packages_for_install,python,\
3216 python3 \
3217 $(if $(filter WNT,$(OS)),libffi) \
3220 define gb_LinkTarget__use_python_headers
3221 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3222 $(call gb_LinkTarget_set_include,$(1),\
3223 -I$(call gb_UnpackedTarball_get_dir,python3) \
3224 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3225 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3226 $$(INCLUDE) \
3229 endef
3231 define gb_LinkTarget__use_python
3232 $(call gb_LinkTarget__use_python_headers,$(1))
3233 ifeq ($(OS),MACOSX)
3234 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3235 else
3236 $(call gb_LinkTarget_use_package,$(1),python3)
3237 endif
3239 ifeq ($(OS),WNT)
3240 ifeq ($(CPUNAME),X86_64)
3241 python_arch_subdir=amd64
3242 else ifeq ($(CPUNAME),AARCH64)
3243 python_arch_subdir=arm64
3244 else
3245 python_arch_subdir=win32
3246 endif
3247 $(call gb_LinkTarget_add_libs,$(1),\
3248 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3250 else ifeq ($(OS),MACOSX)
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3254 else
3255 $(call gb_LinkTarget_add_libs,$(1),\
3256 -L$(call gb_UnpackedTarball_get_dir,python3) \
3257 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3259 endif
3261 endef
3263 # this is only used by python currently
3264 define gb_ExternalProject__use_libffi
3265 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3267 endef
3269 endif # SYSTEM_PYTHON
3271 # ORCUS
3272 ifneq ($(SYSTEM_LIBORCUS),)
3274 define gb_LinkTarget__use_orcus
3275 $(call gb_LinkTarget_set_include,$(1),\
3276 $$(INCLUDE) \
3277 $(ORCUS_CFLAGS) \
3279 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3280 endef
3282 define gb_LinkTarget__use_orcus-parser
3284 endef
3286 else # !SYSTEM_LIBORCUS
3288 ifeq ($(COM),MSC)
3290 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3291 orcus \
3292 orcus-parser \
3295 define gb_LinkTarget__use_orcus
3296 $(call gb_LinkTarget_set_include,$(1),\
3297 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3298 $$(INCLUDE) \
3301 $(call gb_LinkTarget_use_libraries,$(1),\
3302 orcus \
3305 endef
3307 define gb_LinkTarget__use_orcus-parser
3308 $(call gb_LinkTarget_set_include,$(1),\
3309 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3310 $$(INCLUDE) \
3313 $(call gb_LinkTarget_use_libraries,$(1),\
3314 orcus-parser \
3317 endef
3319 else # !MSC
3321 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3322 liborcus \
3325 define gb_LinkTarget__use_orcus
3326 $(call gb_LinkTarget_use_package,$(1),liborcus)
3328 $(call gb_LinkTarget_set_include,$(1),\
3329 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3330 $$(INCLUDE) \
3333 $(call gb_LinkTarget_add_libs,$(1),\
3334 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
3337 $(if $(SYSTEM_BOOST), \
3338 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3339 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3342 endef
3344 define gb_LinkTarget__use_orcus-parser
3345 $(call gb_LinkTarget_use_package,$(1),liborcus)
3347 $(call gb_LinkTarget_set_include,$(1),\
3348 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3349 $$(INCLUDE) \
3352 $(call gb_LinkTarget_add_libs,$(1),\
3353 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
3356 endef
3358 endif # MSC
3360 endif # SYSTEM_LIBORCUS
3362 ifeq ($(ENABLE_EOT),TRUE)
3364 ifneq ($(SYSTEM_LIBEOT),)
3366 define gb_LinkTarget__use_libeot
3367 $(call gb_LinkTarget_set_include,$(1),\
3368 $$(INCLUDE) \
3369 $(LIBEOT_CFLAGS) \
3371 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3373 endef
3375 gb_ExternalProject__use_libeot :=
3377 else # !SYSTEM_LIBEOT
3379 define gb_LinkTarget__use_libeot
3380 $(call gb_LinkTarget_set_include,$(1),\
3381 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3382 $$(INCLUDE) \
3384 $(call gb_LinkTarget_add_libs,$(1),\
3385 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3387 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3389 endef
3391 define gb_ExternalProject__use_libeot
3392 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3394 endef
3396 endif # SYSTEM_LIBEOT
3398 else # !ENABLE_EOT
3400 gb_LinkTarget__use_libeot :=
3401 gb_ExternalProject__use_libeot :=
3403 endif # ENABLE_EOT
3405 ### X11 stuff ###
3407 ifeq ($(USING_X11), TRUE)
3409 define gb_LinkTarget__use_Xrandr
3410 $(call gb_LinkTarget_set_include,$(1),\
3411 $$(INCLUDE) \
3412 $(XRANDR_CFLAGS) \
3415 $(call gb_LinkTarget_add_libs,$(1),\
3416 $(XRANDR_LIBS) \
3418 endef
3420 define gb_LinkTarget__use_Xrender
3421 $(call gb_LinkTarget_set_include,$(1),\
3422 $$(INCLUDE) \
3423 $(XRENDER_CFLAGS) \
3426 $(call gb_LinkTarget_add_libs,$(1),\
3427 $(XRENDER_LIBS) \
3429 endef
3431 endif # USING_X11
3434 gb_ExternalProject__use_nss3:=
3437 ifneq ($(SYSTEM_NSS),)
3439 define gb_LinkTarget__use_nss3
3440 $(call gb_LinkTarget_add_defs,$(1),\
3441 -DSYSTEM_NSS \
3444 $(call gb_LinkTarget_set_include,$(1),\
3445 $$(INCLUDE) \
3446 $(NSS_CFLAGS) \
3449 $(call gb_LinkTarget_add_libs,$(1),\
3450 $(NSS_LIBS) \
3453 endef
3455 define gb_LinkTarget__use_nssutil3
3456 $(call gb_LinkTarget__use_nss3,$(1))
3458 endef
3460 define gb_LinkTarget__use_plc4
3461 $(call gb_LinkTarget__use_nss3,$(1))
3463 endef
3465 define gb_LinkTarget__use_ssl3
3466 $(call gb_LinkTarget__use_nss3,$(1))
3468 endef
3470 else # !SYSTEM_NSS
3472 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3473 nss \
3476 define gb_LinkTarget__use_nss3
3477 $(call gb_LinkTarget_use_package,$(1),nss)
3478 $(call gb_LinkTarget_set_include,$(1),\
3479 $$(INCLUDE) \
3480 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3481 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3484 ifeq ($(COM),MSC)
3485 $(call gb_LinkTarget_add_libs,$(1),\
3486 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3487 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3488 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3490 else
3491 $(call gb_LinkTarget_add_libs,$(1),\
3492 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3493 -lnspr4 \
3494 -lnss3 \
3495 -lsmime3 \
3497 endif
3499 endef
3501 define gb_LinkTarget__use_plc4
3502 $(call gb_LinkTarget_use_package,$(1),nss)
3503 ifeq ($(COM),MSC)
3504 $(call gb_LinkTarget_add_libs,$(1),\
3505 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3507 else
3508 $(call gb_LinkTarget_add_libs,$(1),\
3509 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3511 endif
3513 endef
3515 define gb_LinkTarget__use_ssl3
3516 $(call gb_LinkTarget_use_package,$(1),nss)
3517 ifeq ($(COM),MSC)
3518 $(call gb_LinkTarget_add_libs,$(1),\
3519 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3521 else
3522 $(call gb_LinkTarget_add_libs,$(1),\
3523 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3525 endif
3527 endef
3529 define gb_LinkTarget__use_nssutil3
3530 $(call gb_LinkTarget_use_package,$(1),nss)
3531 $(call gb_LinkTarget_set_include,$(1),\
3532 $$(INCLUDE) \
3533 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3534 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3537 ifeq ($(COM),MSC)
3538 $(call gb_LinkTarget_add_libs,$(1),\
3539 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3541 else
3542 $(call gb_LinkTarget_add_libs,$(1),\
3543 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3544 -lnssutil3 \
3546 endif
3548 endef
3550 define gb_ExternalProject__use_nss3
3551 $(call gb_ExternalProject_use_package,$(1),nss)
3553 endef
3555 endif # SYSTEM_NSS
3557 ifeq ($(ENABLE_BREAKPAD),TRUE)
3559 define gb_LinkTarget__use_breakpad
3560 $(call gb_LinkTarget_set_include,$(1),\
3561 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3562 $$(INCLUDE) \
3565 ifeq ($(COM),MSC)
3566 $(call gb_LinkTarget_use_static_libraries,$(1),\
3567 breakpad \
3569 else
3570 $(call gb_LinkTarget_add_libs,$(1),\
3571 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3573 endif
3575 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3577 endef
3579 endif # ENABLE_BREAKPAD
3581 ifeq ($(ENABLE_GPGMEPP),TRUE)
3583 ifneq ($(SYSTEM_GPGMEPP),)
3585 gb_ExternalProject__use_gpgmepp:=
3586 gb_ExternalProject__use_libassuan:=
3587 gb_ExternalProject__use_libgpg-error:=
3589 define gb_LinkTarget__use_gpgmepp
3590 $(call gb_LinkTarget_set_include,$(1),\
3591 $$(INCLUDE) \
3592 $$(GPGMEPP_CFLAGS) \
3595 $(call gb_LinkTarget_add_libs,$(1),\
3596 $(GPGMEPP_LIBS) \
3599 endef
3601 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3603 define gb_ExternalProject__use_gpgmepp
3604 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3606 endef
3607 define gb_ExternalProject__use_libassuan
3608 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3610 endef
3611 define gb_ExternalProject__use_libgpg-error
3612 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3614 endef
3616 ifneq ($(filter WNT,$(OS)),)
3618 define gb_LinkTarget__use_libgpg-error
3619 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3621 $(call gb_LinkTarget_set_include,$(1),\
3622 $(GPG_ERROR_CFLAGS) \
3623 $$(INCLUDE) \
3625 $(call gb_LinkTarget_add_libs,$(1),\
3626 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3629 endef
3631 define gb_LinkTarget__use_libassuan
3632 $(call gb_LinkTarget_use_package,$(1),libassuan)
3634 $(call gb_LinkTarget_set_include,$(1),\
3635 $(LIBASSUAN_CFLAGS) \
3636 $$(INCLUDE) \
3638 $(call gb_LinkTarget_add_libs,$(1),\
3639 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3642 endef
3644 define gb_LinkTarget__use_gpgmepp
3645 $(call gb_LinkTarget_set_include,$(1),\
3646 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3647 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3648 $$(GPG_ERROR_CFLAGS) \
3649 $$(INCLUDE) \
3651 $(call gb_LinkTarget_use_libraries,$(1),\
3652 gpgmepp \
3655 endef
3657 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3658 gpgmepp \
3659 libassuan \
3660 libgpg-error \
3663 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3664 gpgmepp \
3667 endif
3669 ifneq ($(filter MACOSX LINUX,$(OS)),)
3671 define gb_LinkTarget__use_gpgmepp
3672 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3674 $(call gb_LinkTarget_set_include,$(1),\
3675 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3676 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3677 $$(GPG_ERROR_CFLAGS) \
3678 $$(INCLUDE) \
3680 $(call gb_LinkTarget_add_libs,$(1),\
3681 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3682 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3683 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3684 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3687 endef
3689 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3690 gpgmepp \
3691 libassuan \
3692 libgpg-error \
3695 endif
3697 endif
3699 else # !ENABLE_GPGMEPP
3701 gb_ExternalProject__use_gpgmepp :=
3702 gb_ExternalProject__use_libassuan :=
3703 gb_ExternalProject__use_libgpg-error :=
3705 gb_LinkTarget__use_gpgmepp :=
3706 gb_LinkTarget__use_libassuan :=
3707 gb_LinkTarget__use_libgpg-error :=
3709 endif # ENABLE_GPGMEPP
3711 define gb_LinkTarget__use_dconf
3712 $(call gb_LinkTarget_set_include,$(1),\
3713 $$(INCLUDE) \
3714 $(DCONF_CFLAGS) \
3717 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3718 endef
3720 ### Jars ############################################################
3722 ifneq ($(SYSTEM_HSQLDB),)
3724 define gb_Jar__use_hsqldb
3725 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3726 endef
3727 define gb_JunitTest__use_hsqldb
3728 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3729 endef
3731 else # !SYSTEM_HSQLDB
3733 ifeq ($(ENABLE_JAVA),TRUE)
3734 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3735 hsqldb \
3737 endif
3739 define gb_Jar__use_hsqldb
3740 $(call gb_Jar_use_jar,$(1),hsqldb)
3741 endef
3742 define gb_JunitTest__use_hsqldb
3743 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3744 endef
3746 endif # SYSTEM_HSQLDB
3749 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3751 ifneq ($(SYSTEM_BSH),)
3753 define gb_Jar__use_bsh
3754 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3755 endef
3757 else # !SYSTEM_BSH
3759 ifeq ($(ENABLE_JAVA),TRUE)
3760 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3761 bsh \
3763 endif
3765 define gb_Jar__use_bsh
3766 $(call gb_Jar_use_jar,$(1),bsh)
3767 endef
3769 endif # SYSTEM_BSH
3771 endif
3773 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3775 ifneq ($(SYSTEM_RHINO),)
3777 define gb_Jar__use_rhino
3778 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3779 endef
3781 else # !SYSTEM_RHINO
3783 ifeq ($(ENABLE_JAVA),TRUE)
3784 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3785 js \
3787 endif
3789 define gb_Jar__use_rhino
3790 $(call gb_Jar_use_jar,$(1),js)
3791 endef
3793 endif # SYSTEM_RHINO
3795 endif
3797 ifneq ($(SYSTEM_JFREEREPORT),)
3799 define gb_Jar__use_flow-engine
3800 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3801 endef
3803 define gb_Jar__use_flute
3804 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3805 endef
3807 define gb_Jar__use_libbase
3808 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3809 endef
3811 define gb_Jar__use_libfonts
3812 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3813 endef
3815 define gb_Jar__use_libformula
3816 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3817 endef
3819 define gb_Jar__use_liblayout
3820 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3821 endef
3823 define gb_Jar__use_libloader
3824 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3825 endef
3827 define gb_Jar__use_librepository
3828 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3829 endef
3831 define gb_Jar__use_libserializer
3832 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3833 endef
3835 define gb_Jar__use_libxml
3836 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3837 endef
3839 define gb_Jar__use_sac
3840 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3841 endef
3843 else # !SYSTEM_JFREEREPORT
3845 ifeq ($(ENABLE_JAVA),TRUE)
3846 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3847 flow-engine \
3848 flute-1.1.6 \
3849 libbase-1.1.6 \
3850 libfonts-1.1.6 \
3851 libformula-1.1.7 \
3852 liblayout \
3853 libloader-1.1.6 \
3854 librepository-1.1.6 \
3855 libserializer-1.1.6 \
3856 libxml-1.1.7 \
3857 sac \
3859 endif
3861 define gb_Jar__use_flow-engine
3862 $(call gb_Jar_use_jar,$(1),flow-engine)
3863 endef
3865 define gb_Jar__use_flute
3866 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3867 endef
3869 define gb_Jar__use_libbase
3870 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3871 endef
3873 define gb_Jar__use_libfonts
3874 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3875 endef
3877 define gb_Jar__use_libformula
3878 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3879 endef
3881 define gb_Jar__use_liblayout
3882 $(call gb_Jar_use_jar,$(1),liblayout)
3883 endef
3885 define gb_Jar__use_libloader
3886 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3887 endef
3889 define gb_Jar__use_librepository
3890 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3891 endef
3893 define gb_Jar__use_libserializer
3894 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3895 endef
3897 define gb_Jar__use_libxml
3898 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3899 endef
3901 define gb_Jar__use_sac
3902 $(call gb_Jar_use_jar,$(1),sac)
3903 endef
3905 endif # SYSTEM_JFREEREPORT
3908 # Executables
3910 define gb_Executable__register_bestreversemap
3911 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3912 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
3914 endef
3916 # TODO depending on the whole URE might be overkill, but I do not have a
3917 # Windows machine to debug it...
3918 define gb_Executable__register_climaker
3919 $(call gb_Executable_add_runtime_dependencies,climaker,\
3920 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3921 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3922 $(call gb_UnoApi_get_target_for_build,udkapi) \
3923 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3925 endef
3927 define gb_Executable__register_cppumaker
3928 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3929 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3931 endef
3933 # This is used to determine what we need for 'build' platform.
3934 define gb_Executable__register_gengal
3935 $(call gb_Executable_add_runtime_dependencies,gengal,\
3936 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3937 $(call gb_Library_get_target_for_build,localedata_en) \
3938 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3939 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3940 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3941 $(call gb_Package_get_target_for_build,postprocess_registry) \
3942 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3943 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3944 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3945 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3946 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3947 $(call gb_UnoApi_get_target_for_build,offapi) \
3948 $(call gb_UnoApi_get_target_for_build,udkapi) \
3950 endef
3952 ifeq ($(SYSTEM_ICU),)
3954 define gb_Executable__register_gendict
3955 $(call gb_Executable_add_runtime_dependencies,gendict,\
3956 $(call gb_Package_get_target_for_build,icu) \
3957 $(call gb_Package_get_target_for_build,icu_ure) \
3959 endef
3961 endif
3963 define gb_Executable__register_idlc
3964 $(call gb_Executable_add_runtime_dependencies,idlc,\
3965 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3967 endef
3969 define gb_Executable__register_localize
3970 $(call gb_Executable_add_runtime_dependencies,localize,\
3971 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3972 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3975 endef
3977 # FIXME ure/services.rdb needs cleanup
3978 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3979 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3980 define gb_Executable__register_saxparser
3981 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3982 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3983 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3984 $(call gb_Rdb_get_target_for_build,saxparser) \
3985 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3986 $(call gb_UnoApi_get_target_for_build,udkapi) \
3988 endef
3990 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3991 # required due to the settings for URE_SERVICES and URE_TYPES in
3992 # cppuhelper/source/unorc
3993 define gb_Executable__register_uno
3994 $(call gb_Executable_add_runtime_dependencies,uno,\
3995 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3996 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3997 $(call gb_UnoApi_get_target_for_build,udkapi) \
3999 endef
4002 # External executables
4004 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4006 gb_ExternalExecutable__register_xmllint :=
4008 else # ! SYSTEM_LIBXML_FOR_BUILD
4010 define gb_ExternalExecutable__register_xmllint
4011 $(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)
4012 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4013 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4014 $(call gb_Package_get_target,libxml2) \
4017 endef
4019 endif # SYSTEM_LIBXML_FOR_BUILD
4021 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4023 gb_ExternalExecutable__register_xsltproc :=
4025 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4027 define gb_ExternalExecutable__register_xsltproc
4028 $(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)
4029 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4030 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4031 $(call gb_Package_get_target,libxml2) \
4032 $(call gb_Package_get_target,libxslt) \
4035 endef
4037 endif # SYSTEM_LIBXSLT_FOR_BUILD
4039 ifneq (,$(SYSTEM_UCPP))
4041 gb_ExternalExecutable__register_ucpp :=
4043 else # ! SYSTEM_UCPP
4045 define gb_ExternalExecutable__register_ucpp
4046 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4048 endef
4050 endif # SYSTEM_UCPP
4052 ifeq (,$(PYTHON_FOR_BUILD))
4054 define gb_ExternalExecutable__register_python
4055 ifeq ($(OS),MACOSX)
4057 # use set_external, to avoid having the command added as prerequisite for the
4058 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4059 # matching rule to build that specific file)
4060 $(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))
4061 # the Zip ensures that internal python has been built (cannot use the Package
4062 # target, as that is not used on Mac)
4063 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4065 else
4067 $(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))
4068 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4069 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4071 endif
4073 endef
4075 else
4077 define gb_ExternalExecutable__register_python
4078 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4080 endef
4082 endif # PYTHON_FOR_BUILD
4084 ifneq ($(SYSTEM_GENBRK),)
4086 define gb_ExternalExecutable__register_genbrk
4087 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4089 endef
4091 else # ! SYSTEM_GENBRK
4093 define gb_ExternalExecutable__register_genbrk
4094 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4095 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4096 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4097 $(call gb_Package_get_target_for_build,icu) \
4098 $(call gb_Package_get_target_for_build,icu_ure) \
4101 endef
4103 endif
4105 ifneq ($(SYSTEM_GENCCODE),)
4107 define gb_ExternalExecutable__register_genccode
4108 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4110 endef
4112 else # ! SYSTEM_GENCCODE
4114 define gb_ExternalExecutable__register_genccode
4115 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4116 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4117 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4118 $(call gb_Package_get_target_for_build,icu) \
4119 $(call gb_Package_get_target_for_build,icu_ure) \
4122 endef
4124 endif
4126 ifneq ($(SYSTEM_GENCMN),)
4128 define gb_ExternalExecutable__register_gencmn
4129 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4131 endef
4133 else # ! SYSTEM_GENCMN
4135 define gb_ExternalExecutable__register_gencmn
4136 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4137 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4138 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4139 $(call gb_Package_get_target_for_build,icu) \
4140 $(call gb_Package_get_target_for_build,icu_ure) \
4143 endef
4145 endif
4147 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4148 ifneq ($(SYSTEM_BZIP2),)
4150 define gb_LinkTarget__use_bzip2
4151 $(call gb_LinkTarget_set_include,$(1),\
4152 $(BZIP2_CFLAGS) \
4153 $$(INCLUDE) \
4155 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4157 endef
4159 gb_ExternalProject__use_bzip2 :=
4161 else # !SYSTEM_BZIP2
4163 define gb_LinkTarget__use_bzip2
4164 $(call gb_LinkTarget_set_include,$(1),\
4165 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4166 $$(INCLUDE) \
4169 ifeq ($(COM),MSC)
4170 $(call gb_LinkTarget_add_libs,$(1),\
4171 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4173 else
4174 $(call gb_LinkTarget_add_libs,$(1),\
4175 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4177 endif
4179 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4180 endef
4182 define gb_ExternalProject__use_bzip2
4183 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4184 endef
4186 endif
4187 endif
4189 define gb_LinkTarget__use_clew
4190 $(call gb_LinkTarget_set_include,$(1), \
4191 -I$(SRCDIR)/external/clew/source/include \
4192 $$(INCLUDE) \
4194 $(call gb_LinkTarget_use_libraries,$(1),clew)
4195 endef
4197 ifneq ($(ENABLE_PDFIUM),)
4198 define gb_LinkTarget__use_pdfium
4199 $(call gb_LinkTarget_set_include,$(1),\
4200 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4201 -DCOMPONENT_BUILD \
4202 $$(INCLUDE) \
4204 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4205 endef
4206 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4207 pdfium \
4209 endif
4211 define gb_LinkTarget__use_dtoa
4212 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4213 $(call gb_LinkTarget_set_include,$(1),\
4214 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4215 $$(INCLUDE) \
4217 $(call gb_LinkTarget_use_static_libraries,$(1),\
4218 dtoa \
4221 endef
4223 define gb_ExternalProject__use_dtoa
4224 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4226 endef
4228 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4229 $(if $(UCRT_REDISTDIR),ucrt) \
4232 ifneq ($(SYSTEM_BOX2D),)
4234 define gb_LinkTarget__use_box2d
4235 $(call gb_LinkTarget_set_include,$(1),\
4236 -DSYSTEM_BOX2D \
4237 $$(INCLUDE) \
4238 $(BOX2D_CFLAGS) \
4240 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4242 endef
4244 gb_ExternalProject__use_box2d :=
4246 else # !SYSTEM_BOX2D
4248 define gb_LinkTarget__use_box2d
4249 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4250 $(call gb_LinkTarget_set_include,$(1),\
4251 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4252 $$(INCLUDE) \
4254 $(call gb_LinkTarget_use_static_libraries,$(1),\
4255 box2d \
4258 endef
4260 define gb_ExternalProject__use_box2d
4261 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4263 endef
4265 endif # SYSTEM_BOX2D
4267 ifneq ($(SYSTEM_ZXING),)
4269 define gb_LinkTarget__use_zxing
4270 $(call gb_LinkTarget_set_include,$(1),\
4271 -DSYSTEM_ZXING \
4272 $$(INCLUDE) \
4273 $(ZXING_CFLAGS) \
4275 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4277 endef
4279 gb_ExternalProject__use_zxing :=
4281 else # !SYSTEM_ZXING
4283 ifneq ($(ENABLE_ZXING),)
4285 define gb_LinkTarget__use_zxing
4286 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4287 $(call gb_LinkTarget_set_include,$(1),\
4288 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4289 $$(INCLUDE) \
4291 $(call gb_LinkTarget_use_static_libraries,$(1),\
4292 zxing \
4295 endef
4297 define gb_ExternalProject__use_zxing
4298 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4300 endef
4302 else # !ENABLE_ZXING
4304 define gb_LinkTarget__use_zxing
4305 endef
4307 endif # ENABLE_ZXING
4309 endif # SYSTEM_ZXING
4311 # vim: set noet sw=4 ts=4: