lok: catch and log exceptions during key / mouse event emission.
[LibreOffice.git] / RepositoryExternal.mk
blob9f172d6af448b19ffaee2529c14b051961e5eaa6
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 gb_LinkTarget__use_glm_headers :=
94 gb_ExternalProject__use_glm_headers :=
96 else
98 define gb_LinkTarget__use_glm_headers
99 $(call gb_LinkTarget_use_unpacked,$(1),glm)
100 $(call gb_LinkTarget_set_include,$(1),\
101 $(GLM_CFLAGS) \
102 $$(INCLUDE) \
105 endef
107 define gb_ExternalProject__use_glm_headers
108 $(call gb_ExternalProject_use_unpacked,$(1),glm)
110 endef
112 endif
114 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
116 define gb_LinkTarget__use_sane_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(if $(filter WNT,$(OS)), \
119 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
120 -I$(SRCDIR)/external/sane/inc) \
121 $$(INCLUDE) \
124 ifeq ($(OS),WNT)
125 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
126 endif
128 endef
130 else
132 gb_LinkTarget__use_sane_headers :=
134 endif
136 ifneq ($(SYSTEM_BLUEZ),)
138 gb_LinkTarget__use_bluez_bluetooth_headers :=
140 else # !SYSTEM_BLUEZ
142 define gb_LinkTarget__use_bluez_bluetooth_headers
143 $(call gb_LinkTarget_set_include,$(1),\
144 -I$(SRCDIR)/external/bluez_bluetooth/inc \
145 $$(INCLUDE) \
148 endef
150 endif # SYSTEM_BLUEZ
152 # External libraries
154 ifneq ($(SYSTEM_CPPUNIT),)
156 define gb_LinkTarget__use_cppunit
157 $(call gb_LinkTarget_set_include,$(1),\
158 $$(INCLUDE) \
159 $(CPPUNIT_CFLAGS) \
162 $(call gb_LinkTarget_add_libs,$(1),\
163 $(CPPUNIT_LIBS) \
166 endef
168 else # !SYSTEM_CPPUNIT
170 define gb_LinkTarget__use_cppunit
171 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
173 $(call gb_LinkTarget_set_include,$(1),\
174 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
175 $$(INCLUDE) \
178 ifeq ($(COM),MSC)
179 $(call gb_LinkTarget_add_libs,$(1),\
180 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
182 else
183 $(call gb_LinkTarget_add_libs,$(1),\
184 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
186 endif
188 endef
190 endif # SYSTEM_CPPUNIT
192 ifneq ($(SYSTEM_EPOXY),)
194 define gb_LinkTarget__use_epoxy
195 $(call gb_LinkTarget_set_include,$(1),\
196 $$(INCLUDE) \
197 $(EPOXY_CFLAGS) \
199 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
201 endef
203 gb_ExternalProject__use_epoxy :=
205 else # !SYSTEM_EPOXY
207 define gb_LinkTarget__use_epoxy
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
210 $$(INCLUDE) \
213 $(call gb_LinkTarget_use_libraries,$(1),\
214 epoxy \
217 endef
219 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
220 epoxy \
223 define gb_ExternalProject__use_epoxy
224 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
226 endef
228 endif # SYSTEM_EPOXY
230 define gb_LinkTarget__use_iconv
231 ifeq ($(COM),MSC)
232 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
233 else
234 $(call gb_LinkTarget_add_libs,$(1),-liconv)
235 endif
236 endef
238 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
240 define gb_LinkTarget__use_mariadb-connector-c
241 $(call gb_LinkTarget_set_include,$(1),\
242 $$(INCLUDE) \
243 $(MARIADB_CFLAGS) \
245 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
247 endef
248 gb_ExternalProject__use_mariadb-connector-c :=
250 else # !SYSTEM_MARIADB_CONNECTOR_C
252 define gb_LinkTarget__use_mariadb-connector-c
253 $(call gb_LinkTarget_set_include,$(1),\
254 $$(INCLUDE) \
255 $(MARIADB_CFLAGS) \
257 $(call gb_LinkTarget_use_static_libraries,$(1),\
258 mariadb-connector-c \
260 ifeq ($(OS),MACOSX)
261 $(call gb_LinkTarget_add_libs,$(1),\
262 -liconv \
264 endif
266 endef
267 define gb_ExternalProject__use_mariadb-connector-c
268 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
270 endef
272 endif # SYSTEM_MARIADB_CONNECTOR_C
275 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
277 define gb_LinkTarget__use_mysql
279 $(call gb_LinkTarget_add_defs,$(1),\
280 -DSYSTEM_MARIADB \
283 $(call gb_LinkTarget_add_libs,$(1),\
284 $(MARIADB_LIBS) \
287 $(call gb_LinkTarget_set_include,$(1),\
288 $(MARIADB_CFLAGS) \
289 $$(INCLUDE) \
291 endef
293 else
295 define gb_LinkTarget__use_mysql
297 $(call gb_LinkTarget_set_include,$(1),\
298 $$(INCLUDE) \
301 endef
303 endif
305 ifneq ($(SYSTEM_ZLIB),)
307 define gb_LinkTarget__use_zlib
308 $(call gb_LinkTarget_add_defs,$(1),\
309 -DSYSTEM_ZLIB \
311 $(call gb_LinkTarget_add_libs,$(1),-lz)
313 endef
315 # nothing on system
316 define gb_LinkTarget__use_zlib_x64
318 endef
320 gb_ExternalProject__use_zlib :=
322 else # !SYSTEM_ZLIB
324 define gb_LinkTarget__use_zlib_multiarch
325 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
327 $(call gb_LinkTarget_set_include,$(1),\
328 $(ZLIB_CFLAGS) \
329 $$(INCLUDE) \
332 $(call gb_LinkTarget_use_static_libraries,$(1),\
333 $(2) \
336 endef
338 define gb_LinkTarget__use_zlib
339 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
341 endef
343 define gb_LinkTarget__use_zlib_x64
344 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
346 endef
348 define gb_ExternalProject__use_zlib
349 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
351 endef
353 endif # SYSTEM_ZLIB
356 ifneq ($(SYSTEM_LIBJPEG),)
358 define gb_LinkTarget__use_libjpeg
359 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
360 $(call gb_LinkTarget_set_ldflags,$(1),\
361 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
364 endef
366 gb_ExternalProject__use_libjpeg :=
368 else
370 define gb_LinkTarget__use_libjpeg
371 $(call gb_LinkTarget_set_include,$(1),\
372 $(LIBJPEG_CFLAGS) \
373 $$(INCLUDE) \
375 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
376 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
378 endef
380 define gb_ExternalProject__use_libjpeg
381 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
383 endef
385 endif # SYSTEM_LIBJPEG
387 ifneq ($(SYSTEM_MYTHES),)
389 define gb_LinkTarget__use_mythes
390 $(call gb_LinkTarget_set_include,$(1),\
391 $$(INCLUDE) \
392 $(MYTHES_CFLAGS) \
394 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
396 endef
398 else # !SYSTEM_MYTHES
400 define gb_LinkTarget__use_mythes
401 $(call gb_LinkTarget_set_include,$(1),\
402 -I$(call gb_UnpackedTarball_get_dir,mythes) \
403 $$(INCLUDE) \
406 ifeq ($(COM),MSC)
407 $(call gb_LinkTarget_use_static_libraries,$(1),\
408 mythes \
410 else
411 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
412 $(call gb_LinkTarget_use_external_project,$(1),mythes)
413 endif
415 endef
417 endif # SYSTEM_MYTHES
420 ifneq ($(SYSTEM_EXPAT),)
422 define gb_LinkTarget__use_expat_impl
423 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
425 $(call gb_LinkTarget_add_defs,$(1),\
426 -DSYSTEM_EXPAT \
429 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
431 endef
433 gb_ExternalProject__use_expat :=
435 else # !SYSTEM_EXPAT
437 define gb_LinkTarget__use_expat_impl
438 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
440 $(call gb_LinkTarget_set_include,$(1),\
441 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
442 $$(INCLUDE) \
445 $(call gb_LinkTarget_use_static_libraries,$(1),\
446 $(2) \
449 endef
451 define gb_ExternalProject__use_expat
452 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
454 endef
456 endif # SYSTEM_EXPAT
458 define gb_LinkTarget__use_expat
459 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
461 endef
463 define gb_LinkTarget__use_expat_x64
464 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
466 endef
468 ifneq ($(SYSTEM_HYPH),)
470 define gb_LinkTarget__use_hyphen
471 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
473 endef
475 else # !SYSTEM_HYPH
477 define gb_LinkTarget__use_hyphen
478 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
479 $(call gb_LinkTarget_set_include,$(1),\
480 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
481 $$(INCLUDE) \
484 ifeq ($(COM),MSC)
485 $(call gb_LinkTarget_use_static_libraries,$(1),\
486 hyphen \
488 else
489 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
490 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
491 endif
493 endef
495 endif # SYSTEM_HYPH
497 ifneq ($(SYSTEM_HUNSPELL),)
499 define gb_LinkTarget__use_hunspell
500 $(call gb_LinkTarget_set_include,$(1),\
501 $$(INCLUDE) \
502 $(HUNSPELL_CFLAGS) \
504 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
506 endef
508 gb_ExternalProject__use_hunspell :=
510 else # !SYSTEM_HUNSPELL
512 define gb_LinkTarget__use_hunspell
513 $(call gb_LinkTarget_add_defs,$(1),\
514 -DHUNSPELL_STATIC \
516 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
517 $(call gb_LinkTarget_set_include,$(1),\
518 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
519 $$(INCLUDE) \
522 ifeq ($(COM),MSC)
523 $(call gb_LinkTarget_use_static_libraries,$(1),\
524 hunspell \
526 else
527 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
528 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
529 endif
531 endef
533 define gb_ExternalProject__use_hunspell
534 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
536 endef
538 endif # SYSTEM_HUNSPELL
541 ifneq ($(SYSTEM_BOOST),)
543 define gb_LinkTarget__use_boost_lib
544 $(call gb_LinkTarget_set_include,$(1),\
545 $$(INCLUDE) \
546 $(BOOST_CPPFLAGS) \
549 $(call gb_LinkTarget_add_ldflags,$(1),\
550 $(BOOST_LDFLAGS) \
553 $(call gb_LinkTarget_add_libs,$(1),$(2))
555 endef
557 define gb_LinkTarget__use_boost_locale
558 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
560 endef
562 define gb_LinkTarget__use_boost_date_time
563 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
565 endef
567 define gb_LinkTarget__use_boost_filesystem
568 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
570 endef
572 gb_ExternalProject__use_boost_filesystem :=
574 define gb_LinkTarget__use_boost_iostreams
575 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
577 endef
579 gb_ExternalProject__use_boost_iostreams :=
581 define gb_LinkTarget__use_boost_system
582 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
584 endef
586 gb_ExternalProject__use_boost_system :=
588 define gb_LinkTarget__use_boost_headers
589 $(call gb_LinkTarget_set_include,$(1),\
590 $$(INCLUDE) \
591 $(BOOST_CPPFLAGS) \
594 endef
596 gb_ExternalProject__use_boost_headers:=
598 else # !SYSTEM_BOOST
600 define gb_LinkTarget__use_boost_lib
601 $(call gb_LinkTarget_add_defs,$(1),\
602 -DBOOST_ALL_NO_LIB \
605 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
607 endef
609 define gb_LinkTarget__use_boost_locale
610 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
611 $(call gb_LinkTarget_add_libs,$(1),\
612 $(if $(filter $(OS),MACOSX),-liconv) \
615 endef
617 define gb_LinkTarget__use_boost_date_time
618 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
620 endef
622 define gb_LinkTarget__use_boost_filesystem
623 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
625 endef
627 define gb_ExternalProject__use_boost_filesystem
628 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
629 endef
631 define gb_LinkTarget__use_boost_iostreams
632 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
634 endef
636 define gb_ExternalProject__use_boost_iostreams
637 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
638 endef
640 define gb_LinkTarget__use_boost_system
641 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
643 endef
645 define gb_ExternalProject__use_boost_system
646 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
647 endef
649 define gb_LinkTarget__use_boost_headers
650 $(call gb_LinkTarget_use_unpacked,$(1),boost)
651 $(call gb_LinkTarget_set_include,$(1),\
652 $(BOOST_CPPFLAGS) \
653 $$(INCLUDE) \
656 endef
658 define gb_ExternalProject__use_boost_headers
659 $(call gb_ExternalProject_use_unpacked,$(1),boost)
661 endef
663 endif # SYSTEM_BOOST
666 ifneq ($(SYSTEM_LIBCMIS),)
668 define gb_LinkTarget__use_libcmis
669 $(call gb_LinkTarget_set_include,$(1),\
670 $$(INCLUDE) \
671 $(LIBCMIS_CFLAGS) \
673 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
675 endef
677 else # !SYSTEM_LIBCMIS
679 define gb_LinkTarget__use_libcmis
680 $(call gb_LinkTarget_set_include,$(1),\
681 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
682 $$(INCLUDE) \
684 $(call gb_LinkTarget_use_static_libraries,$(1),\
685 libcmis \
688 endef
690 endif # SYSTEM_LIBCMIS
692 ifeq ($(ENABLE_JAVA),TRUE)
694 define gb_LinkTarget__use_jawt
695 $(call gb_LinkTarget_add_libs,$(1),\
696 $(JAWTLIB) \
699 endef
701 else # !ENABLE_JAVA
703 gb_LinkTarget__use_jawt :=
705 endif # ENABLE_JAVA
707 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
709 define gb_LinkTarget__use_libatomic_ops
710 $(call gb_LinkTarget_set_include,$(1),\
711 $$(INCLUDE) \
712 $(LIBATOMIC_OPS_CFLAGS) \
714 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
716 endef
717 gb_ExternalProject__use_libatomic_ops :=
719 else # !SYSTEM_LIBATOMIC_OPS
721 define gb_LinkTarget__use_libatomic_ops
722 $(call gb_LinkTarget_set_include,$(1),\
723 $(LIBATOMIC_OPS_CFLAGS) \
724 $$(INCLUDE) \
725 $(LIBATOMIC_OPS_CFLAGS) \
727 $(call gb_LinkTarget_use_external_project,$(1),\
728 libatomic_ops \
731 $(call gb_LinkTarget_add_libs,$(1),\
732 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
735 endef
737 define gb_ExternalProject__use_libatomic_ops
738 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
740 endef
742 endif # SYSTEM_LIBATOMIC_OPS
745 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
747 define gb_LinkTarget__use_libexttextcat
748 $(call gb_LinkTarget_set_include,$(1),\
749 $$(INCLUDE) \
750 $(LIBEXTTEXTCAT_CFLAGS) \
752 $(call gb_LinkTarget_add_defs,$(1),\
753 -DSYSTEM_LIBEXTTEXTCAT \
755 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
757 endef
759 else # !SYSTEM_LIBEXTTEXTCAT
761 define gb_LinkTarget__use_libexttextcat
762 $(call gb_LinkTarget_set_include,$(1),\
763 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
764 $$(INCLUDE) \
767 ifeq ($(COM),MSC)
768 $(call gb_LinkTarget_use_static_libraries,$(1),\
769 libexttextcat \
771 else
772 $(call gb_LinkTarget_add_libs,$(1),\
773 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
775 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
776 endif
779 endef
781 endif # SYSTEM_LIBEXTTEXTCAT
784 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
786 define gb_LinkTarget__use_libnumbertext
787 $(call gb_LinkTarget_set_include,$(1),\
788 $$(INCLUDE) \
789 $(LIBNUMBERTEXT_CFLAGS) \
791 $(call gb_LinkTarget_add_defs,$(1),\
792 -DSYSTEM_LIBNUMBERTEXT \
794 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
796 endef
798 else # !SYSTEM_LIBNUMBERTEXT
800 ifneq ($(ENABLE_LIBNUMBERTEXT),)
802 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
803 libnumbertext_numbertext \
806 define gb_LinkTarget__use_libnumbertext
807 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
808 $(call gb_LinkTarget_set_include,$(1),\
809 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
810 $$(INCLUDE) \
812 $(call gb_LinkTarget_add_defs,$(1),\
813 -DENABLE_LIBNUMBERTEXT \
816 ifeq ($(COM),MSC)
817 $(call gb_LinkTarget_use_static_libraries,$(1),\
818 libnumbertext \
820 else
822 $(call gb_LinkTarget_add_libs,$(1),\
823 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
825 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
827 endif
829 endef
831 else # !ENABLE_LIBNUMBERTEXT
833 define gb_LinkTarget__use_libnumbertext
834 endef
836 endif # ENABLE_LIBNUMBERTEXT
838 endif # SYSTEM_LIBNUMBERTEXT
841 ifneq ($(SYSTEM_LIBXML),)
843 define gb_LinkTarget__use_libxml2
844 $(call gb_LinkTarget_add_defs,$(1),\
845 -DSYSTEM_LIBXML \
847 $(call gb_LinkTarget_set_include,$(1),\
848 $$(INCLUDE) \
849 $(LIBXML_CFLAGS) \
851 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
853 endef
854 gb_ExternalProject__use_libxml2:=
856 else # !SYSTEM_LIBXML
858 $(eval $(call gb_Helper_register_packages_for_install,ure,\
859 libxml2 \
862 define gb_LinkTarget__use_libxml2
863 $(call gb_LinkTarget_use_package,$(1),libxml2)
864 $(call gb_LinkTarget_set_include,$(1),\
865 $$(INCLUDE) \
866 $(LIBXML_CFLAGS) \
869 $(call gb_LinkTarget_add_libs,$(1),\
870 $(LIBXML_LIBS) \
873 ifeq ($(COM),MSC)
874 $(call gb_LinkTarget_use_external,$(1),icu_headers)
875 endif
877 endef
878 define gb_ExternalProject__use_libxml2
879 $(call gb_ExternalProject_use_package,$(1),libxml2)
881 ifeq ($(COM),MSC)
882 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
883 endif
885 endef
887 endif # SYSTEM_LIBXML
890 ifneq ($(SYSTEM_LIBXSLT),)
892 define gb_LinkTarget__use_libxslt
893 $(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
895 $(LIBXSLT_CFLAGS) \
897 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
899 endef
901 define gb_LinkTarget__use_libexslt
902 $(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(LIBEXSLT_CFLAGS) \
907 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
909 endef
911 else # !SYSTEM_LIBXSLT
913 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
914 libxslt \
917 define gb_LinkTarget__use_libxslt
918 $(call gb_LinkTarget_use_package,$(1),libxslt)
919 $(call gb_LinkTarget_set_include,$(1),\
920 $$(INCLUDE) \
921 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
924 ifeq ($(COM),MSC)
925 $(call gb_LinkTarget_add_libs,$(1),\
926 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
928 else
929 $(call gb_LinkTarget_add_libs,$(1),\
930 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
932 endif
934 endef
936 define gb_LinkTarget__use_libexslt
937 $(call gb_LinkTarget_use_package,$(1),libxslt)
938 $(call gb_LinkTarget_set_include,$(1),\
939 $$(INCLUDE) \
940 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
943 ifeq ($(COM),MSC)
944 $(call gb_LinkTarget_add_libs,$(1),\
945 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
947 else
948 $(call gb_LinkTarget_add_libs,$(1),\
949 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
951 endif
953 endef
955 endif # SYSTEM_LIBXSLT
958 ifneq ($(SYSTEM_XMLSEC),)
960 define gb_LinkTarget__use_xmlsec
961 $(call gb_LinkTarget_add_defs,$(1),\
962 -DSYSTEM_XMLSEC \
964 $(call gb_LinkTarget_set_include,$(1),\
965 $$(INCLUDE) \
966 $(XMLSEC_CFLAGS) \
968 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
970 endef
972 gb_ExternalProject__use_xmlsec:=
974 else # !SYSTEM_XMLSEC
976 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
977 xmlsec \
980 define gb_LinkTarget__use_xmlsec
982 endef
984 endif # SYSTEM_XMLSEC
986 ifneq ($(SYSTEM_LIBLANGTAG),)
988 define gb_LinkTarget__use_liblangtag
989 $(call gb_LinkTarget_set_include,$(1),\
990 $$(INCLUDE) \
991 $(LIBLANGTAG_CFLAGS) \
994 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
996 endef
998 gb_ExternalProject__use_liblangtag :=
1000 else # !SYSTEM_LIBLANGTAG
1002 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1003 liblangtag_data \
1006 ifeq ($(COM),MSC)
1008 define gb_LinkTarget__use_liblangtag
1009 $(call gb_LinkTarget_set_include,$(1),\
1010 $(LIBLANGTAG_CFLAGS) \
1011 $$(INCLUDE) \
1013 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1014 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1016 endef
1018 else
1020 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1021 liblangtag \
1024 define gb_LinkTarget__use_liblangtag
1025 $(call gb_LinkTarget_set_include,$(1),\
1026 $(LIBLANGTAG_CFLAGS) \
1027 $$(INCLUDE) \
1029 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1030 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1032 endef
1034 endif # MSC
1036 define gb_ExternalProject__use_liblangtag
1037 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1039 endef
1041 endif # SYSTEM_LIBLANGTAG
1044 gb_ExternalProject__use_apr :=
1046 ifeq ($(WITH_WEBDAV),serf)
1048 define gb_LinkTarget__use_apr
1049 $(call gb_LinkTarget_set_include,$(1),\
1050 $$(INCLUDE) \
1051 $(APR_CFLAGS) \
1053 $(call gb_LinkTarget_add_libs,$(1),\
1054 $(APR_LIBS) \
1055 $(if $(filter $(OS),LINUX),-lpthread) \
1056 $(if $(filter $(OS),MACOSX),-liconv) \
1059 ifeq ($(SYSTEM_APR),)
1060 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1061 mswsock \
1062 rpcrt4 \
1063 shell32 \
1065 $(call gb_LinkTarget_add_defs,$(1),\
1066 -DAPR_DECLARE_STATIC \
1067 -DAPU_DECLARE_STATIC \
1069 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1070 endif
1072 endef
1074 define gb_ExternalProject__use_apr
1075 ifeq ($(SYSTEM_APR),)
1076 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1077 endif
1079 endef
1081 define gb_LinkTarget__use_serf
1082 $(call gb_LinkTarget_set_include,$(1),\
1083 $(SERF_CFLAGS) \
1084 $$(INCLUDE) \
1086 $(call gb_LinkTarget_add_libs,$(1),\
1087 $(SERF_LIBS) \
1090 ifeq ($(SYSTEM_SERF),)
1091 $(call gb_LinkTarget_use_external_project,$(1),serf)
1092 endif
1094 endef
1096 else ifeq ($(WITH_WEBDAV),neon)
1098 ifneq ($(SYSTEM_NEON),)
1100 define gb_LinkTarget__use_neon
1101 $(call gb_LinkTarget_add_defs,$(1),\
1102 -DNEON_VERSION=0x$(NEON_VERSION) \
1103 -DSYSTEM_NEON \
1105 $(call gb_LinkTarget_set_include,$(1),\
1106 $$(INCLUDE) \
1107 $(NEON_CFLAGS) \
1110 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1112 endef
1114 else # !SYSTEM_NEON
1116 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1117 neon \
1120 define gb_LinkTarget__use_neon
1121 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1122 $(call gb_LinkTarget_set_include,$(1),\
1123 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1124 $$(INCLUDE) \
1126 $(call gb_LinkTarget_use_libraries,$(1),\
1127 neon \
1130 endef
1132 endif # SYSTEM_NEON
1134 endif # WITH_WEBDAV
1136 ifneq ($(SYSTEM_REDLAND),)
1138 define gb_LinkTarget__use_librdf
1139 $(call gb_LinkTarget_add_defs,$(1),\
1140 -DSYSTEM_REDLAND \
1142 $(call gb_LinkTarget_set_include,$(1),\
1143 $$(INCLUDE) \
1144 $(REDLAND_CFLAGS) \
1146 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1148 endef
1150 gb_LinkTarget__use_redland_headers:=
1152 gb_LinkTarget__use_raptor_headers:=
1154 gb_LinkTarget__use_rasqal_headers:=
1156 else # !SYSTEM_REDLAND
1158 define gb_LinkTarget__use_redland_headers
1159 $(call gb_LinkTarget_set_include,$(1),\
1160 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1161 $$(INCLUDE) \
1164 endef
1166 define gb_LinkTarget__use_raptor_headers
1167 $(call gb_LinkTarget_set_include,$(1),\
1168 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1169 $$(INCLUDE) \
1172 endef
1174 define gb_LinkTarget__use_rasqal_headers
1175 $(call gb_LinkTarget_set_include,$(1),\
1176 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1177 $$(INCLUDE) \
1180 endef
1182 ifneq ($(OS),ANDROID)
1184 ifeq ($(COM),MSC)
1185 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1186 raptor2 \
1187 rasqal \
1188 rdf \
1190 else
1191 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1192 raptor \
1193 rasqal \
1194 redland \
1196 endif
1198 define gb_LinkTarget__use_librdf
1199 ifeq ($(COM),MSC)
1200 $(call gb_LinkTarget_use_libraries,$(1),\
1201 raptor2 \
1202 rdf \
1204 else
1205 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1207 $(call gb_LinkTarget_add_libs,$(1),\
1208 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1209 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1210 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1212 endif
1214 endef
1216 else # ANDROID
1218 define gb_LinkTarget__use_librdf
1219 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1221 endef
1223 endif # ANDROID
1225 endif # SYSTEM_REDLAND
1228 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1230 ifneq ($(SYSTEM_CAIRO),)
1232 define gb_LinkTarget__use_cairo
1233 $(call gb_LinkTarget_set_include,$(1),\
1234 $$(INCLUDE) \
1235 $(CAIRO_CFLAGS) \
1237 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1238 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1240 endef
1242 else # !SYSTEM_CAIRO
1244 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1245 cairo \
1246 $(if $(filter $(OS),WNT),,pixman) \
1249 define gb_LinkTarget__use_cairo
1250 $(call gb_LinkTarget_use_package,$(1),cairo)
1251 $(call gb_LinkTarget_use_package,$(1),pixman)
1252 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1253 $(call gb_LinkTarget_set_include,$(1),\
1254 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1255 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1256 $$(INCLUDE) \
1258 $(call gb_LinkTarget_add_libs,$(1),\
1259 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1260 $(if $(filter-out MACOSX WNT,$(OS)), \
1261 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1265 endef
1267 endif # SYSTEM_CAIRO
1269 else ifeq ($(OS),ANDROID)
1271 define gb_LinkTarget__use_cairo
1272 $(call gb_LinkTarget_use_package,$(1),cairo)
1273 $(call gb_LinkTarget_use_package,$(1),pixman)
1274 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1275 $(call gb_LinkTarget_set_include,$(1),\
1276 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1277 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1278 $$(INCLUDE) \
1280 $(call gb_LinkTarget_add_libs,$(1),\
1281 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1282 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1285 endef
1287 endif # CAIRO
1289 ifneq ($(SYSTEM_FREETYPE),)
1291 define gb_LinkTarget__use_freetype_headers
1292 $(call gb_LinkTarget_set_include,$(1),\
1293 $$(INCLUDE) \
1294 $(FREETYPE_CFLAGS) \
1297 endef
1299 gb_ExternalProject__use_freetype :=
1301 else
1303 define gb_LinkTarget__use_freetype_headers
1304 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1305 $(call gb_LinkTarget_set_include,$(1),\
1306 $(FREETYPE_CFLAGS) \
1307 $$(INCLUDE) \
1310 endef
1312 define gb_ExternalProject__use_freetype
1313 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1315 endef
1317 endif # SYSTEM_FREETYPE
1319 define gb_LinkTarget__use_freetype
1320 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1321 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1323 endef
1325 ifneq ($(SYSTEM_FONTCONFIG),)
1327 define gb_LinkTarget__use_fontconfig
1328 $(call gb_LinkTarget_set_include,$(1),\
1329 $$(INCLUDE) \
1330 $(FONTCONFIG_CFLAGS) \
1333 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1335 endef
1337 else
1339 define gb_LinkTarget__use_fontconfig
1340 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1341 $(call gb_LinkTarget_set_include,$(1),\
1342 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1343 $$(INCLUDE) \
1346 $(call gb_LinkTarget_add_libs,$(1),\
1347 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1350 endef
1352 endif # SYSTEM_FONTCONFIG
1354 ifneq ($(SYSTEM_GRAPHITE),)
1356 define gb_LinkTarget__use_graphite
1357 $(call gb_LinkTarget_set_include,$(1),\
1358 $$(INCLUDE) \
1359 $(GRAPHITE_CFLAGS) \
1361 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1363 endef
1365 gb_ExternalProject__use_graphite:=
1367 else # !SYSTEM_GRAPHITE
1369 define gb_LinkTarget__use_graphite
1370 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1371 $(call gb_LinkTarget_set_include,$(1),\
1372 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1373 $$(INCLUDE) \
1375 $(call gb_LinkTarget_use_static_libraries,$(1),\
1376 graphite \
1379 endef
1381 define gb_ExternalProject__use_graphite
1382 $(call gb_ExternalProject_use_static_libraries,$(1),\
1383 graphite \
1386 endef
1387 endif # SYSTEM_GRAPHITE
1389 ifneq ($(SYSTEM_ICU),)
1391 gb_LinkTarget__use_icu_headers:=
1392 gb_ExternalProject__use_icu:=
1394 define gb_LinkTarget__use_icudata
1395 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1397 endef
1398 define gb_LinkTarget__use_icui18n
1399 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1401 endef
1402 define gb_LinkTarget__use_icuuc
1403 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1405 endef
1407 else # !SYSTEM_ICU
1409 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1410 icu_ure \
1413 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1414 icu \
1417 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1418 gb_ICU_suffix:=lo
1419 else
1420 gb_ICU_suffix:=
1421 endif
1423 define gb_LinkTarget__use_icu_headers
1424 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1425 $(call gb_LinkTarget_set_include,$(1),\
1426 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1427 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1428 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1429 $$(INCLUDE) \
1432 endef
1434 define gb_ExternalProject__use_icu
1435 $(call gb_ExternalProject_use_package,$(1),icu)
1437 endef
1439 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1440 define gb_LinkTarget__use_icudata
1441 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1443 ifeq ($(OS),WNT)
1444 $(call gb_LinkTarget_add_libs,$(1),\
1445 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1447 else
1448 $(call gb_LinkTarget_add_libs,$(1),\
1449 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1451 endif
1453 endef
1455 define gb_LinkTarget__use_icui18n
1456 $(call gb_LinkTarget_use_package,$(1),icu)
1458 ifeq ($(OS),WNT)
1459 $(call gb_LinkTarget_add_libs,$(1),\
1460 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1462 else
1463 $(call gb_LinkTarget_add_libs,$(1),\
1464 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1466 endif
1468 endef
1470 define gb_LinkTarget__use_icuuc
1471 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1473 ifeq ($(OS),WNT)
1474 $(call gb_LinkTarget_add_libs,$(1),\
1475 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1477 else
1478 $(call gb_LinkTarget_add_libs,$(1),\
1479 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1481 endif
1483 endef
1485 endif # SYSTEM_ICU
1487 ifneq ($(SYSTEM_HARFBUZZ),)
1489 define gb_LinkTarget__use_harfbuzz
1490 $(call gb_LinkTarget_set_include,$(1),\
1491 $$(INCLUDE) \
1492 $(HARFBUZZ_CFLAGS) \
1494 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1496 endef
1498 gb_ExternalProject__use_harfbuzz :=
1500 else # SYSTEM_HARFBUZZ != TRUE
1502 define gb_LinkTarget__use_harfbuzz
1503 $(call gb_LinkTarget_set_include,$(1),\
1504 $(HARFBUZZ_CFLAGS) \
1505 $$(INCLUDE) \
1507 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1508 $(call gb_LinkTarget_use_external,$(1),icuuc)
1509 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1511 endef
1513 define gb_ExternalProject__use_harfbuzz
1514 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1516 endef
1518 endif # SYSTEM_HARFBUZZ
1520 ifeq ($(DISABLE_OPENSSL),TRUE)
1522 gb_ExternalProject__use_openssl:=
1523 gb_LinkTarget__use_openssl_headers:=
1524 gb_LinkTarget__use_openssl:=
1526 else # !DISABLE_OPENSSL
1528 ifneq ($(SYSTEM_OPENSSL),)
1530 gb_LinkTarget__use_openssl_headers:=
1531 gb_ExternalProject__use_openssl:=
1533 define gb_LinkTarget__use_openssl
1534 $(call gb_LinkTarget_set_include,$(1),\
1535 $$(INCLUDE) \
1536 $(OPENSSL_CFLAGS) \
1538 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1540 endef
1542 else # !SYSTEM_OPENSSL
1544 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1545 openssl \
1548 define gb_ExternalProject__use_openssl
1549 $(call gb_ExternalProject_use_package,$(1),openssl)
1551 endef
1553 define gb_LinkTarget__use_openssl_headers
1554 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1555 $(call gb_LinkTarget_set_include,$(1),\
1556 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1557 $$(INCLUDE) \
1560 endef
1562 define gb_LinkTarget__use_openssl
1563 $(call gb_LinkTarget_use_package,$(1),openssl)
1564 ifeq ($(OS),WNT)
1565 $(call gb_LinkTarget_add_libs,$(1),\
1566 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1567 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1569 else
1570 $(call gb_LinkTarget_add_libs,$(1),\
1571 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1572 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1574 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1575 ifeq ($(OS),SOLARIS)
1576 $(call gb_LinkTarget_add_libs,$(1),\
1577 -lnsl \
1578 -lsocket \
1580 endif
1581 endif
1583 endef
1585 endif # SYSTEM_OPENSSL
1586 endif # DISABLE_OPENSSL
1589 ifeq ($(DISABLE_OPENSSL),TRUE)
1591 define gb_LinkTarget__use_gnutls
1592 $(call gb_LinkTarget_set_include,$(1),\
1593 $$(INCLUDE) \
1594 $(GNUTLS_CFLAGS) \
1597 $(call gb_LinkTarget_add_defs,$(1),\
1598 -DDISABLE_OPENSSL \
1601 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1603 endef
1605 define gb_LinkTarget__use_libgcrypt
1606 $(call gb_LinkTarget_set_include,$(1),\
1607 $$(INCLUDE) \
1608 $(LIBGCRYPT_CFLAGS) \
1611 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1613 endef
1615 else # !DISABLE_OPENSSL
1617 gb_LinkTarget__use_gnutls:=
1618 gb_LinkTarget__use_libgcrypt:=
1620 endif # DISABLE_OPENSSL
1623 ifneq ($(SYSTEM_CDR),)
1625 define gb_LinkTarget__use_cdr
1626 $(call gb_LinkTarget_set_include,$(1),\
1627 $$(INCLUDE) \
1628 $(CDR_CFLAGS) \
1630 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1632 endef
1634 else # !SYSTEM_CDR
1636 define gb_LinkTarget__use_cdr
1637 $(call gb_LinkTarget_set_include,$(1),\
1638 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1639 $$(INCLUDE) \
1641 $(call gb_LinkTarget_add_libs,$(1),\
1642 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1644 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1645 endef
1647 endif # SYSTEM_CDR
1650 ifneq ($(SYSTEM_EBOOK),)
1652 define gb_LinkTarget__use_ebook
1653 $(call gb_LinkTarget_set_include,$(1),\
1654 $$(INCLUDE) \
1655 $(EBOOK_CFLAGS) \
1657 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1659 endef
1661 gb_ExternalProject__use_ebook :=
1663 else # !SYSTEM_EBOOK
1665 define gb_LinkTarget__use_ebook
1666 $(call gb_LinkTarget_set_include,$(1),\
1667 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1668 $$(INCLUDE) \
1670 $(call gb_LinkTarget_add_libs,$(1),\
1671 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1673 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1675 endef
1677 define gb_ExternalProject__use_ebook
1678 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1680 endef
1682 endif # SYSTEM_EBOOK
1685 ifneq ($(SYSTEM_ETONYEK),)
1687 define gb_LinkTarget__use_etonyek
1688 $(call gb_LinkTarget_set_include,$(1),\
1689 $$(INCLUDE) \
1690 $(ETONYEK_CFLAGS) \
1692 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1694 endef
1696 gb_ExternalProject__use_etonyek :=
1698 else # !SYSTEM_ETONYEK
1700 ifeq ($(COM),MSC)
1702 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1703 etonyek \
1706 define gb_LinkTarget__use_etonyek
1707 $(call gb_LinkTarget_set_include,$(1),\
1708 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1709 $$(INCLUDE) \
1711 $(call gb_LinkTarget_use_libraries,$(1),\
1712 etonyek \
1715 endef
1717 else # !MSC
1719 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1720 libetonyek \
1723 define gb_LinkTarget__use_etonyek
1724 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1726 $(call gb_LinkTarget_set_include,$(1),\
1727 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1728 -DLIBETONYEK_VISIBILITY \
1729 $$(INCLUDE) \
1731 $(call gb_LinkTarget_add_libs,$(1),\
1732 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1734 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1736 endef
1738 define gb_ExternalProject__use_etonyek
1739 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1741 endef
1743 endif
1745 endif # SYSTEM_ETONYEK
1748 ifneq ($(SYSTEM_FREEHAND),)
1750 define gb_LinkTarget__use_freehand
1751 $(call gb_LinkTarget_set_include,$(1),\
1752 $$(INCLUDE) \
1753 $(FREEHAND_CFLAGS) \
1755 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1757 endef
1759 gb_ExternalProject__use_freehand :=
1761 else # !SYSTEM_FREEHAND
1763 define gb_LinkTarget__use_freehand
1764 $(call gb_LinkTarget_set_include,$(1),\
1765 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1766 $$(INCLUDE) \
1768 $(call gb_LinkTarget_add_libs,$(1),\
1769 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1771 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1773 endef
1775 define gb_ExternalProject__use_freehand
1776 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1778 endef
1780 endif # SYSTEM_FREEHAND
1783 ifneq ($(SYSTEM_ODFGEN),)
1785 define gb_LinkTarget__use_odfgen
1786 $(call gb_LinkTarget_set_include,$(1),\
1787 $$(INCLUDE) \
1788 $(ODFGEN_CFLAGS) \
1790 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1792 endef
1794 else # !SYSTEM_ODFGEN
1796 ifeq ($(COM),MSC)
1798 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1799 odfgen \
1802 define gb_LinkTarget__use_odfgen
1803 $(call gb_LinkTarget_set_include,$(1),\
1804 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1805 $$(INCLUDE) \
1807 $(call gb_LinkTarget_use_libraries,$(1),\
1808 odfgen \
1811 endef
1813 else # !MSC
1815 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1816 libodfgen \
1819 define gb_LinkTarget__use_odfgen
1820 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1822 $(call gb_LinkTarget_set_include,$(1),\
1823 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1824 -DLIBODFGEN_VISIBILITY \
1825 $$(INCLUDE) \
1827 $(call gb_LinkTarget_add_libs,$(1),\
1828 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1831 endef
1833 endif
1835 endif # SYSTEM_ODFGEN
1837 ifneq ($(SYSTEM_EPUBGEN),)
1839 define gb_LinkTarget__use_epubgen
1840 $(call gb_LinkTarget_set_include,$(1),\
1841 $$(INCLUDE) \
1842 $(EPUBGEN_CFLAGS) \
1844 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1846 endef
1847 gb_ExternalProject__use_epubgen :=
1849 else # !SYSTEM_EPUBGEN
1851 define gb_LinkTarget__use_epubgen
1852 $(call gb_LinkTarget_set_include,$(1),\
1853 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1854 $$(INCLUDE) \
1856 $(call gb_LinkTarget_add_libs,$(1),\
1857 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1859 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1861 endef
1862 define gb_ExternalProject__use_epubgen
1863 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1865 endef
1867 endif # SYSTEM_EPUBGEN
1869 ifneq ($(SYSTEM_REVENGE),)
1871 define gb_LinkTarget__use_revenge
1872 $(call gb_LinkTarget_set_include,$(1),\
1873 $$(INCLUDE) \
1874 $(REVENGE_CFLAGS) \
1876 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1878 endef
1880 gb_ExternalProject__use_revenge :=
1882 else # !SYSTEM_REVENGE
1884 ifeq ($(COM),MSC)
1886 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1887 revenge \
1890 define gb_LinkTarget__use_revenge
1891 $(call gb_LinkTarget_set_include,$(1),\
1892 $(REVENGE_CFLAGS) \
1893 $$(INCLUDE) \
1895 $(call gb_LinkTarget_use_libraries,$(1),\
1896 revenge \
1899 endef
1901 define gb_ExternalProject__use_revenge
1902 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1904 endef
1906 else # !MSC
1908 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1909 librevenge \
1912 define gb_LinkTarget__use_revenge
1913 $(call gb_LinkTarget_use_package,$(1),librevenge)
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 $(REVENGE_CFLAGS) \
1917 -DLIBREVENGE_VISIBILITY \
1918 $$(INCLUDE) \
1920 $(call gb_LinkTarget_add_libs,$(1),\
1921 $(REVENGE_LIBS) \
1923 endef
1925 define gb_ExternalProject__use_revenge
1926 $(call gb_ExternalProject_use_package,$(1),librevenge)
1928 endef
1930 endif # MSC
1932 endif # SYSTEM_REVENGE
1935 ifneq ($(SYSTEM_ABW),)
1937 define gb_LinkTarget__use_abw
1938 $(call gb_LinkTarget_set_include,$(1),\
1939 $$(INCLUDE) \
1940 $(ABW_CFLAGS) \
1942 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1944 endef
1945 gb_ExternalProject__use_abw :=
1947 else # !SYSTEM_ABW
1949 define gb_LinkTarget__use_abw
1950 $(call gb_LinkTarget_set_include,$(1),\
1951 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1952 $$(INCLUDE) \
1954 $(call gb_LinkTarget_add_libs,$(1),\
1955 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1957 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1959 endef
1960 define gb_ExternalProject__use_abw
1961 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1963 endef
1965 endif # SYSTEM_ABW
1968 ifneq ($(SYSTEM_MSPUB),)
1970 define gb_LinkTarget__use_mspub
1971 $(call gb_LinkTarget_set_include,$(1),\
1972 $$(INCLUDE) \
1973 $(MSPUB_CFLAGS) \
1975 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1977 endef
1979 else # !SYSTEM_MSPUB
1981 define gb_LinkTarget__use_mspub
1982 $(call gb_LinkTarget_set_include,$(1),\
1983 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1984 $$(INCLUDE) \
1986 $(call gb_LinkTarget_add_libs,$(1),\
1987 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1989 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1991 endef
1993 endif # SYSTEM_MSPUB
1996 ifneq ($(SYSTEM_PAGEMAKER),)
1998 define gb_LinkTarget__use_pagemaker
1999 $(call gb_LinkTarget_set_include,$(1),\
2000 $$(INCLUDE) \
2001 $(PAGEMAKER_CFLAGS) \
2003 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2005 endef
2006 gb_ExternalProject__use_pagemaker :=
2008 else # !SYSTEM_PAGEMAKER
2010 define gb_LinkTarget__use_pagemaker
2011 $(call gb_LinkTarget_set_include,$(1),\
2012 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2013 $$(INCLUDE) \
2015 $(call gb_LinkTarget_add_libs,$(1),\
2016 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2018 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2020 endef
2021 define gb_ExternalProject__use_pagemaker
2022 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2024 endef
2026 endif # SYSTEM_PAGEMAKER
2029 ifneq ($(SYSTEM_QXP),)
2031 define gb_LinkTarget__use_qxp
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(QXP_CFLAGS) \
2036 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2038 endef
2039 gb_ExternalProject__use_qxp :=
2041 else # !SYSTEM_QXP
2043 define gb_LinkTarget__use_qxp
2044 $(call gb_LinkTarget_set_include,$(1),\
2045 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2046 $$(INCLUDE) \
2048 $(call gb_LinkTarget_add_libs,$(1),\
2049 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2051 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2053 endef
2054 define gb_ExternalProject__use_qxp
2055 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2057 endef
2059 endif # SYSTEM_QXP
2062 ifneq ($(SYSTEM_ZMF),)
2064 define gb_LinkTarget__use_zmf
2065 $(call gb_LinkTarget_set_include,$(1),\
2066 $$(INCLUDE) \
2067 $(ZMF_CFLAGS) \
2069 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2071 endef
2072 gb_ExternalProject__use_zmf :=
2074 else # !SYSTEM_ZMF
2076 define gb_LinkTarget__use_zmf
2077 $(call gb_LinkTarget_set_include,$(1),\
2078 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2079 $$(INCLUDE) \
2081 $(call gb_LinkTarget_add_libs,$(1),\
2082 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2084 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2086 endef
2087 define gb_ExternalProject__use_zmf
2088 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2090 endef
2092 endif # SYSTEM_ZMF
2095 ifneq ($(SYSTEM_VISIO),)
2097 define gb_LinkTarget__use_visio
2098 $(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
2100 $(VISIO_CFLAGS) \
2102 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2104 endef
2106 else # !SYSTEM_VISIO
2108 define gb_LinkTarget__use_visio
2109 $(call gb_LinkTarget_set_include,$(1),\
2110 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2111 $$(INCLUDE) \
2113 $(call gb_LinkTarget_add_libs,$(1),\
2114 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2116 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2118 endef
2120 endif # SYSTEM_VISIO
2123 ifneq ($(SYSTEM_WPD),)
2125 define gb_LinkTarget__use_wpd
2126 $(call gb_LinkTarget_set_include,$(1),\
2127 $$(INCLUDE) \
2128 $(WPD_CFLAGS) \
2130 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2132 endef
2133 gb_ExternalProject__use_wpd :=
2135 else # !SYSTEM_WPD
2137 ifeq ($(COM),MSC)
2139 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2140 wpd \
2143 define gb_LinkTarget__use_wpd
2144 $(call gb_LinkTarget_set_include,$(1),\
2145 $(WPD_CFLAGS) \
2146 $$(INCLUDE) \
2148 $(call gb_LinkTarget_use_libraries,$(1),\
2149 wpd \
2152 endef
2154 define gb_ExternalProject__use_wpd
2155 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2157 endef
2159 else # !MSC
2161 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2162 libwpd \
2165 define gb_LinkTarget__use_wpd
2166 $(call gb_LinkTarget_use_package,$(1),libwpd)
2168 $(call gb_LinkTarget_set_include,$(1),\
2169 $(WPD_CFLAGS) \
2170 $$(INCLUDE) \
2172 $(call gb_LinkTarget_add_libs,$(1),\
2173 $(WPD_LIBS) \
2176 endef
2178 define gb_ExternalProject__use_wpd
2179 $(call gb_ExternalProject_use_package,$(1),libwpd)
2181 endef
2183 endif # MSC
2185 endif # SYSTEM_WPD
2188 ifneq ($(SYSTEM_WPG),)
2190 define gb_LinkTarget__use_wpg
2191 $(call gb_LinkTarget_set_include,$(1),\
2192 $$(INCLUDE) \
2193 $(WPG_CFLAGS) \
2195 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2197 endef
2198 gb_ExternalProject__use_wpg :=
2200 else # !SYSTEM_WPG
2202 ifeq ($(COM),MSC)
2204 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2205 wpg \
2208 define gb_LinkTarget__use_wpg
2209 $(call gb_LinkTarget_set_include,$(1),\
2210 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2211 $$(INCLUDE) \
2213 $(call gb_LinkTarget_use_libraries,$(1),\
2214 wpg \
2217 endef
2219 else # !MSC
2221 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2222 libwpg \
2225 define gb_LinkTarget__use_wpg
2226 $(call gb_LinkTarget_use_package,$(1),libwpg)
2228 $(call gb_LinkTarget_set_include,$(1),\
2229 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2230 $$(INCLUDE) \
2232 $(call gb_LinkTarget_add_libs,$(1),\
2233 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2236 endef
2238 endif # MSC
2240 endif # SYSTEM_WPG
2243 ifneq ($(SYSTEM_WPS),)
2245 define gb_LinkTarget__use_wps
2246 $(call gb_LinkTarget_set_include,$(1),\
2247 $$(INCLUDE) \
2248 $(WPS_CFLAGS) \
2250 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2252 endef
2253 gb_ExternalProject__use_wps :=
2255 else # !SYSTEM_WPS
2257 ifeq ($(COM),MSC)
2259 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2260 wps \
2263 define gb_LinkTarget__use_wps
2264 $(call gb_LinkTarget_set_include,$(1),\
2265 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2266 $$(INCLUDE) \
2269 $(call gb_LinkTarget_use_libraries,$(1),\
2270 wps \
2273 endef
2275 else # !MSC
2277 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2278 libwps \
2281 define gb_LinkTarget__use_wps
2282 $(call gb_LinkTarget_use_package,$(1),libwps)
2284 $(call gb_LinkTarget_set_include,$(1),\
2285 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2286 $$(INCLUDE) \
2288 $(call gb_LinkTarget_add_libs,$(1),\
2289 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2292 endef
2294 endif # MSC
2296 endif # SYSTEM_WPS
2299 ifneq ($(SYSTEM_MWAW),)
2301 define gb_LinkTarget__use_mwaw
2302 $(call gb_LinkTarget_set_include,$(1),\
2303 $$(INCLUDE) \
2304 $(MWAW_CFLAGS) \
2306 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2308 endef
2310 else # !SYSTEM_MWAW
2312 ifeq ($(COM),MSC)
2314 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2315 mwaw \
2318 define gb_LinkTarget__use_mwaw
2319 $(call gb_LinkTarget_set_include,$(1),\
2320 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2321 $$(INCLUDE) \
2324 $(call gb_LinkTarget_use_libraries,$(1),\
2325 mwaw \
2328 endef
2330 else # !MSC
2332 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2333 libmwaw \
2336 define gb_LinkTarget__use_mwaw
2337 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2339 $(call gb_LinkTarget_set_include,$(1),\
2340 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2341 $$(INCLUDE) \
2343 $(call gb_LinkTarget_add_libs,$(1),\
2344 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2347 endef
2349 endif # MSC
2351 endif # SYSTEM_MWAW
2353 ifneq ($(SYSTEM_STAROFFICE),)
2355 define gb_LinkTarget__use_staroffice
2356 $(call gb_LinkTarget_set_include,$(1),\
2357 $$(INCLUDE) \
2358 $(STAROFFICE_CFLAGS) \
2360 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2362 endef
2364 else # !SYSTEM_STAROFFICE
2366 ifeq ($(COM),MSC)
2368 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2369 staroffice \
2372 define gb_LinkTarget__use_staroffice
2373 $(call gb_LinkTarget_set_include,$(1),\
2374 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2375 $$(INCLUDE) \
2378 $(call gb_LinkTarget_use_libraries,$(1),\
2379 staroffice \
2382 endef
2384 else # !MSC
2386 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2387 libstaroffice \
2390 define gb_LinkTarget__use_staroffice
2391 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2393 $(call gb_LinkTarget_set_include,$(1),\
2394 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2395 $$(INCLUDE) \
2397 $(call gb_LinkTarget_add_libs,$(1),\
2398 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2401 endef
2403 endif # MSC
2405 endif # SYSTEM_STAROFFICE
2408 ifneq ($(SYSTEM_LCMS2),)
2410 define gb_LinkTarget__use_lcms2
2411 $(call gb_LinkTarget_set_include,$(1),\
2412 $$(INCLUDE) \
2413 $(LCMS2_CFLAGS) \
2415 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2417 endef
2419 gb_ExternalProject__use_lcms2 :=
2421 else # !SYSTEM_LCMS2
2423 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2424 lcms2 \
2427 define gb_ExternalProject__use_lcms2
2428 $(call gb_ExternalProject_use_package,$(1),lcms2)
2430 endef
2432 ifeq ($(OS),ANDROID)
2434 define gb_LinkTarget__use_lcms2
2435 $(call gb_LinkTarget_use_package,$(1),lcms2)
2436 $(call gb_LinkTarget_set_include,$(1),\
2437 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2438 $$(INCLUDE) \
2441 endef
2443 else
2445 define gb_LinkTarget__use_lcms2
2446 $(call gb_LinkTarget_use_package,$(1),lcms2)
2447 $(call gb_LinkTarget_set_include,$(1),\
2448 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2449 $$(INCLUDE) \
2451 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2453 endef
2455 endif # ANDROID
2456 endif # SYSTEM_LCMS2
2458 ifneq ($(ENABLE_LPSOLVE),)
2460 ifneq ($(SYSTEM_LPSOLVE),)
2462 define gb_LinkTarget__use_lpsolve
2463 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2464 $(call gb_LinkTarget_add_defs,$(1),\
2465 -DSYSTEM_LPSOLVE \
2468 endef
2470 else # !SYSTEM_LPSOLVE
2472 define gb_LinkTarget__use_lpsolve
2473 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2474 ifeq ($(COM),MSC)
2475 $(call gb_LinkTarget_add_libs,$(1),\
2476 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2478 else
2479 $(call gb_LinkTarget_add_libs,$(1),\
2480 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2482 endif
2483 $(call gb_LinkTarget_set_include,$(1),\
2484 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2485 $$(INCLUDE) \
2488 endef
2490 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2491 lpsolve \
2494 endif # SYSTEM_LPSOLVE
2496 else
2498 gb_LinkTarget__use_lpsolve :=
2500 endif # ENABLE_LPSOLVE
2502 ifneq ($(ENABLE_COINMP),)
2504 ifneq ($(SYSTEM_COINMP),TRUE)
2506 define gb_LinkTarget__use_coinmp
2507 $(call gb_LinkTarget_use_package,$(1),coinmp)
2508 ifeq ($(COM),MSC)
2509 $(call gb_LinkTarget_add_libs,$(1),\
2510 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2512 else
2513 $(call gb_LinkTarget_add_libs,$(1),\
2514 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2515 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2516 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2517 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2518 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2519 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2520 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2522 endif
2523 $(call gb_LinkTarget_set_include,$(1),\
2524 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2525 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2526 $$(INCLUDE) \
2529 endef
2531 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2532 coinmp \
2535 else # SYSTEM_COINMP
2537 define gb_LinkTarget__use_coinmp
2538 $(call gb_LinkTarget_set_include,$(1),\
2539 $$(INCLUDE) \
2540 $(COINMP_CFLAGS) \
2542 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2544 endef
2546 endif
2548 else
2550 gb_LinkTarget__use_coinmp :=
2552 endif # ENABLE_COINMP
2554 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2556 define gb_LinkTarget__use_mDNSResponder
2557 $(call gb_LinkTarget_set_include,$(1),\
2558 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2559 $$(INCLUDE) \
2561 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2562 endef
2564 endif # MDNSRESPONDER
2566 ifeq ($(ENABLE_GIO),TRUE)
2568 define gb_LinkTarget__use_gio
2569 $(call gb_LinkTarget_set_include,$(1),\
2570 $$(INCLUDE) \
2571 $(GIO_CFLAGS) \
2574 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2576 endef
2578 else # ENABLE_GIO
2580 define gb_LinkTarget__use_gio
2582 endef
2584 endif # ENABLE_GIO
2586 ifeq ($(ENABLE_AVAHI),TRUE)
2588 define gb_LinkTarget__use_avahi
2589 $(call gb_LinkTarget_set_include,$(1),\
2590 $$(INCLUDE) \
2591 $(AVAHI_CFLAGS) \
2594 $(call gb_LinkTarget_add_defs,$(1),\
2595 -DENABLE_AVAHI \
2598 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2600 endef
2602 else # ENABLE_AVAHI
2604 gb_LinkTarget__use_avahi :=
2606 endif # ENABLE_AVAHI
2608 ifeq ($(ENABLE_CUPS),TRUE)
2610 define gb_LinkTarget__use_cups
2611 $(call gb_LinkTarget_add_defs,$(1),\
2612 -DENABLE_CUPS \
2615 $(call gb_LinkTarget_add_libs,$(1),\
2616 -lcups \
2619 endef
2621 else # ENABLE_CUPS
2623 define gb_LinkTarget__use_cups
2625 endef
2627 endif # ENABLE_CUPS
2629 ifeq ($(ENABLE_DBUS),TRUE)
2631 define gb_LinkTarget__use_dbus
2632 $(call gb_LinkTarget_set_include,$(1),\
2633 $$(INCLUDE) \
2634 $(DBUS_CFLAGS) \
2637 $(call gb_LinkTarget_add_libs,$(1),\
2638 $(DBUS_LIBS) \
2641 endef
2643 else # ENABLE_DBUS
2645 define gb_LinkTarget__use_dbus
2647 endef
2649 endif # ENABLE_DBUS
2652 ifneq ($(SYSTEM_LIBPNG),)
2654 define gb_LinkTarget__use_libpng
2655 $(call gb_LinkTarget_set_include,$(1),\
2656 $$(INCLUDE) \
2657 $(LIBPNG_CFLAGS) \
2660 $(call gb_LinkTarget_add_libs,$(1),\
2661 $(LIBPNG_LIBS) \
2664 endef
2666 gb_ExternalProject__use_libpng :=
2668 else # !SYSTEM_LIBPNG
2670 define gb_LinkTarget__use_libpng
2671 $(call gb_LinkTarget_set_include,$(1),\
2672 $(LIBPNG_CFLAGS) \
2673 $$(INCLUDE) \
2675 $(call gb_LinkTarget_use_static_libraries,$(1),\
2676 libpng \
2678 $(call gb_LinkTarget__use_zlib,$(1))
2680 endef
2682 define gb_ExternalProject__use_libpng
2683 $(call gb_ExternalProject_use_static_libraries,$(1),\
2684 libpng \
2687 endef
2689 endif # !SYSTEM_LIBPNG
2692 ifneq ($(SYSTEM_CURL),)
2694 define gb_LinkTarget__use_curl
2695 $(call gb_LinkTarget_add_defs,$(1),\
2696 -DSYSTEM_CURL \
2698 $(call gb_LinkTarget_set_include,$(1),\
2699 $$(INCLUDE) \
2700 $(CURL_CFLAGS) \
2702 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2704 endef
2706 else # !SYSTEM_CURL
2708 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2709 curl \
2712 define gb_LinkTarget__use_curl
2713 $(call gb_LinkTarget_use_package,$(1),curl)
2714 $(call gb_LinkTarget_set_include,$(1),\
2715 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2716 $$(INCLUDE) \
2719 ifeq ($(COM),MSC)
2720 $(call gb_LinkTarget_add_libs,$(1),\
2721 $(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 \
2723 else
2724 $(call gb_LinkTarget_add_libs,$(1),\
2725 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2727 endif
2729 endef
2731 endif # SYSTEM_CURL
2733 ifeq ($(ENABLE_VALGRIND),TRUE)
2735 define gb_LinkTarget__use_valgrind
2736 $(call gb_LinkTarget_add_defs,$(1),\
2737 -DHAVE_VALGRIND_HEADERS \
2740 $(call gb_LinkTarget_set_include,$(1),\
2741 $$(INCLUDE) \
2742 $(VALGRIND_CFLAGS) \
2745 endef
2747 else # !ENABLE_VALGRIND
2749 define gb_LinkTarget__use_valgrind
2751 endef
2753 endif # ENABLE_VALGRIND
2755 ifeq ($(ENABLE_POPPLER),TRUE)
2757 ifneq ($(SYSTEM_POPPLER),)
2759 define gb_LinkTarget__use_poppler
2760 $(call gb_LinkTarget_set_include,$(1),\
2761 $(POPPLER_CFLAGS) \
2762 $$(INCLUDE) \
2765 $(call gb_LinkTarget_add_libs,$(1),\
2766 $(POPPLER_LIBS) \
2769 endef
2771 else # !SYSTEM_POPPLER
2773 define gb_LinkTarget__use_poppler
2774 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2776 $(call gb_LinkTarget_set_include,$(1),\
2777 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2778 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2779 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2780 $$(INCLUDE) \
2783 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2785 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2787 ifeq ($(OS),MACOSX)
2788 $(call gb_LinkTarget_add_libs,$(1),\
2789 -lobjc \
2791 else ifeq ($(OS),LINUX)
2792 $(call gb_LinkTarget_add_libs,$(1),\
2793 -pthread \
2795 else ifeq ($(OS),WNT)
2796 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2797 advapi32 \
2798 gdi32 \
2800 endif
2802 endef
2804 endif # SYSTEM_POPPLER
2806 endif # ENABLE_POPPLER
2809 ifneq ($(SYSTEM_CLUCENE),)
2811 define gb_LinkTarget__use_clucene
2812 $(call gb_LinkTarget_add_defs,$(1),\
2813 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2816 $(call gb_LinkTarget_set_include,$(1),\
2817 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2818 $$(INCLUDE) \
2821 $(call gb_LinkTarget_add_libs,$(1),\
2822 $(CLUCENE_LIBS) \
2825 endef
2827 else # !SYSTEM_CLUCENE
2829 define gb_LinkTarget__use_clucene
2830 $(call gb_LinkTarget_set_include,$(1),\
2831 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2832 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2833 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2834 $$(INCLUDE) \
2837 $(call gb_LinkTarget_use_libraries,$(1),\
2838 clucene \
2841 endef
2843 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2844 clucene \
2847 endif # SYSTEM_CLUCENE
2849 define gb_LinkTarget__use_gobject
2850 $(call gb_LinkTarget_add_libs,$(1),\
2851 $(GOBJECT_LIBS) \
2854 $(call gb_LinkTarget_set_include,$(1),\
2855 $$(INCLUDE) \
2856 $(GOBJECT_CFLAGS) \
2858 endef
2860 ifneq ($(SYSTEM_HSQLDB),)
2862 define gb_LinkTarget__use_hsqldb
2864 $(call gb_LinkTarget_add_defs,$(1),\
2865 -DSYSTEM_HSQLDB \
2866 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2869 endef
2871 else # !SYSTEM_HSQLDB
2873 define gb_LinkTarget__use_hsqldb
2875 endef
2877 endif # SYSTEM_HSQLDB
2879 ifeq ($(ENABLE_LDAP),TRUE)
2880 ifneq ($(SYSTEM_OPENLDAP),)
2882 define gb_LinkTarget__use_openldap
2884 $(call gb_LinkTarget_add_libs,$(1),\
2885 -lldap \
2886 -llber \
2889 endef
2891 gb_ExternalProject__use_openldap :=
2893 else # !SYSTEM_OPENLDAP
2895 define gb_LinkTarget__use_openldap
2896 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2897 $(call gb_LinkTarget_set_include,$(1),\
2898 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2899 $$(INCLUDE) \
2901 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2902 $(call gb_LinkTarget_add_libs,$(1), \
2903 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2904 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2907 endef
2908 endif
2910 define gb_ExternalProject__use_openldap
2911 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2913 endef
2915 endif # SYSTEM_OPENLDAP
2917 ifneq ($(SYSTEM_LIBTOMMATH),)
2919 define gb_LinkTarget__use_libtommath
2920 $(call gb_LinkTarget_set_include,$(1),\
2921 $(LIBTOMMATH_CFLAGS) \
2922 $$(INCLUDE) \
2924 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2926 endef
2928 else # !SYSTEM_LIBTOMMATH
2929 define gb_LinkTarget__use_libtommath
2930 $(call gb_LinkTarget_set_include,$(1),\
2931 -I${WORKDIR}/UnpackedTarball/libtommath \
2932 $$(INCLUDE) \
2934 $(call gb_LinkTarget_add_libs,$(1),\
2935 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2937 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2939 endef
2941 endif # SYSTEM_LIBTOMMATH
2943 define gb_ExternalProject__use_libtommath
2944 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2946 endef
2948 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2950 ifneq ($(SYSTEM_FIREBIRD),)
2952 define gb_LinkTarget__use_libfbembed
2953 $(call gb_LinkTarget_set_include,$(1),\
2954 $(FIREBIRD_CFLAGS) \
2955 $$(INCLUDE) \
2957 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2959 endef
2961 else # !SYSTEM_FIREBIRD
2963 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2964 firebird \
2967 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2968 #$(call gb_LinkTarget__use_libtommath,$(1))
2970 define gb_LinkTarget__use_libfbembed
2971 $(call gb_LinkTarget_use_package,$(1),firebird)
2972 $(call gb_LinkTarget_set_include,$(1),\
2973 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2974 $$(INCLUDE) \
2976 ifeq ($(COM),MSC)
2977 $(call gb_LinkTarget_add_libs,$(1),\
2978 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2980 else
2981 $(call gb_LinkTarget_add_libs,$(1),\
2982 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2984 endif
2986 endef
2989 # endef
2991 endif # SYSTEM_FIREBIRD
2993 else # !ENABLE_FIREBIRD_SDBC
2995 gb_LinkTarget__use_firebird :=
2996 # gb_LinkTarget__use_atomic_ops :=
2997 # gb_LinkTarget__use_libtommath :=
2999 endif # ENABLE_FIREBIRD_SDBC
3002 ifneq ($(SYSTEM_POSTGRESQL),)
3004 define gb_LinkTarget__use_postgresql
3006 $(call gb_LinkTarget_set_include,$(1),\
3007 $(POSTGRESQL_INC) \
3008 $$(INCLUDE) \
3011 $(call gb_LinkTarget_add_libs,$(1),\
3012 -lpq \
3015 $(call gb_LinkTarget_add_ldflags,$(1),\
3016 $(POSTGRESQL_LIB) \
3019 endef
3021 else # !SYSTEM_POSTGRESQL
3023 define gb_LinkTarget__use_postgresql
3025 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3027 $(call gb_LinkTarget_set_include,$(1),\
3028 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3029 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3030 $$(INCLUDE) \
3033 $(call gb_LinkTarget_add_libs,$(1),\
3034 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3037 ifeq ($(OS),WNT)
3038 $(call gb_LinkTarget_use_external,$(1),openssl)
3040 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3041 secur32 \
3042 ws2_32 \
3045 endif
3047 endef
3049 endif # SYSTEM_POSTGRESQL
3051 ifeq ($(ENABLE_KF5),TRUE)
3053 define gb_LinkTarget__use_kf5
3054 $(call gb_LinkTarget_set_include,$(1),\
3055 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3056 $$(INCLUDE) \
3059 $(call gb_LinkTarget_add_cxxflags,$(1),\
3060 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3063 $(call gb_LinkTarget_add_libs,$(1),\
3064 $(KF5_LIBS) \
3067 endef
3069 else # !ENABLE_KF5
3071 define gb_LinkTarget__use_kf5
3073 endef
3075 endif # ENABLE_KF5
3079 ifeq ($(ENABLE_QT5),TRUE)
3081 define gb_LinkTarget__use_qt5
3082 $(call gb_LinkTarget_set_include,$(1),\
3083 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3084 $$(INCLUDE) \
3087 $(call gb_LinkTarget_add_defs,$(1),\
3088 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3091 $(call gb_LinkTarget_add_libs,$(1),\
3092 $(QT5_LIBS) \
3095 endef
3097 else # !ENABLE_QT5
3099 define gb_LinkTarget__use_qt5
3101 endef
3103 endif # ENABLE_QT5
3105 # PYTHON
3106 # extra python_headers external because pyuno wrapper must not link python
3107 ifneq ($(SYSTEM_PYTHON),)
3109 define gb_LinkTarget__use_python_headers
3110 $(call gb_LinkTarget_add_defs,$(1),\
3111 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3114 $(call gb_LinkTarget_set_include,$(1),\
3115 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3116 $$(INCLUDE) \
3119 endef
3121 define gb_LinkTarget__use_python
3122 $(call gb_LinkTarget__use_python_headers,$(1))
3124 $(call gb_LinkTarget_add_libs,$(1),\
3125 $(PYTHON_LIBS) \
3128 endef
3130 else # !SYSTEM_PYTHON
3132 $(eval $(call gb_Helper_register_packages_for_install,python,\
3133 python3 \
3136 define gb_LinkTarget__use_python_headers
3137 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3138 $(call gb_LinkTarget_set_include,$(1),\
3139 -I$(call gb_UnpackedTarball_get_dir,python3) \
3140 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3141 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3142 $$(INCLUDE) \
3145 endef
3147 define gb_LinkTarget__use_python
3148 $(call gb_LinkTarget__use_python_headers,$(1))
3149 ifeq ($(OS),MACOSX)
3150 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3151 else
3152 $(call gb_LinkTarget_use_package,$(1),python3)
3153 endif
3155 ifeq ($(OS),WNT)
3156 $(call gb_LinkTarget_add_libs,$(1),\
3157 $(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 \
3159 else ifeq ($(OS),MACOSX)
3160 $(call gb_LinkTarget_add_libs,$(1),\
3161 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3163 else
3164 $(call gb_LinkTarget_add_libs,$(1),\
3165 -L$(call gb_UnpackedTarball_get_dir,python3) \
3166 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3168 endif
3170 endef
3172 # this is only used by python currently
3173 define gb_ExternalProject__use_libffi
3174 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3176 endef
3178 endif # SYSTEM_PYTHON
3180 # ORCUS
3181 ifneq ($(SYSTEM_LIBORCUS),)
3183 define gb_LinkTarget__use_orcus
3184 $(call gb_LinkTarget_set_include,$(1),\
3185 $$(INCLUDE) \
3186 $(ORCUS_CFLAGS) \
3188 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3189 endef
3191 define gb_LinkTarget__use_orcus-parser
3193 endef
3195 else # !SYSTEM_LIBORCUS
3197 ifeq ($(COM),MSC)
3199 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3200 orcus \
3201 orcus-parser \
3204 define gb_LinkTarget__use_orcus
3205 $(call gb_LinkTarget_set_include,$(1),\
3206 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3207 $$(INCLUDE) \
3210 $(call gb_LinkTarget_use_libraries,$(1),\
3211 orcus \
3214 endef
3216 define gb_LinkTarget__use_orcus-parser
3217 $(call gb_LinkTarget_set_include,$(1),\
3218 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3219 $$(INCLUDE) \
3222 $(call gb_LinkTarget_use_libraries,$(1),\
3223 orcus-parser \
3226 endef
3228 else # !MSC
3230 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3231 liborcus \
3234 define gb_LinkTarget__use_orcus
3235 $(call gb_LinkTarget_use_package,$(1),liborcus)
3237 $(call gb_LinkTarget_set_include,$(1),\
3238 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3239 $$(INCLUDE) \
3242 $(call gb_LinkTarget_add_libs,$(1),\
3243 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3246 $(if $(SYSTEM_BOOST), \
3247 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3248 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3251 endef
3253 define gb_LinkTarget__use_orcus-parser
3254 $(call gb_LinkTarget_use_package,$(1),liborcus)
3256 $(call gb_LinkTarget_set_include,$(1),\
3257 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3258 $$(INCLUDE) \
3261 $(call gb_LinkTarget_add_libs,$(1),\
3262 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3265 endef
3267 endif # MSC
3269 endif # SYSTEM_LIBORCUS
3271 ifeq ($(ENABLE_EOT),TRUE)
3273 ifneq ($(SYSTEM_LIBEOT),)
3275 define gb_LinkTarget__use_libeot
3276 $(call gb_LinkTarget_set_include,$(1),\
3277 $$(INCLUDE) \
3278 $(LIBEOT_CFLAGS) \
3280 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3282 endef
3284 gb_ExternalProject__use_libeot :=
3286 else # !SYSTEM_LIBEOT
3288 define gb_LinkTarget__use_libeot
3289 $(call gb_LinkTarget_set_include,$(1),\
3290 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3291 $$(INCLUDE) \
3293 $(call gb_LinkTarget_add_libs,$(1),\
3294 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3296 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3298 endef
3300 define gb_ExternalProject__use_libeot
3301 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3303 endef
3305 endif # SYSTEM_LIBEOT
3307 else # !ENABLE_EOT
3309 gb_LinkTarget__use_libeot :=
3310 gb_ExternalProject__use_libeot :=
3312 endif # ENABLE_EOT
3314 ### X11 stuff ###
3316 ifeq ($(USING_X11), TRUE)
3318 define gb_LinkTarget__use_Xrandr
3319 $(call gb_LinkTarget_set_include,$(1),\
3320 $$(INCLUDE) \
3321 $(XRANDR_CFLAGS) \
3324 $(call gb_LinkTarget_add_libs,$(1),\
3325 $(XRANDR_LIBS) \
3327 endef
3329 define gb_LinkTarget__use_Xrender
3330 $(call gb_LinkTarget_set_include,$(1),\
3331 $$(INCLUDE) \
3332 $(XRENDER_CFLAGS) \
3335 $(call gb_LinkTarget_add_libs,$(1),\
3336 $(XRENDER_LIBS) \
3338 endef
3340 endif # USING_X11
3343 gb_ExternalProject__use_nss3:=
3346 ifneq ($(SYSTEM_NSS),)
3348 define gb_LinkTarget__use_nss3
3349 $(call gb_LinkTarget_add_defs,$(1),\
3350 -DSYSTEM_NSS \
3353 $(call gb_LinkTarget_set_include,$(1),\
3354 $$(INCLUDE) \
3355 $(NSS_CFLAGS) \
3358 $(call gb_LinkTarget_add_libs,$(1),\
3359 $(NSS_LIBS) \
3362 endef
3364 define gb_LinkTarget__use_plc4
3365 $(call gb_LinkTarget__use_nss3,$(1))
3367 endef
3369 define gb_LinkTarget__use_ssl3
3370 $(call gb_LinkTarget__use_nss3,$(1))
3372 endef
3374 else # !SYSTEM_NSS
3376 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3377 nss \
3380 define gb_LinkTarget__use_nss3
3381 $(call gb_LinkTarget_use_package,$(1),nss)
3382 $(call gb_LinkTarget_set_include,$(1),\
3383 $$(INCLUDE) \
3384 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3385 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3388 ifeq ($(COM),MSC)
3389 $(call gb_LinkTarget_add_libs,$(1),\
3390 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3391 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3392 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3394 else
3395 $(call gb_LinkTarget_add_libs,$(1),\
3396 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3397 -lnspr4 \
3398 -lnss3 \
3399 -lsmime3 \
3401 endif
3403 endef
3405 define gb_LinkTarget__use_plc4
3406 $(call gb_LinkTarget_use_package,$(1),nss)
3407 ifeq ($(COM),MSC)
3408 $(call gb_LinkTarget_add_libs,$(1),\
3409 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3411 else
3412 $(call gb_LinkTarget_add_libs,$(1),\
3413 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3415 endif
3417 endef
3419 define gb_LinkTarget__use_ssl3
3420 $(call gb_LinkTarget_use_package,$(1),nss)
3421 ifeq ($(COM),MSC)
3422 $(call gb_LinkTarget_add_libs,$(1),\
3423 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3425 else
3426 $(call gb_LinkTarget_add_libs,$(1),\
3427 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3429 endif
3431 endef
3433 define gb_ExternalProject__use_nss3
3434 $(call gb_ExternalProject_use_package,$(1),nss)
3436 endef
3438 endif # SYSTEM_NSS
3440 ifeq ($(ENABLE_BREAKPAD),TRUE)
3442 define gb_LinkTarget__use_breakpad
3443 $(call gb_LinkTarget_set_include,$(1),\
3444 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3445 $$(INCLUDE) \
3448 ifeq ($(COM),MSC)
3449 $(call gb_LinkTarget_use_static_libraries,$(1),\
3450 breakpad \
3452 else
3453 $(call gb_LinkTarget_add_libs,$(1),\
3454 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3456 endif
3458 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3460 endef
3462 endif # ENABLE_BREAKPAD
3464 ifeq ($(ENABLE_GPGMEPP),TRUE)
3466 ifneq ($(SYSTEM_GPGMEPP),)
3468 gb_ExternalProject__use_gpgmepp:=
3469 gb_ExternalProject__use_libassuan:=
3470 gb_ExternalProject__use_libgpg-error:=
3472 define gb_LinkTarget__use_gpgmepp
3473 $(call gb_LinkTarget_set_include,$(1),\
3474 $$(INCLUDE) \
3475 $$(GPGMEPP_CFLAGS) \
3478 $(call gb_LinkTarget_add_libs,$(1),\
3479 $(GPGMEPP_LIBS) \
3482 endef
3484 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3486 define gb_ExternalProject__use_gpgmepp
3487 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3489 endef
3490 define gb_ExternalProject__use_libassuan
3491 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3493 endef
3494 define gb_ExternalProject__use_libgpg-error
3495 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3497 endef
3499 ifneq ($(filter WNT,$(OS)),)
3501 define gb_LinkTarget__use_libgpg-error
3502 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3504 $(call gb_LinkTarget_set_include,$(1),\
3505 $(GPG_ERROR_CFLAGS) \
3506 $$(INCLUDE) \
3508 $(call gb_LinkTarget_add_libs,$(1),\
3509 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3512 endef
3514 define gb_LinkTarget__use_libassuan
3515 $(call gb_LinkTarget_use_package,$(1),libassuan)
3517 $(call gb_LinkTarget_set_include,$(1),\
3518 $(LIBASSUAN_CFLAGS) \
3519 $$(INCLUDE) \
3521 $(call gb_LinkTarget_add_libs,$(1),\
3522 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3525 endef
3527 define gb_LinkTarget__use_gpgmepp
3528 $(call gb_LinkTarget_set_include,$(1),\
3529 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3530 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3531 $$(GPG_ERROR_CFLAGS) \
3532 $$(INCLUDE) \
3534 $(call gb_LinkTarget_use_libraries,$(1),\
3535 gpgmepp \
3538 endef
3540 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3541 libassuan \
3542 libgpg-error \
3545 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3546 gpgmepp \
3549 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3550 gpgme-w32spawn \
3553 endif
3555 ifneq ($(filter MACOSX LINUX,$(OS)),)
3557 define gb_LinkTarget__use_gpgmepp
3558 $(call gb_LinkTarget_use_package,$(1),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_add_libs,$(1),\
3567 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3568 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3569 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3570 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3573 endef
3575 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3576 gpgmepp \
3577 libassuan \
3578 libgpg-error \
3581 endif
3583 endif
3585 else # !ENABLE_GPGMEPP
3587 gb_ExternalProject__use_gpgmepp :=
3588 gb_ExternalProject__use_libassuan :=
3589 gb_ExternalProject__use_libgpg-error :=
3591 gb_LinkTarget__use_gpgmepp :=
3592 gb_LinkTarget__use_libassuan :=
3593 gb_LinkTarget__use_libgpg-error :=
3595 endif # ENABLE_GPGMEPP
3597 define gb_LinkTarget__use_dconf
3598 $(call gb_LinkTarget_set_include,$(1),\
3599 $$(INCLUDE) \
3600 $(DCONF_CFLAGS) \
3603 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3604 endef
3606 ### Jars ############################################################
3608 ifneq ($(SYSTEM_HSQLDB),)
3610 define gb_Jar__use_hsqldb
3611 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3612 endef
3613 define gb_JunitTest__use_hsqldb
3614 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3615 endef
3617 else # !SYSTEM_HSQLDB
3619 ifeq ($(ENABLE_JAVA),TRUE)
3620 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3621 hsqldb \
3623 endif
3625 define gb_Jar__use_hsqldb
3626 $(call gb_Jar_use_jar,$(1),hsqldb)
3627 endef
3628 define gb_JunitTest__use_hsqldb
3629 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3630 endef
3632 endif # SYSTEM_HSQLDB
3635 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3637 ifneq ($(SYSTEM_BSH),)
3639 define gb_Jar__use_bsh
3640 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3641 endef
3643 else # !SYSTEM_BSH
3645 ifeq ($(ENABLE_JAVA),TRUE)
3646 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3647 bsh \
3649 endif
3651 define gb_Jar__use_bsh
3652 $(call gb_Jar_use_jar,$(1),bsh)
3653 endef
3655 endif # SYSTEM_BSH
3657 endif
3659 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3661 ifneq ($(SYSTEM_RHINO),)
3663 define gb_Jar__use_rhino
3664 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3665 endef
3667 else # !SYSTEM_RHINO
3669 ifeq ($(ENABLE_JAVA),TRUE)
3670 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3671 js \
3673 endif
3675 define gb_Jar__use_rhino
3676 $(call gb_Jar_use_jar,$(1),js)
3677 endef
3679 endif # SYSTEM_RHINO
3681 endif
3683 ifneq ($(SYSTEM_APACHE_COMMONS),)
3685 define gb_Jar__use_commons-logging
3686 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3687 endef
3688 gb_ExternalProject__use_commons-logging :=
3690 else # !SYSTEM_APACHE_COMMONS
3692 ifeq ($(ENABLE_JAVA),TRUE)
3693 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3694 commons-logging-$(COMMONS_LOGGING_VERSION) \
3696 endif
3698 define gb_Jar__use_commons-logging
3699 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3700 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3701 endef
3702 define gb_ExternalProject__use_commons-logging
3703 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3704 endef
3706 endif # SYSTEM_APACHE_COMMONS
3709 ifneq ($(SYSTEM_JFREEREPORT),)
3711 define gb_Jar__use_flow-engine
3712 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3713 endef
3715 define gb_Jar__use_flute
3716 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3717 endef
3719 define gb_Jar__use_libbase
3720 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3721 endef
3723 define gb_Jar__use_libfonts
3724 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3725 endef
3727 define gb_Jar__use_libformula
3728 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3729 endef
3731 define gb_Jar__use_liblayout
3732 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3733 endef
3735 define gb_Jar__use_libloader
3736 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3737 endef
3739 define gb_Jar__use_librepository
3740 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3741 endef
3743 define gb_Jar__use_libserializer
3744 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3745 endef
3747 define gb_Jar__use_libxml
3748 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3749 endef
3751 define gb_Jar__use_sac
3752 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3753 endef
3755 else # !SYSTEM_JFREEREPORT
3757 ifeq ($(ENABLE_JAVA),TRUE)
3758 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3759 flow-engine \
3760 flute-1.1.6 \
3761 libbase-1.1.6 \
3762 libfonts-1.1.6 \
3763 libformula-1.1.7 \
3764 liblayout \
3765 libloader-1.1.6 \
3766 librepository-1.1.6 \
3767 libserializer-1.1.6 \
3768 libxml-1.1.7 \
3769 sac \
3771 endif
3773 define gb_Jar__use_flow-engine
3774 $(call gb_Jar_use_jar,$(1),flow-engine)
3775 endef
3777 define gb_Jar__use_flute
3778 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3779 endef
3781 define gb_Jar__use_libbase
3782 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3783 endef
3785 define gb_Jar__use_libfonts
3786 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3787 endef
3789 define gb_Jar__use_libformula
3790 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3791 endef
3793 define gb_Jar__use_liblayout
3794 $(call gb_Jar_use_jar,$(1),liblayout)
3795 endef
3797 define gb_Jar__use_libloader
3798 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3799 endef
3801 define gb_Jar__use_librepository
3802 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3803 endef
3805 define gb_Jar__use_libserializer
3806 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3807 endef
3809 define gb_Jar__use_libxml
3810 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3811 endef
3813 define gb_Jar__use_sac
3814 $(call gb_Jar_use_jar,$(1),sac)
3815 endef
3817 endif # SYSTEM_JFREEREPORT
3820 # Executables
3822 # FIXME: the library target should be for build too
3823 define gb_Executable__register_bestreversemap
3824 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3825 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3827 endef
3829 # TODO depending on the whole URE might be overkill, but I do not have a
3830 # Windows machine to debug it...
3831 # FIXME: the library target should be for build too
3832 define gb_Executable__register_climaker
3833 $(call gb_Executable_add_runtime_dependencies,climaker,\
3834 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3835 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3836 $(call gb_UnoApi_get_target,udkapi) \
3837 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3839 endef
3841 define gb_Executable__register_cppumaker
3842 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3843 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3845 endef
3847 # This is used to determine what we need for 'build' platform.
3848 # FIXME: the library target should be for build too
3849 define gb_Executable__register_gengal
3850 $(call gb_Executable_add_runtime_dependencies,gengal,\
3851 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3852 $(call gb_Package_get_target_for_build,postprocess_images) \
3853 $(call gb_Package_get_target_for_build,postprocess_registry) \
3854 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3855 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3856 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3857 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3858 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3859 $(call gb_UnoApi_get_target,offapi) \
3860 $(call gb_UnoApi_get_target,udkapi) \
3862 endef
3864 ifeq ($(SYSTEM_ICU),)
3866 define gb_Executable__register_gendict
3867 $(call gb_Executable_add_runtime_dependencies,gendict,\
3868 $(call gb_Package_get_target_for_build,icu) \
3869 $(call gb_Package_get_target_for_build,icu_ure) \
3871 endef
3873 endif
3875 define gb_Executable__register_idlc
3876 $(call gb_Executable_add_runtime_dependencies,idlc,\
3877 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3879 endef
3881 define gb_Executable__register_localize
3882 $(call gb_Executable_add_runtime_dependencies,localize,\
3883 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3884 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3887 endef
3889 # FIXME ure/services.rdb needs cleanup
3890 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3891 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3892 # FIXME: the library target should be for build too
3893 define gb_Executable__register_saxparser
3894 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3895 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3896 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3897 $(call gb_Rdb_get_target_for_build,saxparser) \
3898 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3899 $(call gb_UnoApi_get_target,udkapi) \
3901 endef
3903 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3904 # required due to the settings for URE_SERVICES and URE_TYPES in
3905 # cppuhelper/source/unorc
3906 # FIXME: the library target should be for build too
3907 define gb_Executable__register_uno
3908 $(call gb_Executable_add_runtime_dependencies,uno,\
3909 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3910 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3911 $(call gb_UnoApi_get_target,udkapi) \
3913 endef
3916 # External executables
3918 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3920 gb_ExternalExecutable__register_xmllint :=
3922 else # ! SYSTEM_LIBXML_FOR_BUILD
3924 define gb_ExternalExecutable__register_xmllint
3925 $(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)
3926 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3927 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3928 $(call gb_Package_get_target,libxml2) \
3931 endef
3933 endif # SYSTEM_LIBXML_FOR_BUILD
3935 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3937 gb_ExternalExecutable__register_xsltproc :=
3939 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3941 define gb_ExternalExecutable__register_xsltproc
3942 $(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)
3943 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3944 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3945 $(call gb_Package_get_target,libxml2) \
3946 $(call gb_Package_get_target,libxslt) \
3949 endef
3951 endif # SYSTEM_LIBXSLT_FOR_BUILD
3953 ifneq (,$(SYSTEM_UCPP))
3955 gb_ExternalExecutable__register_ucpp :=
3957 else # ! SYSTEM_UCPP
3959 define gb_ExternalExecutable__register_ucpp
3960 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3962 endef
3964 endif # SYSTEM_UCPP
3966 ifeq (,$(PYTHON_FOR_BUILD))
3968 define gb_ExternalExecutable__register_python
3969 ifeq ($(OS),MACOSX)
3971 # use set_external, to avoid having the command added as prerequisite for the
3972 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3973 # matching rule to build that specific file)
3974 $(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))
3975 # the Zip ensures that internal python has been built (cannot use the Package
3976 # target, as that is not used on Mac)
3977 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3979 else
3981 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3982 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3983 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3985 endif
3987 endef
3989 else
3991 define gb_ExternalExecutable__register_python
3992 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3993 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
3995 endef
3997 endif # PYTHON_FOR_BUILD
3999 ifneq ($(SYSTEM_GENBRK),)
4001 define gb_ExternalExecutable__register_genbrk
4002 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4004 endef
4006 else # ! SYSTEM_GENBRK
4008 define gb_ExternalExecutable__register_genbrk
4009 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4010 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4011 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4012 $(call gb_Package_get_target_for_build,icu) \
4013 $(call gb_Package_get_target_for_build,icu_ure) \
4016 endef
4018 endif
4020 ifneq ($(SYSTEM_GENCCODE),)
4022 define gb_ExternalExecutable__register_genccode
4023 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4025 endef
4027 else # ! SYSTEM_GENCCODE
4029 define gb_ExternalExecutable__register_genccode
4030 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4031 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4032 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4033 $(call gb_Package_get_target_for_build,icu) \
4034 $(call gb_Package_get_target_for_build,icu_ure) \
4037 endef
4039 endif
4041 ifneq ($(SYSTEM_GENCMN),)
4043 define gb_ExternalExecutable__register_gencmn
4044 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4046 endef
4048 else # ! SYSTEM_GENCMN
4050 define gb_ExternalExecutable__register_gencmn
4051 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4052 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4053 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4054 $(call gb_Package_get_target_for_build,icu) \
4055 $(call gb_Package_get_target_for_build,icu_ure) \
4058 endef
4060 endif
4062 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4064 $(eval $(call gb_Helper_register_jars,OXT,\
4065 owncloud-android-library \
4068 define gb_Jar__use_owncloud_android_lib
4069 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4070 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4071 endef
4072 define gb_ExternalProject__use_owncloud_android_lib
4073 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4074 endef
4076 endif
4078 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4079 ifneq ($(SYSTEM_BZIP2),)
4081 define gb_LinkTarget__use_bzip2
4082 $(call gb_LinkTarget_set_include,$(1),\
4083 $(BZIP2_CFLAGS) \
4084 $$(INCLUDE) \
4086 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4088 endef
4090 gb_ExternalProject__use_bzip2 :=
4092 else # !SYSTEM_BZIP2
4094 define gb_LinkTarget__use_bzip2
4095 $(call gb_LinkTarget_set_include,$(1),\
4096 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4097 $$(INCLUDE) \
4100 ifeq ($(COM),MSC)
4101 $(call gb_LinkTarget_add_libs,$(1),\
4102 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4104 else
4105 $(call gb_LinkTarget_add_libs,$(1),\
4106 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4108 endif
4110 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4111 endef
4113 define gb_ExternalProject__use_bzip2
4114 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4115 endef
4117 endif
4118 endif
4120 define gb_LinkTarget__use_clew
4121 $(call gb_LinkTarget_set_include,$(1), \
4122 -I$(SRCDIR)/external/clew/source/include \
4123 $$(INCLUDE) \
4125 $(call gb_LinkTarget_use_libraries,$(1),clew)
4126 endef
4128 ifneq ($(ENABLE_PDFIUM),)
4129 define gb_LinkTarget__use_pdfium
4130 $(call gb_LinkTarget_set_include,$(1),\
4131 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4132 $$(INCLUDE) \
4134 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4135 endef
4136 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4137 pdfium \
4139 endif
4141 ifneq ($(SYSTEM_QRCODEGEN),)
4143 define gb_LinkTarget__use_qrcodegen
4144 $(call gb_LinkTarget_set_include,$(1),\
4145 -DSYSTEM_QRCODEGEN \
4146 $$(INCLUDE) \
4147 $(QRCODEGEN_CFLAGS) \
4149 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4151 endef
4153 gb_ExternalProject__use_qrcodegen :=
4155 else # !SYSTEM_QRCODEGEN
4157 define gb_LinkTarget__use_qrcodegen
4158 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4159 $(call gb_LinkTarget_set_include,$(1),\
4160 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4161 $$(INCLUDE) \
4163 $(call gb_LinkTarget_use_static_libraries,$(1),\
4164 qrcodegen \
4167 endef
4169 define gb_ExternalProject__use_qrcodegen
4170 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4172 endef
4174 endif # SYSTEM_QRCODEGEN
4176 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4177 $(if $(UCRT_REDISTDIR),ucrt) \
4180 # vim: set noet sw=4 ts=4: