Update git submodules
[LibreOffice.git] / RepositoryExternal.mk
bloba0de7e340de86a9f0d3fc474db6be2572aa7699e
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/third_party/vulkan \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
132 -I$(call gb_UnpackedTarball_get_dir,skia) \
133 $$(INCLUDE) \
135 $(call gb_LinkTarget_use_libraries,$(1),skia)
136 $(call gb_LinkTarget_add_defs,$(1),\
137 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
138 -DSKIA_DLL \
140 endef
141 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
142 skia \
144 endif
146 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
148 define gb_LinkTarget__use_sane_headers
149 $(call gb_LinkTarget_set_include,$(1),\
150 $(if $(filter WNT,$(OS)), \
151 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
152 -I$(SRCDIR)/external/sane/inc) \
153 $$(INCLUDE) \
156 ifeq ($(OS),WNT)
157 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
158 endif
160 endef
162 else
164 gb_LinkTarget__use_sane_headers :=
166 endif
168 ifneq ($(SYSTEM_BLUEZ),)
170 gb_LinkTarget__use_bluez_bluetooth_headers :=
172 else # !SYSTEM_BLUEZ
174 define gb_LinkTarget__use_bluez_bluetooth_headers
175 $(call gb_LinkTarget_set_include,$(1),\
176 -I$(SRCDIR)/external/bluez_bluetooth/inc \
177 $$(INCLUDE) \
180 endef
182 endif # SYSTEM_BLUEZ
184 # External libraries
186 ifneq ($(SYSTEM_CPPUNIT),)
188 define gb_LinkTarget__use_cppunit
189 $(call gb_LinkTarget_set_include,$(1),\
190 $$(INCLUDE) \
191 $(CPPUNIT_CFLAGS) \
194 $(call gb_LinkTarget_add_libs,$(1),\
195 $(CPPUNIT_LIBS) \
198 endef
200 else # !SYSTEM_CPPUNIT
202 define gb_LinkTarget__use_cppunit
203 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
205 $(call gb_LinkTarget_set_include,$(1),\
206 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
207 $$(INCLUDE) \
210 ifeq ($(COM),MSC)
211 $(call gb_LinkTarget_add_libs,$(1),\
212 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
214 else
215 $(call gb_LinkTarget_add_libs,$(1),\
216 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
218 endif
220 endef
222 endif # SYSTEM_CPPUNIT
224 ifneq ($(SYSTEM_EPOXY),)
226 define gb_LinkTarget__use_epoxy
227 $(call gb_LinkTarget_set_include,$(1),\
228 $$(INCLUDE) \
229 $(EPOXY_CFLAGS) \
231 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
233 endef
235 gb_ExternalProject__use_epoxy :=
237 else # !SYSTEM_EPOXY
239 define gb_LinkTarget__use_epoxy
240 $(call gb_LinkTarget_set_include,$(1),\
241 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
242 $$(INCLUDE) \
245 $(call gb_LinkTarget_use_libraries,$(1),\
246 epoxy \
249 endef
251 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
252 epoxy \
255 define gb_ExternalProject__use_epoxy
256 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
258 endef
260 endif # SYSTEM_EPOXY
262 define gb_LinkTarget__use_iconv
263 ifeq ($(COM),MSC)
264 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
265 else
266 $(call gb_LinkTarget_add_libs,$(1),-liconv)
267 endif
268 endef
270 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
272 define gb_LinkTarget__use_mariadb-connector-c
273 $(call gb_LinkTarget_set_include,$(1),\
274 $$(INCLUDE) \
275 $(MARIADB_CFLAGS) \
277 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
279 endef
280 gb_ExternalProject__use_mariadb-connector-c :=
282 else # !SYSTEM_MARIADB_CONNECTOR_C
284 define gb_LinkTarget__use_mariadb-connector-c
285 $(call gb_LinkTarget_set_include,$(1),\
286 $$(INCLUDE) \
287 $(MARIADB_CFLAGS) \
289 $(call gb_LinkTarget_use_static_libraries,$(1),\
290 mariadb-connector-c \
292 ifeq ($(OS),MACOSX)
293 $(call gb_LinkTarget_add_libs,$(1),\
294 -liconv \
296 endif
298 endef
299 define gb_ExternalProject__use_mariadb-connector-c
300 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
302 endef
304 endif # SYSTEM_MARIADB_CONNECTOR_C
307 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
309 define gb_LinkTarget__use_mysql
311 $(call gb_LinkTarget_add_defs,$(1),\
312 -DSYSTEM_MARIADB \
315 $(call gb_LinkTarget_add_libs,$(1),\
316 $(MARIADB_LIBS) \
319 $(call gb_LinkTarget_set_include,$(1),\
320 $(MARIADB_CFLAGS) \
321 $$(INCLUDE) \
323 endef
325 else
327 define gb_LinkTarget__use_mysql
329 $(call gb_LinkTarget_set_include,$(1),\
330 $$(INCLUDE) \
333 endef
335 endif
337 ifneq ($(SYSTEM_ZLIB),)
339 define gb_LinkTarget__use_zlib
340 $(call gb_LinkTarget_add_defs,$(1),\
341 -DSYSTEM_ZLIB \
343 $(call gb_LinkTarget_add_libs,$(1),-lz)
345 endef
347 # nothing on system
348 define gb_LinkTarget__use_zlib_x64
350 endef
352 gb_ExternalProject__use_zlib :=
354 else # !SYSTEM_ZLIB
356 define gb_LinkTarget__use_zlib_multiarch
357 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
359 $(call gb_LinkTarget_set_include,$(1),\
360 $(ZLIB_CFLAGS) \
361 $$(INCLUDE) \
364 $(call gb_LinkTarget_use_static_libraries,$(1),\
365 $(2) \
368 endef
370 define gb_LinkTarget__use_zlib
371 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
373 endef
375 define gb_LinkTarget__use_zlib_x64
376 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
378 endef
380 define gb_ExternalProject__use_zlib
381 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
383 endef
385 endif # SYSTEM_ZLIB
388 ifneq ($(SYSTEM_LIBJPEG),)
390 define gb_LinkTarget__use_libjpeg
391 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
392 $(call gb_LinkTarget_set_ldflags,$(1),\
393 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
396 endef
398 gb_ExternalProject__use_libjpeg :=
400 else
402 define gb_LinkTarget__use_libjpeg
403 $(call gb_LinkTarget_set_include,$(1),\
404 $(LIBJPEG_CFLAGS) \
405 $$(INCLUDE) \
407 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
408 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
410 endef
412 define gb_ExternalProject__use_libjpeg
413 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
415 endef
417 endif # SYSTEM_LIBJPEG
419 ifneq ($(SYSTEM_MYTHES),)
421 define gb_LinkTarget__use_mythes
422 $(call gb_LinkTarget_set_include,$(1),\
423 $$(INCLUDE) \
424 $(MYTHES_CFLAGS) \
426 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
428 endef
430 else # !SYSTEM_MYTHES
432 define gb_LinkTarget__use_mythes
433 $(call gb_LinkTarget_set_include,$(1),\
434 -I$(call gb_UnpackedTarball_get_dir,mythes) \
435 $$(INCLUDE) \
438 ifeq ($(COM),MSC)
439 $(call gb_LinkTarget_use_static_libraries,$(1),\
440 mythes \
442 else
443 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
444 $(call gb_LinkTarget_use_external_project,$(1),mythes)
445 endif
447 endef
449 endif # SYSTEM_MYTHES
452 ifneq ($(SYSTEM_EXPAT),)
454 define gb_LinkTarget__use_expat_impl
455 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
457 $(call gb_LinkTarget_add_defs,$(1),\
458 -DSYSTEM_EXPAT \
461 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
463 endef
465 gb_ExternalProject__use_expat :=
467 else # !SYSTEM_EXPAT
469 define gb_LinkTarget__use_expat_impl
470 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
472 $(call gb_LinkTarget_set_include,$(1),\
473 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
474 $$(INCLUDE) \
477 $(call gb_LinkTarget_use_static_libraries,$(1),\
478 $(2) \
481 endef
483 define gb_ExternalProject__use_expat
484 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
486 endef
488 endif # SYSTEM_EXPAT
490 define gb_LinkTarget__use_expat
491 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
493 endef
495 define gb_LinkTarget__use_expat_x64
496 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
498 endef
500 ifneq ($(SYSTEM_HYPH),)
502 define gb_LinkTarget__use_hyphen
503 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
505 endef
507 else # !SYSTEM_HYPH
509 define gb_LinkTarget__use_hyphen
510 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
511 $(call gb_LinkTarget_set_include,$(1),\
512 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
513 $$(INCLUDE) \
516 ifeq ($(COM),MSC)
517 $(call gb_LinkTarget_use_static_libraries,$(1),\
518 hyphen \
520 else
521 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
522 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
523 endif
525 endef
527 endif # SYSTEM_HYPH
529 ifneq ($(SYSTEM_HUNSPELL),)
531 define gb_LinkTarget__use_hunspell
532 $(call gb_LinkTarget_set_include,$(1),\
533 $$(INCLUDE) \
534 $(HUNSPELL_CFLAGS) \
536 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
538 endef
540 gb_ExternalProject__use_hunspell :=
542 else # !SYSTEM_HUNSPELL
544 define gb_LinkTarget__use_hunspell
545 $(call gb_LinkTarget_add_defs,$(1),\
546 -DHUNSPELL_STATIC \
548 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
549 $(call gb_LinkTarget_set_include,$(1),\
550 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
551 $$(INCLUDE) \
554 ifeq ($(COM),MSC)
555 $(call gb_LinkTarget_use_static_libraries,$(1),\
556 hunspell \
558 else
559 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
560 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
561 endif
563 endef
565 define gb_ExternalProject__use_hunspell
566 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
568 endef
570 endif # SYSTEM_HUNSPELL
573 ifneq ($(SYSTEM_BOOST),)
575 define gb_LinkTarget__use_boost_lib
576 $(call gb_LinkTarget_set_include,$(1),\
577 $$(INCLUDE) \
578 $(BOOST_CPPFLAGS) \
581 $(call gb_LinkTarget_add_ldflags,$(1),\
582 $(BOOST_LDFLAGS) \
585 $(call gb_LinkTarget_add_libs,$(1),$(2))
587 endef
589 define gb_LinkTarget__use_boost_locale
590 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
592 endef
594 define gb_LinkTarget__use_boost_date_time
595 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
597 endef
599 define gb_LinkTarget__use_boost_filesystem
600 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
602 endef
604 gb_ExternalProject__use_boost_filesystem :=
606 define gb_LinkTarget__use_boost_iostreams
607 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
609 endef
611 gb_ExternalProject__use_boost_iostreams :=
613 define gb_LinkTarget__use_boost_system
614 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
616 endef
618 gb_ExternalProject__use_boost_system :=
620 define gb_LinkTarget__use_boost_headers
621 $(call gb_LinkTarget_set_include,$(1),\
622 $$(INCLUDE) \
623 $(BOOST_CPPFLAGS) \
626 endef
628 gb_ExternalProject__use_boost_headers:=
630 else # !SYSTEM_BOOST
632 define gb_LinkTarget__use_boost_lib
633 $(call gb_LinkTarget_add_defs,$(1),\
634 -DBOOST_ALL_NO_LIB \
637 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
639 endef
641 define gb_LinkTarget__use_boost_locale
642 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
643 $(call gb_LinkTarget_add_libs,$(1),\
644 $(if $(filter $(OS),MACOSX),-liconv) \
647 endef
649 define gb_LinkTarget__use_boost_date_time
650 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
652 endef
654 define gb_LinkTarget__use_boost_filesystem
655 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
657 endef
659 define gb_ExternalProject__use_boost_filesystem
660 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
661 endef
663 define gb_LinkTarget__use_boost_iostreams
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
666 endef
668 define gb_ExternalProject__use_boost_iostreams
669 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
670 endef
672 define gb_LinkTarget__use_boost_system
673 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
675 endef
677 define gb_ExternalProject__use_boost_system
678 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
679 endef
681 define gb_LinkTarget__use_boost_headers
682 $(call gb_LinkTarget_use_unpacked,$(1),boost)
683 $(call gb_LinkTarget_set_include,$(1),\
684 $(BOOST_CPPFLAGS) \
685 $$(INCLUDE) \
688 endef
690 define gb_ExternalProject__use_boost_headers
691 $(call gb_ExternalProject_use_unpacked,$(1),boost)
693 endef
695 endif # SYSTEM_BOOST
698 ifneq ($(SYSTEM_LIBCMIS),)
700 define gb_LinkTarget__use_libcmis
701 $(call gb_LinkTarget_set_include,$(1),\
702 $$(INCLUDE) \
703 $(LIBCMIS_CFLAGS) \
705 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
707 endef
709 else # !SYSTEM_LIBCMIS
711 define gb_LinkTarget__use_libcmis
712 $(call gb_LinkTarget_set_include,$(1),\
713 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
714 $$(INCLUDE) \
716 $(call gb_LinkTarget_use_static_libraries,$(1),\
717 libcmis \
720 endef
722 endif # SYSTEM_LIBCMIS
724 ifeq ($(ENABLE_JAVA),TRUE)
726 define gb_LinkTarget__use_jawt
727 $(call gb_LinkTarget_add_libs,$(1),\
728 $(JAWTLIB) \
731 endef
733 else # !ENABLE_JAVA
735 gb_LinkTarget__use_jawt :=
737 endif # ENABLE_JAVA
739 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
741 define gb_LinkTarget__use_libatomic_ops
742 $(call gb_LinkTarget_set_include,$(1),\
743 $$(INCLUDE) \
744 $(LIBATOMIC_OPS_CFLAGS) \
746 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
748 endef
749 gb_ExternalProject__use_libatomic_ops :=
751 else # !SYSTEM_LIBATOMIC_OPS
753 define gb_LinkTarget__use_libatomic_ops
754 $(call gb_LinkTarget_set_include,$(1),\
755 $(LIBATOMIC_OPS_CFLAGS) \
756 $$(INCLUDE) \
757 $(LIBATOMIC_OPS_CFLAGS) \
759 $(call gb_LinkTarget_use_external_project,$(1),\
760 libatomic_ops \
763 $(call gb_LinkTarget_add_libs,$(1),\
764 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
767 endef
769 define gb_ExternalProject__use_libatomic_ops
770 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
772 endef
774 endif # SYSTEM_LIBATOMIC_OPS
777 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
779 define gb_LinkTarget__use_libexttextcat
780 $(call gb_LinkTarget_set_include,$(1),\
781 $$(INCLUDE) \
782 $(LIBEXTTEXTCAT_CFLAGS) \
784 $(call gb_LinkTarget_add_defs,$(1),\
785 -DSYSTEM_LIBEXTTEXTCAT \
787 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
789 endef
791 else # !SYSTEM_LIBEXTTEXTCAT
793 define gb_LinkTarget__use_libexttextcat
794 $(call gb_LinkTarget_set_include,$(1),\
795 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
796 $$(INCLUDE) \
799 ifeq ($(COM),MSC)
800 $(call gb_LinkTarget_use_static_libraries,$(1),\
801 libexttextcat \
803 else
804 $(call gb_LinkTarget_add_libs,$(1),\
805 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
807 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
808 endif
811 endef
813 endif # SYSTEM_LIBEXTTEXTCAT
816 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
818 define gb_LinkTarget__use_libnumbertext
819 $(call gb_LinkTarget_set_include,$(1),\
820 $$(INCLUDE) \
821 $(LIBNUMBERTEXT_CFLAGS) \
823 $(call gb_LinkTarget_add_defs,$(1),\
824 -DSYSTEM_LIBNUMBERTEXT \
826 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
828 endef
830 else # !SYSTEM_LIBNUMBERTEXT
832 ifneq ($(ENABLE_LIBNUMBERTEXT),)
834 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
835 libnumbertext_numbertext \
838 define gb_LinkTarget__use_libnumbertext
839 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
840 $(call gb_LinkTarget_set_include,$(1),\
841 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
842 $$(INCLUDE) \
844 $(call gb_LinkTarget_add_defs,$(1),\
845 -DENABLE_LIBNUMBERTEXT \
848 ifeq ($(COM),MSC)
849 $(call gb_LinkTarget_use_static_libraries,$(1),\
850 libnumbertext \
852 else
854 $(call gb_LinkTarget_add_libs,$(1),\
855 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
857 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
859 endif
861 endef
863 else # !ENABLE_LIBNUMBERTEXT
865 define gb_LinkTarget__use_libnumbertext
866 endef
868 endif # ENABLE_LIBNUMBERTEXT
870 endif # SYSTEM_LIBNUMBERTEXT
873 ifneq ($(SYSTEM_LIBXML),)
875 define gb_LinkTarget__use_libxml2
876 $(call gb_LinkTarget_add_defs,$(1),\
877 -DSYSTEM_LIBXML \
879 $(call gb_LinkTarget_set_include,$(1),\
880 $$(INCLUDE) \
881 $(LIBXML_CFLAGS) \
883 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
885 endef
886 gb_ExternalProject__use_libxml2:=
888 else # !SYSTEM_LIBXML
890 $(eval $(call gb_Helper_register_packages_for_install,ure,\
891 libxml2 \
894 define gb_LinkTarget__use_libxml2
895 $(call gb_LinkTarget_use_package,$(1),libxml2)
896 $(call gb_LinkTarget_set_include,$(1),\
897 $$(INCLUDE) \
898 $(LIBXML_CFLAGS) \
901 $(call gb_LinkTarget_add_libs,$(1),\
902 $(LIBXML_LIBS) \
905 ifeq ($(COM),MSC)
906 $(call gb_LinkTarget_use_external,$(1),icu_headers)
907 endif
909 endef
910 define gb_ExternalProject__use_libxml2
911 $(call gb_ExternalProject_use_package,$(1),libxml2)
913 ifeq ($(COM),MSC)
914 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
915 endif
917 endef
919 endif # SYSTEM_LIBXML
922 ifneq ($(SYSTEM_LIBXSLT),)
924 define gb_LinkTarget__use_libxslt
925 $(call gb_LinkTarget_set_include,$(1),\
926 $$(INCLUDE) \
927 $(LIBXSLT_CFLAGS) \
929 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
931 endef
933 define gb_LinkTarget__use_libexslt
934 $(call gb_LinkTarget_set_include,$(1),\
935 $$(INCLUDE) \
936 $(LIBEXSLT_CFLAGS) \
939 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
941 endef
943 else # !SYSTEM_LIBXSLT
945 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
946 libxslt \
949 define gb_LinkTarget__use_libxslt
950 $(call gb_LinkTarget_use_package,$(1),libxslt)
951 $(call gb_LinkTarget_set_include,$(1),\
952 $$(INCLUDE) \
953 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
956 ifeq ($(COM),MSC)
957 $(call gb_LinkTarget_add_libs,$(1),\
958 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
960 else
961 $(call gb_LinkTarget_add_libs,$(1),\
962 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
964 endif
966 endef
968 define gb_LinkTarget__use_libexslt
969 $(call gb_LinkTarget_use_package,$(1),libxslt)
970 $(call gb_LinkTarget_set_include,$(1),\
971 $$(INCLUDE) \
972 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
975 ifeq ($(COM),MSC)
976 $(call gb_LinkTarget_add_libs,$(1),\
977 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
979 else
980 $(call gb_LinkTarget_add_libs,$(1),\
981 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
983 endif
985 endef
987 endif # SYSTEM_LIBXSLT
990 ifneq ($(SYSTEM_XMLSEC),)
992 define gb_LinkTarget__use_xmlsec
993 $(call gb_LinkTarget_add_defs,$(1),\
994 -DSYSTEM_XMLSEC \
996 $(call gb_LinkTarget_set_include,$(1),\
997 $$(INCLUDE) \
998 $(XMLSEC_CFLAGS) \
1000 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1002 endef
1004 gb_ExternalProject__use_xmlsec:=
1006 else # !SYSTEM_XMLSEC
1008 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1009 xmlsec \
1012 define gb_LinkTarget__use_xmlsec
1014 endef
1016 endif # SYSTEM_XMLSEC
1018 ifneq ($(SYSTEM_LIBLANGTAG),)
1020 define gb_LinkTarget__use_liblangtag
1021 $(call gb_LinkTarget_set_include,$(1),\
1022 $$(INCLUDE) \
1023 $(LIBLANGTAG_CFLAGS) \
1026 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1028 endef
1030 gb_ExternalProject__use_liblangtag :=
1032 else # !SYSTEM_LIBLANGTAG
1034 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1035 liblangtag_data \
1038 ifeq ($(COM),MSC)
1040 define gb_LinkTarget__use_liblangtag
1041 $(call gb_LinkTarget_set_include,$(1),\
1042 $(LIBLANGTAG_CFLAGS) \
1043 $$(INCLUDE) \
1045 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1046 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1048 endef
1050 else
1052 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1053 liblangtag \
1056 define gb_LinkTarget__use_liblangtag
1057 $(call gb_LinkTarget_set_include,$(1),\
1058 $(LIBLANGTAG_CFLAGS) \
1059 $$(INCLUDE) \
1061 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1062 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1064 endef
1066 endif # MSC
1068 define gb_ExternalProject__use_liblangtag
1069 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1071 endef
1073 endif # SYSTEM_LIBLANGTAG
1076 gb_ExternalProject__use_apr :=
1078 ifeq ($(WITH_WEBDAV),serf)
1080 define gb_LinkTarget__use_apr
1081 $(call gb_LinkTarget_set_include,$(1),\
1082 $$(INCLUDE) \
1083 $(APR_CFLAGS) \
1085 $(call gb_LinkTarget_add_libs,$(1),\
1086 $(APR_LIBS) \
1087 $(if $(filter $(OS),LINUX),-lpthread) \
1088 $(if $(filter $(OS),MACOSX),-liconv) \
1091 ifeq ($(SYSTEM_APR),)
1092 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1093 mswsock \
1094 rpcrt4 \
1095 shell32 \
1097 $(call gb_LinkTarget_add_defs,$(1),\
1098 -DAPR_DECLARE_STATIC \
1099 -DAPU_DECLARE_STATIC \
1101 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1102 endif
1104 endef
1106 define gb_ExternalProject__use_apr
1107 ifeq ($(SYSTEM_APR),)
1108 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1109 endif
1111 endef
1113 define gb_LinkTarget__use_serf
1114 $(call gb_LinkTarget_set_include,$(1),\
1115 $(SERF_CFLAGS) \
1116 $$(INCLUDE) \
1118 $(call gb_LinkTarget_add_libs,$(1),\
1119 $(SERF_LIBS) \
1122 ifeq ($(SYSTEM_SERF),)
1123 $(call gb_LinkTarget_use_external_project,$(1),serf)
1124 endif
1126 endef
1128 else ifeq ($(WITH_WEBDAV),neon)
1130 ifneq ($(SYSTEM_NEON),)
1132 define gb_LinkTarget__use_neon
1133 $(call gb_LinkTarget_add_defs,$(1),\
1134 -DNEON_VERSION=0x$(NEON_VERSION) \
1135 -DSYSTEM_NEON \
1137 $(call gb_LinkTarget_set_include,$(1),\
1138 $$(INCLUDE) \
1139 $(NEON_CFLAGS) \
1142 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1144 endef
1146 else # !SYSTEM_NEON
1148 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1149 neon \
1152 define gb_LinkTarget__use_neon
1153 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1154 $(call gb_LinkTarget_set_include,$(1),\
1155 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1156 $$(INCLUDE) \
1158 $(call gb_LinkTarget_use_libraries,$(1),\
1159 neon \
1162 endef
1164 endif # SYSTEM_NEON
1166 endif # WITH_WEBDAV
1168 ifneq ($(SYSTEM_REDLAND),)
1170 define gb_LinkTarget__use_librdf
1171 $(call gb_LinkTarget_add_defs,$(1),\
1172 -DSYSTEM_REDLAND \
1174 $(call gb_LinkTarget_set_include,$(1),\
1175 $$(INCLUDE) \
1176 $(REDLAND_CFLAGS) \
1178 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1180 endef
1182 gb_LinkTarget__use_redland_headers:=
1184 gb_LinkTarget__use_raptor_headers:=
1186 gb_LinkTarget__use_rasqal_headers:=
1188 else # !SYSTEM_REDLAND
1190 define gb_LinkTarget__use_redland_headers
1191 $(call gb_LinkTarget_set_include,$(1),\
1192 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1193 $$(INCLUDE) \
1196 endef
1198 define gb_LinkTarget__use_raptor_headers
1199 $(call gb_LinkTarget_set_include,$(1),\
1200 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1201 $$(INCLUDE) \
1204 endef
1206 define gb_LinkTarget__use_rasqal_headers
1207 $(call gb_LinkTarget_set_include,$(1),\
1208 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1209 $$(INCLUDE) \
1212 endef
1214 ifneq ($(OS),ANDROID)
1216 ifeq ($(COM),MSC)
1217 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1218 raptor2 \
1219 rasqal \
1220 rdf \
1222 else
1223 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1224 raptor \
1225 rasqal \
1226 redland \
1228 endif
1230 define gb_LinkTarget__use_librdf
1231 ifeq ($(COM),MSC)
1232 $(call gb_LinkTarget_use_libraries,$(1),\
1233 raptor2 \
1234 rdf \
1236 else
1237 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1239 $(call gb_LinkTarget_add_libs,$(1),\
1240 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1241 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1242 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1244 endif
1246 endef
1248 else # ANDROID
1250 define gb_LinkTarget__use_librdf
1251 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1253 endef
1255 endif # ANDROID
1257 endif # SYSTEM_REDLAND
1260 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1262 ifneq ($(SYSTEM_CAIRO),)
1264 define gb_LinkTarget__use_cairo
1265 $(call gb_LinkTarget_set_include,$(1),\
1266 $$(INCLUDE) \
1267 $(CAIRO_CFLAGS) \
1269 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1270 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1272 endef
1274 else # !SYSTEM_CAIRO
1276 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1277 cairo \
1278 $(if $(filter $(OS),WNT),,pixman) \
1281 define gb_LinkTarget__use_cairo
1282 $(call gb_LinkTarget_use_package,$(1),cairo)
1283 $(call gb_LinkTarget_use_package,$(1),pixman)
1284 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1285 $(call gb_LinkTarget_set_include,$(1),\
1286 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1287 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1288 $$(INCLUDE) \
1290 $(call gb_LinkTarget_add_libs,$(1),\
1291 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1292 $(if $(filter-out MACOSX WNT,$(OS)), \
1293 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1297 endef
1299 endif # SYSTEM_CAIRO
1301 else ifeq ($(OS),ANDROID)
1303 define gb_LinkTarget__use_cairo
1304 $(call gb_LinkTarget_use_package,$(1),cairo)
1305 $(call gb_LinkTarget_use_package,$(1),pixman)
1306 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1307 $(call gb_LinkTarget_set_include,$(1),\
1308 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1309 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1310 $$(INCLUDE) \
1312 $(call gb_LinkTarget_add_libs,$(1),\
1313 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1314 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1317 endef
1319 endif # CAIRO
1321 ifneq ($(SYSTEM_FREETYPE),)
1323 define gb_LinkTarget__use_freetype_headers
1324 $(call gb_LinkTarget_set_include,$(1),\
1325 $$(INCLUDE) \
1326 $(FREETYPE_CFLAGS) \
1329 endef
1331 gb_ExternalProject__use_freetype :=
1333 else
1335 define gb_LinkTarget__use_freetype_headers
1336 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1337 $(call gb_LinkTarget_set_include,$(1),\
1338 $(FREETYPE_CFLAGS) \
1339 $$(INCLUDE) \
1342 endef
1344 define gb_ExternalProject__use_freetype
1345 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1347 endef
1349 endif # SYSTEM_FREETYPE
1351 define gb_LinkTarget__use_freetype
1352 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1353 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1355 endef
1357 ifneq ($(SYSTEM_FONTCONFIG),)
1359 define gb_LinkTarget__use_fontconfig
1360 $(call gb_LinkTarget_set_include,$(1),\
1361 $$(INCLUDE) \
1362 $(FONTCONFIG_CFLAGS) \
1365 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1367 endef
1369 else
1371 define gb_LinkTarget__use_fontconfig
1372 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1373 $(call gb_LinkTarget_set_include,$(1),\
1374 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1375 $$(INCLUDE) \
1378 $(call gb_LinkTarget_add_libs,$(1),\
1379 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1382 endef
1384 endif # SYSTEM_FONTCONFIG
1386 ifneq ($(SYSTEM_GRAPHITE),)
1388 define gb_LinkTarget__use_graphite
1389 $(call gb_LinkTarget_set_include,$(1),\
1390 $$(INCLUDE) \
1391 $(GRAPHITE_CFLAGS) \
1393 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1395 endef
1397 gb_ExternalProject__use_graphite:=
1399 else # !SYSTEM_GRAPHITE
1401 define gb_LinkTarget__use_graphite
1402 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1403 $(call gb_LinkTarget_set_include,$(1),\
1404 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1405 $$(INCLUDE) \
1407 $(call gb_LinkTarget_use_static_libraries,$(1),\
1408 graphite \
1411 endef
1413 define gb_ExternalProject__use_graphite
1414 $(call gb_ExternalProject_use_static_libraries,$(1),\
1415 graphite \
1418 endef
1419 endif # SYSTEM_GRAPHITE
1421 ifneq ($(SYSTEM_ICU),)
1423 gb_LinkTarget__use_icu_headers:=
1424 gb_ExternalProject__use_icu:=
1426 define gb_LinkTarget__use_icudata
1427 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1429 endef
1430 define gb_LinkTarget__use_icui18n
1431 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1433 endef
1434 define gb_LinkTarget__use_icuuc
1435 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1437 endef
1439 else # !SYSTEM_ICU
1441 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1442 icu_ure \
1445 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1446 icu \
1449 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1450 gb_ICU_suffix:=lo
1451 else
1452 gb_ICU_suffix:=
1453 endif
1455 define gb_LinkTarget__use_icu_headers
1456 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1457 $(call gb_LinkTarget_set_include,$(1),\
1458 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1459 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1460 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1461 $$(INCLUDE) \
1464 endef
1466 define gb_ExternalProject__use_icu
1467 $(call gb_ExternalProject_use_package,$(1),icu)
1469 endef
1471 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1472 define gb_LinkTarget__use_icudata
1473 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1475 ifeq ($(OS),WNT)
1476 $(call gb_LinkTarget_add_libs,$(1),\
1477 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1479 else
1480 $(call gb_LinkTarget_add_libs,$(1),\
1481 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1483 endif
1485 endef
1487 define gb_LinkTarget__use_icui18n
1488 $(call gb_LinkTarget_use_package,$(1),icu)
1490 ifeq ($(OS),WNT)
1491 $(call gb_LinkTarget_add_libs,$(1),\
1492 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1494 else
1495 $(call gb_LinkTarget_add_libs,$(1),\
1496 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1498 endif
1500 endef
1502 define gb_LinkTarget__use_icuuc
1503 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1505 ifeq ($(OS),WNT)
1506 $(call gb_LinkTarget_add_libs,$(1),\
1507 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1509 else
1510 $(call gb_LinkTarget_add_libs,$(1),\
1511 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1513 endif
1515 endef
1517 endif # SYSTEM_ICU
1519 ifneq ($(SYSTEM_HARFBUZZ),)
1521 define gb_LinkTarget__use_harfbuzz
1522 $(call gb_LinkTarget_set_include,$(1),\
1523 $$(INCLUDE) \
1524 $(HARFBUZZ_CFLAGS) \
1526 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1528 endef
1530 gb_ExternalProject__use_harfbuzz :=
1532 else # SYSTEM_HARFBUZZ != TRUE
1534 define gb_LinkTarget__use_harfbuzz
1535 $(call gb_LinkTarget_set_include,$(1),\
1536 $(HARFBUZZ_CFLAGS) \
1537 $$(INCLUDE) \
1539 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1540 $(call gb_LinkTarget_use_external,$(1),icuuc)
1541 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1543 endef
1545 define gb_ExternalProject__use_harfbuzz
1546 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1548 endef
1550 endif # SYSTEM_HARFBUZZ
1552 ifeq ($(DISABLE_OPENSSL),TRUE)
1554 gb_ExternalProject__use_openssl:=
1555 gb_LinkTarget__use_openssl_headers:=
1556 gb_LinkTarget__use_openssl:=
1558 else # !DISABLE_OPENSSL
1560 ifneq ($(SYSTEM_OPENSSL),)
1562 gb_LinkTarget__use_openssl_headers:=
1563 gb_ExternalProject__use_openssl:=
1565 define gb_LinkTarget__use_openssl
1566 $(call gb_LinkTarget_set_include,$(1),\
1567 $$(INCLUDE) \
1568 $(OPENSSL_CFLAGS) \
1570 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1572 endef
1574 else # !SYSTEM_OPENSSL
1576 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1577 openssl \
1580 define gb_ExternalProject__use_openssl
1581 $(call gb_ExternalProject_use_package,$(1),openssl)
1583 endef
1585 define gb_LinkTarget__use_openssl_headers
1586 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1587 $(call gb_LinkTarget_set_include,$(1),\
1588 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1589 $$(INCLUDE) \
1592 endef
1594 define gb_LinkTarget__use_openssl
1595 $(call gb_LinkTarget_use_package,$(1),openssl)
1596 ifeq ($(OS),WNT)
1597 $(call gb_LinkTarget_add_libs,$(1),\
1598 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1599 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1601 else
1602 $(call gb_LinkTarget_add_libs,$(1),\
1603 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1604 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1606 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1607 ifeq ($(OS),SOLARIS)
1608 $(call gb_LinkTarget_add_libs,$(1),\
1609 -lnsl \
1610 -lsocket \
1612 endif
1613 endif
1615 endef
1617 endif # SYSTEM_OPENSSL
1618 endif # DISABLE_OPENSSL
1621 ifeq ($(DISABLE_OPENSSL),TRUE)
1623 define gb_LinkTarget__use_gnutls
1624 $(call gb_LinkTarget_set_include,$(1),\
1625 $$(INCLUDE) \
1626 $(GNUTLS_CFLAGS) \
1629 $(call gb_LinkTarget_add_defs,$(1),\
1630 -DDISABLE_OPENSSL \
1633 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1635 endef
1637 define gb_LinkTarget__use_libgcrypt
1638 $(call gb_LinkTarget_set_include,$(1),\
1639 $$(INCLUDE) \
1640 $(LIBGCRYPT_CFLAGS) \
1643 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1645 endef
1647 else # !DISABLE_OPENSSL
1649 gb_LinkTarget__use_gnutls:=
1650 gb_LinkTarget__use_libgcrypt:=
1652 endif # DISABLE_OPENSSL
1655 ifneq ($(SYSTEM_CDR),)
1657 define gb_LinkTarget__use_cdr
1658 $(call gb_LinkTarget_set_include,$(1),\
1659 $$(INCLUDE) \
1660 $(CDR_CFLAGS) \
1662 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1664 endef
1666 else # !SYSTEM_CDR
1668 define gb_LinkTarget__use_cdr
1669 $(call gb_LinkTarget_set_include,$(1),\
1670 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1671 $$(INCLUDE) \
1673 $(call gb_LinkTarget_add_libs,$(1),\
1674 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1676 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1677 endef
1679 endif # SYSTEM_CDR
1682 ifneq ($(SYSTEM_EBOOK),)
1684 define gb_LinkTarget__use_ebook
1685 $(call gb_LinkTarget_set_include,$(1),\
1686 $$(INCLUDE) \
1687 $(EBOOK_CFLAGS) \
1689 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1691 endef
1693 gb_ExternalProject__use_ebook :=
1695 else # !SYSTEM_EBOOK
1697 define gb_LinkTarget__use_ebook
1698 $(call gb_LinkTarget_set_include,$(1),\
1699 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1700 $$(INCLUDE) \
1702 $(call gb_LinkTarget_add_libs,$(1),\
1703 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1705 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1707 endef
1709 define gb_ExternalProject__use_ebook
1710 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1712 endef
1714 endif # SYSTEM_EBOOK
1717 ifneq ($(SYSTEM_ETONYEK),)
1719 define gb_LinkTarget__use_etonyek
1720 $(call gb_LinkTarget_set_include,$(1),\
1721 $$(INCLUDE) \
1722 $(ETONYEK_CFLAGS) \
1724 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1726 endef
1728 gb_ExternalProject__use_etonyek :=
1730 else # !SYSTEM_ETONYEK
1732 ifeq ($(COM),MSC)
1734 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1735 etonyek \
1738 define gb_LinkTarget__use_etonyek
1739 $(call gb_LinkTarget_set_include,$(1),\
1740 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1741 $$(INCLUDE) \
1743 $(call gb_LinkTarget_use_libraries,$(1),\
1744 etonyek \
1747 endef
1749 else # !MSC
1751 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1752 libetonyek \
1755 define gb_LinkTarget__use_etonyek
1756 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1758 $(call gb_LinkTarget_set_include,$(1),\
1759 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1760 -DLIBETONYEK_VISIBILITY \
1761 $$(INCLUDE) \
1763 $(call gb_LinkTarget_add_libs,$(1),\
1764 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1766 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1768 endef
1770 define gb_ExternalProject__use_etonyek
1771 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1773 endef
1775 endif
1777 endif # SYSTEM_ETONYEK
1780 ifneq ($(SYSTEM_FREEHAND),)
1782 define gb_LinkTarget__use_freehand
1783 $(call gb_LinkTarget_set_include,$(1),\
1784 $$(INCLUDE) \
1785 $(FREEHAND_CFLAGS) \
1787 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1789 endef
1791 gb_ExternalProject__use_freehand :=
1793 else # !SYSTEM_FREEHAND
1795 define gb_LinkTarget__use_freehand
1796 $(call gb_LinkTarget_set_include,$(1),\
1797 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1798 $$(INCLUDE) \
1800 $(call gb_LinkTarget_add_libs,$(1),\
1801 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1803 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1805 endef
1807 define gb_ExternalProject__use_freehand
1808 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1810 endef
1812 endif # SYSTEM_FREEHAND
1815 ifneq ($(SYSTEM_ODFGEN),)
1817 define gb_LinkTarget__use_odfgen
1818 $(call gb_LinkTarget_set_include,$(1),\
1819 $$(INCLUDE) \
1820 $(ODFGEN_CFLAGS) \
1822 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1824 endef
1826 else # !SYSTEM_ODFGEN
1828 ifeq ($(COM),MSC)
1830 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1831 odfgen \
1834 define gb_LinkTarget__use_odfgen
1835 $(call gb_LinkTarget_set_include,$(1),\
1836 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1837 $$(INCLUDE) \
1839 $(call gb_LinkTarget_use_libraries,$(1),\
1840 odfgen \
1843 endef
1845 else # !MSC
1847 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1848 libodfgen \
1851 define gb_LinkTarget__use_odfgen
1852 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1854 $(call gb_LinkTarget_set_include,$(1),\
1855 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1856 -DLIBODFGEN_VISIBILITY \
1857 $$(INCLUDE) \
1859 $(call gb_LinkTarget_add_libs,$(1),\
1860 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1863 endef
1865 endif
1867 endif # SYSTEM_ODFGEN
1869 ifneq ($(SYSTEM_EPUBGEN),)
1871 define gb_LinkTarget__use_epubgen
1872 $(call gb_LinkTarget_set_include,$(1),\
1873 $$(INCLUDE) \
1874 $(EPUBGEN_CFLAGS) \
1876 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1878 endef
1879 gb_ExternalProject__use_epubgen :=
1881 else # !SYSTEM_EPUBGEN
1883 define gb_LinkTarget__use_epubgen
1884 $(call gb_LinkTarget_set_include,$(1),\
1885 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1886 $$(INCLUDE) \
1888 $(call gb_LinkTarget_add_libs,$(1),\
1889 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1891 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1893 endef
1894 define gb_ExternalProject__use_epubgen
1895 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1897 endef
1899 endif # SYSTEM_EPUBGEN
1901 ifneq ($(SYSTEM_REVENGE),)
1903 define gb_LinkTarget__use_revenge
1904 $(call gb_LinkTarget_set_include,$(1),\
1905 $$(INCLUDE) \
1906 $(REVENGE_CFLAGS) \
1908 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1910 endef
1912 gb_ExternalProject__use_revenge :=
1914 else # !SYSTEM_REVENGE
1916 ifeq ($(COM),MSC)
1918 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1919 revenge \
1922 define gb_LinkTarget__use_revenge
1923 $(call gb_LinkTarget_set_include,$(1),\
1924 $(REVENGE_CFLAGS) \
1925 $$(INCLUDE) \
1927 $(call gb_LinkTarget_use_libraries,$(1),\
1928 revenge \
1931 endef
1933 define gb_ExternalProject__use_revenge
1934 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1936 endef
1938 else # !MSC
1940 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1941 librevenge \
1944 define gb_LinkTarget__use_revenge
1945 $(call gb_LinkTarget_use_package,$(1),librevenge)
1947 $(call gb_LinkTarget_set_include,$(1),\
1948 $(REVENGE_CFLAGS) \
1949 -DLIBREVENGE_VISIBILITY \
1950 $$(INCLUDE) \
1952 $(call gb_LinkTarget_add_libs,$(1),\
1953 $(REVENGE_LIBS) \
1955 endef
1957 define gb_ExternalProject__use_revenge
1958 $(call gb_ExternalProject_use_package,$(1),librevenge)
1960 endef
1962 endif # MSC
1964 endif # SYSTEM_REVENGE
1967 ifneq ($(SYSTEM_ABW),)
1969 define gb_LinkTarget__use_abw
1970 $(call gb_LinkTarget_set_include,$(1),\
1971 $$(INCLUDE) \
1972 $(ABW_CFLAGS) \
1974 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1976 endef
1977 gb_ExternalProject__use_abw :=
1979 else # !SYSTEM_ABW
1981 define gb_LinkTarget__use_abw
1982 $(call gb_LinkTarget_set_include,$(1),\
1983 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1984 $$(INCLUDE) \
1986 $(call gb_LinkTarget_add_libs,$(1),\
1987 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1989 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1991 endef
1992 define gb_ExternalProject__use_abw
1993 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1995 endef
1997 endif # SYSTEM_ABW
2000 ifneq ($(SYSTEM_MSPUB),)
2002 define gb_LinkTarget__use_mspub
2003 $(call gb_LinkTarget_set_include,$(1),\
2004 $$(INCLUDE) \
2005 $(MSPUB_CFLAGS) \
2007 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2009 endef
2011 else # !SYSTEM_MSPUB
2013 define gb_LinkTarget__use_mspub
2014 $(call gb_LinkTarget_set_include,$(1),\
2015 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2016 $$(INCLUDE) \
2018 $(call gb_LinkTarget_add_libs,$(1),\
2019 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2021 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2023 endef
2025 endif # SYSTEM_MSPUB
2028 ifneq ($(SYSTEM_PAGEMAKER),)
2030 define gb_LinkTarget__use_pagemaker
2031 $(call gb_LinkTarget_set_include,$(1),\
2032 $$(INCLUDE) \
2033 $(PAGEMAKER_CFLAGS) \
2035 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2037 endef
2038 gb_ExternalProject__use_pagemaker :=
2040 else # !SYSTEM_PAGEMAKER
2042 define gb_LinkTarget__use_pagemaker
2043 $(call gb_LinkTarget_set_include,$(1),\
2044 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2045 $$(INCLUDE) \
2047 $(call gb_LinkTarget_add_libs,$(1),\
2048 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2050 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2052 endef
2053 define gb_ExternalProject__use_pagemaker
2054 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2056 endef
2058 endif # SYSTEM_PAGEMAKER
2061 ifneq ($(SYSTEM_QXP),)
2063 define gb_LinkTarget__use_qxp
2064 $(call gb_LinkTarget_set_include,$(1),\
2065 $$(INCLUDE) \
2066 $(QXP_CFLAGS) \
2068 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2070 endef
2071 gb_ExternalProject__use_qxp :=
2073 else # !SYSTEM_QXP
2075 define gb_LinkTarget__use_qxp
2076 $(call gb_LinkTarget_set_include,$(1),\
2077 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2078 $$(INCLUDE) \
2080 $(call gb_LinkTarget_add_libs,$(1),\
2081 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2083 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2085 endef
2086 define gb_ExternalProject__use_qxp
2087 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2089 endef
2091 endif # SYSTEM_QXP
2094 ifneq ($(SYSTEM_ZMF),)
2096 define gb_LinkTarget__use_zmf
2097 $(call gb_LinkTarget_set_include,$(1),\
2098 $$(INCLUDE) \
2099 $(ZMF_CFLAGS) \
2101 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2103 endef
2104 gb_ExternalProject__use_zmf :=
2106 else # !SYSTEM_ZMF
2108 define gb_LinkTarget__use_zmf
2109 $(call gb_LinkTarget_set_include,$(1),\
2110 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2111 $$(INCLUDE) \
2113 $(call gb_LinkTarget_add_libs,$(1),\
2114 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2116 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2118 endef
2119 define gb_ExternalProject__use_zmf
2120 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2122 endef
2124 endif # SYSTEM_ZMF
2127 ifneq ($(SYSTEM_VISIO),)
2129 define gb_LinkTarget__use_visio
2130 $(call gb_LinkTarget_set_include,$(1),\
2131 $$(INCLUDE) \
2132 $(VISIO_CFLAGS) \
2134 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2136 endef
2138 else # !SYSTEM_VISIO
2140 define gb_LinkTarget__use_visio
2141 $(call gb_LinkTarget_set_include,$(1),\
2142 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2143 $$(INCLUDE) \
2145 $(call gb_LinkTarget_add_libs,$(1),\
2146 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2148 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2150 endef
2152 endif # SYSTEM_VISIO
2155 ifneq ($(SYSTEM_WPD),)
2157 define gb_LinkTarget__use_wpd
2158 $(call gb_LinkTarget_set_include,$(1),\
2159 $$(INCLUDE) \
2160 $(WPD_CFLAGS) \
2162 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2164 endef
2165 gb_ExternalProject__use_wpd :=
2167 else # !SYSTEM_WPD
2169 ifeq ($(COM),MSC)
2171 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2172 wpd \
2175 define gb_LinkTarget__use_wpd
2176 $(call gb_LinkTarget_set_include,$(1),\
2177 $(WPD_CFLAGS) \
2178 $$(INCLUDE) \
2180 $(call gb_LinkTarget_use_libraries,$(1),\
2181 wpd \
2184 endef
2186 define gb_ExternalProject__use_wpd
2187 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2189 endef
2191 else # !MSC
2193 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2194 libwpd \
2197 define gb_LinkTarget__use_wpd
2198 $(call gb_LinkTarget_use_package,$(1),libwpd)
2200 $(call gb_LinkTarget_set_include,$(1),\
2201 $(WPD_CFLAGS) \
2202 $$(INCLUDE) \
2204 $(call gb_LinkTarget_add_libs,$(1),\
2205 $(WPD_LIBS) \
2208 endef
2210 define gb_ExternalProject__use_wpd
2211 $(call gb_ExternalProject_use_package,$(1),libwpd)
2213 endef
2215 endif # MSC
2217 endif # SYSTEM_WPD
2220 ifneq ($(SYSTEM_WPG),)
2222 define gb_LinkTarget__use_wpg
2223 $(call gb_LinkTarget_set_include,$(1),\
2224 $$(INCLUDE) \
2225 $(WPG_CFLAGS) \
2227 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2229 endef
2230 gb_ExternalProject__use_wpg :=
2232 else # !SYSTEM_WPG
2234 ifeq ($(COM),MSC)
2236 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2237 wpg \
2240 define gb_LinkTarget__use_wpg
2241 $(call gb_LinkTarget_set_include,$(1),\
2242 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2243 $$(INCLUDE) \
2245 $(call gb_LinkTarget_use_libraries,$(1),\
2246 wpg \
2249 endef
2251 else # !MSC
2253 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2254 libwpg \
2257 define gb_LinkTarget__use_wpg
2258 $(call gb_LinkTarget_use_package,$(1),libwpg)
2260 $(call gb_LinkTarget_set_include,$(1),\
2261 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2262 $$(INCLUDE) \
2264 $(call gb_LinkTarget_add_libs,$(1),\
2265 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2268 endef
2270 endif # MSC
2272 endif # SYSTEM_WPG
2275 ifneq ($(SYSTEM_WPS),)
2277 define gb_LinkTarget__use_wps
2278 $(call gb_LinkTarget_set_include,$(1),\
2279 $$(INCLUDE) \
2280 $(WPS_CFLAGS) \
2282 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2284 endef
2285 gb_ExternalProject__use_wps :=
2287 else # !SYSTEM_WPS
2289 ifeq ($(COM),MSC)
2291 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2292 wps \
2295 define gb_LinkTarget__use_wps
2296 $(call gb_LinkTarget_set_include,$(1),\
2297 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2298 $$(INCLUDE) \
2301 $(call gb_LinkTarget_use_libraries,$(1),\
2302 wps \
2305 endef
2307 else # !MSC
2309 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2310 libwps \
2313 define gb_LinkTarget__use_wps
2314 $(call gb_LinkTarget_use_package,$(1),libwps)
2316 $(call gb_LinkTarget_set_include,$(1),\
2317 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2318 $$(INCLUDE) \
2320 $(call gb_LinkTarget_add_libs,$(1),\
2321 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2324 endef
2326 endif # MSC
2328 endif # SYSTEM_WPS
2331 ifneq ($(SYSTEM_MWAW),)
2333 define gb_LinkTarget__use_mwaw
2334 $(call gb_LinkTarget_set_include,$(1),\
2335 $$(INCLUDE) \
2336 $(MWAW_CFLAGS) \
2338 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2340 endef
2342 else # !SYSTEM_MWAW
2344 ifeq ($(COM),MSC)
2346 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2347 mwaw \
2350 define gb_LinkTarget__use_mwaw
2351 $(call gb_LinkTarget_set_include,$(1),\
2352 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2353 $$(INCLUDE) \
2356 $(call gb_LinkTarget_use_libraries,$(1),\
2357 mwaw \
2360 endef
2362 else # !MSC
2364 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2365 libmwaw \
2368 define gb_LinkTarget__use_mwaw
2369 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2371 $(call gb_LinkTarget_set_include,$(1),\
2372 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2373 $$(INCLUDE) \
2375 $(call gb_LinkTarget_add_libs,$(1),\
2376 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2379 endef
2381 endif # MSC
2383 endif # SYSTEM_MWAW
2385 ifneq ($(SYSTEM_STAROFFICE),)
2387 define gb_LinkTarget__use_staroffice
2388 $(call gb_LinkTarget_set_include,$(1),\
2389 $$(INCLUDE) \
2390 $(STAROFFICE_CFLAGS) \
2392 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2394 endef
2396 else # !SYSTEM_STAROFFICE
2398 ifeq ($(COM),MSC)
2400 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2401 staroffice \
2404 define gb_LinkTarget__use_staroffice
2405 $(call gb_LinkTarget_set_include,$(1),\
2406 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2407 $$(INCLUDE) \
2410 $(call gb_LinkTarget_use_libraries,$(1),\
2411 staroffice \
2414 endef
2416 else # !MSC
2418 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2419 libstaroffice \
2422 define gb_LinkTarget__use_staroffice
2423 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2425 $(call gb_LinkTarget_set_include,$(1),\
2426 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2427 $$(INCLUDE) \
2429 $(call gb_LinkTarget_add_libs,$(1),\
2430 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2433 endef
2435 endif # MSC
2437 endif # SYSTEM_STAROFFICE
2440 ifneq ($(SYSTEM_LCMS2),)
2442 define gb_LinkTarget__use_lcms2
2443 $(call gb_LinkTarget_set_include,$(1),\
2444 $$(INCLUDE) \
2445 $(LCMS2_CFLAGS) \
2447 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2449 endef
2451 gb_ExternalProject__use_lcms2 :=
2453 else # !SYSTEM_LCMS2
2455 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2456 lcms2 \
2459 define gb_ExternalProject__use_lcms2
2460 $(call gb_ExternalProject_use_package,$(1),lcms2)
2462 endef
2464 ifeq ($(OS),ANDROID)
2466 define gb_LinkTarget__use_lcms2
2467 $(call gb_LinkTarget_use_package,$(1),lcms2)
2468 $(call gb_LinkTarget_set_include,$(1),\
2469 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2470 $$(INCLUDE) \
2473 endef
2475 else
2477 define gb_LinkTarget__use_lcms2
2478 $(call gb_LinkTarget_use_package,$(1),lcms2)
2479 $(call gb_LinkTarget_set_include,$(1),\
2480 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2481 $$(INCLUDE) \
2483 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2485 endef
2487 endif # ANDROID
2488 endif # SYSTEM_LCMS2
2490 ifneq ($(ENABLE_LPSOLVE),)
2492 ifneq ($(SYSTEM_LPSOLVE),)
2494 define gb_LinkTarget__use_lpsolve
2495 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2496 $(call gb_LinkTarget_add_defs,$(1),\
2497 -DSYSTEM_LPSOLVE \
2500 endef
2502 else # !SYSTEM_LPSOLVE
2504 define gb_LinkTarget__use_lpsolve
2505 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2506 ifeq ($(COM),MSC)
2507 $(call gb_LinkTarget_add_libs,$(1),\
2508 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2510 else
2511 $(call gb_LinkTarget_add_libs,$(1),\
2512 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2514 endif
2515 $(call gb_LinkTarget_set_include,$(1),\
2516 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2517 $$(INCLUDE) \
2520 endef
2522 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2523 lpsolve \
2526 endif # SYSTEM_LPSOLVE
2528 else
2530 gb_LinkTarget__use_lpsolve :=
2532 endif # ENABLE_LPSOLVE
2534 ifneq ($(ENABLE_COINMP),)
2536 ifneq ($(SYSTEM_COINMP),TRUE)
2538 define gb_LinkTarget__use_coinmp
2539 $(call gb_LinkTarget_use_package,$(1),coinmp)
2540 ifeq ($(COM),MSC)
2541 $(call gb_LinkTarget_add_libs,$(1),\
2542 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2544 else
2545 $(call gb_LinkTarget_add_libs,$(1),\
2546 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2547 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2548 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2549 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2550 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2551 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2552 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2554 endif
2555 $(call gb_LinkTarget_set_include,$(1),\
2556 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2557 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2558 $$(INCLUDE) \
2561 endef
2563 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2564 coinmp \
2567 else # SYSTEM_COINMP
2569 define gb_LinkTarget__use_coinmp
2570 $(call gb_LinkTarget_set_include,$(1),\
2571 $$(INCLUDE) \
2572 $(COINMP_CFLAGS) \
2574 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2576 endef
2578 endif
2580 else
2582 gb_LinkTarget__use_coinmp :=
2584 endif # ENABLE_COINMP
2586 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2588 define gb_LinkTarget__use_mDNSResponder
2589 $(call gb_LinkTarget_set_include,$(1),\
2590 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2591 $$(INCLUDE) \
2593 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2594 endef
2596 endif # MDNSRESPONDER
2598 ifeq ($(ENABLE_GIO),TRUE)
2600 define gb_LinkTarget__use_gio
2601 $(call gb_LinkTarget_set_include,$(1),\
2602 $$(INCLUDE) \
2603 $(GIO_CFLAGS) \
2606 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2608 endef
2610 else # ENABLE_GIO
2612 define gb_LinkTarget__use_gio
2614 endef
2616 endif # ENABLE_GIO
2618 ifeq ($(ENABLE_AVAHI),TRUE)
2620 define gb_LinkTarget__use_avahi
2621 $(call gb_LinkTarget_set_include,$(1),\
2622 $$(INCLUDE) \
2623 $(AVAHI_CFLAGS) \
2626 $(call gb_LinkTarget_add_defs,$(1),\
2627 -DENABLE_AVAHI \
2630 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2632 endef
2634 else # ENABLE_AVAHI
2636 gb_LinkTarget__use_avahi :=
2638 endif # ENABLE_AVAHI
2640 ifeq ($(ENABLE_CUPS),TRUE)
2642 define gb_LinkTarget__use_cups
2643 $(call gb_LinkTarget_add_defs,$(1),\
2644 -DENABLE_CUPS \
2647 $(call gb_LinkTarget_add_libs,$(1),\
2648 -lcups \
2651 endef
2653 else # ENABLE_CUPS
2655 define gb_LinkTarget__use_cups
2657 endef
2659 endif # ENABLE_CUPS
2661 ifeq ($(ENABLE_DBUS),TRUE)
2663 define gb_LinkTarget__use_dbus
2664 $(call gb_LinkTarget_set_include,$(1),\
2665 $$(INCLUDE) \
2666 $(DBUS_CFLAGS) \
2669 $(call gb_LinkTarget_add_libs,$(1),\
2670 $(DBUS_LIBS) \
2673 endef
2675 else # ENABLE_DBUS
2677 define gb_LinkTarget__use_dbus
2679 endef
2681 endif # ENABLE_DBUS
2684 ifneq ($(SYSTEM_LIBPNG),)
2686 define gb_LinkTarget__use_libpng
2687 $(call gb_LinkTarget_set_include,$(1),\
2688 $$(INCLUDE) \
2689 $(LIBPNG_CFLAGS) \
2692 $(call gb_LinkTarget_add_libs,$(1),\
2693 $(LIBPNG_LIBS) \
2696 endef
2698 gb_ExternalProject__use_libpng :=
2700 else # !SYSTEM_LIBPNG
2702 define gb_LinkTarget__use_libpng
2703 $(call gb_LinkTarget_set_include,$(1),\
2704 $(LIBPNG_CFLAGS) \
2705 $$(INCLUDE) \
2707 $(call gb_LinkTarget_use_static_libraries,$(1),\
2708 libpng \
2710 $(call gb_LinkTarget__use_zlib,$(1))
2712 endef
2714 define gb_ExternalProject__use_libpng
2715 $(call gb_ExternalProject_use_static_libraries,$(1),\
2716 libpng \
2719 endef
2721 endif # !SYSTEM_LIBPNG
2724 ifneq ($(SYSTEM_CURL),)
2726 define gb_LinkTarget__use_curl
2727 $(call gb_LinkTarget_add_defs,$(1),\
2728 -DSYSTEM_CURL \
2730 $(call gb_LinkTarget_set_include,$(1),\
2731 $$(INCLUDE) \
2732 $(CURL_CFLAGS) \
2734 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2736 endef
2738 else # !SYSTEM_CURL
2740 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2741 curl \
2744 define gb_LinkTarget__use_curl
2745 $(call gb_LinkTarget_use_package,$(1),curl)
2746 $(call gb_LinkTarget_set_include,$(1),\
2747 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2748 $$(INCLUDE) \
2751 ifeq ($(COM),MSC)
2752 $(call gb_LinkTarget_add_libs,$(1),\
2753 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2755 else
2756 $(call gb_LinkTarget_add_libs,$(1),\
2757 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2759 endif
2761 endef
2763 endif # SYSTEM_CURL
2765 ifeq ($(ENABLE_VALGRIND),TRUE)
2767 define gb_LinkTarget__use_valgrind
2768 $(call gb_LinkTarget_add_defs,$(1),\
2769 -DHAVE_VALGRIND_HEADERS \
2772 $(call gb_LinkTarget_set_include,$(1),\
2773 $$(INCLUDE) \
2774 $(VALGRIND_CFLAGS) \
2777 endef
2779 else # !ENABLE_VALGRIND
2781 define gb_LinkTarget__use_valgrind
2783 endef
2785 endif # ENABLE_VALGRIND
2787 ifeq ($(ENABLE_POPPLER),TRUE)
2789 ifneq ($(SYSTEM_POPPLER),)
2791 define gb_LinkTarget__use_poppler
2792 $(call gb_LinkTarget_set_include,$(1),\
2793 $(POPPLER_CFLAGS) \
2794 $$(INCLUDE) \
2797 $(call gb_LinkTarget_add_libs,$(1),\
2798 $(POPPLER_LIBS) \
2801 endef
2803 else # !SYSTEM_POPPLER
2805 define gb_LinkTarget__use_poppler
2806 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2808 $(call gb_LinkTarget_set_include,$(1),\
2809 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2810 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2811 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2812 $$(INCLUDE) \
2815 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2817 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2819 ifeq ($(OS),MACOSX)
2820 $(call gb_LinkTarget_add_libs,$(1),\
2821 -lobjc \
2823 else ifeq ($(OS),LINUX)
2824 $(call gb_LinkTarget_add_libs,$(1),\
2825 -pthread \
2827 else ifeq ($(OS),WNT)
2828 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2829 advapi32 \
2830 gdi32 \
2832 endif
2834 endef
2836 endif # SYSTEM_POPPLER
2838 endif # ENABLE_POPPLER
2841 ifneq ($(SYSTEM_CLUCENE),)
2843 define gb_LinkTarget__use_clucene
2844 $(call gb_LinkTarget_add_defs,$(1),\
2845 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2848 $(call gb_LinkTarget_set_include,$(1),\
2849 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2850 $$(INCLUDE) \
2853 $(call gb_LinkTarget_add_libs,$(1),\
2854 $(CLUCENE_LIBS) \
2857 endef
2859 else # !SYSTEM_CLUCENE
2861 define gb_LinkTarget__use_clucene
2862 $(call gb_LinkTarget_set_include,$(1),\
2863 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2864 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2865 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2866 $$(INCLUDE) \
2869 $(call gb_LinkTarget_use_libraries,$(1),\
2870 clucene \
2873 endef
2875 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2876 clucene \
2879 endif # SYSTEM_CLUCENE
2881 define gb_LinkTarget__use_gobject
2882 $(call gb_LinkTarget_add_libs,$(1),\
2883 $(GOBJECT_LIBS) \
2886 $(call gb_LinkTarget_set_include,$(1),\
2887 $$(INCLUDE) \
2888 $(GOBJECT_CFLAGS) \
2890 endef
2892 ifneq ($(SYSTEM_HSQLDB),)
2894 define gb_LinkTarget__use_hsqldb
2896 $(call gb_LinkTarget_add_defs,$(1),\
2897 -DSYSTEM_HSQLDB \
2898 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2901 endef
2903 else # !SYSTEM_HSQLDB
2905 define gb_LinkTarget__use_hsqldb
2907 endef
2909 endif # SYSTEM_HSQLDB
2911 ifeq ($(ENABLE_LDAP),TRUE)
2912 ifneq ($(SYSTEM_OPENLDAP),)
2914 define gb_LinkTarget__use_openldap
2916 $(call gb_LinkTarget_add_libs,$(1),\
2917 -lldap \
2918 -llber \
2921 endef
2923 gb_ExternalProject__use_openldap :=
2925 else # !SYSTEM_OPENLDAP
2927 define gb_LinkTarget__use_openldap
2928 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2929 $(call gb_LinkTarget_set_include,$(1),\
2930 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2931 $$(INCLUDE) \
2933 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2934 $(call gb_LinkTarget_add_libs,$(1), \
2935 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2936 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2939 endef
2940 endif
2942 define gb_ExternalProject__use_openldap
2943 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2945 endef
2947 endif # SYSTEM_OPENLDAP
2949 ifneq ($(SYSTEM_LIBTOMMATH),)
2951 define gb_LinkTarget__use_libtommath
2952 $(call gb_LinkTarget_set_include,$(1),\
2953 $(LIBTOMMATH_CFLAGS) \
2954 $$(INCLUDE) \
2956 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2958 endef
2960 else # !SYSTEM_LIBTOMMATH
2961 define gb_LinkTarget__use_libtommath
2962 $(call gb_LinkTarget_set_include,$(1),\
2963 -I${WORKDIR}/UnpackedTarball/libtommath \
2964 $$(INCLUDE) \
2966 $(call gb_LinkTarget_add_libs,$(1),\
2967 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2969 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2971 endef
2973 endif # SYSTEM_LIBTOMMATH
2975 define gb_ExternalProject__use_libtommath
2976 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2978 endef
2980 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2982 ifneq ($(SYSTEM_FIREBIRD),)
2984 define gb_LinkTarget__use_libfbembed
2985 $(call gb_LinkTarget_set_include,$(1),\
2986 $(FIREBIRD_CFLAGS) \
2987 $$(INCLUDE) \
2989 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2991 endef
2993 else # !SYSTEM_FIREBIRD
2995 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2996 firebird \
2999 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3000 #$(call gb_LinkTarget__use_libtommath,$(1))
3002 define gb_LinkTarget__use_libfbembed
3003 $(call gb_LinkTarget_use_package,$(1),firebird)
3004 $(call gb_LinkTarget_set_include,$(1),\
3005 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3006 $$(INCLUDE) \
3008 ifeq ($(COM),MSC)
3009 $(call gb_LinkTarget_add_libs,$(1),\
3010 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3012 else
3013 $(call gb_LinkTarget_add_libs,$(1),\
3014 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3016 endif
3018 endef
3021 # endef
3023 endif # SYSTEM_FIREBIRD
3025 else # !ENABLE_FIREBIRD_SDBC
3027 gb_LinkTarget__use_firebird :=
3028 # gb_LinkTarget__use_atomic_ops :=
3029 # gb_LinkTarget__use_libtommath :=
3031 endif # ENABLE_FIREBIRD_SDBC
3034 ifneq ($(SYSTEM_POSTGRESQL),)
3036 define gb_LinkTarget__use_postgresql
3038 $(call gb_LinkTarget_set_include,$(1),\
3039 $(POSTGRESQL_INC) \
3040 $$(INCLUDE) \
3043 $(call gb_LinkTarget_add_libs,$(1),\
3044 -lpq \
3047 $(call gb_LinkTarget_add_ldflags,$(1),\
3048 $(POSTGRESQL_LIB) \
3051 endef
3053 else # !SYSTEM_POSTGRESQL
3055 define gb_LinkTarget__use_postgresql
3057 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3059 $(call gb_LinkTarget_set_include,$(1),\
3060 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3061 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3062 $$(INCLUDE) \
3065 $(call gb_LinkTarget_add_libs,$(1),\
3066 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3069 ifeq ($(OS),WNT)
3070 $(call gb_LinkTarget_use_external,$(1),openssl)
3072 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3073 secur32 \
3074 ws2_32 \
3077 endif
3079 endef
3081 endif # SYSTEM_POSTGRESQL
3083 ifeq ($(ENABLE_KF5),TRUE)
3085 define gb_LinkTarget__use_kf5
3086 $(call gb_LinkTarget_set_include,$(1),\
3087 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3088 $$(INCLUDE) \
3091 $(call gb_LinkTarget_add_cxxflags,$(1),\
3092 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3095 $(call gb_LinkTarget_add_libs,$(1),\
3096 $(KF5_LIBS) \
3099 endef
3101 else # !ENABLE_KF5
3103 define gb_LinkTarget__use_kf5
3105 endef
3107 endif # ENABLE_KF5
3111 ifeq ($(ENABLE_QT5),TRUE)
3113 define gb_LinkTarget__use_qt5
3114 $(call gb_LinkTarget_set_include,$(1),\
3115 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3116 $$(INCLUDE) \
3119 $(call gb_LinkTarget_add_defs,$(1),\
3120 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3123 $(call gb_LinkTarget_add_libs,$(1),\
3124 $(QT5_LIBS) \
3127 endef
3129 else # !ENABLE_QT5
3131 define gb_LinkTarget__use_qt5
3133 endef
3135 endif # ENABLE_QT5
3137 # PYTHON
3138 # extra python_headers external because pyuno wrapper must not link python
3139 ifneq ($(SYSTEM_PYTHON),)
3141 define gb_LinkTarget__use_python_headers
3142 $(call gb_LinkTarget_add_defs,$(1),\
3143 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3146 $(call gb_LinkTarget_set_include,$(1),\
3147 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3148 $$(INCLUDE) \
3151 endef
3153 define gb_LinkTarget__use_python
3154 $(call gb_LinkTarget__use_python_headers,$(1))
3156 $(call gb_LinkTarget_add_libs,$(1),\
3157 $(PYTHON_LIBS) \
3160 endef
3162 else # !SYSTEM_PYTHON
3164 $(eval $(call gb_Helper_register_packages_for_install,python,\
3165 python3 \
3168 define gb_LinkTarget__use_python_headers
3169 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3170 $(call gb_LinkTarget_set_include,$(1),\
3171 -I$(call gb_UnpackedTarball_get_dir,python3) \
3172 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3173 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3174 $$(INCLUDE) \
3177 endef
3179 define gb_LinkTarget__use_python
3180 $(call gb_LinkTarget__use_python_headers,$(1))
3181 ifeq ($(OS),MACOSX)
3182 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3183 else
3184 $(call gb_LinkTarget_use_package,$(1),python3)
3185 endif
3187 ifeq ($(OS),WNT)
3188 $(call gb_LinkTarget_add_libs,$(1),\
3189 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(if $(filter X86_64,$(CPUNAME)),amd64,win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3191 else ifeq ($(OS),MACOSX)
3192 $(call gb_LinkTarget_add_libs,$(1),\
3193 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3195 else
3196 $(call gb_LinkTarget_add_libs,$(1),\
3197 -L$(call gb_UnpackedTarball_get_dir,python3) \
3198 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3200 endif
3202 endef
3204 # this is only used by python currently
3205 define gb_ExternalProject__use_libffi
3206 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3208 endef
3210 endif # SYSTEM_PYTHON
3212 # ORCUS
3213 ifneq ($(SYSTEM_LIBORCUS),)
3215 define gb_LinkTarget__use_orcus
3216 $(call gb_LinkTarget_set_include,$(1),\
3217 $$(INCLUDE) \
3218 $(ORCUS_CFLAGS) \
3220 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3221 endef
3223 define gb_LinkTarget__use_orcus-parser
3225 endef
3227 else # !SYSTEM_LIBORCUS
3229 ifeq ($(COM),MSC)
3231 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3232 orcus \
3233 orcus-parser \
3236 define gb_LinkTarget__use_orcus
3237 $(call gb_LinkTarget_set_include,$(1),\
3238 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3239 $$(INCLUDE) \
3242 $(call gb_LinkTarget_use_libraries,$(1),\
3243 orcus \
3246 endef
3248 define gb_LinkTarget__use_orcus-parser
3249 $(call gb_LinkTarget_set_include,$(1),\
3250 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3251 $$(INCLUDE) \
3254 $(call gb_LinkTarget_use_libraries,$(1),\
3255 orcus-parser \
3258 endef
3260 else # !MSC
3262 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3263 liborcus \
3266 define gb_LinkTarget__use_orcus
3267 $(call gb_LinkTarget_use_package,$(1),liborcus)
3269 $(call gb_LinkTarget_set_include,$(1),\
3270 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3271 $$(INCLUDE) \
3274 $(call gb_LinkTarget_add_libs,$(1),\
3275 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3278 $(if $(SYSTEM_BOOST), \
3279 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3280 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3283 endef
3285 define gb_LinkTarget__use_orcus-parser
3286 $(call gb_LinkTarget_use_package,$(1),liborcus)
3288 $(call gb_LinkTarget_set_include,$(1),\
3289 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3290 $$(INCLUDE) \
3293 $(call gb_LinkTarget_add_libs,$(1),\
3294 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3297 endef
3299 endif # MSC
3301 endif # SYSTEM_LIBORCUS
3303 ifeq ($(ENABLE_EOT),TRUE)
3305 ifneq ($(SYSTEM_LIBEOT),)
3307 define gb_LinkTarget__use_libeot
3308 $(call gb_LinkTarget_set_include,$(1),\
3309 $$(INCLUDE) \
3310 $(LIBEOT_CFLAGS) \
3312 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3314 endef
3316 gb_ExternalProject__use_libeot :=
3318 else # !SYSTEM_LIBEOT
3320 define gb_LinkTarget__use_libeot
3321 $(call gb_LinkTarget_set_include,$(1),\
3322 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3323 $$(INCLUDE) \
3325 $(call gb_LinkTarget_add_libs,$(1),\
3326 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3328 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3330 endef
3332 define gb_ExternalProject__use_libeot
3333 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3335 endef
3337 endif # SYSTEM_LIBEOT
3339 else # !ENABLE_EOT
3341 gb_LinkTarget__use_libeot :=
3342 gb_ExternalProject__use_libeot :=
3344 endif # ENABLE_EOT
3346 ### X11 stuff ###
3348 ifeq ($(USING_X11), TRUE)
3350 define gb_LinkTarget__use_Xrandr
3351 $(call gb_LinkTarget_set_include,$(1),\
3352 $$(INCLUDE) \
3353 $(XRANDR_CFLAGS) \
3356 $(call gb_LinkTarget_add_libs,$(1),\
3357 $(XRANDR_LIBS) \
3359 endef
3361 define gb_LinkTarget__use_Xrender
3362 $(call gb_LinkTarget_set_include,$(1),\
3363 $$(INCLUDE) \
3364 $(XRENDER_CFLAGS) \
3367 $(call gb_LinkTarget_add_libs,$(1),\
3368 $(XRENDER_LIBS) \
3370 endef
3372 endif # USING_X11
3375 gb_ExternalProject__use_nss3:=
3378 ifneq ($(SYSTEM_NSS),)
3380 define gb_LinkTarget__use_nss3
3381 $(call gb_LinkTarget_add_defs,$(1),\
3382 -DSYSTEM_NSS \
3385 $(call gb_LinkTarget_set_include,$(1),\
3386 $$(INCLUDE) \
3387 $(NSS_CFLAGS) \
3390 $(call gb_LinkTarget_add_libs,$(1),\
3391 $(NSS_LIBS) \
3394 endef
3396 define gb_LinkTarget__use_plc4
3397 $(call gb_LinkTarget__use_nss3,$(1))
3399 endef
3401 define gb_LinkTarget__use_ssl3
3402 $(call gb_LinkTarget__use_nss3,$(1))
3404 endef
3406 else # !SYSTEM_NSS
3408 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3409 nss \
3412 define gb_LinkTarget__use_nss3
3413 $(call gb_LinkTarget_use_package,$(1),nss)
3414 $(call gb_LinkTarget_set_include,$(1),\
3415 $$(INCLUDE) \
3416 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3417 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3420 ifeq ($(COM),MSC)
3421 $(call gb_LinkTarget_add_libs,$(1),\
3422 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3423 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3424 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3426 else
3427 $(call gb_LinkTarget_add_libs,$(1),\
3428 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3429 -lnspr4 \
3430 -lnss3 \
3431 -lsmime3 \
3433 endif
3435 endef
3437 define gb_LinkTarget__use_plc4
3438 $(call gb_LinkTarget_use_package,$(1),nss)
3439 ifeq ($(COM),MSC)
3440 $(call gb_LinkTarget_add_libs,$(1),\
3441 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3443 else
3444 $(call gb_LinkTarget_add_libs,$(1),\
3445 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3447 endif
3449 endef
3451 define gb_LinkTarget__use_ssl3
3452 $(call gb_LinkTarget_use_package,$(1),nss)
3453 ifeq ($(COM),MSC)
3454 $(call gb_LinkTarget_add_libs,$(1),\
3455 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3457 else
3458 $(call gb_LinkTarget_add_libs,$(1),\
3459 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3461 endif
3463 endef
3465 define gb_ExternalProject__use_nss3
3466 $(call gb_ExternalProject_use_package,$(1),nss)
3468 endef
3470 endif # SYSTEM_NSS
3472 ifeq ($(ENABLE_BREAKPAD),TRUE)
3474 define gb_LinkTarget__use_breakpad
3475 $(call gb_LinkTarget_set_include,$(1),\
3476 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3477 $$(INCLUDE) \
3480 ifeq ($(COM),MSC)
3481 $(call gb_LinkTarget_use_static_libraries,$(1),\
3482 breakpad \
3484 else
3485 $(call gb_LinkTarget_add_libs,$(1),\
3486 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3488 endif
3490 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3492 endef
3494 endif # ENABLE_BREAKPAD
3496 ifeq ($(ENABLE_GPGMEPP),TRUE)
3498 ifneq ($(SYSTEM_GPGMEPP),)
3500 gb_ExternalProject__use_gpgmepp:=
3501 gb_ExternalProject__use_libassuan:=
3502 gb_ExternalProject__use_libgpg-error:=
3504 define gb_LinkTarget__use_gpgmepp
3505 $(call gb_LinkTarget_set_include,$(1),\
3506 $$(INCLUDE) \
3507 $$(GPGMEPP_CFLAGS) \
3510 $(call gb_LinkTarget_add_libs,$(1),\
3511 $(GPGMEPP_LIBS) \
3514 endef
3516 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3518 define gb_ExternalProject__use_gpgmepp
3519 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3521 endef
3522 define gb_ExternalProject__use_libassuan
3523 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3525 endef
3526 define gb_ExternalProject__use_libgpg-error
3527 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3529 endef
3531 ifneq ($(filter WNT,$(OS)),)
3533 define gb_LinkTarget__use_libgpg-error
3534 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3536 $(call gb_LinkTarget_set_include,$(1),\
3537 $(GPG_ERROR_CFLAGS) \
3538 $$(INCLUDE) \
3540 $(call gb_LinkTarget_add_libs,$(1),\
3541 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3544 endef
3546 define gb_LinkTarget__use_libassuan
3547 $(call gb_LinkTarget_use_package,$(1),libassuan)
3549 $(call gb_LinkTarget_set_include,$(1),\
3550 $(LIBASSUAN_CFLAGS) \
3551 $$(INCLUDE) \
3553 $(call gb_LinkTarget_add_libs,$(1),\
3554 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3557 endef
3559 define gb_LinkTarget__use_gpgmepp
3560 $(call gb_LinkTarget_set_include,$(1),\
3561 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3562 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3563 $$(GPG_ERROR_CFLAGS) \
3564 $$(INCLUDE) \
3566 $(call gb_LinkTarget_use_libraries,$(1),\
3567 gpgmepp \
3570 endef
3572 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3573 libassuan \
3574 libgpg-error \
3577 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3578 gpgmepp \
3581 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3582 gpgme-w32spawn \
3585 endif
3587 ifneq ($(filter MACOSX LINUX,$(OS)),)
3589 define gb_LinkTarget__use_gpgmepp
3590 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3592 $(call gb_LinkTarget_set_include,$(1),\
3593 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3594 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3595 $$(GPG_ERROR_CFLAGS) \
3596 $$(INCLUDE) \
3598 $(call gb_LinkTarget_add_libs,$(1),\
3599 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3600 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3601 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3602 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3605 endef
3607 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3608 gpgmepp \
3609 libassuan \
3610 libgpg-error \
3613 endif
3615 endif
3617 else # !ENABLE_GPGMEPP
3619 gb_ExternalProject__use_gpgmepp :=
3620 gb_ExternalProject__use_libassuan :=
3621 gb_ExternalProject__use_libgpg-error :=
3623 gb_LinkTarget__use_gpgmepp :=
3624 gb_LinkTarget__use_libassuan :=
3625 gb_LinkTarget__use_libgpg-error :=
3627 endif # ENABLE_GPGMEPP
3629 define gb_LinkTarget__use_dconf
3630 $(call gb_LinkTarget_set_include,$(1),\
3631 $$(INCLUDE) \
3632 $(DCONF_CFLAGS) \
3635 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3636 endef
3638 ### Jars ############################################################
3640 ifneq ($(SYSTEM_HSQLDB),)
3642 define gb_Jar__use_hsqldb
3643 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3644 endef
3645 define gb_JunitTest__use_hsqldb
3646 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3647 endef
3649 else # !SYSTEM_HSQLDB
3651 ifeq ($(ENABLE_JAVA),TRUE)
3652 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3653 hsqldb \
3655 endif
3657 define gb_Jar__use_hsqldb
3658 $(call gb_Jar_use_jar,$(1),hsqldb)
3659 endef
3660 define gb_JunitTest__use_hsqldb
3661 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3662 endef
3664 endif # SYSTEM_HSQLDB
3667 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3669 ifneq ($(SYSTEM_BSH),)
3671 define gb_Jar__use_bsh
3672 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3673 endef
3675 else # !SYSTEM_BSH
3677 ifeq ($(ENABLE_JAVA),TRUE)
3678 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3679 bsh \
3681 endif
3683 define gb_Jar__use_bsh
3684 $(call gb_Jar_use_jar,$(1),bsh)
3685 endef
3687 endif # SYSTEM_BSH
3689 endif
3691 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3693 ifneq ($(SYSTEM_RHINO),)
3695 define gb_Jar__use_rhino
3696 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3697 endef
3699 else # !SYSTEM_RHINO
3701 ifeq ($(ENABLE_JAVA),TRUE)
3702 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3703 js \
3705 endif
3707 define gb_Jar__use_rhino
3708 $(call gb_Jar_use_jar,$(1),js)
3709 endef
3711 endif # SYSTEM_RHINO
3713 endif
3715 ifneq ($(SYSTEM_APACHE_COMMONS),)
3717 define gb_Jar__use_commons-logging
3718 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3719 endef
3720 gb_ExternalProject__use_commons-logging :=
3722 else # !SYSTEM_APACHE_COMMONS
3724 ifeq ($(ENABLE_JAVA),TRUE)
3725 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3726 commons-logging-$(COMMONS_LOGGING_VERSION) \
3728 endif
3730 define gb_Jar__use_commons-logging
3731 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3732 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3733 endef
3734 define gb_ExternalProject__use_commons-logging
3735 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3736 endef
3738 endif # SYSTEM_APACHE_COMMONS
3741 ifneq ($(SYSTEM_JFREEREPORT),)
3743 define gb_Jar__use_flow-engine
3744 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3745 endef
3747 define gb_Jar__use_flute
3748 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3749 endef
3751 define gb_Jar__use_libbase
3752 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3753 endef
3755 define gb_Jar__use_libfonts
3756 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3757 endef
3759 define gb_Jar__use_libformula
3760 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3761 endef
3763 define gb_Jar__use_liblayout
3764 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3765 endef
3767 define gb_Jar__use_libloader
3768 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3769 endef
3771 define gb_Jar__use_librepository
3772 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3773 endef
3775 define gb_Jar__use_libserializer
3776 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3777 endef
3779 define gb_Jar__use_libxml
3780 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3781 endef
3783 define gb_Jar__use_sac
3784 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3785 endef
3787 else # !SYSTEM_JFREEREPORT
3789 ifeq ($(ENABLE_JAVA),TRUE)
3790 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3791 flow-engine \
3792 flute-1.1.6 \
3793 libbase-1.1.6 \
3794 libfonts-1.1.6 \
3795 libformula-1.1.7 \
3796 liblayout \
3797 libloader-1.1.6 \
3798 librepository-1.1.6 \
3799 libserializer-1.1.6 \
3800 libxml-1.1.7 \
3801 sac \
3803 endif
3805 define gb_Jar__use_flow-engine
3806 $(call gb_Jar_use_jar,$(1),flow-engine)
3807 endef
3809 define gb_Jar__use_flute
3810 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3811 endef
3813 define gb_Jar__use_libbase
3814 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3815 endef
3817 define gb_Jar__use_libfonts
3818 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3819 endef
3821 define gb_Jar__use_libformula
3822 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3823 endef
3825 define gb_Jar__use_liblayout
3826 $(call gb_Jar_use_jar,$(1),liblayout)
3827 endef
3829 define gb_Jar__use_libloader
3830 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3831 endef
3833 define gb_Jar__use_librepository
3834 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3835 endef
3837 define gb_Jar__use_libserializer
3838 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3839 endef
3841 define gb_Jar__use_libxml
3842 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3843 endef
3845 define gb_Jar__use_sac
3846 $(call gb_Jar_use_jar,$(1),sac)
3847 endef
3849 endif # SYSTEM_JFREEREPORT
3852 # Executables
3854 # FIXME: the library target should be for build too
3855 define gb_Executable__register_bestreversemap
3856 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3857 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3859 endef
3861 # TODO depending on the whole URE might be overkill, but I do not have a
3862 # Windows machine to debug it...
3863 # FIXME: the library target should be for build too
3864 define gb_Executable__register_climaker
3865 $(call gb_Executable_add_runtime_dependencies,climaker,\
3866 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3867 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3868 $(call gb_UnoApi_get_target,udkapi) \
3869 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3871 endef
3873 define gb_Executable__register_cppumaker
3874 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3875 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3877 endef
3879 # This is used to determine what we need for 'build' platform.
3880 # FIXME: the library target should be for build too
3881 define gb_Executable__register_gengal
3882 $(call gb_Executable_add_runtime_dependencies,gengal,\
3883 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3884 $(call gb_Package_get_target_for_build,postprocess_images) \
3885 $(call gb_Package_get_target_for_build,postprocess_registry) \
3886 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3887 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3888 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3889 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3890 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3891 $(call gb_UnoApi_get_target,offapi) \
3892 $(call gb_UnoApi_get_target,udkapi) \
3894 endef
3896 ifeq ($(SYSTEM_ICU),)
3898 define gb_Executable__register_gendict
3899 $(call gb_Executable_add_runtime_dependencies,gendict,\
3900 $(call gb_Package_get_target_for_build,icu) \
3901 $(call gb_Package_get_target_for_build,icu_ure) \
3903 endef
3905 endif
3907 define gb_Executable__register_idlc
3908 $(call gb_Executable_add_runtime_dependencies,idlc,\
3909 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3911 endef
3913 define gb_Executable__register_localize
3914 $(call gb_Executable_add_runtime_dependencies,localize,\
3915 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3916 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3919 endef
3921 # FIXME ure/services.rdb needs cleanup
3922 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3923 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3924 # FIXME: the library target should be for build too
3925 define gb_Executable__register_saxparser
3926 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3927 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3928 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3929 $(call gb_Rdb_get_target_for_build,saxparser) \
3930 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3931 $(call gb_UnoApi_get_target,udkapi) \
3933 endef
3935 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3936 # required due to the settings for URE_SERVICES and URE_TYPES in
3937 # cppuhelper/source/unorc
3938 # FIXME: the library target should be for build too
3939 define gb_Executable__register_uno
3940 $(call gb_Executable_add_runtime_dependencies,uno,\
3941 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3942 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3943 $(call gb_UnoApi_get_target,udkapi) \
3945 endef
3948 # External executables
3950 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3952 gb_ExternalExecutable__register_xmllint :=
3954 else # ! SYSTEM_LIBXML_FOR_BUILD
3956 define gb_ExternalExecutable__register_xmllint
3957 $(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)
3958 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3959 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3960 $(call gb_Package_get_target,libxml2) \
3963 endef
3965 endif # SYSTEM_LIBXML_FOR_BUILD
3967 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3969 gb_ExternalExecutable__register_xsltproc :=
3971 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3973 define gb_ExternalExecutable__register_xsltproc
3974 $(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)
3975 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3976 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3977 $(call gb_Package_get_target,libxml2) \
3978 $(call gb_Package_get_target,libxslt) \
3981 endef
3983 endif # SYSTEM_LIBXSLT_FOR_BUILD
3985 ifneq (,$(SYSTEM_UCPP))
3987 gb_ExternalExecutable__register_ucpp :=
3989 else # ! SYSTEM_UCPP
3991 define gb_ExternalExecutable__register_ucpp
3992 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3994 endef
3996 endif # SYSTEM_UCPP
3998 ifeq (,$(PYTHON_FOR_BUILD))
4000 define gb_ExternalExecutable__register_python
4001 ifeq ($(OS),MACOSX)
4003 # use set_external, to avoid having the command added as prerequisite for the
4004 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4005 # matching rule to build that specific file)
4006 $(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))
4007 # the Zip ensures that internal python has been built (cannot use the Package
4008 # target, as that is not used on Mac)
4009 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4011 else
4013 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4014 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4015 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4017 endif
4019 endef
4021 else
4023 define gb_ExternalExecutable__register_python
4024 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4025 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4027 endef
4029 endif # PYTHON_FOR_BUILD
4031 ifneq ($(SYSTEM_GENBRK),)
4033 define gb_ExternalExecutable__register_genbrk
4034 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4036 endef
4038 else # ! SYSTEM_GENBRK
4040 define gb_ExternalExecutable__register_genbrk
4041 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4042 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4043 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4044 $(call gb_Package_get_target_for_build,icu) \
4045 $(call gb_Package_get_target_for_build,icu_ure) \
4048 endef
4050 endif
4052 ifneq ($(SYSTEM_GENCCODE),)
4054 define gb_ExternalExecutable__register_genccode
4055 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4057 endef
4059 else # ! SYSTEM_GENCCODE
4061 define gb_ExternalExecutable__register_genccode
4062 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4063 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4064 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4065 $(call gb_Package_get_target_for_build,icu) \
4066 $(call gb_Package_get_target_for_build,icu_ure) \
4069 endef
4071 endif
4073 ifneq ($(SYSTEM_GENCMN),)
4075 define gb_ExternalExecutable__register_gencmn
4076 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4078 endef
4080 else # ! SYSTEM_GENCMN
4082 define gb_ExternalExecutable__register_gencmn
4083 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4084 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4085 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4086 $(call gb_Package_get_target_for_build,icu) \
4087 $(call gb_Package_get_target_for_build,icu_ure) \
4090 endef
4092 endif
4094 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4096 $(eval $(call gb_Helper_register_jars,OXT,\
4097 owncloud-android-library \
4100 define gb_Jar__use_owncloud_android_lib
4101 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4102 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4103 endef
4104 define gb_ExternalProject__use_owncloud_android_lib
4105 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4106 endef
4108 endif
4110 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4111 ifneq ($(SYSTEM_BZIP2),)
4113 define gb_LinkTarget__use_bzip2
4114 $(call gb_LinkTarget_set_include,$(1),\
4115 $(BZIP2_CFLAGS) \
4116 $$(INCLUDE) \
4118 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4120 endef
4122 gb_ExternalProject__use_bzip2 :=
4124 else # !SYSTEM_BZIP2
4126 define gb_LinkTarget__use_bzip2
4127 $(call gb_LinkTarget_set_include,$(1),\
4128 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4129 $$(INCLUDE) \
4132 ifeq ($(COM),MSC)
4133 $(call gb_LinkTarget_add_libs,$(1),\
4134 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4136 else
4137 $(call gb_LinkTarget_add_libs,$(1),\
4138 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4140 endif
4142 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4143 endef
4145 define gb_ExternalProject__use_bzip2
4146 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4147 endef
4149 endif
4150 endif
4152 define gb_LinkTarget__use_clew
4153 $(call gb_LinkTarget_set_include,$(1), \
4154 -I$(SRCDIR)/external/clew/source/include \
4155 $$(INCLUDE) \
4157 $(call gb_LinkTarget_use_libraries,$(1),clew)
4158 endef
4160 ifneq ($(ENABLE_PDFIUM),)
4161 define gb_LinkTarget__use_pdfium
4162 $(call gb_LinkTarget_set_include,$(1),\
4163 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4164 -DCOMPONENT_BUILD \
4165 $$(INCLUDE) \
4167 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4168 endef
4169 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4170 pdfium \
4172 endif
4174 ifneq ($(SYSTEM_QRCODEGEN),)
4176 define gb_LinkTarget__use_qrcodegen
4177 $(call gb_LinkTarget_set_include,$(1),\
4178 -DSYSTEM_QRCODEGEN \
4179 $$(INCLUDE) \
4180 $(QRCODEGEN_CFLAGS) \
4182 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4184 endef
4186 gb_ExternalProject__use_qrcodegen :=
4188 else # !SYSTEM_QRCODEGEN
4190 define gb_LinkTarget__use_qrcodegen
4191 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4192 $(call gb_LinkTarget_set_include,$(1),\
4193 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4194 $$(INCLUDE) \
4196 $(call gb_LinkTarget_use_static_libraries,$(1),\
4197 qrcodegen \
4200 endef
4202 define gb_ExternalProject__use_qrcodegen
4203 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4205 endef
4207 endif # SYSTEM_QRCODEGEN
4209 define gb_LinkTarget__use_dtoa
4210 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4211 $(call gb_LinkTarget_set_include,$(1),\
4212 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4213 $$(INCLUDE) \
4215 $(call gb_LinkTarget_use_static_libraries,$(1),\
4216 dtoa \
4219 endef
4221 define gb_ExternalProject__use_dtoa
4222 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4224 endef
4226 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4227 $(if $(UCRT_REDISTDIR),ucrt) \
4230 # vim: set noet sw=4 ts=4: