Do not validate SSL cert in LOK case
[LibreOffice.git] / RepositoryExternal.mk
blob78b511a3f124fdfa04814346bf6c4ebf0ce622a1
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 \
261 endef
262 define gb_ExternalProject__use_mariadb-connector-c
263 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
265 endef
267 endif # SYSTEM_MARIADB_CONNECTOR_C
270 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
272 define gb_LinkTarget__use_mysql
274 $(call gb_LinkTarget_add_defs,$(1),\
275 -DSYSTEM_MARIADB \
278 $(call gb_LinkTarget_add_libs,$(1),\
279 $(MARIADB_LIBS) \
282 $(call gb_LinkTarget_set_include,$(1),\
283 $(MARIADB_CFLAGS) \
284 $$(INCLUDE) \
286 endef
288 else
290 define gb_LinkTarget__use_mysql
292 $(call gb_LinkTarget_set_include,$(1),\
293 $$(INCLUDE) \
296 endef
298 endif
300 ifneq ($(SYSTEM_ZLIB),)
302 define gb_LinkTarget__use_zlib
303 $(call gb_LinkTarget_add_defs,$(1),\
304 -DSYSTEM_ZLIB \
306 $(call gb_LinkTarget_add_libs,$(1),-lz)
308 endef
310 # nothing on system
311 define gb_LinkTarget__use_zlib_x64
313 endef
315 gb_ExternalProject__use_zlib :=
317 else # !SYSTEM_ZLIB
319 define gb_LinkTarget__use_zlib_multiarch
320 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
322 $(call gb_LinkTarget_set_include,$(1),\
323 $(ZLIB_CFLAGS) \
324 $$(INCLUDE) \
327 $(call gb_LinkTarget_use_static_libraries,$(1),\
328 $(2) \
331 endef
333 define gb_LinkTarget__use_zlib
334 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
336 endef
338 define gb_LinkTarget__use_zlib_x64
339 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
341 endef
343 define gb_ExternalProject__use_zlib
344 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
346 endef
348 endif # SYSTEM_ZLIB
351 ifneq ($(SYSTEM_LIBJPEG),)
353 define gb_LinkTarget__use_libjpeg
354 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
355 $(call gb_LinkTarget_set_ldflags,$(1),\
356 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
359 endef
361 gb_ExternalProject__use_libjpeg :=
363 else
365 define gb_LinkTarget__use_libjpeg
366 $(call gb_LinkTarget_set_include,$(1),\
367 $(LIBJPEG_CFLAGS) \
368 $$(INCLUDE) \
370 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
371 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
373 endef
375 define gb_ExternalProject__use_libjpeg
376 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
378 endef
380 endif # SYSTEM_LIBJPEG
382 ifneq ($(SYSTEM_MYTHES),)
384 define gb_LinkTarget__use_mythes
385 $(call gb_LinkTarget_set_include,$(1),\
386 $$(INCLUDE) \
387 $(MYTHES_CFLAGS) \
389 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
391 endef
393 else # !SYSTEM_MYTHES
395 define gb_LinkTarget__use_mythes
396 $(call gb_LinkTarget_set_include,$(1),\
397 -I$(call gb_UnpackedTarball_get_dir,mythes) \
398 $$(INCLUDE) \
401 ifeq ($(COM),MSC)
402 $(call gb_LinkTarget_use_static_libraries,$(1),\
403 mythes \
405 else
406 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
407 $(call gb_LinkTarget_use_external_project,$(1),mythes)
408 endif
410 endef
412 endif # SYSTEM_MYTHES
415 ifneq ($(SYSTEM_EXPAT),)
417 define gb_LinkTarget__use_expat_impl
418 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
420 $(call gb_LinkTarget_add_defs,$(1),\
421 -DSYSTEM_EXPAT \
424 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
426 endef
428 gb_ExternalProject__use_expat :=
430 else # !SYSTEM_EXPAT
432 define gb_LinkTarget__use_expat_impl
433 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
435 $(call gb_LinkTarget_set_include,$(1),\
436 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
437 $$(INCLUDE) \
440 $(call gb_LinkTarget_use_static_libraries,$(1),\
441 $(2) \
444 endef
446 define gb_ExternalProject__use_expat
447 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
449 endef
451 endif # SYSTEM_EXPAT
453 define gb_LinkTarget__use_expat
454 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
456 endef
458 define gb_LinkTarget__use_expat_x64
459 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
461 endef
463 ifneq ($(SYSTEM_HYPH),)
465 define gb_LinkTarget__use_hyphen
466 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
468 endef
470 else # !SYSTEM_HYPH
472 define gb_LinkTarget__use_hyphen
473 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
474 $(call gb_LinkTarget_set_include,$(1),\
475 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
476 $$(INCLUDE) \
479 ifeq ($(COM),MSC)
480 $(call gb_LinkTarget_use_static_libraries,$(1),\
481 hyphen \
483 else
484 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
485 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
486 endif
488 endef
490 endif # SYSTEM_HYPH
492 ifneq ($(SYSTEM_HUNSPELL),)
494 define gb_LinkTarget__use_hunspell
495 $(call gb_LinkTarget_set_include,$(1),\
496 $$(INCLUDE) \
497 $(HUNSPELL_CFLAGS) \
499 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
501 endef
503 gb_ExternalProject__use_hunspell :=
505 else # !SYSTEM_HUNSPELL
507 define gb_LinkTarget__use_hunspell
508 $(call gb_LinkTarget_add_defs,$(1),\
509 -DHUNSPELL_STATIC \
511 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
512 $(call gb_LinkTarget_set_include,$(1),\
513 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
514 $$(INCLUDE) \
517 ifeq ($(COM),MSC)
518 $(call gb_LinkTarget_use_static_libraries,$(1),\
519 hunspell \
521 else
522 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
523 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
524 endif
526 endef
528 define gb_ExternalProject__use_hunspell
529 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
531 endef
533 endif # SYSTEM_HUNSPELL
536 ifneq ($(SYSTEM_BOOST),)
538 define gb_LinkTarget__use_boost_lib
539 $(call gb_LinkTarget_set_include,$(1),\
540 $$(INCLUDE) \
541 $(BOOST_CPPFLAGS) \
544 $(call gb_LinkTarget_add_ldflags,$(1),\
545 $(BOOST_LDFLAGS) \
548 $(call gb_LinkTarget_add_libs,$(1),$(2))
550 endef
552 define gb_LinkTarget__use_boost_locale
553 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
555 endef
557 define gb_LinkTarget__use_boost_date_time
558 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
560 endef
562 define gb_LinkTarget__use_boost_filesystem
563 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
565 endef
567 gb_ExternalProject__use_boost_filesystem :=
569 define gb_LinkTarget__use_boost_iostreams
570 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
572 endef
574 gb_ExternalProject__use_boost_iostreams :=
576 define gb_LinkTarget__use_boost_system
577 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
579 endef
581 gb_ExternalProject__use_boost_system :=
583 define gb_LinkTarget__use_boost_headers
584 $(call gb_LinkTarget_set_include,$(1),\
585 $$(INCLUDE) \
586 $(BOOST_CPPFLAGS) \
589 endef
591 gb_ExternalProject__use_boost_headers:=
593 else # !SYSTEM_BOOST
595 define gb_LinkTarget__use_boost_lib
596 $(call gb_LinkTarget_add_defs,$(1),\
597 -DBOOST_ALL_NO_LIB \
600 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
602 endef
604 define gb_LinkTarget__use_boost_locale
605 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
606 $(call gb_LinkTarget_add_libs,$(1),\
607 $(if $(filter $(OS),MACOSX),-liconv) \
610 endef
612 define gb_LinkTarget__use_boost_date_time
613 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
615 endef
617 define gb_LinkTarget__use_boost_filesystem
618 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
620 endef
622 define gb_ExternalProject__use_boost_filesystem
623 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
624 endef
626 define gb_LinkTarget__use_boost_iostreams
627 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
629 endef
631 define gb_ExternalProject__use_boost_iostreams
632 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
633 endef
635 define gb_LinkTarget__use_boost_system
636 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
638 endef
640 define gb_ExternalProject__use_boost_system
641 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
642 endef
644 define gb_LinkTarget__use_boost_headers
645 $(call gb_LinkTarget_use_unpacked,$(1),boost)
646 $(call gb_LinkTarget_set_include,$(1),\
647 $(BOOST_CPPFLAGS) \
648 $$(INCLUDE) \
651 endef
653 define gb_ExternalProject__use_boost_headers
654 $(call gb_ExternalProject_use_unpacked,$(1),boost)
656 endef
658 endif # SYSTEM_BOOST
661 ifneq ($(SYSTEM_LIBCMIS),)
663 define gb_LinkTarget__use_libcmis
664 $(call gb_LinkTarget_set_include,$(1),\
665 $$(INCLUDE) \
666 $(LIBCMIS_CFLAGS) \
668 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
670 endef
672 else # !SYSTEM_LIBCMIS
674 define gb_LinkTarget__use_libcmis
675 $(call gb_LinkTarget_set_include,$(1),\
676 -I$(call gb_UnpackedTarball_get_dir,libcmis)/src \
677 $$(INCLUDE) \
679 $(call gb_LinkTarget_use_static_libraries,$(1),\
680 libcmis \
683 endef
685 endif # SYSTEM_LIBCMIS
687 ifeq ($(ENABLE_JAVA),TRUE)
689 define gb_LinkTarget__use_jawt
690 $(call gb_LinkTarget_add_libs,$(1),\
691 $(JAWTLIB) \
694 endef
696 else # !ENABLE_JAVA
698 gb_LinkTarget__use_jawt :=
700 endif # ENABLE_JAVA
702 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
704 define gb_LinkTarget__use_libatomic_ops
705 $(call gb_LinkTarget_set_include,$(1),\
706 $$(INCLUDE) \
707 $(LIBATOMIC_OPS_CFLAGS) \
709 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
711 endef
712 gb_ExternalProject__use_libatomic_ops :=
714 else # !SYSTEM_LIBATOMIC_OPS
716 define gb_LinkTarget__use_libatomic_ops
717 $(call gb_LinkTarget_set_include,$(1),\
718 $(LIBATOMIC_OPS_CFLAGS) \
719 $$(INCLUDE) \
720 $(LIBATOMIC_OPS_CFLAGS) \
722 $(call gb_LinkTarget_use_external_project,$(1),\
723 libatomic_ops \
726 $(call gb_LinkTarget_add_libs,$(1),\
727 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
730 endef
732 define gb_ExternalProject__use_libatomic_ops
733 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
735 endef
737 endif # SYSTEM_LIBATOMIC_OPS
740 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
742 define gb_LinkTarget__use_libexttextcat
743 $(call gb_LinkTarget_set_include,$(1),\
744 $$(INCLUDE) \
745 $(LIBEXTTEXTCAT_CFLAGS) \
747 $(call gb_LinkTarget_add_defs,$(1),\
748 -DSYSTEM_LIBEXTTEXTCAT \
750 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
752 endef
754 else # !SYSTEM_LIBEXTTEXTCAT
756 define gb_LinkTarget__use_libexttextcat
757 $(call gb_LinkTarget_set_include,$(1),\
758 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
759 $$(INCLUDE) \
762 ifeq ($(COM),MSC)
763 $(call gb_LinkTarget_use_static_libraries,$(1),\
764 libexttextcat \
766 else
767 $(call gb_LinkTarget_add_libs,$(1),\
768 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
770 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
771 endif
774 endef
776 endif # SYSTEM_LIBEXTTEXTCAT
779 ifneq ($(SYSTEM_LIBXML),)
781 define gb_LinkTarget__use_libxml2
782 $(call gb_LinkTarget_add_defs,$(1),\
783 -DSYSTEM_LIBXML \
785 $(call gb_LinkTarget_set_include,$(1),\
786 $$(INCLUDE) \
787 $(LIBXML_CFLAGS) \
789 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
791 endef
792 gb_ExternalProject__use_libxml2:=
794 else # !SYSTEM_LIBXML
796 $(eval $(call gb_Helper_register_packages_for_install,ure,\
797 libxml2 \
800 define gb_LinkTarget__use_libxml2
801 $(call gb_LinkTarget_use_package,$(1),libxml2)
802 $(call gb_LinkTarget_set_include,$(1),\
803 $$(INCLUDE) \
804 $(LIBXML_CFLAGS) \
807 $(call gb_LinkTarget_add_libs,$(1),\
808 $(LIBXML_LIBS) \
811 ifeq ($(COM),MSC)
812 $(call gb_LinkTarget_use_external,$(1),icu_headers)
813 endif
815 endef
816 define gb_ExternalProject__use_libxml2
817 $(call gb_ExternalProject_use_package,$(1),libxml2)
819 ifeq ($(COM),MSC)
820 $(call gb_ExternalProject_use_external_project,$(1),icu)
821 endif
823 endef
825 endif # SYSTEM_LIBXML
828 ifneq ($(SYSTEM_LIBXSLT),)
830 define gb_LinkTarget__use_libxslt
831 $(call gb_LinkTarget_set_include,$(1),\
832 $$(INCLUDE) \
833 $(LIBXSLT_CFLAGS) \
835 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
837 endef
839 define gb_LinkTarget__use_libexslt
840 $(call gb_LinkTarget_set_include,$(1),\
841 $$(INCLUDE) \
842 $(LIBEXSLT_CFLAGS) \
845 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
847 endef
849 else # !SYSTEM_LIBXSLT
851 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
852 libxslt \
855 define gb_LinkTarget__use_libxslt
856 $(call gb_LinkTarget_use_package,$(1),libxslt)
857 $(call gb_LinkTarget_set_include,$(1),\
858 $$(INCLUDE) \
859 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
862 ifeq ($(COM),MSC)
863 $(call gb_LinkTarget_add_libs,$(1),\
864 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
866 else
867 $(call gb_LinkTarget_add_libs,$(1),\
868 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
870 endif
872 endef
874 define gb_LinkTarget__use_libexslt
875 $(call gb_LinkTarget_use_package,$(1),libxslt)
876 $(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
881 ifeq ($(COM),MSC)
882 $(call gb_LinkTarget_add_libs,$(1),\
883 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
885 else
886 $(call gb_LinkTarget_add_libs,$(1),\
887 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
889 endif
891 endef
893 endif # SYSTEM_LIBXSLT
896 ifneq ($(SYSTEM_XMLSEC),)
898 define gb_LinkTarget__use_xmlsec
899 $(call gb_LinkTarget_add_defs,$(1),\
900 -DSYSTEM_XMLSEC \
902 $(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(XMLSEC_CFLAGS) \
906 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
908 endef
910 gb_ExternalProject__use_xmlsec:=
912 else # !SYSTEM_XMLSEC
914 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
915 xmlsec \
918 define gb_LinkTarget__use_xmlsec
920 endef
922 endif # SYSTEM_XMLSEC
924 ifneq ($(SYSTEM_LIBLANGTAG),)
926 define gb_LinkTarget__use_liblangtag
927 $(call gb_LinkTarget_set_include,$(1),\
928 $$(INCLUDE) \
929 $(LIBLANGTAG_CFLAGS) \
932 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
934 endef
936 gb_ExternalProject__use_liblangtag :=
938 else # !SYSTEM_LIBLANGTAG
940 $(eval $(call gb_Helper_register_packages_for_install,ure,\
941 liblangtag_data \
944 ifeq ($(COM),MSC)
946 define gb_LinkTarget__use_liblangtag
947 $(call gb_LinkTarget_set_include,$(1),\
948 $(LIBLANGTAG_CFLAGS) \
949 $$(INCLUDE) \
951 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
952 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
954 endef
956 else
958 $(eval $(call gb_Helper_register_packages_for_install,ure,\
959 liblangtag \
962 define gb_LinkTarget__use_liblangtag
963 $(call gb_LinkTarget_set_include,$(1),\
964 $(LIBLANGTAG_CFLAGS) \
965 $$(INCLUDE) \
967 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
968 $(call gb_LinkTarget_use_package,$(1),liblangtag)
970 endef
972 endif # MSC
974 define gb_ExternalProject__use_liblangtag
975 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
977 endef
979 endif # SYSTEM_LIBLANGTAG
982 gb_ExternalProject__use_apr :=
984 ifeq ($(WITH_WEBDAV),serf)
986 define gb_LinkTarget__use_apr
987 $(call gb_LinkTarget_set_include,$(1),\
988 $$(INCLUDE) \
989 $(APR_CFLAGS) \
991 $(call gb_LinkTarget_add_libs,$(1),\
992 $(APR_LIBS) \
993 $(if $(filter $(OS),LINUX),-lpthread) \
994 $(if $(filter $(OS),MACOSX),-liconv) \
997 ifeq ($(SYSTEM_APR),)
998 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
999 mswsock \
1000 rpcrt4 \
1001 shell32 \
1003 $(call gb_LinkTarget_add_defs,$(1),\
1004 -DAPR_DECLARE_STATIC \
1005 -DAPU_DECLARE_STATIC \
1007 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1008 endif
1010 endef
1012 define gb_ExternalProject__use_apr
1013 ifeq ($(SYSTEM_APR),)
1014 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1015 endif
1017 endef
1019 define gb_LinkTarget__use_serf
1020 $(call gb_LinkTarget_set_include,$(1),\
1021 $(SERF_CFLAGS) \
1022 $$(INCLUDE) \
1024 $(call gb_LinkTarget_add_libs,$(1),\
1025 $(SERF_LIBS) \
1028 ifeq ($(SYSTEM_SERF),)
1029 $(call gb_LinkTarget_use_external_project,$(1),serf)
1030 endif
1032 endef
1034 else ifeq ($(WITH_WEBDAV),neon)
1036 ifneq ($(SYSTEM_NEON),)
1038 define gb_LinkTarget__use_neon
1039 $(call gb_LinkTarget_add_defs,$(1),\
1040 -DNEON_VERSION=0x$(NEON_VERSION) \
1041 -DSYSTEM_NEON \
1043 $(call gb_LinkTarget_set_include,$(1),\
1044 $$(INCLUDE) \
1045 $(NEON_CFLAGS) \
1048 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1050 endef
1052 else # !SYSTEM_NEON
1054 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1055 neon \
1058 define gb_LinkTarget__use_neon
1059 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1060 $(call gb_LinkTarget_set_include,$(1),\
1061 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1062 $$(INCLUDE) \
1064 $(call gb_LinkTarget_use_libraries,$(1),\
1065 neon \
1068 endef
1070 endif # SYSTEM_NEON
1072 endif # WITH_WEBDAV
1074 ifneq ($(SYSTEM_REDLAND),)
1076 define gb_LinkTarget__use_librdf
1077 $(call gb_LinkTarget_add_defs,$(1),\
1078 -DSYSTEM_REDLAND \
1080 $(call gb_LinkTarget_set_include,$(1),\
1081 $$(INCLUDE) \
1082 $(REDLAND_CFLAGS) \
1084 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1086 endef
1088 gb_LinkTarget__use_redland_headers:=
1090 gb_LinkTarget__use_raptor_headers:=
1092 gb_LinkTarget__use_rasqal_headers:=
1094 else # !SYSTEM_REDLAND
1096 define gb_LinkTarget__use_redland_headers
1097 $(call gb_LinkTarget_set_include,$(1),\
1098 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1099 $$(INCLUDE) \
1102 endef
1104 define gb_LinkTarget__use_raptor_headers
1105 $(call gb_LinkTarget_set_include,$(1),\
1106 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1107 $$(INCLUDE) \
1110 endef
1112 define gb_LinkTarget__use_rasqal_headers
1113 $(call gb_LinkTarget_set_include,$(1),\
1114 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1115 $$(INCLUDE) \
1118 endef
1120 ifneq ($(OS),ANDROID)
1122 ifeq ($(COM),MSC)
1123 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1124 raptor2 \
1125 rasqal \
1126 rdf \
1128 else
1129 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1130 raptor \
1131 rasqal \
1132 redland \
1134 endif
1136 define gb_LinkTarget__use_librdf
1137 ifeq ($(COM),MSC)
1138 $(call gb_LinkTarget_use_libraries,$(1),\
1139 raptor2 \
1140 rdf \
1142 else
1143 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1145 $(call gb_LinkTarget_add_libs,$(1),\
1146 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1147 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1148 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1150 endif
1152 endef
1154 else # ANDROID
1156 define gb_LinkTarget__use_librdf
1157 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1159 endef
1161 endif # ANDROID
1163 endif # SYSTEM_REDLAND
1166 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1168 ifneq ($(SYSTEM_CAIRO),)
1170 define gb_LinkTarget__use_cairo
1171 $(call gb_LinkTarget_set_include,$(1),\
1172 $$(INCLUDE) \
1173 $(CAIRO_CFLAGS) \
1175 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1176 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1178 endef
1180 else # !SYSTEM_CAIRO
1182 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1183 cairo \
1184 $(if $(filter $(OS),WNT),,pixman) \
1187 define gb_LinkTarget__use_cairo
1188 $(call gb_LinkTarget_use_package,$(1),cairo)
1189 $(call gb_LinkTarget_use_package,$(1),pixman)
1190 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1191 $(call gb_LinkTarget_set_include,$(1),\
1192 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1193 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1194 $$(INCLUDE) \
1196 $(call gb_LinkTarget_add_libs,$(1),\
1197 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1198 $(if $(filter-out MACOSX WNT,$(OS)), \
1199 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1203 endef
1205 endif # SYSTEM_CAIRO
1207 else ifeq ($(OS),ANDROID)
1209 define gb_LinkTarget__use_cairo
1210 $(call gb_LinkTarget_use_package,$(1),cairo)
1211 $(call gb_LinkTarget_use_package,$(1),pixman)
1212 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1213 $(call gb_LinkTarget_set_include,$(1),\
1214 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1215 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1216 $$(INCLUDE) \
1218 $(call gb_LinkTarget_add_libs,$(1),\
1219 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1220 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1223 endef
1225 endif # CAIRO
1227 ifneq ($(SYSTEM_FREETYPE),)
1229 define gb_LinkTarget__use_freetype_headers
1230 $(call gb_LinkTarget_set_include,$(1),\
1231 $$(INCLUDE) \
1232 $(FREETYPE_CFLAGS) \
1235 endef
1237 gb_ExternalProject__use_freetype :=
1239 else
1241 define gb_LinkTarget__use_freetype_headers
1242 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1243 $(call gb_LinkTarget_set_include,$(1),\
1244 $(FREETYPE_CFLAGS) \
1245 $$(INCLUDE) \
1248 endef
1250 define gb_ExternalProject__use_freetype
1251 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1253 endef
1255 endif # SYSTEM_FREETYPE
1257 define gb_LinkTarget__use_freetype
1258 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1259 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1261 endef
1263 ifneq ($(SYSTEM_FONTCONFIG),)
1265 define gb_LinkTarget__use_fontconfig
1266 $(call gb_LinkTarget_set_include,$(1),\
1267 $$(INCLUDE) \
1268 $(FONTCONFIG_CFLAGS) \
1271 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1273 endef
1275 else
1277 define gb_LinkTarget__use_fontconfig
1278 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1279 $(call gb_LinkTarget_set_include,$(1),\
1280 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1281 $$(INCLUDE) \
1284 $(call gb_LinkTarget_add_libs,$(1),\
1285 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1288 endef
1290 endif # SYSTEM_FONTCONFIG
1292 ifneq ($(SYSTEM_GRAPHITE),)
1294 define gb_LinkTarget__use_graphite
1295 $(call gb_LinkTarget_set_include,$(1),\
1296 $$(INCLUDE) \
1297 $(GRAPHITE_CFLAGS) \
1299 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1301 endef
1303 gb_ExternalProject__use_graphite:=
1305 else # !SYSTEM_GRAPHITE
1307 define gb_LinkTarget__use_graphite
1308 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1309 $(call gb_LinkTarget_set_include,$(1),\
1310 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1311 $$(INCLUDE) \
1313 $(call gb_LinkTarget_use_static_libraries,$(1),\
1314 graphite \
1317 endef
1319 define gb_ExternalProject__use_graphite
1320 $(call gb_ExternalProject_use_static_libraries,$(1),\
1321 graphite \
1324 endef
1325 endif # SYSTEM_GRAPHITE
1327 ifneq ($(SYSTEM_ICU),)
1329 gb_LinkTarget__use_icu_headers:=
1330 gb_ExternalProject__use_icu:=
1332 define gb_LinkTarget__use_icudata
1333 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1335 endef
1336 define gb_LinkTarget__use_icui18n
1337 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1339 endef
1340 define gb_LinkTarget__use_icuuc
1341 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1343 endef
1345 else # !SYSTEM_ICU
1347 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1348 icu_ure \
1351 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1352 icu \
1355 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1356 gb_ICU_suffix:=lo
1357 else
1358 gb_ICU_suffix:=
1359 endif
1361 define gb_LinkTarget__use_icu_headers
1362 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1363 $(call gb_LinkTarget_set_include,$(1),\
1364 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1365 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1366 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1367 $$(INCLUDE) \
1370 endef
1372 define gb_ExternalProject__use_icu
1373 $(call gb_ExternalProject_use_package,$(1),icu)
1375 endef
1377 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1378 define gb_LinkTarget__use_icudata
1379 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1381 ifeq ($(OS),WNT)
1382 $(call gb_LinkTarget_add_libs,$(1),\
1383 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1385 else
1386 $(call gb_LinkTarget_add_libs,$(1),\
1387 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1389 endif
1391 endef
1393 define gb_LinkTarget__use_icui18n
1394 $(call gb_LinkTarget_use_package,$(1),icu)
1396 ifeq ($(OS),WNT)
1397 $(call gb_LinkTarget_add_libs,$(1),\
1398 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1400 else
1401 $(call gb_LinkTarget_add_libs,$(1),\
1402 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1404 endif
1406 endef
1408 define gb_LinkTarget__use_icuuc
1409 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1411 ifeq ($(OS),WNT)
1412 $(call gb_LinkTarget_add_libs,$(1),\
1413 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1415 else
1416 $(call gb_LinkTarget_add_libs,$(1),\
1417 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1419 endif
1421 endef
1423 endif # SYSTEM_ICU
1425 ifneq ($(SYSTEM_HARFBUZZ),)
1427 define gb_LinkTarget__use_harfbuzz
1428 $(call gb_LinkTarget_set_include,$(1),\
1429 $$(INCLUDE) \
1430 $(HARFBUZZ_CFLAGS) \
1432 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1434 endef
1436 gb_ExternalProject__use_harfbuzz :=
1438 else # SYSTEM_HARFBUZZ != TRUE
1440 define gb_LinkTarget__use_harfbuzz
1441 $(call gb_LinkTarget_set_include,$(1),\
1442 $(HARFBUZZ_CFLAGS) \
1443 $$(INCLUDE) \
1445 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1446 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1448 endef
1450 define gb_ExternalProject__use_harfbuzz
1451 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1453 endef
1455 endif # SYSTEM_HARFBUZZ
1457 ifeq ($(DISABLE_OPENSSL),TRUE)
1459 gb_ExternalProject__use_openssl:=
1460 gb_LinkTarget__use_openssl_headers:=
1461 gb_LinkTarget__use_openssl:=
1463 else # !DISABLE_OPENSSL
1465 ifneq ($(SYSTEM_OPENSSL),)
1467 gb_LinkTarget__use_openssl_headers:=
1468 gb_ExternalProject__use_openssl:=
1470 define gb_LinkTarget__use_openssl
1471 $(call gb_LinkTarget_set_include,$(1),\
1472 $$(INCLUDE) \
1473 $(OPENSSL_CFLAGS) \
1475 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1477 endef
1479 else # !SYSTEM_OPENSSL
1481 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1482 openssl \
1485 define gb_ExternalProject__use_openssl
1486 $(call gb_ExternalProject_use_package,$(1),openssl)
1488 endef
1490 define gb_LinkTarget__use_openssl_headers
1491 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1492 $(call gb_LinkTarget_set_include,$(1),\
1493 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1494 $$(INCLUDE) \
1497 endef
1499 define gb_LinkTarget__use_openssl
1500 $(call gb_LinkTarget_use_package,$(1),openssl)
1501 ifeq ($(OS),WNT)
1502 $(call gb_LinkTarget_add_libs,$(1),\
1503 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1504 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1506 else
1507 $(call gb_LinkTarget_add_libs,$(1),\
1508 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1509 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1511 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1512 ifeq ($(OS),SOLARIS)
1513 $(call gb_LinkTarget_add_libs,$(1),\
1514 -lnsl \
1515 -lsocket \
1517 endif
1518 endif
1520 endef
1522 endif # SYSTEM_OPENSSL
1523 endif # DISABLE_OPENSSL
1526 ifeq ($(DISABLE_OPENSSL),TRUE)
1528 define gb_LinkTarget__use_gnutls
1529 $(call gb_LinkTarget_set_include,$(1),\
1530 $$(INCLUDE) \
1531 $(GNUTLS_CFLAGS) \
1534 $(call gb_LinkTarget_add_defs,$(1),\
1535 -DDISABLE_OPENSSL \
1538 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1540 endef
1542 define gb_LinkTarget__use_libgcrypt
1543 $(call gb_LinkTarget_set_include,$(1),\
1544 $$(INCLUDE) \
1545 $(LIBGCRYPT_CFLAGS) \
1548 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1550 endef
1552 else # !DISABLE_OPENSSL
1554 gb_LinkTarget__use_gnutls:=
1555 gb_LinkTarget__use_libgcrypt:=
1557 endif # DISABLE_OPENSSL
1560 ifneq ($(SYSTEM_CDR),)
1562 define gb_LinkTarget__use_cdr
1563 $(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(CDR_CFLAGS) \
1567 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1569 endef
1571 else # !SYSTEM_CDR
1573 define gb_LinkTarget__use_cdr
1574 $(call gb_LinkTarget_set_include,$(1),\
1575 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1576 $$(INCLUDE) \
1578 $(call gb_LinkTarget_add_libs,$(1),\
1579 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1581 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1582 endef
1584 endif # SYSTEM_CDR
1587 ifneq ($(SYSTEM_EBOOK),)
1589 define gb_LinkTarget__use_ebook
1590 $(call gb_LinkTarget_set_include,$(1),\
1591 $$(INCLUDE) \
1592 $(EBOOK_CFLAGS) \
1594 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1596 endef
1598 gb_ExternalProject__use_ebook :=
1600 else # !SYSTEM_EBOOK
1602 define gb_LinkTarget__use_ebook
1603 $(call gb_LinkTarget_set_include,$(1),\
1604 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1605 $$(INCLUDE) \
1607 $(call gb_LinkTarget_add_libs,$(1),\
1608 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1610 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1612 endef
1614 define gb_ExternalProject__use_ebook
1615 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1617 endef
1619 endif # SYSTEM_EBOOK
1622 ifneq ($(SYSTEM_ETONYEK),)
1624 define gb_LinkTarget__use_etonyek
1625 $(call gb_LinkTarget_set_include,$(1),\
1626 $$(INCLUDE) \
1627 $(ETONYEK_CFLAGS) \
1629 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1631 endef
1633 gb_ExternalProject__use_etonyek :=
1635 else # !SYSTEM_ETONYEK
1637 ifeq ($(COM),MSC)
1639 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1640 etonyek \
1643 define gb_LinkTarget__use_etonyek
1644 $(call gb_LinkTarget_set_include,$(1),\
1645 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1646 $$(INCLUDE) \
1648 $(call gb_LinkTarget_use_libraries,$(1),\
1649 etonyek \
1652 endef
1654 else # !MSC
1656 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1657 libetonyek \
1660 define gb_LinkTarget__use_etonyek
1661 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1663 $(call gb_LinkTarget_set_include,$(1),\
1664 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1665 -DLIBETONYEK_VISIBILITY \
1666 $$(INCLUDE) \
1668 $(call gb_LinkTarget_add_libs,$(1),\
1669 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1671 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1673 endef
1675 define gb_ExternalProject__use_etonyek
1676 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1678 endef
1680 endif
1682 endif # SYSTEM_ETONYEK
1685 ifneq ($(SYSTEM_FREEHAND),)
1687 define gb_LinkTarget__use_freehand
1688 $(call gb_LinkTarget_set_include,$(1),\
1689 $$(INCLUDE) \
1690 $(FREEHAND_CFLAGS) \
1692 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1694 endef
1696 gb_ExternalProject__use_freehand :=
1698 else # !SYSTEM_FREEHAND
1700 define gb_LinkTarget__use_freehand
1701 $(call gb_LinkTarget_set_include,$(1),\
1702 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1703 $$(INCLUDE) \
1705 $(call gb_LinkTarget_add_libs,$(1),\
1706 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1708 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1710 endef
1712 define gb_ExternalProject__use_freehand
1713 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1715 endef
1717 endif # SYSTEM_FREEHAND
1720 ifneq ($(SYSTEM_ODFGEN),)
1722 define gb_LinkTarget__use_odfgen
1723 $(call gb_LinkTarget_set_include,$(1),\
1724 $$(INCLUDE) \
1725 $(ODFGEN_CFLAGS) \
1727 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1729 endef
1731 else # !SYSTEM_ODFGEN
1733 ifeq ($(COM),MSC)
1735 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1736 odfgen \
1739 define gb_LinkTarget__use_odfgen
1740 $(call gb_LinkTarget_set_include,$(1),\
1741 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1742 $$(INCLUDE) \
1744 $(call gb_LinkTarget_use_libraries,$(1),\
1745 odfgen \
1748 endef
1750 else # !MSC
1752 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1753 libodfgen \
1756 define gb_LinkTarget__use_odfgen
1757 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1759 $(call gb_LinkTarget_set_include,$(1),\
1760 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1761 -DLIBODFGEN_VISIBILITY \
1762 $$(INCLUDE) \
1764 $(call gb_LinkTarget_add_libs,$(1),\
1765 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1768 endef
1770 endif
1772 endif # SYSTEM_ODFGEN
1774 ifneq ($(SYSTEM_EPUBGEN),)
1776 define gb_LinkTarget__use_epubgen
1777 $(call gb_LinkTarget_set_include,$(1),\
1778 $$(INCLUDE) \
1779 $(EPUBGEN_CFLAGS) \
1781 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1783 endef
1784 gb_ExternalProject__use_epubgen :=
1786 else # !SYSTEM_EPUBGEN
1788 define gb_LinkTarget__use_epubgen
1789 $(call gb_LinkTarget_set_include,$(1),\
1790 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1791 $$(INCLUDE) \
1793 $(call gb_LinkTarget_add_libs,$(1),\
1794 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1796 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1798 endef
1799 define gb_ExternalProject__use_epubgen
1800 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1802 endef
1804 endif # SYSTEM_EPUBGEN
1806 ifneq ($(SYSTEM_REVENGE),)
1808 define gb_LinkTarget__use_revenge
1809 $(call gb_LinkTarget_set_include,$(1),\
1810 $$(INCLUDE) \
1811 $(REVENGE_CFLAGS) \
1813 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1815 endef
1817 gb_ExternalProject__use_revenge :=
1819 else # !SYSTEM_REVENGE
1821 ifeq ($(COM),MSC)
1823 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1824 revenge \
1827 define gb_LinkTarget__use_revenge
1828 $(call gb_LinkTarget_set_include,$(1),\
1829 $(REVENGE_CFLAGS) \
1830 $$(INCLUDE) \
1832 $(call gb_LinkTarget_use_libraries,$(1),\
1833 revenge \
1836 endef
1838 define gb_ExternalProject__use_revenge
1839 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1841 endef
1843 else # !MSC
1845 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1846 librevenge \
1849 define gb_LinkTarget__use_revenge
1850 $(call gb_LinkTarget_use_package,$(1),librevenge)
1852 $(call gb_LinkTarget_set_include,$(1),\
1853 $(REVENGE_CFLAGS) \
1854 -DLIBREVENGE_VISIBILITY \
1855 $$(INCLUDE) \
1857 $(call gb_LinkTarget_add_libs,$(1),\
1858 $(REVENGE_LIBS) \
1860 endef
1862 define gb_ExternalProject__use_revenge
1863 $(call gb_ExternalProject_use_package,$(1),librevenge)
1865 endef
1867 endif # MSC
1869 endif # SYSTEM_REVENGE
1872 ifneq ($(SYSTEM_ABW),)
1874 define gb_LinkTarget__use_abw
1875 $(call gb_LinkTarget_set_include,$(1),\
1876 $$(INCLUDE) \
1877 $(ABW_CFLAGS) \
1879 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1881 endef
1882 gb_ExternalProject__use_abw :=
1884 else # !SYSTEM_ABW
1886 define gb_LinkTarget__use_abw
1887 $(call gb_LinkTarget_set_include,$(1),\
1888 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1889 $$(INCLUDE) \
1891 $(call gb_LinkTarget_add_libs,$(1),\
1892 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1894 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1896 endef
1897 define gb_ExternalProject__use_abw
1898 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1900 endef
1902 endif # SYSTEM_ABW
1905 ifneq ($(SYSTEM_MSPUB),)
1907 define gb_LinkTarget__use_mspub
1908 $(call gb_LinkTarget_set_include,$(1),\
1909 $$(INCLUDE) \
1910 $(MSPUB_CFLAGS) \
1912 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1914 endef
1916 else # !SYSTEM_MSPUB
1918 define gb_LinkTarget__use_mspub
1919 $(call gb_LinkTarget_set_include,$(1),\
1920 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1921 $$(INCLUDE) \
1923 $(call gb_LinkTarget_add_libs,$(1),\
1924 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1926 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1928 endef
1930 endif # SYSTEM_MSPUB
1933 ifneq ($(SYSTEM_PAGEMAKER),)
1935 define gb_LinkTarget__use_pagemaker
1936 $(call gb_LinkTarget_set_include,$(1),\
1937 $$(INCLUDE) \
1938 $(PAGEMAKER_CFLAGS) \
1940 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1942 endef
1943 gb_ExternalProject__use_pagemaker :=
1945 else # !SYSTEM_PAGEMAKER
1947 define gb_LinkTarget__use_pagemaker
1948 $(call gb_LinkTarget_set_include,$(1),\
1949 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1950 $$(INCLUDE) \
1952 $(call gb_LinkTarget_add_libs,$(1),\
1953 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1955 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1957 endef
1958 define gb_ExternalProject__use_pagemaker
1959 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1961 endef
1963 endif # SYSTEM_PAGEMAKER
1966 ifneq ($(SYSTEM_QXP),)
1968 define gb_LinkTarget__use_qxp
1969 $(call gb_LinkTarget_set_include,$(1),\
1970 $$(INCLUDE) \
1971 $(QXP_CFLAGS) \
1973 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
1975 endef
1976 gb_ExternalProject__use_qxp :=
1978 else # !SYSTEM_QXP
1980 define gb_LinkTarget__use_qxp
1981 $(call gb_LinkTarget_set_include,$(1),\
1982 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
1983 $$(INCLUDE) \
1985 $(call gb_LinkTarget_add_libs,$(1),\
1986 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
1988 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
1990 endef
1991 define gb_ExternalProject__use_qxp
1992 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
1994 endef
1996 endif # SYSTEM_QXP
1999 ifneq ($(SYSTEM_ZMF),)
2001 define gb_LinkTarget__use_zmf
2002 $(call gb_LinkTarget_set_include,$(1),\
2003 $$(INCLUDE) \
2004 $(ZMF_CFLAGS) \
2006 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2008 endef
2009 gb_ExternalProject__use_zmf :=
2011 else # !SYSTEM_ZMF
2013 define gb_LinkTarget__use_zmf
2014 $(call gb_LinkTarget_set_include,$(1),\
2015 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2016 $$(INCLUDE) \
2018 $(call gb_LinkTarget_add_libs,$(1),\
2019 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2021 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2023 endef
2024 define gb_ExternalProject__use_zmf
2025 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2027 endef
2029 endif # SYSTEM_ZMF
2032 ifneq ($(SYSTEM_VISIO),)
2034 define gb_LinkTarget__use_visio
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 $$(INCLUDE) \
2037 $(VISIO_CFLAGS) \
2039 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2041 endef
2043 else # !SYSTEM_VISIO
2045 define gb_LinkTarget__use_visio
2046 $(call gb_LinkTarget_set_include,$(1),\
2047 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2048 $$(INCLUDE) \
2050 $(call gb_LinkTarget_add_libs,$(1),\
2051 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2053 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2055 endef
2057 endif # SYSTEM_VISIO
2060 ifneq ($(SYSTEM_WPD),)
2062 define gb_LinkTarget__use_wpd
2063 $(call gb_LinkTarget_set_include,$(1),\
2064 $$(INCLUDE) \
2065 $(WPD_CFLAGS) \
2067 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2069 endef
2070 gb_ExternalProject__use_wpd :=
2072 else # !SYSTEM_WPD
2074 ifeq ($(COM),MSC)
2076 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2077 wpd \
2080 define gb_LinkTarget__use_wpd
2081 $(call gb_LinkTarget_set_include,$(1),\
2082 $(WPD_CFLAGS) \
2083 $$(INCLUDE) \
2085 $(call gb_LinkTarget_use_libraries,$(1),\
2086 wpd \
2089 endef
2091 define gb_ExternalProject__use_wpd
2092 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2094 endef
2096 else # !MSC
2098 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2099 libwpd \
2102 define gb_LinkTarget__use_wpd
2103 $(call gb_LinkTarget_use_package,$(1),libwpd)
2105 $(call gb_LinkTarget_set_include,$(1),\
2106 $(WPD_CFLAGS) \
2107 $$(INCLUDE) \
2109 $(call gb_LinkTarget_add_libs,$(1),\
2110 $(WPD_LIBS) \
2113 endef
2115 define gb_ExternalProject__use_wpd
2116 $(call gb_ExternalProject_use_package,$(1),libwpd)
2118 endef
2120 endif # MSC
2122 endif # SYSTEM_WPD
2125 ifneq ($(SYSTEM_WPG),)
2127 define gb_LinkTarget__use_wpg
2128 $(call gb_LinkTarget_set_include,$(1),\
2129 $$(INCLUDE) \
2130 $(WPG_CFLAGS) \
2132 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2134 endef
2135 gb_ExternalProject__use_wpg :=
2137 else # !SYSTEM_WPG
2139 ifeq ($(COM),MSC)
2141 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2142 wpg \
2145 define gb_LinkTarget__use_wpg
2146 $(call gb_LinkTarget_set_include,$(1),\
2147 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2148 $$(INCLUDE) \
2150 $(call gb_LinkTarget_use_libraries,$(1),\
2151 wpg \
2154 endef
2156 else # !MSC
2158 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2159 libwpg \
2162 define gb_LinkTarget__use_wpg
2163 $(call gb_LinkTarget_use_package,$(1),libwpg)
2165 $(call gb_LinkTarget_set_include,$(1),\
2166 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2167 $$(INCLUDE) \
2169 $(call gb_LinkTarget_add_libs,$(1),\
2170 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2173 endef
2175 endif # MSC
2177 endif # SYSTEM_WPG
2180 ifneq ($(SYSTEM_WPS),)
2182 define gb_LinkTarget__use_wps
2183 $(call gb_LinkTarget_set_include,$(1),\
2184 $$(INCLUDE) \
2185 $(WPS_CFLAGS) \
2187 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2189 endef
2190 gb_ExternalProject__use_wps :=
2192 else # !SYSTEM_WPS
2194 ifeq ($(COM),MSC)
2196 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2197 wps \
2200 define gb_LinkTarget__use_wps
2201 $(call gb_LinkTarget_set_include,$(1),\
2202 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2203 $$(INCLUDE) \
2206 $(call gb_LinkTarget_use_libraries,$(1),\
2207 wps \
2210 endef
2212 else # !MSC
2214 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2215 libwps \
2218 define gb_LinkTarget__use_wps
2219 $(call gb_LinkTarget_use_package,$(1),libwps)
2221 $(call gb_LinkTarget_set_include,$(1),\
2222 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2223 $$(INCLUDE) \
2225 $(call gb_LinkTarget_add_libs,$(1),\
2226 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2229 endef
2231 endif # MSC
2233 endif # SYSTEM_WPS
2236 ifneq ($(SYSTEM_MWAW),)
2238 define gb_LinkTarget__use_mwaw
2239 $(call gb_LinkTarget_set_include,$(1),\
2240 $$(INCLUDE) \
2241 $(MWAW_CFLAGS) \
2243 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2245 endef
2247 else # !SYSTEM_MWAW
2249 ifeq ($(COM),MSC)
2251 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2252 mwaw \
2255 define gb_LinkTarget__use_mwaw
2256 $(call gb_LinkTarget_set_include,$(1),\
2257 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2258 $$(INCLUDE) \
2261 $(call gb_LinkTarget_use_libraries,$(1),\
2262 mwaw \
2265 endef
2267 else # !MSC
2269 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2270 libmwaw \
2273 define gb_LinkTarget__use_mwaw
2274 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2276 $(call gb_LinkTarget_set_include,$(1),\
2277 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2278 $$(INCLUDE) \
2280 $(call gb_LinkTarget_add_libs,$(1),\
2281 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2284 endef
2286 endif # MSC
2288 endif # SYSTEM_MWAW
2290 ifneq ($(SYSTEM_STAROFFICE),)
2292 define gb_LinkTarget__use_staroffice
2293 $(call gb_LinkTarget_set_include,$(1),\
2294 $$(INCLUDE) \
2295 $(STAROFFICE_CFLAGS) \
2297 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2299 endef
2301 else # !SYSTEM_STAROFFICE
2303 ifeq ($(COM),MSC)
2305 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2306 staroffice \
2309 define gb_LinkTarget__use_staroffice
2310 $(call gb_LinkTarget_set_include,$(1),\
2311 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2312 $$(INCLUDE) \
2315 $(call gb_LinkTarget_use_libraries,$(1),\
2316 staroffice \
2319 endef
2321 else # !MSC
2323 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2324 libstaroffice \
2327 define gb_LinkTarget__use_staroffice
2328 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2330 $(call gb_LinkTarget_set_include,$(1),\
2331 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2332 $$(INCLUDE) \
2334 $(call gb_LinkTarget_add_libs,$(1),\
2335 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2338 endef
2340 endif # MSC
2342 endif # SYSTEM_STAROFFICE
2345 ifneq ($(SYSTEM_LCMS2),)
2347 define gb_LinkTarget__use_lcms2
2348 $(call gb_LinkTarget_set_include,$(1),\
2349 $$(INCLUDE) \
2350 $(LCMS2_CFLAGS) \
2352 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2354 endef
2356 gb_ExternalProject__use_lcms2 :=
2358 else # !SYSTEM_LCMS2
2360 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2361 lcms2 \
2364 define gb_ExternalProject__use_lcms2
2365 $(call gb_ExternalProject_use_package,$(1),lcms2)
2367 endef
2369 ifeq ($(OS),ANDROID)
2371 define gb_LinkTarget__use_lcms2
2372 $(call gb_LinkTarget_use_package,$(1),lcms2)
2373 $(call gb_LinkTarget_set_include,$(1),\
2374 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2375 $$(INCLUDE) \
2378 endef
2380 else
2382 define gb_LinkTarget__use_lcms2
2383 $(call gb_LinkTarget_use_package,$(1),lcms2)
2384 $(call gb_LinkTarget_set_include,$(1),\
2385 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2386 $$(INCLUDE) \
2388 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2390 endef
2392 endif # ANDROID
2393 endif # SYSTEM_LCMS2
2395 ifneq ($(ENABLE_LPSOLVE),)
2397 ifneq ($(SYSTEM_LPSOLVE),)
2399 define gb_LinkTarget__use_lpsolve
2400 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2401 $(call gb_LinkTarget_add_defs,$(1),\
2402 -DSYSTEM_LPSOLVE \
2405 endef
2407 else # !SYSTEM_LPSOLVE
2409 define gb_LinkTarget__use_lpsolve
2410 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2411 ifeq ($(COM),MSC)
2412 $(call gb_LinkTarget_add_libs,$(1),\
2413 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2415 else
2416 $(call gb_LinkTarget_add_libs,$(1),\
2417 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2419 endif
2420 $(call gb_LinkTarget_set_include,$(1),\
2421 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2422 $$(INCLUDE) \
2425 endef
2427 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2428 lpsolve \
2431 endif # SYSTEM_LPSOLVE
2433 else
2435 gb_LinkTarget__use_lpsolve :=
2437 endif # ENABLE_LPSOLVE
2439 ifneq ($(ENABLE_COINMP),)
2441 ifneq ($(SYSTEM_COINMP),TRUE)
2443 define gb_LinkTarget__use_coinmp
2444 $(call gb_LinkTarget_use_package,$(1),coinmp)
2445 ifeq ($(COM),MSC)
2446 $(call gb_LinkTarget_add_libs,$(1),\
2447 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2449 else
2450 $(call gb_LinkTarget_add_libs,$(1),\
2451 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2452 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2453 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2454 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2455 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2456 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2457 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2459 endif
2460 $(call gb_LinkTarget_set_include,$(1),\
2461 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2462 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2463 $$(INCLUDE) \
2466 endef
2468 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2469 coinmp \
2472 else # SYSTEM_COINMP
2474 define gb_LinkTarget__use_coinmp
2475 $(call gb_LinkTarget_set_include,$(1),\
2476 $$(INCLUDE) \
2477 $(COINMP_CFLAGS) \
2479 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2481 endef
2483 endif
2485 else
2487 gb_LinkTarget__use_coinmp :=
2489 endif # ENABLE_COINMP
2491 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2493 define gb_LinkTarget__use_mDNSResponder
2494 $(call gb_LinkTarget_set_include,$(1),\
2495 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2496 $$(INCLUDE) \
2498 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2499 endef
2501 endif # MDNSRESPONDER
2503 ifeq ($(ENABLE_GIO),TRUE)
2505 define gb_LinkTarget__use_gio
2506 $(call gb_LinkTarget_set_include,$(1),\
2507 $$(INCLUDE) \
2508 $(GIO_CFLAGS) \
2511 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2513 endef
2515 else # ENABLE_GIO
2517 define gb_LinkTarget__use_gio
2519 endef
2521 endif # ENABLE_GIO
2523 ifeq ($(ENABLE_AVAHI),TRUE)
2525 define gb_LinkTarget__use_avahi
2526 $(call gb_LinkTarget_set_include,$(1),\
2527 $$(INCLUDE) \
2528 $(AVAHI_CFLAGS) \
2531 $(call gb_LinkTarget_add_defs,$(1),\
2532 -DENABLE_AVAHI \
2535 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2537 endef
2539 else # ENABLE_AVAHI
2541 gb_LinkTarget__use_avahi :=
2543 endif # ENABLE_AVAHI
2546 define gb_LinkTarget__use_gtk
2547 $(call gb_LinkTarget_set_include,$(1),\
2548 $$(INCLUDE) \
2549 $(GTK_CFLAGS) \
2552 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2554 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2556 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2558 $(call gb_LinkTarget_set_include,$(1),\
2559 $$(INCLUDE) \
2560 $(GTK_PRINT_CFLAGS) \
2563 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2565 endif
2567 endef
2569 define gb_LinkTarget__use_gthread
2570 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2571 endef
2573 ifeq ($(ENABLE_CUPS),TRUE)
2575 define gb_LinkTarget__use_cups
2576 $(call gb_LinkTarget_add_defs,$(1),\
2577 -DENABLE_CUPS \
2580 $(call gb_LinkTarget_add_libs,$(1),\
2581 -lcups \
2584 endef
2586 else # ENABLE_CUPS
2588 define gb_LinkTarget__use_cups
2590 endef
2592 endif # ENABLE_DBUS
2594 ifeq ($(ENABLE_DBUS),TRUE)
2596 define gb_LinkTarget__use_dbus
2597 $(call gb_LinkTarget_set_include,$(1),\
2598 $$(INCLUDE) \
2599 $(DBUS_CFLAGS) \
2602 $(call gb_LinkTarget_add_libs,$(1),\
2603 $(DBUS_LIBS) \
2606 endef
2608 else # ENABLE_DBUS
2610 define gb_LinkTarget__use_dbus
2612 endef
2614 endif # ENABLE_DBUS
2617 ifneq ($(SYSTEM_LIBPNG),)
2619 define gb_LinkTarget__use_libpng
2620 $(call gb_LinkTarget_set_include,$(1),\
2621 $$(INCLUDE) \
2622 $(LIBPNG_CFLAGS) \
2625 $(call gb_LinkTarget_add_libs,$(1),\
2626 $(LIBPNG_LIBS) \
2629 endef
2631 gb_ExternalProject__use_libpng :=
2633 else # !SYSTEM_LIBPNG
2635 define gb_LinkTarget__use_libpng
2636 $(call gb_LinkTarget_set_include,$(1),\
2637 $(LIBPNG_CFLAGS) \
2638 $$(INCLUDE) \
2640 $(call gb_LinkTarget_use_static_libraries,$(1),\
2641 libpng \
2643 $(call gb_LinkTarget__use_zlib,$(1))
2645 endef
2647 define gb_ExternalProject__use_libpng
2648 $(call gb_ExternalProject_use_static_libraries,$(1),\
2649 libpng \
2652 endef
2654 endif # !SYSTEM_LIBPNG
2657 ifneq ($(SYSTEM_CURL),)
2659 define gb_LinkTarget__use_curl
2660 $(call gb_LinkTarget_add_defs,$(1),\
2661 -DSYSTEM_CURL \
2663 $(call gb_LinkTarget_set_include,$(1),\
2664 $$(INCLUDE) \
2665 $(CURL_CFLAGS) \
2667 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2669 endef
2671 else # !SYSTEM_CURL
2673 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2674 curl \
2677 define gb_LinkTarget__use_curl
2678 $(call gb_LinkTarget_use_package,$(1),curl)
2679 $(call gb_LinkTarget_set_include,$(1),\
2680 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2681 $$(INCLUDE) \
2684 ifeq ($(COM),MSC)
2685 $(call gb_LinkTarget_add_libs,$(1),\
2686 $(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 \
2688 else
2689 $(call gb_LinkTarget_add_libs,$(1),\
2690 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2692 endif
2694 endef
2696 endif # SYSTEM_CURL
2698 ifeq ($(ENABLE_VALGRIND),TRUE)
2700 define gb_LinkTarget__use_valgrind
2701 $(call gb_LinkTarget_add_defs,$(1),\
2702 -DHAVE_VALGRIND_HEADERS \
2705 $(call gb_LinkTarget_set_include,$(1),\
2706 $$(INCLUDE) \
2707 $(VALGRIND_CFLAGS) \
2710 endef
2712 else # !ENABLE_VALGRIND
2714 define gb_LinkTarget__use_valgrind
2716 endef
2718 endif # ENABLE_VALGRIND
2720 ifneq ($(SYSTEM_POPPLER),)
2722 define gb_LinkTarget__use_poppler
2723 $(call gb_LinkTarget_set_include,$(1),\
2724 $(POPPLER_CFLAGS) \
2725 $$(INCLUDE) \
2728 $(call gb_LinkTarget_add_libs,$(1),\
2729 $(POPPLER_LIBS) \
2732 endef
2734 else # !SYSTEM_POPPLER
2736 define gb_LinkTarget__use_poppler
2737 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2739 $(call gb_LinkTarget_set_include,$(1),\
2740 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2741 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2742 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2743 $$(INCLUDE) \
2746 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2748 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2750 ifeq ($(OS),MACOSX)
2751 $(call gb_LinkTarget_add_libs,$(1),\
2752 -lobjc \
2754 else ifeq ($(OS),LINUX)
2755 $(call gb_LinkTarget_add_libs,$(1),\
2756 -pthread \
2758 else ifeq ($(OS),WNT)
2759 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2760 advapi32 \
2761 gdi32 \
2763 endif
2765 endef
2767 endif # SYSTEM_POPPLER
2770 ifneq ($(SYSTEM_CLUCENE),)
2772 define gb_LinkTarget__use_clucene
2773 $(call gb_LinkTarget_add_defs,$(1),\
2774 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2777 $(call gb_LinkTarget_set_include,$(1),\
2778 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2779 $$(INCLUDE) \
2782 $(call gb_LinkTarget_add_libs,$(1),\
2783 $(CLUCENE_LIBS) \
2786 endef
2788 else # !SYSTEM_CLUCENE
2790 define gb_LinkTarget__use_clucene
2791 $(call gb_LinkTarget_set_include,$(1),\
2792 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2793 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2794 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2795 $$(INCLUDE) \
2798 $(call gb_LinkTarget_use_libraries,$(1),\
2799 clucene \
2802 endef
2804 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2805 clucene \
2808 endif # SYSTEM_CLUCENE
2810 define gb_LinkTarget__use_gobject
2811 $(call gb_LinkTarget_add_libs,$(1),\
2812 $(GOBJECT_LIBS) \
2815 $(call gb_LinkTarget_set_include,$(1),\
2816 $$(INCLUDE) \
2817 $(GOBJECT_CFLAGS) \
2819 endef
2821 ifneq ($(SYSTEM_HSQLDB),)
2823 define gb_LinkTarget__use_hsqldb
2825 $(call gb_LinkTarget_add_defs,$(1),\
2826 -DSYSTEM_HSQLDB \
2827 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2830 endef
2832 else # !SYSTEM_HSQLDB
2834 define gb_LinkTarget__use_hsqldb
2836 endef
2838 endif # SYSTEM_HSQLDB
2841 ifneq ($(SYSTEM_OPENLDAP),)
2843 define gb_LinkTarget__use_openldap
2845 $(call gb_LinkTarget_add_libs,$(1),\
2846 -lldap \
2847 -llber \
2850 endef
2852 gb_ExternalProject__use_openldap :=
2854 else # !SYSTEM_OPENLDAP
2856 define gb_LinkTarget__use_openldap
2857 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2858 $(call gb_LinkTarget_set_include,$(1),\
2859 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2860 $$(INCLUDE) \
2862 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2863 $(call gb_LinkTarget_add_libs,$(1), \
2864 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2865 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2868 endef
2870 define gb_ExternalProject__use_openldap
2871 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2873 endef
2875 endif # SYSTEM_OPENLDAP
2877 ifneq ($(SYSTEM_LIBTOMMATH),)
2879 define gb_LinkTarget__use_libtommath
2880 $(call gb_LinkTarget_set_include,$(1),\
2881 $(LIBTOMMATH_CFLAGS) \
2882 $$(INCLUDE) \
2884 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2886 endef
2888 else # !SYSTEM_LIBTOMMATH
2889 define gb_LinkTarget__use_libtommath
2890 $(call gb_LinkTarget_set_include,$(1),\
2891 -I${WORKDIR}/UnpackedTarball/libtommath \
2892 $$(INCLUDE) \
2894 $(call gb_LinkTarget_add_libs,$(1),\
2895 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2897 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2899 endef
2901 endif # SYSTEM_LIBTOMMATH
2903 define gb_ExternalProject__use_libtommath
2904 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2906 endef
2908 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2910 ifneq ($(SYSTEM_FIREBIRD),)
2912 define gb_LinkTarget__use_libfbembed
2913 $(call gb_LinkTarget_set_include,$(1),\
2914 $(FIREBIRD_CFLAGS) \
2915 $$(INCLUDE) \
2917 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2919 endef
2921 else # !SYSTEM_FIREBIRD
2923 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2924 firebird \
2927 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2928 #$(call gb_LinkTarget__use_libtommath,$(1))
2930 define gb_LinkTarget__use_libfbembed
2931 $(call gb_LinkTarget_use_package,$(1),firebird)
2932 $(call gb_LinkTarget_set_include,$(1),\
2933 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2934 $$(INCLUDE) \
2936 ifeq ($(COM),MSC)
2937 $(call gb_LinkTarget_add_libs,$(1),\
2938 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2940 else
2941 $(call gb_LinkTarget_add_libs,$(1),\
2942 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2944 endif
2946 endef
2949 # endef
2951 endif # SYSTEM_FIREBIRD
2953 else # !ENABLE_FIREBIRD_SDBC
2955 gb_LinkTarget__use_firebird :=
2956 # gb_LinkTarget__use_atomic_ops :=
2957 # gb_LinkTarget__use_libtommath :=
2959 endif # ENABLE_FIREBIRD_SDBC
2962 ifneq ($(SYSTEM_POSTGRESQL),)
2964 define gb_LinkTarget__use_postgresql
2966 $(call gb_LinkTarget_set_include,$(1),\
2967 $(POSTGRESQL_INC) \
2968 $$(INCLUDE) \
2971 $(call gb_LinkTarget_add_libs,$(1),\
2972 -lpq \
2975 $(call gb_LinkTarget_add_ldflags,$(1),\
2976 $(POSTGRESQL_LIB) \
2979 endef
2981 else # !SYSTEM_POSTGRESQL
2983 define gb_LinkTarget__use_postgresql
2985 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2987 $(call gb_LinkTarget_set_include,$(1),\
2988 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2989 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2990 $$(INCLUDE) \
2993 $(call gb_LinkTarget_add_libs,$(1),\
2994 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2997 ifeq ($(OS),WNT)
2998 $(call gb_LinkTarget_use_external,$(1),openssl)
3000 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3001 secur32 \
3002 ws2_32 \
3005 endif
3007 endef
3009 endif # SYSTEM_POSTGRESQL
3011 ifeq ($(ENABLE_KDE4),TRUE)
3013 define gb_LinkTarget__use_kde4
3014 $(call gb_LinkTarget_set_include,$(1),\
3015 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3016 $$(INCLUDE) \
3019 $(call gb_LinkTarget_add_defs,$(1),\
3020 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3023 $(call gb_LinkTarget_add_libs,$(1),\
3024 $(KDE4_LIBS) \
3027 endef
3029 else # !ENABLE_KDE4
3031 define gb_LinkTarget__use_kde4
3033 endef
3035 endif # ENABLE_KDE4
3037 ifeq ($(ENABLE_QT5),TRUE)
3039 define gb_LinkTarget__use_qt5
3040 $(call gb_LinkTarget_set_include,$(1),\
3041 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3042 $$(INCLUDE) \
3045 $(call gb_LinkTarget_add_defs,$(1),\
3046 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3049 $(call gb_LinkTarget_add_libs,$(1),\
3050 $(QT5_LIBS) \
3053 ifeq ($(COM),GCC)
3054 $(call gb_LinkTarget_add_cxxflags,$(1),\
3055 -Wno-shadow \
3057 endif
3059 endef
3061 else # !ENABLE_QT5
3063 define gb_LinkTarget__use_qt5
3065 endef
3067 endif # ENABLE_QT5
3069 # PYTHON
3070 # extra python_headers external because pyuno wrapper must not link python
3071 ifneq ($(SYSTEM_PYTHON),)
3073 define gb_LinkTarget__use_python_headers
3074 $(call gb_LinkTarget_add_defs,$(1),\
3075 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3078 $(call gb_LinkTarget_set_include,$(1),\
3079 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3080 $$(INCLUDE) \
3083 endef
3085 define gb_LinkTarget__use_python
3086 $(call gb_LinkTarget__use_python_headers,$(1))
3088 $(call gb_LinkTarget_add_libs,$(1),\
3089 $(PYTHON_LIBS) \
3092 endef
3094 else # !SYSTEM_PYTHON
3096 $(eval $(call gb_Helper_register_packages_for_install,python,\
3097 python3 \
3100 define gb_LinkTarget__use_python_headers
3101 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3102 $(call gb_LinkTarget_set_include,$(1),\
3103 -I$(call gb_UnpackedTarball_get_dir,python3) \
3104 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3105 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3106 $$(INCLUDE) \
3109 endef
3111 define gb_LinkTarget__use_python
3112 $(call gb_LinkTarget__use_python_headers,$(1))
3113 ifeq ($(OS),MACOSX)
3114 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3115 else
3116 $(call gb_LinkTarget_use_package,$(1),python3)
3117 endif
3119 ifeq ($(OS),WNT)
3120 $(call gb_LinkTarget_add_libs,$(1),\
3121 $(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 \
3123 else ifeq ($(OS),MACOSX)
3124 $(call gb_LinkTarget_add_libs,$(1),\
3125 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3127 else
3128 $(call gb_LinkTarget_add_libs,$(1),\
3129 -L$(call gb_UnpackedTarball_get_dir,python3) \
3130 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3132 endif
3134 endef
3136 endif # SYSTEM_PYTHON
3138 # ORCUS
3139 ifneq ($(SYSTEM_LIBORCUS),)
3141 define gb_LinkTarget__use_orcus
3142 $(call gb_LinkTarget_set_include,$(1),\
3143 $$(INCLUDE) \
3144 $(ORCUS_CFLAGS) \
3146 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3147 endef
3149 define gb_LinkTarget__use_orcus-parser
3151 endef
3153 else # !SYSTEM_LIBORCUS
3155 ifeq ($(COM),MSC)
3157 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3158 orcus \
3159 orcus-parser \
3162 define gb_LinkTarget__use_orcus
3163 $(call gb_LinkTarget_set_include,$(1),\
3164 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3165 $$(INCLUDE) \
3168 $(call gb_LinkTarget_use_libraries,$(1),\
3169 orcus \
3172 endef
3174 define gb_LinkTarget__use_orcus-parser
3175 $(call gb_LinkTarget_set_include,$(1),\
3176 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3177 $$(INCLUDE) \
3180 $(call gb_LinkTarget_use_libraries,$(1),\
3181 orcus-parser \
3184 endef
3186 else # !MSC
3188 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3189 liborcus \
3192 define gb_LinkTarget__use_orcus
3193 $(call gb_LinkTarget_use_package,$(1),liborcus)
3195 $(call gb_LinkTarget_set_include,$(1),\
3196 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3197 $$(INCLUDE) \
3200 $(call gb_LinkTarget_add_libs,$(1),\
3201 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.13 \
3204 $(if $(SYSTEM_BOOST), \
3205 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3206 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3209 endef
3211 define gb_LinkTarget__use_orcus-parser
3212 $(call gb_LinkTarget_use_package,$(1),liborcus)
3214 $(call gb_LinkTarget_set_include,$(1),\
3215 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3216 $$(INCLUDE) \
3219 $(call gb_LinkTarget_add_libs,$(1),\
3220 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.13 \
3223 endef
3225 endif # MSC
3227 endif # SYSTEM_LIBORCUS
3229 ifeq ($(ENABLE_EOT),TRUE)
3231 ifneq ($(SYSTEM_LIBEOT),)
3233 define gb_LinkTarget__use_libeot
3234 $(call gb_LinkTarget_set_include,$(1),\
3235 $$(INCLUDE) \
3236 $(LIBEOT_CFLAGS) \
3238 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3240 endef
3242 gb_ExternalProject__use_libeot :=
3244 else # !SYSTEM_LIBEOT
3246 define gb_LinkTarget__use_libeot
3247 $(call gb_LinkTarget_set_include,$(1),\
3248 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3249 $$(INCLUDE) \
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3254 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3256 endef
3258 define gb_ExternalProject__use_libeot
3259 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3261 endef
3263 endif # SYSTEM_LIBEOT
3265 else # !ENABLE_EOT
3267 gb_LinkTarget__use_libeot :=
3268 gb_ExternalProject__use_libeot :=
3270 endif # ENABLE_EOT
3272 ### X11 stuff ###
3274 ifeq ($(USING_X11), TRUE)
3276 define gb_LinkTarget__use_Xrandr
3277 $(call gb_LinkTarget_set_include,$(1),\
3278 $$(INCLUDE) \
3279 $(XRANDR_CFLAGS) \
3282 $(call gb_LinkTarget_add_libs,$(1),\
3283 $(XRANDR_LIBS) \
3285 endef
3287 define gb_LinkTarget__use_Xrender
3288 $(call gb_LinkTarget_set_include,$(1),\
3289 $$(INCLUDE) \
3290 $(XRENDER_CFLAGS) \
3293 $(call gb_LinkTarget_add_libs,$(1),\
3294 $(XRENDER_LIBS) \
3296 endef
3298 endif # USING_X11
3301 gb_ExternalProject__use_nss3:=
3304 ifneq ($(SYSTEM_NSS),)
3306 define gb_LinkTarget__use_nss3
3307 $(call gb_LinkTarget_add_defs,$(1),\
3308 -DSYSTEM_NSS \
3311 $(call gb_LinkTarget_set_include,$(1),\
3312 $$(INCLUDE) \
3313 $(NSS_CFLAGS) \
3316 $(call gb_LinkTarget_add_libs,$(1),\
3317 $(NSS_LIBS) \
3320 endef
3322 define gb_LinkTarget__use_plc4
3323 $(call gb_LinkTarget__use_nss3,$(1))
3325 endef
3327 define gb_LinkTarget__use_ssl3
3328 $(call gb_LinkTarget__use_nss3,$(1))
3330 endef
3332 else # !SYSTEM_NSS
3334 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3335 nss \
3338 define gb_LinkTarget__use_nss3
3339 $(call gb_LinkTarget_use_package,$(1),nss)
3340 $(call gb_LinkTarget_set_include,$(1),\
3341 $$(INCLUDE) \
3342 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3343 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3346 ifeq ($(COM),MSC)
3347 $(call gb_LinkTarget_add_libs,$(1),\
3348 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3349 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3350 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3352 else
3353 $(call gb_LinkTarget_add_libs,$(1),\
3354 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3355 -lnspr4 \
3356 -lnss3 \
3357 -lsmime3 \
3359 endif
3361 endef
3363 define gb_LinkTarget__use_plc4
3364 $(call gb_LinkTarget_use_package,$(1),nss)
3365 ifeq ($(COM),MSC)
3366 $(call gb_LinkTarget_add_libs,$(1),\
3367 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3369 else
3370 $(call gb_LinkTarget_add_libs,$(1),\
3371 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3373 endif
3375 endef
3377 define gb_LinkTarget__use_ssl3
3378 $(call gb_LinkTarget_use_package,$(1),nss)
3379 ifeq ($(COM),MSC)
3380 $(call gb_LinkTarget_add_libs,$(1),\
3381 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3383 else
3384 $(call gb_LinkTarget_add_libs,$(1),\
3385 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3387 endif
3389 endef
3391 define gb_ExternalProject__use_nss3
3392 $(call gb_ExternalProject_use_package,$(1),nss)
3394 endef
3396 endif # SYSTEM_NSS
3398 ifeq ($(ENABLE_BREAKPAD),TRUE)
3400 define gb_LinkTarget__use_breakpad
3401 $(call gb_LinkTarget_set_include,$(1),\
3402 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3403 $$(INCLUDE) \
3406 ifeq ($(COM),MSC)
3407 $(call gb_LinkTarget_use_static_libraries,$(1),\
3408 breakpad \
3410 else
3411 $(call gb_LinkTarget_add_libs,$(1),\
3412 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3414 endif
3416 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3418 endef
3420 endif # ENABLE_BREAKPAD
3422 ifeq ($(ENABLE_GPGMEPP),TRUE)
3424 ifneq ($(SYSTEM_GPGMEPP),)
3426 gb_ExternalProject__use_gpgmepp:=
3427 gb_ExternalProject__use_libassuan:=
3428 gb_ExternalProject__use_libgpg-error:=
3430 define gb_LinkTarget__use_gpgmepp
3431 $(call gb_LinkTarget_set_include,$(1),\
3432 $$(INCLUDE) \
3433 $$(GPGMEPP_CFLAGS) \
3436 $(call gb_LinkTarget_add_libs,$(1),\
3437 $(GPGMEPP_LIBS) \
3440 endef
3442 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3444 define gb_ExternalProject__use_gpgmepp
3445 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3447 endef
3448 define gb_ExternalProject__use_libassuan
3449 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3451 endef
3452 define gb_ExternalProject__use_libgpg-error
3453 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3455 endef
3457 ifneq ($(filter WNT,$(OS)),)
3459 define gb_LinkTarget__use_libgpg-error
3460 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3462 $(call gb_LinkTarget_set_include,$(1),\
3463 $(GPG_ERROR_CFLAGS) \
3464 $$(INCLUDE) \
3466 $(call gb_LinkTarget_add_libs,$(1),\
3467 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3470 endef
3472 define gb_LinkTarget__use_libassuan
3473 $(call gb_LinkTarget_use_package,$(1),libassuan)
3475 $(call gb_LinkTarget_set_include,$(1),\
3476 $(LIBASSUAN_CFLAGS) \
3477 $$(INCLUDE) \
3479 $(call gb_LinkTarget_add_libs,$(1),\
3480 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3483 endef
3485 define gb_LinkTarget__use_gpgmepp
3486 $(call gb_LinkTarget_set_include,$(1),\
3487 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3488 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3489 $$(GPG_ERROR_CFLAGS) \
3490 $$(INCLUDE) \
3492 $(call gb_LinkTarget_use_libraries,$(1),\
3493 gpgmepp \
3496 endef
3498 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3499 libassuan \
3500 libgpg-error \
3503 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3504 gpgmepp \
3507 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3508 gpgme-w32spawn \
3511 endif
3513 ifneq ($(filter MACOSX LINUX,$(OS)),)
3515 define gb_LinkTarget__use_gpgmepp
3516 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3518 $(call gb_LinkTarget_set_include,$(1),\
3519 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3520 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3521 $$(GPG_ERROR_CFLAGS) \
3522 $$(INCLUDE) \
3524 $(call gb_LinkTarget_add_libs,$(1),\
3525 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3528 endef
3530 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3531 gpgmepp \
3532 libassuan \
3533 libgpg-error \
3536 endif
3538 endif
3540 else # !ENABLE_GPGMEPP
3542 gb_ExternalProject__use_gpgmepp :=
3543 gb_ExternalProject__use_libassuan :=
3544 gb_ExternalProject__use_libgpg-error :=
3546 gb_LinkTarget__use_gpgmepp :=
3547 gb_LinkTarget__use_libassuan :=
3548 gb_LinkTarget__use_libgpg-error :=
3550 endif # ENABLE_GPGMEPP
3552 define gb_LinkTarget__use_dconf
3553 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3554 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3555 endef
3557 ### Jars ############################################################
3559 ifneq ($(SYSTEM_HSQLDB),)
3561 define gb_Jar__use_hsqldb
3562 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3563 endef
3564 define gb_JunitTest__use_hsqldb
3565 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3566 endef
3568 else # !SYSTEM_HSQLDB
3570 ifeq ($(ENABLE_JAVA),TRUE)
3571 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3572 hsqldb \
3574 endif
3576 define gb_Jar__use_hsqldb
3577 $(call gb_Jar_use_jar,$(1),hsqldb)
3578 endef
3579 define gb_JunitTest__use_hsqldb
3580 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3581 endef
3583 endif # SYSTEM_HSQLDB
3586 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3588 ifneq ($(SYSTEM_BSH),)
3590 define gb_Jar__use_bsh
3591 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3592 endef
3594 else # !SYSTEM_BSH
3596 ifeq ($(ENABLE_JAVA),TRUE)
3597 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3598 bsh \
3600 endif
3602 define gb_Jar__use_bsh
3603 $(call gb_Jar_use_jar,$(1),bsh)
3604 endef
3606 endif # SYSTEM_BSH
3608 endif
3610 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3612 ifneq ($(SYSTEM_RHINO),)
3614 define gb_Jar__use_rhino
3615 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3616 endef
3618 else # !SYSTEM_RHINO
3620 ifeq ($(ENABLE_JAVA),TRUE)
3621 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3622 js \
3624 endif
3626 define gb_Jar__use_rhino
3627 $(call gb_Jar_use_jar,$(1),js)
3628 endef
3630 endif # SYSTEM_RHINO
3632 endif
3634 ifneq ($(SYSTEM_APACHE_COMMONS),)
3636 define gb_Jar__use_commons-logging
3637 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3638 endef
3639 gb_ExternalProject__use_commons-logging :=
3641 else # !SYSTEM_APACHE_COMMONS
3643 ifeq ($(ENABLE_JAVA),TRUE)
3644 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3645 commons-logging-$(COMMONS_LOGGING_VERSION) \
3647 endif
3649 define gb_Jar__use_commons-logging
3650 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3651 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3652 endef
3653 define gb_ExternalProject__use_commons-logging
3654 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3655 endef
3657 endif # SYSTEM_APACHE_COMMONS
3660 ifneq ($(SYSTEM_JFREEREPORT),)
3662 define gb_Jar__use_flow-engine
3663 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3664 endef
3666 define gb_Jar__use_flute
3667 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3668 endef
3670 define gb_Jar__use_libbase
3671 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3672 endef
3674 define gb_Jar__use_libfonts
3675 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3676 endef
3678 define gb_Jar__use_libformula
3679 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3680 endef
3682 define gb_Jar__use_liblayout
3683 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3684 endef
3686 define gb_Jar__use_libloader
3687 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3688 endef
3690 define gb_Jar__use_librepository
3691 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3692 endef
3694 define gb_Jar__use_libserializer
3695 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3696 endef
3698 define gb_Jar__use_libxml
3699 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3700 endef
3702 define gb_Jar__use_sac
3703 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3704 endef
3706 else # !SYSTEM_JFREEREPORT
3708 ifeq ($(ENABLE_JAVA),TRUE)
3709 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3710 flow-engine \
3711 flute-1.1.6 \
3712 libbase-1.1.6 \
3713 libfonts-1.1.6 \
3714 libformula-1.1.7 \
3715 liblayout \
3716 libloader-1.1.6 \
3717 librepository-1.1.6 \
3718 libserializer-1.1.6 \
3719 libxml-1.1.7 \
3720 sac \
3722 endif
3724 define gb_Jar__use_flow-engine
3725 $(call gb_Jar_use_jar,$(1),flow-engine)
3726 endef
3728 define gb_Jar__use_flute
3729 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3730 endef
3732 define gb_Jar__use_libbase
3733 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3734 endef
3736 define gb_Jar__use_libfonts
3737 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3738 endef
3740 define gb_Jar__use_libformula
3741 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3742 endef
3744 define gb_Jar__use_liblayout
3745 $(call gb_Jar_use_jar,$(1),liblayout)
3746 endef
3748 define gb_Jar__use_libloader
3749 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3750 endef
3752 define gb_Jar__use_librepository
3753 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3754 endef
3756 define gb_Jar__use_libserializer
3757 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3758 endef
3760 define gb_Jar__use_libxml
3761 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3762 endef
3764 define gb_Jar__use_sac
3765 $(call gb_Jar_use_jar,$(1),sac)
3766 endef
3768 endif # SYSTEM_JFREEREPORT
3771 # Executables
3773 # FIXME: the library target should be for build too
3774 define gb_Executable__register_bestreversemap
3775 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3776 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3778 endef
3780 # TODO depending on the whole URE might be overkill, but I do not have a
3781 # Windows machine to debug it...
3782 # FIXME: the library target should be for build too
3783 define gb_Executable__register_climaker
3784 $(call gb_Executable_add_runtime_dependencies,climaker,\
3785 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3786 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3787 $(call gb_UnoApi_get_target,udkapi) \
3788 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3790 endef
3792 define gb_Executable__register_cppumaker
3793 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3794 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3796 endef
3798 # This is used to determine what we need for 'build' platform.
3799 # FIXME: the library target should be for build too
3800 define gb_Executable__register_gengal
3801 $(call gb_Executable_add_runtime_dependencies,gengal,\
3802 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3803 $(call gb_Package_get_target_for_build,postprocess_images) \
3804 $(call gb_Package_get_target_for_build,postprocess_registry) \
3805 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3806 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3807 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3808 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3809 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3810 $(call gb_UnoApi_get_target,offapi) \
3811 $(call gb_UnoApi_get_target,udkapi) \
3813 endef
3815 ifeq ($(SYSTEM_ICU),)
3817 define gb_Executable__register_gendict
3818 $(call gb_Executable_add_runtime_dependencies,gendict,\
3819 $(call gb_Package_get_target_for_build,icu) \
3820 $(call gb_Package_get_target_for_build,icu_ure) \
3822 endef
3824 endif
3826 define gb_Executable__register_idlc
3827 $(call gb_Executable_add_runtime_dependencies,idlc,\
3828 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3830 endef
3832 define gb_Executable__register_localize
3833 $(call gb_Executable_add_runtime_dependencies,localize,\
3834 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3835 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3838 endef
3840 # FIXME ure/services.rdb needs cleanup
3841 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3842 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3843 # FIXME: the library target should be for build too
3844 define gb_Executable__register_saxparser
3845 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3846 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3847 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3848 $(call gb_Rdb_get_target_for_build,saxparser) \
3849 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3850 $(call gb_UnoApi_get_target,udkapi) \
3852 endef
3854 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3855 # required due to the settings for URE_SERVICES and URE_TYPES in
3856 # cppuhelper/source/unorc
3857 # FIXME: the library target should be for build too
3858 define gb_Executable__register_uno
3859 $(call gb_Executable_add_runtime_dependencies,uno,\
3860 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3861 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3862 $(call gb_UnoApi_get_target,udkapi) \
3864 endef
3867 # External executables
3869 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3871 gb_ExternalExecutable__register_xmllint :=
3873 else # ! SYSTEM_LIBXML_FOR_BUILD
3875 define gb_ExternalExecutable__register_xmllint
3876 $(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)
3877 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3878 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3879 $(call gb_Package_get_target,libxml2) \
3882 endef
3884 endif # SYSTEM_LIBXML_FOR_BUILD
3886 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3888 gb_ExternalExecutable__register_xsltproc :=
3890 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3892 define gb_ExternalExecutable__register_xsltproc
3893 $(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)
3894 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3895 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3896 $(call gb_Package_get_target,libxml2) \
3897 $(call gb_Package_get_target,libxslt) \
3900 endef
3902 endif # SYSTEM_LIBXSLT_FOR_BUILD
3904 ifneq (,$(SYSTEM_UCPP))
3906 gb_ExternalExecutable__register_ucpp :=
3908 else # ! SYSTEM_UCPP
3910 define gb_ExternalExecutable__register_ucpp
3911 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3913 endef
3915 endif # SYSTEM_UCPP
3917 ifeq (,$(PYTHON_FOR_BUILD))
3919 define gb_ExternalExecutable__register_python
3920 ifeq ($(OS),MACOSX)
3922 # use set_external, to avoid having the command added as prerequisite for the
3923 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3924 # matching rule to build that specific file)
3925 $(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))
3926 # the Zip ensures that internal python has been built (cannot use the Package
3927 # target, as that is not used on Mac)
3928 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3930 else
3932 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3933 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3934 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3936 endif
3938 endef
3940 else
3942 define gb_ExternalExecutable__register_python
3943 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3945 endef
3947 endif # PYTHON_FOR_BUILD
3949 ifneq ($(SYSTEM_GENBRK),)
3951 define gb_ExternalExecutable__register_genbrk
3952 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3954 endef
3956 else # ! SYSTEM_GENBRK
3958 define gb_ExternalExecutable__register_genbrk
3959 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3960 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3961 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3962 $(call gb_Package_get_target_for_build,icu) \
3963 $(call gb_Package_get_target_for_build,icu_ure) \
3966 endef
3968 endif
3970 ifneq ($(SYSTEM_GENCCODE),)
3972 define gb_ExternalExecutable__register_genccode
3973 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3975 endef
3977 else # ! SYSTEM_GENCCODE
3979 define gb_ExternalExecutable__register_genccode
3980 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3981 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3982 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3983 $(call gb_Package_get_target_for_build,icu) \
3984 $(call gb_Package_get_target_for_build,icu_ure) \
3987 endef
3989 endif
3991 ifneq ($(SYSTEM_GENCMN),)
3993 define gb_ExternalExecutable__register_gencmn
3994 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3996 endef
3998 else # ! SYSTEM_GENCMN
4000 define gb_ExternalExecutable__register_gencmn
4001 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4002 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4003 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4004 $(call gb_Package_get_target_for_build,icu) \
4005 $(call gb_Package_get_target_for_build,icu_ure) \
4008 endef
4010 endif
4012 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4014 $(eval $(call gb_Helper_register_jars,OXT,\
4015 owncloud-android-library \
4018 define gb_Jar__use_owncloud_android_lib
4019 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4020 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4021 endef
4022 define gb_ExternalProject__use_owncloud_android_lib
4023 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4024 endef
4026 endif
4028 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4029 ifneq ($(SYSTEM_BZIP2),)
4031 define gb_LinkTarget__use_bzip2
4032 $(call gb_LinkTarget_set_include,$(1),\
4033 $(BZIP2_CFLAGS) \
4034 $$(INCLUDE) \
4036 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4038 endef
4040 gb_ExternalProject__use_bzip2 :=
4042 else # !SYSTEM_BZIP2
4044 define gb_LinkTarget__use_bzip2
4045 $(call gb_LinkTarget_set_include,$(1),\
4046 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4047 $$(INCLUDE) \
4050 ifeq ($(COM),MSC)
4051 $(call gb_LinkTarget_add_libs,$(1),\
4052 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4054 else
4055 $(call gb_LinkTarget_add_libs,$(1),\
4056 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4058 endif
4060 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4061 endef
4063 define gb_ExternalProject__use_bzip2
4064 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4065 endef
4067 endif
4068 endif
4070 define gb_LinkTarget__use_clew
4071 $(call gb_LinkTarget_set_include,$(1), \
4072 -I$(SRCDIR)/external/clew/source/include \
4073 $$(INCLUDE) \
4075 $(call gb_LinkTarget_use_libraries,$(1),clew)
4076 endef
4078 ifneq ($(ENABLE_PDFIUM),)
4079 define gb_LinkTarget__use_pdfium
4080 $(call gb_LinkTarget_set_include,$(1),\
4081 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4082 $$(INCLUDE) \
4084 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4085 endef
4086 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4087 pdfium \
4089 endif
4091 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4092 $(if $(UCRT_REDISTDIR),ucrt) \
4095 # vim: set noet sw=4 ts=4: