sfx2 template dialogs: fix some a11y issues
[LibreOffice.git] / RepositoryExternal.mk
blobf172765a84f8ec69b2b1d1b59eef6ab31fc87210
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)/src \
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_project,$(1),harfbuzz)
1510 endef
1512 define gb_ExternalProject__use_harfbuzz
1513 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1515 endef
1517 endif # SYSTEM_HARFBUZZ
1519 ifeq ($(DISABLE_OPENSSL),TRUE)
1521 gb_ExternalProject__use_openssl:=
1522 gb_LinkTarget__use_openssl_headers:=
1523 gb_LinkTarget__use_openssl:=
1525 else # !DISABLE_OPENSSL
1527 ifneq ($(SYSTEM_OPENSSL),)
1529 gb_LinkTarget__use_openssl_headers:=
1530 gb_ExternalProject__use_openssl:=
1532 define gb_LinkTarget__use_openssl
1533 $(call gb_LinkTarget_set_include,$(1),\
1534 $$(INCLUDE) \
1535 $(OPENSSL_CFLAGS) \
1537 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1539 endef
1541 else # !SYSTEM_OPENSSL
1543 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1544 openssl \
1547 define gb_ExternalProject__use_openssl
1548 $(call gb_ExternalProject_use_package,$(1),openssl)
1550 endef
1552 define gb_LinkTarget__use_openssl_headers
1553 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1554 $(call gb_LinkTarget_set_include,$(1),\
1555 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1556 $$(INCLUDE) \
1559 endef
1561 define gb_LinkTarget__use_openssl
1562 $(call gb_LinkTarget_use_package,$(1),openssl)
1563 ifeq ($(OS),WNT)
1564 $(call gb_LinkTarget_add_libs,$(1),\
1565 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1566 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1568 else
1569 $(call gb_LinkTarget_add_libs,$(1),\
1570 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1571 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1573 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1574 ifeq ($(OS),SOLARIS)
1575 $(call gb_LinkTarget_add_libs,$(1),\
1576 -lnsl \
1577 -lsocket \
1579 endif
1580 endif
1582 endef
1584 endif # SYSTEM_OPENSSL
1585 endif # DISABLE_OPENSSL
1588 ifeq ($(DISABLE_OPENSSL),TRUE)
1590 define gb_LinkTarget__use_gnutls
1591 $(call gb_LinkTarget_set_include,$(1),\
1592 $$(INCLUDE) \
1593 $(GNUTLS_CFLAGS) \
1596 $(call gb_LinkTarget_add_defs,$(1),\
1597 -DDISABLE_OPENSSL \
1600 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1602 endef
1604 define gb_LinkTarget__use_libgcrypt
1605 $(call gb_LinkTarget_set_include,$(1),\
1606 $$(INCLUDE) \
1607 $(LIBGCRYPT_CFLAGS) \
1610 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1612 endef
1614 else # !DISABLE_OPENSSL
1616 gb_LinkTarget__use_gnutls:=
1617 gb_LinkTarget__use_libgcrypt:=
1619 endif # DISABLE_OPENSSL
1622 ifneq ($(SYSTEM_CDR),)
1624 define gb_LinkTarget__use_cdr
1625 $(call gb_LinkTarget_set_include,$(1),\
1626 $$(INCLUDE) \
1627 $(CDR_CFLAGS) \
1629 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1631 endef
1633 else # !SYSTEM_CDR
1635 define gb_LinkTarget__use_cdr
1636 $(call gb_LinkTarget_set_include,$(1),\
1637 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1638 $$(INCLUDE) \
1640 $(call gb_LinkTarget_add_libs,$(1),\
1641 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1643 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1644 endef
1646 endif # SYSTEM_CDR
1649 ifneq ($(SYSTEM_EBOOK),)
1651 define gb_LinkTarget__use_ebook
1652 $(call gb_LinkTarget_set_include,$(1),\
1653 $$(INCLUDE) \
1654 $(EBOOK_CFLAGS) \
1656 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1658 endef
1660 gb_ExternalProject__use_ebook :=
1662 else # !SYSTEM_EBOOK
1664 define gb_LinkTarget__use_ebook
1665 $(call gb_LinkTarget_set_include,$(1),\
1666 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1667 $$(INCLUDE) \
1669 $(call gb_LinkTarget_add_libs,$(1),\
1670 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1672 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1674 endef
1676 define gb_ExternalProject__use_ebook
1677 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1679 endef
1681 endif # SYSTEM_EBOOK
1684 ifneq ($(SYSTEM_ETONYEK),)
1686 define gb_LinkTarget__use_etonyek
1687 $(call gb_LinkTarget_set_include,$(1),\
1688 $$(INCLUDE) \
1689 $(ETONYEK_CFLAGS) \
1691 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1693 endef
1695 gb_ExternalProject__use_etonyek :=
1697 else # !SYSTEM_ETONYEK
1699 ifeq ($(COM),MSC)
1701 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1702 etonyek \
1705 define gb_LinkTarget__use_etonyek
1706 $(call gb_LinkTarget_set_include,$(1),\
1707 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1708 $$(INCLUDE) \
1710 $(call gb_LinkTarget_use_libraries,$(1),\
1711 etonyek \
1714 endef
1716 else # !MSC
1718 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1719 libetonyek \
1722 define gb_LinkTarget__use_etonyek
1723 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1725 $(call gb_LinkTarget_set_include,$(1),\
1726 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1727 -DLIBETONYEK_VISIBILITY \
1728 $$(INCLUDE) \
1730 $(call gb_LinkTarget_add_libs,$(1),\
1731 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1733 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1735 endef
1737 define gb_ExternalProject__use_etonyek
1738 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1740 endef
1742 endif
1744 endif # SYSTEM_ETONYEK
1747 ifneq ($(SYSTEM_FREEHAND),)
1749 define gb_LinkTarget__use_freehand
1750 $(call gb_LinkTarget_set_include,$(1),\
1751 $$(INCLUDE) \
1752 $(FREEHAND_CFLAGS) \
1754 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1756 endef
1758 gb_ExternalProject__use_freehand :=
1760 else # !SYSTEM_FREEHAND
1762 define gb_LinkTarget__use_freehand
1763 $(call gb_LinkTarget_set_include,$(1),\
1764 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1765 $$(INCLUDE) \
1767 $(call gb_LinkTarget_add_libs,$(1),\
1768 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1770 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1772 endef
1774 define gb_ExternalProject__use_freehand
1775 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1777 endef
1779 endif # SYSTEM_FREEHAND
1782 ifneq ($(SYSTEM_ODFGEN),)
1784 define gb_LinkTarget__use_odfgen
1785 $(call gb_LinkTarget_set_include,$(1),\
1786 $$(INCLUDE) \
1787 $(ODFGEN_CFLAGS) \
1789 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1791 endef
1793 else # !SYSTEM_ODFGEN
1795 ifeq ($(COM),MSC)
1797 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1798 odfgen \
1801 define gb_LinkTarget__use_odfgen
1802 $(call gb_LinkTarget_set_include,$(1),\
1803 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1804 $$(INCLUDE) \
1806 $(call gb_LinkTarget_use_libraries,$(1),\
1807 odfgen \
1810 endef
1812 else # !MSC
1814 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1815 libodfgen \
1818 define gb_LinkTarget__use_odfgen
1819 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1821 $(call gb_LinkTarget_set_include,$(1),\
1822 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1823 -DLIBODFGEN_VISIBILITY \
1824 $$(INCLUDE) \
1826 $(call gb_LinkTarget_add_libs,$(1),\
1827 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1830 endef
1832 endif
1834 endif # SYSTEM_ODFGEN
1836 ifneq ($(SYSTEM_EPUBGEN),)
1838 define gb_LinkTarget__use_epubgen
1839 $(call gb_LinkTarget_set_include,$(1),\
1840 $$(INCLUDE) \
1841 $(EPUBGEN_CFLAGS) \
1843 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1845 endef
1846 gb_ExternalProject__use_epubgen :=
1848 else # !SYSTEM_EPUBGEN
1850 define gb_LinkTarget__use_epubgen
1851 $(call gb_LinkTarget_set_include,$(1),\
1852 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1853 $$(INCLUDE) \
1855 $(call gb_LinkTarget_add_libs,$(1),\
1856 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1858 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1860 endef
1861 define gb_ExternalProject__use_epubgen
1862 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1864 endef
1866 endif # SYSTEM_EPUBGEN
1868 ifneq ($(SYSTEM_REVENGE),)
1870 define gb_LinkTarget__use_revenge
1871 $(call gb_LinkTarget_set_include,$(1),\
1872 $$(INCLUDE) \
1873 $(REVENGE_CFLAGS) \
1875 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1877 endef
1879 gb_ExternalProject__use_revenge :=
1881 else # !SYSTEM_REVENGE
1883 ifeq ($(COM),MSC)
1885 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1886 revenge \
1889 define gb_LinkTarget__use_revenge
1890 $(call gb_LinkTarget_set_include,$(1),\
1891 $(REVENGE_CFLAGS) \
1892 $$(INCLUDE) \
1894 $(call gb_LinkTarget_use_libraries,$(1),\
1895 revenge \
1898 endef
1900 define gb_ExternalProject__use_revenge
1901 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1903 endef
1905 else # !MSC
1907 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1908 librevenge \
1911 define gb_LinkTarget__use_revenge
1912 $(call gb_LinkTarget_use_package,$(1),librevenge)
1914 $(call gb_LinkTarget_set_include,$(1),\
1915 $(REVENGE_CFLAGS) \
1916 -DLIBREVENGE_VISIBILITY \
1917 $$(INCLUDE) \
1919 $(call gb_LinkTarget_add_libs,$(1),\
1920 $(REVENGE_LIBS) \
1922 endef
1924 define gb_ExternalProject__use_revenge
1925 $(call gb_ExternalProject_use_package,$(1),librevenge)
1927 endef
1929 endif # MSC
1931 endif # SYSTEM_REVENGE
1934 ifneq ($(SYSTEM_ABW),)
1936 define gb_LinkTarget__use_abw
1937 $(call gb_LinkTarget_set_include,$(1),\
1938 $$(INCLUDE) \
1939 $(ABW_CFLAGS) \
1941 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1943 endef
1944 gb_ExternalProject__use_abw :=
1946 else # !SYSTEM_ABW
1948 define gb_LinkTarget__use_abw
1949 $(call gb_LinkTarget_set_include,$(1),\
1950 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1951 $$(INCLUDE) \
1953 $(call gb_LinkTarget_add_libs,$(1),\
1954 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1956 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1958 endef
1959 define gb_ExternalProject__use_abw
1960 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1962 endef
1964 endif # SYSTEM_ABW
1967 ifneq ($(SYSTEM_MSPUB),)
1969 define gb_LinkTarget__use_mspub
1970 $(call gb_LinkTarget_set_include,$(1),\
1971 $$(INCLUDE) \
1972 $(MSPUB_CFLAGS) \
1974 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1976 endef
1978 else # !SYSTEM_MSPUB
1980 define gb_LinkTarget__use_mspub
1981 $(call gb_LinkTarget_set_include,$(1),\
1982 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1983 $$(INCLUDE) \
1985 $(call gb_LinkTarget_add_libs,$(1),\
1986 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1988 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1990 endef
1992 endif # SYSTEM_MSPUB
1995 ifneq ($(SYSTEM_PAGEMAKER),)
1997 define gb_LinkTarget__use_pagemaker
1998 $(call gb_LinkTarget_set_include,$(1),\
1999 $$(INCLUDE) \
2000 $(PAGEMAKER_CFLAGS) \
2002 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2004 endef
2005 gb_ExternalProject__use_pagemaker :=
2007 else # !SYSTEM_PAGEMAKER
2009 define gb_LinkTarget__use_pagemaker
2010 $(call gb_LinkTarget_set_include,$(1),\
2011 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2012 $$(INCLUDE) \
2014 $(call gb_LinkTarget_add_libs,$(1),\
2015 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2017 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2019 endef
2020 define gb_ExternalProject__use_pagemaker
2021 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2023 endef
2025 endif # SYSTEM_PAGEMAKER
2028 ifneq ($(SYSTEM_QXP),)
2030 define gb_LinkTarget__use_qxp
2031 $(call gb_LinkTarget_set_include,$(1),\
2032 $$(INCLUDE) \
2033 $(QXP_CFLAGS) \
2035 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2037 endef
2038 gb_ExternalProject__use_qxp :=
2040 else # !SYSTEM_QXP
2042 define gb_LinkTarget__use_qxp
2043 $(call gb_LinkTarget_set_include,$(1),\
2044 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2045 $$(INCLUDE) \
2047 $(call gb_LinkTarget_add_libs,$(1),\
2048 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2050 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2052 endef
2053 define gb_ExternalProject__use_qxp
2054 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2056 endef
2058 endif # SYSTEM_QXP
2061 ifneq ($(SYSTEM_ZMF),)
2063 define gb_LinkTarget__use_zmf
2064 $(call gb_LinkTarget_set_include,$(1),\
2065 $$(INCLUDE) \
2066 $(ZMF_CFLAGS) \
2068 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2070 endef
2071 gb_ExternalProject__use_zmf :=
2073 else # !SYSTEM_ZMF
2075 define gb_LinkTarget__use_zmf
2076 $(call gb_LinkTarget_set_include,$(1),\
2077 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2078 $$(INCLUDE) \
2080 $(call gb_LinkTarget_add_libs,$(1),\
2081 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2083 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2085 endef
2086 define gb_ExternalProject__use_zmf
2087 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2089 endef
2091 endif # SYSTEM_ZMF
2094 ifneq ($(SYSTEM_VISIO),)
2096 define gb_LinkTarget__use_visio
2097 $(call gb_LinkTarget_set_include,$(1),\
2098 $$(INCLUDE) \
2099 $(VISIO_CFLAGS) \
2101 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2103 endef
2105 else # !SYSTEM_VISIO
2107 define gb_LinkTarget__use_visio
2108 $(call gb_LinkTarget_set_include,$(1),\
2109 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2110 $$(INCLUDE) \
2112 $(call gb_LinkTarget_add_libs,$(1),\
2113 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2115 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2117 endef
2119 endif # SYSTEM_VISIO
2122 ifneq ($(SYSTEM_WPD),)
2124 define gb_LinkTarget__use_wpd
2125 $(call gb_LinkTarget_set_include,$(1),\
2126 $$(INCLUDE) \
2127 $(WPD_CFLAGS) \
2129 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2131 endef
2132 gb_ExternalProject__use_wpd :=
2134 else # !SYSTEM_WPD
2136 ifeq ($(COM),MSC)
2138 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2139 wpd \
2142 define gb_LinkTarget__use_wpd
2143 $(call gb_LinkTarget_set_include,$(1),\
2144 $(WPD_CFLAGS) \
2145 $$(INCLUDE) \
2147 $(call gb_LinkTarget_use_libraries,$(1),\
2148 wpd \
2151 endef
2153 define gb_ExternalProject__use_wpd
2154 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2156 endef
2158 else # !MSC
2160 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2161 libwpd \
2164 define gb_LinkTarget__use_wpd
2165 $(call gb_LinkTarget_use_package,$(1),libwpd)
2167 $(call gb_LinkTarget_set_include,$(1),\
2168 $(WPD_CFLAGS) \
2169 $$(INCLUDE) \
2171 $(call gb_LinkTarget_add_libs,$(1),\
2172 $(WPD_LIBS) \
2175 endef
2177 define gb_ExternalProject__use_wpd
2178 $(call gb_ExternalProject_use_package,$(1),libwpd)
2180 endef
2182 endif # MSC
2184 endif # SYSTEM_WPD
2187 ifneq ($(SYSTEM_WPG),)
2189 define gb_LinkTarget__use_wpg
2190 $(call gb_LinkTarget_set_include,$(1),\
2191 $$(INCLUDE) \
2192 $(WPG_CFLAGS) \
2194 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2196 endef
2197 gb_ExternalProject__use_wpg :=
2199 else # !SYSTEM_WPG
2201 ifeq ($(COM),MSC)
2203 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2204 wpg \
2207 define gb_LinkTarget__use_wpg
2208 $(call gb_LinkTarget_set_include,$(1),\
2209 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2210 $$(INCLUDE) \
2212 $(call gb_LinkTarget_use_libraries,$(1),\
2213 wpg \
2216 endef
2218 else # !MSC
2220 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2221 libwpg \
2224 define gb_LinkTarget__use_wpg
2225 $(call gb_LinkTarget_use_package,$(1),libwpg)
2227 $(call gb_LinkTarget_set_include,$(1),\
2228 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2229 $$(INCLUDE) \
2231 $(call gb_LinkTarget_add_libs,$(1),\
2232 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2235 endef
2237 endif # MSC
2239 endif # SYSTEM_WPG
2242 ifneq ($(SYSTEM_WPS),)
2244 define gb_LinkTarget__use_wps
2245 $(call gb_LinkTarget_set_include,$(1),\
2246 $$(INCLUDE) \
2247 $(WPS_CFLAGS) \
2249 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2251 endef
2252 gb_ExternalProject__use_wps :=
2254 else # !SYSTEM_WPS
2256 ifeq ($(COM),MSC)
2258 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2259 wps \
2262 define gb_LinkTarget__use_wps
2263 $(call gb_LinkTarget_set_include,$(1),\
2264 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2265 $$(INCLUDE) \
2268 $(call gb_LinkTarget_use_libraries,$(1),\
2269 wps \
2272 endef
2274 else # !MSC
2276 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2277 libwps \
2280 define gb_LinkTarget__use_wps
2281 $(call gb_LinkTarget_use_package,$(1),libwps)
2283 $(call gb_LinkTarget_set_include,$(1),\
2284 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2285 $$(INCLUDE) \
2287 $(call gb_LinkTarget_add_libs,$(1),\
2288 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2291 endef
2293 endif # MSC
2295 endif # SYSTEM_WPS
2298 ifneq ($(SYSTEM_MWAW),)
2300 define gb_LinkTarget__use_mwaw
2301 $(call gb_LinkTarget_set_include,$(1),\
2302 $$(INCLUDE) \
2303 $(MWAW_CFLAGS) \
2305 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2307 endef
2309 else # !SYSTEM_MWAW
2311 ifeq ($(COM),MSC)
2313 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2314 mwaw \
2317 define gb_LinkTarget__use_mwaw
2318 $(call gb_LinkTarget_set_include,$(1),\
2319 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2320 $$(INCLUDE) \
2323 $(call gb_LinkTarget_use_libraries,$(1),\
2324 mwaw \
2327 endef
2329 else # !MSC
2331 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2332 libmwaw \
2335 define gb_LinkTarget__use_mwaw
2336 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2338 $(call gb_LinkTarget_set_include,$(1),\
2339 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2340 $$(INCLUDE) \
2342 $(call gb_LinkTarget_add_libs,$(1),\
2343 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2346 endef
2348 endif # MSC
2350 endif # SYSTEM_MWAW
2352 ifneq ($(SYSTEM_STAROFFICE),)
2354 define gb_LinkTarget__use_staroffice
2355 $(call gb_LinkTarget_set_include,$(1),\
2356 $$(INCLUDE) \
2357 $(STAROFFICE_CFLAGS) \
2359 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2361 endef
2363 else # !SYSTEM_STAROFFICE
2365 ifeq ($(COM),MSC)
2367 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2368 staroffice \
2371 define gb_LinkTarget__use_staroffice
2372 $(call gb_LinkTarget_set_include,$(1),\
2373 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2374 $$(INCLUDE) \
2377 $(call gb_LinkTarget_use_libraries,$(1),\
2378 staroffice \
2381 endef
2383 else # !MSC
2385 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2386 libstaroffice \
2389 define gb_LinkTarget__use_staroffice
2390 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2392 $(call gb_LinkTarget_set_include,$(1),\
2393 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2394 $$(INCLUDE) \
2396 $(call gb_LinkTarget_add_libs,$(1),\
2397 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2400 endef
2402 endif # MSC
2404 endif # SYSTEM_STAROFFICE
2407 ifneq ($(SYSTEM_LCMS2),)
2409 define gb_LinkTarget__use_lcms2
2410 $(call gb_LinkTarget_set_include,$(1),\
2411 $$(INCLUDE) \
2412 $(LCMS2_CFLAGS) \
2414 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2416 endef
2418 gb_ExternalProject__use_lcms2 :=
2420 else # !SYSTEM_LCMS2
2422 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2423 lcms2 \
2426 define gb_ExternalProject__use_lcms2
2427 $(call gb_ExternalProject_use_package,$(1),lcms2)
2429 endef
2431 ifeq ($(OS),ANDROID)
2433 define gb_LinkTarget__use_lcms2
2434 $(call gb_LinkTarget_use_package,$(1),lcms2)
2435 $(call gb_LinkTarget_set_include,$(1),\
2436 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2437 $$(INCLUDE) \
2440 endef
2442 else
2444 define gb_LinkTarget__use_lcms2
2445 $(call gb_LinkTarget_use_package,$(1),lcms2)
2446 $(call gb_LinkTarget_set_include,$(1),\
2447 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2448 $$(INCLUDE) \
2450 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2452 endef
2454 endif # ANDROID
2455 endif # SYSTEM_LCMS2
2457 ifneq ($(ENABLE_LPSOLVE),)
2459 ifneq ($(SYSTEM_LPSOLVE),)
2461 define gb_LinkTarget__use_lpsolve
2462 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2463 $(call gb_LinkTarget_add_defs,$(1),\
2464 -DSYSTEM_LPSOLVE \
2467 endef
2469 else # !SYSTEM_LPSOLVE
2471 define gb_LinkTarget__use_lpsolve
2472 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2473 ifeq ($(COM),MSC)
2474 $(call gb_LinkTarget_add_libs,$(1),\
2475 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2477 else
2478 $(call gb_LinkTarget_add_libs,$(1),\
2479 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2481 endif
2482 $(call gb_LinkTarget_set_include,$(1),\
2483 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2484 $$(INCLUDE) \
2487 endef
2489 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2490 lpsolve \
2493 endif # SYSTEM_LPSOLVE
2495 else
2497 gb_LinkTarget__use_lpsolve :=
2499 endif # ENABLE_LPSOLVE
2501 ifneq ($(ENABLE_COINMP),)
2503 ifneq ($(SYSTEM_COINMP),TRUE)
2505 define gb_LinkTarget__use_coinmp
2506 $(call gb_LinkTarget_use_package,$(1),coinmp)
2507 ifeq ($(COM),MSC)
2508 $(call gb_LinkTarget_add_libs,$(1),\
2509 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2511 else
2512 $(call gb_LinkTarget_add_libs,$(1),\
2513 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2514 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2515 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2516 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2517 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2518 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2519 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2521 endif
2522 $(call gb_LinkTarget_set_include,$(1),\
2523 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2524 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2525 $$(INCLUDE) \
2528 endef
2530 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2531 coinmp \
2534 else # SYSTEM_COINMP
2536 define gb_LinkTarget__use_coinmp
2537 $(call gb_LinkTarget_set_include,$(1),\
2538 $$(INCLUDE) \
2539 $(COINMP_CFLAGS) \
2541 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2543 endef
2545 endif
2547 else
2549 gb_LinkTarget__use_coinmp :=
2551 endif # ENABLE_COINMP
2553 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2555 define gb_LinkTarget__use_mDNSResponder
2556 $(call gb_LinkTarget_set_include,$(1),\
2557 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2558 $$(INCLUDE) \
2560 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2561 endef
2563 endif # MDNSRESPONDER
2565 ifeq ($(ENABLE_GIO),TRUE)
2567 define gb_LinkTarget__use_gio
2568 $(call gb_LinkTarget_set_include,$(1),\
2569 $$(INCLUDE) \
2570 $(GIO_CFLAGS) \
2573 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2575 endef
2577 else # ENABLE_GIO
2579 define gb_LinkTarget__use_gio
2581 endef
2583 endif # ENABLE_GIO
2585 ifeq ($(ENABLE_AVAHI),TRUE)
2587 define gb_LinkTarget__use_avahi
2588 $(call gb_LinkTarget_set_include,$(1),\
2589 $$(INCLUDE) \
2590 $(AVAHI_CFLAGS) \
2593 $(call gb_LinkTarget_add_defs,$(1),\
2594 -DENABLE_AVAHI \
2597 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2599 endef
2601 else # ENABLE_AVAHI
2603 gb_LinkTarget__use_avahi :=
2605 endif # ENABLE_AVAHI
2608 define gb_LinkTarget__use_gtk
2609 $(call gb_LinkTarget_set_include,$(1),\
2610 $$(INCLUDE) \
2611 $(GTK_CFLAGS) \
2614 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2616 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2618 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2620 $(call gb_LinkTarget_set_include,$(1),\
2621 $$(INCLUDE) \
2622 $(GTK_PRINT_CFLAGS) \
2625 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2627 endif
2629 endef
2631 define gb_LinkTarget__use_gthread
2632 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2633 endef
2635 ifeq ($(ENABLE_CUPS),TRUE)
2637 define gb_LinkTarget__use_cups
2638 $(call gb_LinkTarget_add_defs,$(1),\
2639 -DENABLE_CUPS \
2642 $(call gb_LinkTarget_add_libs,$(1),\
2643 -lcups \
2646 endef
2648 else # ENABLE_CUPS
2650 define gb_LinkTarget__use_cups
2652 endef
2654 endif # ENABLE_CUPS
2656 ifeq ($(ENABLE_DBUS),TRUE)
2658 define gb_LinkTarget__use_dbus
2659 $(call gb_LinkTarget_set_include,$(1),\
2660 $$(INCLUDE) \
2661 $(DBUS_CFLAGS) \
2664 $(call gb_LinkTarget_add_libs,$(1),\
2665 $(DBUS_LIBS) \
2668 endef
2670 else # ENABLE_DBUS
2672 define gb_LinkTarget__use_dbus
2674 endef
2676 endif # ENABLE_DBUS
2679 ifneq ($(SYSTEM_LIBPNG),)
2681 define gb_LinkTarget__use_libpng
2682 $(call gb_LinkTarget_set_include,$(1),\
2683 $$(INCLUDE) \
2684 $(LIBPNG_CFLAGS) \
2687 $(call gb_LinkTarget_add_libs,$(1),\
2688 $(LIBPNG_LIBS) \
2691 endef
2693 gb_ExternalProject__use_libpng :=
2695 else # !SYSTEM_LIBPNG
2697 define gb_LinkTarget__use_libpng
2698 $(call gb_LinkTarget_set_include,$(1),\
2699 $(LIBPNG_CFLAGS) \
2700 $$(INCLUDE) \
2702 $(call gb_LinkTarget_use_static_libraries,$(1),\
2703 libpng \
2705 $(call gb_LinkTarget__use_zlib,$(1))
2707 endef
2709 define gb_ExternalProject__use_libpng
2710 $(call gb_ExternalProject_use_static_libraries,$(1),\
2711 libpng \
2714 endef
2716 endif # !SYSTEM_LIBPNG
2719 ifneq ($(SYSTEM_CURL),)
2721 define gb_LinkTarget__use_curl
2722 $(call gb_LinkTarget_add_defs,$(1),\
2723 -DSYSTEM_CURL \
2725 $(call gb_LinkTarget_set_include,$(1),\
2726 $$(INCLUDE) \
2727 $(CURL_CFLAGS) \
2729 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2731 endef
2733 else # !SYSTEM_CURL
2735 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2736 curl \
2739 define gb_LinkTarget__use_curl
2740 $(call gb_LinkTarget_use_package,$(1),curl)
2741 $(call gb_LinkTarget_set_include,$(1),\
2742 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2743 $$(INCLUDE) \
2746 ifeq ($(COM),MSC)
2747 $(call gb_LinkTarget_add_libs,$(1),\
2748 $(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 \
2750 else
2751 $(call gb_LinkTarget_add_libs,$(1),\
2752 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2754 endif
2756 endef
2758 endif # SYSTEM_CURL
2760 ifeq ($(ENABLE_VALGRIND),TRUE)
2762 define gb_LinkTarget__use_valgrind
2763 $(call gb_LinkTarget_add_defs,$(1),\
2764 -DHAVE_VALGRIND_HEADERS \
2767 $(call gb_LinkTarget_set_include,$(1),\
2768 $$(INCLUDE) \
2769 $(VALGRIND_CFLAGS) \
2772 endef
2774 else # !ENABLE_VALGRIND
2776 define gb_LinkTarget__use_valgrind
2778 endef
2780 endif # ENABLE_VALGRIND
2782 ifneq ($(SYSTEM_POPPLER),)
2784 define gb_LinkTarget__use_poppler
2785 $(call gb_LinkTarget_set_include,$(1),\
2786 $(POPPLER_CFLAGS) \
2787 $$(INCLUDE) \
2790 $(call gb_LinkTarget_add_libs,$(1),\
2791 $(POPPLER_LIBS) \
2794 endef
2796 else # !SYSTEM_POPPLER
2798 define gb_LinkTarget__use_poppler
2799 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2801 $(call gb_LinkTarget_set_include,$(1),\
2802 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2803 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2804 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2805 $$(INCLUDE) \
2808 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2810 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2812 ifeq ($(OS),MACOSX)
2813 $(call gb_LinkTarget_add_libs,$(1),\
2814 -lobjc \
2816 else ifeq ($(OS),LINUX)
2817 $(call gb_LinkTarget_add_libs,$(1),\
2818 -pthread \
2820 else ifeq ($(OS),WNT)
2821 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2822 advapi32 \
2823 gdi32 \
2825 endif
2827 endef
2829 endif # SYSTEM_POPPLER
2832 ifneq ($(SYSTEM_CLUCENE),)
2834 define gb_LinkTarget__use_clucene
2835 $(call gb_LinkTarget_add_defs,$(1),\
2836 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2839 $(call gb_LinkTarget_set_include,$(1),\
2840 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2841 $$(INCLUDE) \
2844 $(call gb_LinkTarget_add_libs,$(1),\
2845 $(CLUCENE_LIBS) \
2848 endef
2850 else # !SYSTEM_CLUCENE
2852 define gb_LinkTarget__use_clucene
2853 $(call gb_LinkTarget_set_include,$(1),\
2854 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2855 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2856 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2857 $$(INCLUDE) \
2860 $(call gb_LinkTarget_use_libraries,$(1),\
2861 clucene \
2864 endef
2866 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2867 clucene \
2870 endif # SYSTEM_CLUCENE
2872 define gb_LinkTarget__use_gobject
2873 $(call gb_LinkTarget_add_libs,$(1),\
2874 $(GOBJECT_LIBS) \
2877 $(call gb_LinkTarget_set_include,$(1),\
2878 $$(INCLUDE) \
2879 $(GOBJECT_CFLAGS) \
2881 endef
2883 ifneq ($(SYSTEM_HSQLDB),)
2885 define gb_LinkTarget__use_hsqldb
2887 $(call gb_LinkTarget_add_defs,$(1),\
2888 -DSYSTEM_HSQLDB \
2889 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2892 endef
2894 else # !SYSTEM_HSQLDB
2896 define gb_LinkTarget__use_hsqldb
2898 endef
2900 endif # SYSTEM_HSQLDB
2903 ifneq ($(SYSTEM_OPENLDAP),)
2905 define gb_LinkTarget__use_openldap
2907 $(call gb_LinkTarget_add_libs,$(1),\
2908 -lldap \
2909 -llber \
2912 endef
2914 gb_ExternalProject__use_openldap :=
2916 else # !SYSTEM_OPENLDAP
2918 define gb_LinkTarget__use_openldap
2919 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2920 $(call gb_LinkTarget_set_include,$(1),\
2921 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2922 $$(INCLUDE) \
2924 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2925 $(call gb_LinkTarget_add_libs,$(1), \
2926 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2927 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2930 endef
2932 define gb_ExternalProject__use_openldap
2933 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2935 endef
2937 endif # SYSTEM_OPENLDAP
2939 ifneq ($(SYSTEM_LIBTOMMATH),)
2941 define gb_LinkTarget__use_libtommath
2942 $(call gb_LinkTarget_set_include,$(1),\
2943 $(LIBTOMMATH_CFLAGS) \
2944 $$(INCLUDE) \
2946 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2948 endef
2950 else # !SYSTEM_LIBTOMMATH
2951 define gb_LinkTarget__use_libtommath
2952 $(call gb_LinkTarget_set_include,$(1),\
2953 -I${WORKDIR}/UnpackedTarball/libtommath \
2954 $$(INCLUDE) \
2956 $(call gb_LinkTarget_add_libs,$(1),\
2957 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2959 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2961 endef
2963 endif # SYSTEM_LIBTOMMATH
2965 define gb_ExternalProject__use_libtommath
2966 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2968 endef
2970 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2972 ifneq ($(SYSTEM_FIREBIRD),)
2974 define gb_LinkTarget__use_libfbembed
2975 $(call gb_LinkTarget_set_include,$(1),\
2976 $(FIREBIRD_CFLAGS) \
2977 $$(INCLUDE) \
2979 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2981 endef
2983 else # !SYSTEM_FIREBIRD
2985 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2986 firebird \
2989 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2990 #$(call gb_LinkTarget__use_libtommath,$(1))
2992 define gb_LinkTarget__use_libfbembed
2993 $(call gb_LinkTarget_use_package,$(1),firebird)
2994 $(call gb_LinkTarget_set_include,$(1),\
2995 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2996 $$(INCLUDE) \
2998 ifeq ($(COM),MSC)
2999 $(call gb_LinkTarget_add_libs,$(1),\
3000 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3002 else
3003 $(call gb_LinkTarget_add_libs,$(1),\
3004 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3006 endif
3008 endef
3011 # endef
3013 endif # SYSTEM_FIREBIRD
3015 else # !ENABLE_FIREBIRD_SDBC
3017 gb_LinkTarget__use_firebird :=
3018 # gb_LinkTarget__use_atomic_ops :=
3019 # gb_LinkTarget__use_libtommath :=
3021 endif # ENABLE_FIREBIRD_SDBC
3024 ifneq ($(SYSTEM_POSTGRESQL),)
3026 define gb_LinkTarget__use_postgresql
3028 $(call gb_LinkTarget_set_include,$(1),\
3029 $(POSTGRESQL_INC) \
3030 $$(INCLUDE) \
3033 $(call gb_LinkTarget_add_libs,$(1),\
3034 -lpq \
3037 $(call gb_LinkTarget_add_ldflags,$(1),\
3038 $(POSTGRESQL_LIB) \
3041 endef
3043 else # !SYSTEM_POSTGRESQL
3045 define gb_LinkTarget__use_postgresql
3047 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3049 $(call gb_LinkTarget_set_include,$(1),\
3050 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3051 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3052 $$(INCLUDE) \
3055 $(call gb_LinkTarget_add_libs,$(1),\
3056 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3059 ifeq ($(OS),WNT)
3060 $(call gb_LinkTarget_use_external,$(1),openssl)
3062 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3063 secur32 \
3064 ws2_32 \
3067 endif
3069 endef
3071 endif # SYSTEM_POSTGRESQL
3073 ifeq ($(ENABLE_KDE4),TRUE)
3075 define gb_LinkTarget__use_kde4
3076 $(call gb_LinkTarget_set_include,$(1),\
3077 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3078 $$(INCLUDE) \
3081 $(call gb_LinkTarget_add_defs,$(1),\
3082 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3085 $(call gb_LinkTarget_add_libs,$(1),\
3086 $(KDE4_LIBS) \
3089 endef
3091 else # !ENABLE_KDE4
3093 define gb_LinkTarget__use_kde4
3095 endef
3097 endif # ENABLE_KDE4
3100 ifeq ($(ENABLE_KDE5),TRUE)
3102 define gb_LinkTarget__use_kde5
3103 $(call gb_LinkTarget_set_include,$(1),\
3104 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3105 $$(INCLUDE) \
3108 $(call gb_LinkTarget_add_defs,$(1),\
3109 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3112 $(call gb_LinkTarget_add_libs,$(1),\
3113 $(KF5_LIBS) \
3116 ifeq ($(COM),GCC)
3117 $(call gb_LinkTarget_add_cxxflags,$(1),\
3118 -Wno-shadow \
3120 endif
3122 endef
3124 else # !ENABLE_KDE5
3126 define gb_LinkTarget__use_kde5
3128 endef
3130 endif # ENABLE_KDE5
3134 ifeq ($(ENABLE_QT5),TRUE)
3136 define gb_LinkTarget__use_qt5
3137 $(call gb_LinkTarget_set_include,$(1),\
3138 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3139 $$(INCLUDE) \
3142 $(call gb_LinkTarget_add_defs,$(1),\
3143 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3146 $(call gb_LinkTarget_add_libs,$(1),\
3147 $(QT5_LIBS) \
3150 ifeq ($(COM),GCC)
3151 $(call gb_LinkTarget_add_cxxflags,$(1),\
3152 -Wno-shadow \
3154 endif
3156 endef
3158 else # !ENABLE_QT5
3160 define gb_LinkTarget__use_qt5
3162 endef
3164 endif # ENABLE_QT5
3166 # PYTHON
3167 # extra python_headers external because pyuno wrapper must not link python
3168 ifneq ($(SYSTEM_PYTHON),)
3170 define gb_LinkTarget__use_python_headers
3171 $(call gb_LinkTarget_add_defs,$(1),\
3172 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3175 $(call gb_LinkTarget_set_include,$(1),\
3176 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3177 $$(INCLUDE) \
3180 endef
3182 define gb_LinkTarget__use_python
3183 $(call gb_LinkTarget__use_python_headers,$(1))
3185 $(call gb_LinkTarget_add_libs,$(1),\
3186 $(PYTHON_LIBS) \
3189 endef
3191 else # !SYSTEM_PYTHON
3193 $(eval $(call gb_Helper_register_packages_for_install,python,\
3194 python3 \
3197 define gb_LinkTarget__use_python_headers
3198 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3199 $(call gb_LinkTarget_set_include,$(1),\
3200 -I$(call gb_UnpackedTarball_get_dir,python3) \
3201 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3202 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3203 $$(INCLUDE) \
3206 endef
3208 define gb_LinkTarget__use_python
3209 $(call gb_LinkTarget__use_python_headers,$(1))
3210 ifeq ($(OS),MACOSX)
3211 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3212 else
3213 $(call gb_LinkTarget_use_package,$(1),python3)
3214 endif
3216 ifeq ($(OS),WNT)
3217 $(call gb_LinkTarget_add_libs,$(1),\
3218 $(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 \
3220 else ifeq ($(OS),MACOSX)
3221 $(call gb_LinkTarget_add_libs,$(1),\
3222 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3224 else
3225 $(call gb_LinkTarget_add_libs,$(1),\
3226 -L$(call gb_UnpackedTarball_get_dir,python3) \
3227 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3229 endif
3231 endef
3233 endif # SYSTEM_PYTHON
3235 # ORCUS
3236 ifneq ($(SYSTEM_LIBORCUS),)
3238 define gb_LinkTarget__use_orcus
3239 $(call gb_LinkTarget_set_include,$(1),\
3240 $$(INCLUDE) \
3241 $(ORCUS_CFLAGS) \
3243 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3244 endef
3246 define gb_LinkTarget__use_orcus-parser
3248 endef
3250 else # !SYSTEM_LIBORCUS
3252 ifeq ($(COM),MSC)
3254 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3255 orcus \
3256 orcus-parser \
3259 define gb_LinkTarget__use_orcus
3260 $(call gb_LinkTarget_set_include,$(1),\
3261 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3262 $$(INCLUDE) \
3265 $(call gb_LinkTarget_use_libraries,$(1),\
3266 orcus \
3269 endef
3271 define gb_LinkTarget__use_orcus-parser
3272 $(call gb_LinkTarget_set_include,$(1),\
3273 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3274 $$(INCLUDE) \
3277 $(call gb_LinkTarget_use_libraries,$(1),\
3278 orcus-parser \
3281 endef
3283 else # !MSC
3285 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3286 liborcus \
3289 define gb_LinkTarget__use_orcus
3290 $(call gb_LinkTarget_use_package,$(1),liborcus)
3292 $(call gb_LinkTarget_set_include,$(1),\
3293 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3294 $$(INCLUDE) \
3297 $(call gb_LinkTarget_add_libs,$(1),\
3298 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.14 \
3301 $(if $(SYSTEM_BOOST), \
3302 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3303 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3306 endef
3308 define gb_LinkTarget__use_orcus-parser
3309 $(call gb_LinkTarget_use_package,$(1),liborcus)
3311 $(call gb_LinkTarget_set_include,$(1),\
3312 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3313 $$(INCLUDE) \
3316 $(call gb_LinkTarget_add_libs,$(1),\
3317 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.14 \
3320 endef
3322 endif # MSC
3324 endif # SYSTEM_LIBORCUS
3326 ifeq ($(ENABLE_EOT),TRUE)
3328 ifneq ($(SYSTEM_LIBEOT),)
3330 define gb_LinkTarget__use_libeot
3331 $(call gb_LinkTarget_set_include,$(1),\
3332 $$(INCLUDE) \
3333 $(LIBEOT_CFLAGS) \
3335 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3337 endef
3339 gb_ExternalProject__use_libeot :=
3341 else # !SYSTEM_LIBEOT
3343 define gb_LinkTarget__use_libeot
3344 $(call gb_LinkTarget_set_include,$(1),\
3345 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3346 $$(INCLUDE) \
3348 $(call gb_LinkTarget_add_libs,$(1),\
3349 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3351 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3353 endef
3355 define gb_ExternalProject__use_libeot
3356 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3358 endef
3360 endif # SYSTEM_LIBEOT
3362 else # !ENABLE_EOT
3364 gb_LinkTarget__use_libeot :=
3365 gb_ExternalProject__use_libeot :=
3367 endif # ENABLE_EOT
3369 ### X11 stuff ###
3371 ifeq ($(USING_X11), TRUE)
3373 define gb_LinkTarget__use_Xrandr
3374 $(call gb_LinkTarget_set_include,$(1),\
3375 $$(INCLUDE) \
3376 $(XRANDR_CFLAGS) \
3379 $(call gb_LinkTarget_add_libs,$(1),\
3380 $(XRANDR_LIBS) \
3382 endef
3384 define gb_LinkTarget__use_Xrender
3385 $(call gb_LinkTarget_set_include,$(1),\
3386 $$(INCLUDE) \
3387 $(XRENDER_CFLAGS) \
3390 $(call gb_LinkTarget_add_libs,$(1),\
3391 $(XRENDER_LIBS) \
3393 endef
3395 endif # USING_X11
3398 gb_ExternalProject__use_nss3:=
3401 ifneq ($(SYSTEM_NSS),)
3403 define gb_LinkTarget__use_nss3
3404 $(call gb_LinkTarget_add_defs,$(1),\
3405 -DSYSTEM_NSS \
3408 $(call gb_LinkTarget_set_include,$(1),\
3409 $$(INCLUDE) \
3410 $(NSS_CFLAGS) \
3413 $(call gb_LinkTarget_add_libs,$(1),\
3414 $(NSS_LIBS) \
3417 endef
3419 define gb_LinkTarget__use_plc4
3420 $(call gb_LinkTarget__use_nss3,$(1))
3422 endef
3424 define gb_LinkTarget__use_ssl3
3425 $(call gb_LinkTarget__use_nss3,$(1))
3427 endef
3429 else # !SYSTEM_NSS
3431 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3432 nss \
3435 define gb_LinkTarget__use_nss3
3436 $(call gb_LinkTarget_use_package,$(1),nss)
3437 $(call gb_LinkTarget_set_include,$(1),\
3438 $$(INCLUDE) \
3439 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3440 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3443 ifeq ($(COM),MSC)
3444 $(call gb_LinkTarget_add_libs,$(1),\
3445 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3446 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3447 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3449 else
3450 $(call gb_LinkTarget_add_libs,$(1),\
3451 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3452 -lnspr4 \
3453 -lnss3 \
3454 -lsmime3 \
3456 endif
3458 endef
3460 define gb_LinkTarget__use_plc4
3461 $(call gb_LinkTarget_use_package,$(1),nss)
3462 ifeq ($(COM),MSC)
3463 $(call gb_LinkTarget_add_libs,$(1),\
3464 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3466 else
3467 $(call gb_LinkTarget_add_libs,$(1),\
3468 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3470 endif
3472 endef
3474 define gb_LinkTarget__use_ssl3
3475 $(call gb_LinkTarget_use_package,$(1),nss)
3476 ifeq ($(COM),MSC)
3477 $(call gb_LinkTarget_add_libs,$(1),\
3478 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3480 else
3481 $(call gb_LinkTarget_add_libs,$(1),\
3482 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3484 endif
3486 endef
3488 define gb_ExternalProject__use_nss3
3489 $(call gb_ExternalProject_use_package,$(1),nss)
3491 endef
3493 endif # SYSTEM_NSS
3495 ifeq ($(ENABLE_BREAKPAD),TRUE)
3497 define gb_LinkTarget__use_breakpad
3498 $(call gb_LinkTarget_set_include,$(1),\
3499 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3500 $$(INCLUDE) \
3503 ifeq ($(COM),MSC)
3504 $(call gb_LinkTarget_use_static_libraries,$(1),\
3505 breakpad \
3507 else
3508 $(call gb_LinkTarget_add_libs,$(1),\
3509 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3511 endif
3513 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3515 endef
3517 endif # ENABLE_BREAKPAD
3519 ifeq ($(ENABLE_GPGMEPP),TRUE)
3521 ifneq ($(SYSTEM_GPGMEPP),)
3523 gb_ExternalProject__use_gpgmepp:=
3524 gb_ExternalProject__use_libassuan:=
3525 gb_ExternalProject__use_libgpg-error:=
3527 define gb_LinkTarget__use_gpgmepp
3528 $(call gb_LinkTarget_set_include,$(1),\
3529 $$(INCLUDE) \
3530 $$(GPGMEPP_CFLAGS) \
3533 $(call gb_LinkTarget_add_libs,$(1),\
3534 $(GPGMEPP_LIBS) \
3537 endef
3539 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3541 define gb_ExternalProject__use_gpgmepp
3542 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3544 endef
3545 define gb_ExternalProject__use_libassuan
3546 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3548 endef
3549 define gb_ExternalProject__use_libgpg-error
3550 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3552 endef
3554 ifneq ($(filter WNT,$(OS)),)
3556 define gb_LinkTarget__use_libgpg-error
3557 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3559 $(call gb_LinkTarget_set_include,$(1),\
3560 $(GPG_ERROR_CFLAGS) \
3561 $$(INCLUDE) \
3563 $(call gb_LinkTarget_add_libs,$(1),\
3564 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3567 endef
3569 define gb_LinkTarget__use_libassuan
3570 $(call gb_LinkTarget_use_package,$(1),libassuan)
3572 $(call gb_LinkTarget_set_include,$(1),\
3573 $(LIBASSUAN_CFLAGS) \
3574 $$(INCLUDE) \
3576 $(call gb_LinkTarget_add_libs,$(1),\
3577 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3580 endef
3582 define gb_LinkTarget__use_gpgmepp
3583 $(call gb_LinkTarget_set_include,$(1),\
3584 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3585 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3586 $$(GPG_ERROR_CFLAGS) \
3587 $$(INCLUDE) \
3589 $(call gb_LinkTarget_use_libraries,$(1),\
3590 gpgmepp \
3593 endef
3595 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3596 libassuan \
3597 libgpg-error \
3600 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3601 gpgmepp \
3604 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3605 gpgme-w32spawn \
3608 endif
3610 ifneq ($(filter MACOSX LINUX,$(OS)),)
3612 define gb_LinkTarget__use_gpgmepp
3613 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3615 $(call gb_LinkTarget_set_include,$(1),\
3616 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3617 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3618 $$(GPG_ERROR_CFLAGS) \
3619 $$(INCLUDE) \
3621 $(call gb_LinkTarget_add_libs,$(1),\
3622 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3623 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3624 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3625 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3628 endef
3630 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3631 gpgmepp \
3632 libassuan \
3633 libgpg-error \
3636 endif
3638 endif
3640 else # !ENABLE_GPGMEPP
3642 gb_ExternalProject__use_gpgmepp :=
3643 gb_ExternalProject__use_libassuan :=
3644 gb_ExternalProject__use_libgpg-error :=
3646 gb_LinkTarget__use_gpgmepp :=
3647 gb_LinkTarget__use_libassuan :=
3648 gb_LinkTarget__use_libgpg-error :=
3650 endif # ENABLE_GPGMEPP
3652 define gb_LinkTarget__use_dconf
3653 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3654 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3655 endef
3657 ### Jars ############################################################
3659 ifneq ($(SYSTEM_HSQLDB),)
3661 define gb_Jar__use_hsqldb
3662 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3663 endef
3664 define gb_JunitTest__use_hsqldb
3665 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3666 endef
3668 else # !SYSTEM_HSQLDB
3670 ifeq ($(ENABLE_JAVA),TRUE)
3671 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3672 hsqldb \
3674 endif
3676 define gb_Jar__use_hsqldb
3677 $(call gb_Jar_use_jar,$(1),hsqldb)
3678 endef
3679 define gb_JunitTest__use_hsqldb
3680 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3681 endef
3683 endif # SYSTEM_HSQLDB
3686 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3688 ifneq ($(SYSTEM_BSH),)
3690 define gb_Jar__use_bsh
3691 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3692 endef
3694 else # !SYSTEM_BSH
3696 ifeq ($(ENABLE_JAVA),TRUE)
3697 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3698 bsh \
3700 endif
3702 define gb_Jar__use_bsh
3703 $(call gb_Jar_use_jar,$(1),bsh)
3704 endef
3706 endif # SYSTEM_BSH
3708 endif
3710 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3712 ifneq ($(SYSTEM_RHINO),)
3714 define gb_Jar__use_rhino
3715 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3716 endef
3718 else # !SYSTEM_RHINO
3720 ifeq ($(ENABLE_JAVA),TRUE)
3721 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3722 js \
3724 endif
3726 define gb_Jar__use_rhino
3727 $(call gb_Jar_use_jar,$(1),js)
3728 endef
3730 endif # SYSTEM_RHINO
3732 endif
3734 ifneq ($(SYSTEM_APACHE_COMMONS),)
3736 define gb_Jar__use_commons-logging
3737 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3738 endef
3739 gb_ExternalProject__use_commons-logging :=
3741 else # !SYSTEM_APACHE_COMMONS
3743 ifeq ($(ENABLE_JAVA),TRUE)
3744 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3745 commons-logging-$(COMMONS_LOGGING_VERSION) \
3747 endif
3749 define gb_Jar__use_commons-logging
3750 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3751 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3752 endef
3753 define gb_ExternalProject__use_commons-logging
3754 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3755 endef
3757 endif # SYSTEM_APACHE_COMMONS
3760 ifneq ($(SYSTEM_JFREEREPORT),)
3762 define gb_Jar__use_flow-engine
3763 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3764 endef
3766 define gb_Jar__use_flute
3767 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3768 endef
3770 define gb_Jar__use_libbase
3771 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3772 endef
3774 define gb_Jar__use_libfonts
3775 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3776 endef
3778 define gb_Jar__use_libformula
3779 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3780 endef
3782 define gb_Jar__use_liblayout
3783 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3784 endef
3786 define gb_Jar__use_libloader
3787 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3788 endef
3790 define gb_Jar__use_librepository
3791 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3792 endef
3794 define gb_Jar__use_libserializer
3795 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3796 endef
3798 define gb_Jar__use_libxml
3799 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3800 endef
3802 define gb_Jar__use_sac
3803 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3804 endef
3806 else # !SYSTEM_JFREEREPORT
3808 ifeq ($(ENABLE_JAVA),TRUE)
3809 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3810 flow-engine \
3811 flute-1.1.6 \
3812 libbase-1.1.6 \
3813 libfonts-1.1.6 \
3814 libformula-1.1.7 \
3815 liblayout \
3816 libloader-1.1.6 \
3817 librepository-1.1.6 \
3818 libserializer-1.1.6 \
3819 libxml-1.1.7 \
3820 sac \
3822 endif
3824 define gb_Jar__use_flow-engine
3825 $(call gb_Jar_use_jar,$(1),flow-engine)
3826 endef
3828 define gb_Jar__use_flute
3829 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3830 endef
3832 define gb_Jar__use_libbase
3833 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3834 endef
3836 define gb_Jar__use_libfonts
3837 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3838 endef
3840 define gb_Jar__use_libformula
3841 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3842 endef
3844 define gb_Jar__use_liblayout
3845 $(call gb_Jar_use_jar,$(1),liblayout)
3846 endef
3848 define gb_Jar__use_libloader
3849 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3850 endef
3852 define gb_Jar__use_librepository
3853 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3854 endef
3856 define gb_Jar__use_libserializer
3857 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3858 endef
3860 define gb_Jar__use_libxml
3861 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3862 endef
3864 define gb_Jar__use_sac
3865 $(call gb_Jar_use_jar,$(1),sac)
3866 endef
3868 endif # SYSTEM_JFREEREPORT
3871 # Executables
3873 # FIXME: the library target should be for build too
3874 define gb_Executable__register_bestreversemap
3875 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3876 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3878 endef
3880 # TODO depending on the whole URE might be overkill, but I do not have a
3881 # Windows machine to debug it...
3882 # FIXME: the library target should be for build too
3883 define gb_Executable__register_climaker
3884 $(call gb_Executable_add_runtime_dependencies,climaker,\
3885 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3886 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3887 $(call gb_UnoApi_get_target,udkapi) \
3888 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3890 endef
3892 define gb_Executable__register_cppumaker
3893 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3894 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3896 endef
3898 # This is used to determine what we need for 'build' platform.
3899 # FIXME: the library target should be for build too
3900 define gb_Executable__register_gengal
3901 $(call gb_Executable_add_runtime_dependencies,gengal,\
3902 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3903 $(call gb_Package_get_target_for_build,postprocess_images) \
3904 $(call gb_Package_get_target_for_build,postprocess_registry) \
3905 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3906 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3907 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3908 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3909 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3910 $(call gb_UnoApi_get_target,offapi) \
3911 $(call gb_UnoApi_get_target,udkapi) \
3913 endef
3915 ifeq ($(SYSTEM_ICU),)
3917 define gb_Executable__register_gendict
3918 $(call gb_Executable_add_runtime_dependencies,gendict,\
3919 $(call gb_Package_get_target_for_build,icu) \
3920 $(call gb_Package_get_target_for_build,icu_ure) \
3922 endef
3924 endif
3926 define gb_Executable__register_idlc
3927 $(call gb_Executable_add_runtime_dependencies,idlc,\
3928 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3930 endef
3932 define gb_Executable__register_localize
3933 $(call gb_Executable_add_runtime_dependencies,localize,\
3934 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3935 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3938 endef
3940 # FIXME ure/services.rdb needs cleanup
3941 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3942 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3943 # FIXME: the library target should be for build too
3944 define gb_Executable__register_saxparser
3945 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3946 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3947 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3948 $(call gb_Rdb_get_target_for_build,saxparser) \
3949 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3950 $(call gb_UnoApi_get_target,udkapi) \
3952 endef
3954 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3955 # required due to the settings for URE_SERVICES and URE_TYPES in
3956 # cppuhelper/source/unorc
3957 # FIXME: the library target should be for build too
3958 define gb_Executable__register_uno
3959 $(call gb_Executable_add_runtime_dependencies,uno,\
3960 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3961 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3962 $(call gb_UnoApi_get_target,udkapi) \
3964 endef
3967 # External executables
3969 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3971 gb_ExternalExecutable__register_xmllint :=
3973 else # ! SYSTEM_LIBXML_FOR_BUILD
3975 define gb_ExternalExecutable__register_xmllint
3976 $(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)
3977 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3978 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3979 $(call gb_Package_get_target,libxml2) \
3982 endef
3984 endif # SYSTEM_LIBXML_FOR_BUILD
3986 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3988 gb_ExternalExecutable__register_xsltproc :=
3990 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3992 define gb_ExternalExecutable__register_xsltproc
3993 $(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)
3994 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3995 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3996 $(call gb_Package_get_target,libxml2) \
3997 $(call gb_Package_get_target,libxslt) \
4000 endef
4002 endif # SYSTEM_LIBXSLT_FOR_BUILD
4004 ifneq (,$(SYSTEM_UCPP))
4006 gb_ExternalExecutable__register_ucpp :=
4008 else # ! SYSTEM_UCPP
4010 define gb_ExternalExecutable__register_ucpp
4011 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4013 endef
4015 endif # SYSTEM_UCPP
4017 ifeq (,$(PYTHON_FOR_BUILD))
4019 define gb_ExternalExecutable__register_python
4020 ifeq ($(OS),MACOSX)
4022 # use set_external, to avoid having the command added as prerequisite for the
4023 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4024 # matching rule to build that specific file)
4025 $(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))
4026 # the Zip ensures that internal python has been built (cannot use the Package
4027 # target, as that is not used on Mac)
4028 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4030 else
4032 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4033 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4034 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4036 endif
4038 endef
4040 else
4042 define gb_ExternalExecutable__register_python
4043 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4044 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4046 endef
4048 endif # PYTHON_FOR_BUILD
4050 ifneq ($(SYSTEM_GENBRK),)
4052 define gb_ExternalExecutable__register_genbrk
4053 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4055 endef
4057 else # ! SYSTEM_GENBRK
4059 define gb_ExternalExecutable__register_genbrk
4060 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4061 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4062 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4063 $(call gb_Package_get_target_for_build,icu) \
4064 $(call gb_Package_get_target_for_build,icu_ure) \
4067 endef
4069 endif
4071 ifneq ($(SYSTEM_GENCCODE),)
4073 define gb_ExternalExecutable__register_genccode
4074 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4076 endef
4078 else # ! SYSTEM_GENCCODE
4080 define gb_ExternalExecutable__register_genccode
4081 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4082 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4083 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4084 $(call gb_Package_get_target_for_build,icu) \
4085 $(call gb_Package_get_target_for_build,icu_ure) \
4088 endef
4090 endif
4092 ifneq ($(SYSTEM_GENCMN),)
4094 define gb_ExternalExecutable__register_gencmn
4095 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4097 endef
4099 else # ! SYSTEM_GENCMN
4101 define gb_ExternalExecutable__register_gencmn
4102 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4103 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4104 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4105 $(call gb_Package_get_target_for_build,icu) \
4106 $(call gb_Package_get_target_for_build,icu_ure) \
4109 endef
4111 endif
4113 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4115 $(eval $(call gb_Helper_register_jars,OXT,\
4116 owncloud-android-library \
4119 define gb_Jar__use_owncloud_android_lib
4120 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4121 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4122 endef
4123 define gb_ExternalProject__use_owncloud_android_lib
4124 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4125 endef
4127 endif
4129 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4130 ifneq ($(SYSTEM_BZIP2),)
4132 define gb_LinkTarget__use_bzip2
4133 $(call gb_LinkTarget_set_include,$(1),\
4134 $(BZIP2_CFLAGS) \
4135 $$(INCLUDE) \
4137 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4139 endef
4141 gb_ExternalProject__use_bzip2 :=
4143 else # !SYSTEM_BZIP2
4145 define gb_LinkTarget__use_bzip2
4146 $(call gb_LinkTarget_set_include,$(1),\
4147 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4148 $$(INCLUDE) \
4151 ifeq ($(COM),MSC)
4152 $(call gb_LinkTarget_add_libs,$(1),\
4153 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4155 else
4156 $(call gb_LinkTarget_add_libs,$(1),\
4157 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4159 endif
4161 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4162 endef
4164 define gb_ExternalProject__use_bzip2
4165 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4166 endef
4168 endif
4169 endif
4171 define gb_LinkTarget__use_clew
4172 $(call gb_LinkTarget_set_include,$(1), \
4173 -I$(SRCDIR)/external/clew/source/include \
4174 $$(INCLUDE) \
4176 $(call gb_LinkTarget_use_libraries,$(1),clew)
4177 endef
4179 ifneq ($(ENABLE_PDFIUM),)
4180 define gb_LinkTarget__use_pdfium
4181 $(call gb_LinkTarget_set_include,$(1),\
4182 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4183 $$(INCLUDE) \
4185 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4186 endef
4187 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4188 pdfium \
4190 endif
4192 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4193 $(if $(UCRT_REDISTDIR),ucrt) \
4196 # vim: set noet sw=4 ts=4: