xmlsecurity: reject a few dangerous annotation types during pdf sig verify
[LibreOffice.git] / RepositoryExternal.mk
blob884bececcf086483178976082d4f8da429f753af
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 gb_LinkTarget__use_glm_headers :=
94 gb_ExternalProject__use_glm_headers :=
96 else
98 define gb_LinkTarget__use_glm_headers
99 $(call gb_LinkTarget_use_unpacked,$(1),glm)
100 $(call gb_LinkTarget_set_include,$(1),\
101 $(GLM_CFLAGS) \
102 $$(INCLUDE) \
105 endef
107 define gb_ExternalProject__use_glm_headers
108 $(call gb_ExternalProject_use_unpacked,$(1),glm)
110 endef
112 endif
114 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
116 define gb_LinkTarget__use_sane_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(if $(filter WNT,$(OS)), \
119 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
120 -I$(SRCDIR)/external/sane/inc) \
121 $$(INCLUDE) \
124 ifeq ($(OS),WNT)
125 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
126 endif
128 endef
130 else
132 gb_LinkTarget__use_sane_headers :=
134 endif
136 ifneq ($(SYSTEM_BLUEZ),)
138 gb_LinkTarget__use_bluez_bluetooth_headers :=
140 else # !SYSTEM_BLUEZ
142 define gb_LinkTarget__use_bluez_bluetooth_headers
143 $(call gb_LinkTarget_set_include,$(1),\
144 -I$(SRCDIR)/external/bluez_bluetooth/inc \
145 $$(INCLUDE) \
148 endef
150 endif # SYSTEM_BLUEZ
152 # External libraries
154 ifneq ($(SYSTEM_CPPUNIT),)
156 define gb_LinkTarget__use_cppunit
157 $(call gb_LinkTarget_set_include,$(1),\
158 $$(INCLUDE) \
159 $(CPPUNIT_CFLAGS) \
162 $(call gb_LinkTarget_add_libs,$(1),\
163 $(CPPUNIT_LIBS) \
166 endef
168 else # !SYSTEM_CPPUNIT
170 define gb_LinkTarget__use_cppunit
171 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
173 $(call gb_LinkTarget_set_include,$(1),\
174 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
175 $$(INCLUDE) \
178 ifeq ($(COM),MSC)
179 $(call gb_LinkTarget_add_libs,$(1),\
180 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
182 else
183 $(call gb_LinkTarget_add_libs,$(1),\
184 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
186 endif
188 endef
190 endif # SYSTEM_CPPUNIT
192 ifneq ($(SYSTEM_EPOXY),)
194 define gb_LinkTarget__use_epoxy
195 $(call gb_LinkTarget_set_include,$(1),\
196 $$(INCLUDE) \
197 $(EPOXY_CFLAGS) \
199 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
201 endef
203 gb_ExternalProject__use_epoxy :=
205 else # !SYSTEM_EPOXY
207 define gb_LinkTarget__use_epoxy
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
210 $$(INCLUDE) \
213 $(call gb_LinkTarget_use_libraries,$(1),\
214 epoxy \
217 endef
219 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
220 epoxy \
223 define gb_ExternalProject__use_epoxy
224 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
226 endef
228 endif # SYSTEM_EPOXY
230 define gb_LinkTarget__use_iconv
231 ifeq ($(COM),MSC)
232 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
233 else
234 $(call gb_LinkTarget_add_libs,$(1),-liconv)
235 endif
236 endef
238 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
240 define gb_LinkTarget__use_mariadb-connector-c
241 $(call gb_LinkTarget_set_include,$(1),\
242 $$(INCLUDE) \
243 $(MARIADB_CFLAGS) \
245 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
247 endef
248 gb_ExternalProject__use_mariadb-connector-c :=
250 else # !SYSTEM_MARIADB_CONNECTOR_C
252 define gb_LinkTarget__use_mariadb-connector-c
253 $(call gb_LinkTarget_set_include,$(1),\
254 $$(INCLUDE) \
255 $(MARIADB_CFLAGS) \
257 $(call gb_LinkTarget_use_static_libraries,$(1),\
258 mariadb-connector-c \
260 ifeq ($(OS),MACOSX)
261 $(call gb_LinkTarget_add_libs,$(1),\
262 -liconv \
264 endif
265 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
266 ws2_32 \
267 advapi32 \
268 kernel32 \
269 shlwapi \
270 crypt32 \
273 endef
274 define gb_ExternalProject__use_mariadb-connector-c
275 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
277 endef
279 endif # SYSTEM_MARIADB_CONNECTOR_C
282 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
284 define gb_LinkTarget__use_mysql
286 $(call gb_LinkTarget_add_defs,$(1),\
287 -DSYSTEM_MARIADB \
290 $(call gb_LinkTarget_add_libs,$(1),\
291 $(MARIADB_LIBS) \
294 $(call gb_LinkTarget_set_include,$(1),\
295 $(MARIADB_CFLAGS) \
296 $$(INCLUDE) \
298 endef
300 else
302 define gb_LinkTarget__use_mysql
304 $(call gb_LinkTarget_set_include,$(1),\
305 $$(INCLUDE) \
308 endef
310 endif
312 ifneq ($(SYSTEM_ZLIB),)
314 define gb_LinkTarget__use_zlib
315 $(call gb_LinkTarget_add_defs,$(1),\
316 -DSYSTEM_ZLIB \
318 $(call gb_LinkTarget_add_libs,$(1),-lz)
320 endef
322 # nothing on system
323 define gb_LinkTarget__use_zlib_x64
325 endef
327 gb_ExternalProject__use_zlib :=
329 else # !SYSTEM_ZLIB
331 define gb_LinkTarget__use_zlib_multiarch
332 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
334 $(call gb_LinkTarget_set_include,$(1),\
335 $(ZLIB_CFLAGS) \
336 $$(INCLUDE) \
339 $(call gb_LinkTarget_use_static_libraries,$(1),\
340 $(2) \
343 endef
345 define gb_LinkTarget__use_zlib
346 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
348 endef
350 define gb_LinkTarget__use_zlib_x64
351 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
353 endef
355 define gb_ExternalProject__use_zlib
356 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
358 endef
360 endif # SYSTEM_ZLIB
363 ifneq ($(SYSTEM_LIBJPEG),)
365 define gb_LinkTarget__use_libjpeg
366 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
367 $(call gb_LinkTarget_set_ldflags,$(1),\
368 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
371 endef
373 gb_ExternalProject__use_libjpeg :=
375 else
377 define gb_LinkTarget__use_libjpeg
378 $(call gb_LinkTarget_set_include,$(1),\
379 $(LIBJPEG_CFLAGS) \
380 $$(INCLUDE) \
382 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
383 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
385 endef
387 define gb_ExternalProject__use_libjpeg
388 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
390 endef
392 endif # SYSTEM_LIBJPEG
394 ifneq ($(SYSTEM_MYTHES),)
396 define gb_LinkTarget__use_mythes
397 $(call gb_LinkTarget_set_include,$(1),\
398 $$(INCLUDE) \
399 $(MYTHES_CFLAGS) \
401 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
403 endef
405 else # !SYSTEM_MYTHES
407 define gb_LinkTarget__use_mythes
408 $(call gb_LinkTarget_set_include,$(1),\
409 -I$(call gb_UnpackedTarball_get_dir,mythes) \
410 $$(INCLUDE) \
413 ifeq ($(COM),MSC)
414 $(call gb_LinkTarget_use_static_libraries,$(1),\
415 mythes \
417 else
418 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
419 $(call gb_LinkTarget_use_external_project,$(1),mythes)
420 endif
422 endef
424 endif # SYSTEM_MYTHES
427 ifneq ($(SYSTEM_EXPAT),)
429 define gb_LinkTarget__use_expat_impl
430 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
432 $(call gb_LinkTarget_add_defs,$(1),\
433 -DSYSTEM_EXPAT \
436 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
438 endef
440 gb_ExternalProject__use_expat :=
442 else # !SYSTEM_EXPAT
444 define gb_LinkTarget__use_expat_impl
445 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
447 $(call gb_LinkTarget_set_include,$(1),\
448 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
449 $$(INCLUDE) \
452 $(call gb_LinkTarget_use_static_libraries,$(1),\
453 $(2) \
456 endef
458 define gb_ExternalProject__use_expat
459 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
461 endef
463 endif # SYSTEM_EXPAT
465 define gb_LinkTarget__use_expat
466 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
468 endef
470 define gb_LinkTarget__use_expat_x64
471 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
473 endef
475 ifneq ($(SYSTEM_HYPH),)
477 define gb_LinkTarget__use_hyphen
478 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
480 endef
482 else # !SYSTEM_HYPH
484 define gb_LinkTarget__use_hyphen
485 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
486 $(call gb_LinkTarget_set_include,$(1),\
487 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
488 $$(INCLUDE) \
491 ifeq ($(COM),MSC)
492 $(call gb_LinkTarget_use_static_libraries,$(1),\
493 hyphen \
495 else
496 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
497 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
498 endif
500 endef
502 endif # SYSTEM_HYPH
504 ifneq ($(SYSTEM_HUNSPELL),)
506 define gb_LinkTarget__use_hunspell
507 $(call gb_LinkTarget_set_include,$(1),\
508 $$(INCLUDE) \
509 $(HUNSPELL_CFLAGS) \
511 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
513 endef
515 gb_ExternalProject__use_hunspell :=
517 else # !SYSTEM_HUNSPELL
519 define gb_LinkTarget__use_hunspell
520 $(call gb_LinkTarget_add_defs,$(1),\
521 -DHUNSPELL_STATIC \
523 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
524 $(call gb_LinkTarget_set_include,$(1),\
525 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
526 $$(INCLUDE) \
529 ifeq ($(COM),MSC)
530 $(call gb_LinkTarget_use_static_libraries,$(1),\
531 hunspell \
533 else
534 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
535 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
536 endif
538 endef
540 define gb_ExternalProject__use_hunspell
541 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
543 endef
545 endif # SYSTEM_HUNSPELL
548 ifneq ($(SYSTEM_BOOST),)
550 define gb_LinkTarget__use_boost_lib
551 $(call gb_LinkTarget_set_include,$(1),\
552 $$(INCLUDE) \
553 $(BOOST_CPPFLAGS) \
556 $(call gb_LinkTarget_add_ldflags,$(1),\
557 $(BOOST_LDFLAGS) \
560 $(call gb_LinkTarget_add_libs,$(1),$(2))
562 endef
564 define gb_LinkTarget__use_boost_locale
565 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
567 endef
569 define gb_LinkTarget__use_boost_date_time
570 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
572 endef
574 define gb_LinkTarget__use_boost_filesystem
575 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
577 endef
579 gb_ExternalProject__use_boost_filesystem :=
581 define gb_LinkTarget__use_boost_iostreams
582 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
584 endef
586 gb_ExternalProject__use_boost_iostreams :=
588 define gb_LinkTarget__use_boost_system
589 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
591 endef
593 gb_ExternalProject__use_boost_system :=
595 define gb_LinkTarget__use_boost_headers
596 $(call gb_LinkTarget_set_include,$(1),\
597 $$(INCLUDE) \
598 $(BOOST_CPPFLAGS) \
601 endef
603 gb_ExternalProject__use_boost_headers:=
605 else # !SYSTEM_BOOST
607 define gb_LinkTarget__use_boost_lib
608 $(call gb_LinkTarget_add_defs,$(1),\
609 -DBOOST_ALL_NO_LIB \
612 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
614 endef
616 define gb_LinkTarget__use_boost_locale
617 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
618 $(call gb_LinkTarget_add_libs,$(1),\
619 $(if $(filter $(OS),MACOSX),-liconv) \
622 endef
624 define gb_LinkTarget__use_boost_date_time
625 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
627 endef
629 define gb_LinkTarget__use_boost_filesystem
630 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
632 endef
634 define gb_ExternalProject__use_boost_filesystem
635 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
636 endef
638 define gb_LinkTarget__use_boost_iostreams
639 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
641 endef
643 define gb_ExternalProject__use_boost_iostreams
644 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
645 endef
647 define gb_LinkTarget__use_boost_system
648 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
650 endef
652 define gb_ExternalProject__use_boost_system
653 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
654 endef
656 define gb_LinkTarget__use_boost_headers
657 $(call gb_LinkTarget_use_unpacked,$(1),boost)
658 $(call gb_LinkTarget_set_include,$(1),\
659 $(BOOST_CPPFLAGS) \
660 $$(INCLUDE) \
663 endef
665 define gb_ExternalProject__use_boost_headers
666 $(call gb_ExternalProject_use_unpacked,$(1),boost)
668 endef
670 endif # SYSTEM_BOOST
673 ifneq ($(SYSTEM_LIBCMIS),)
675 define gb_LinkTarget__use_libcmis
676 $(call gb_LinkTarget_set_include,$(1),\
677 $$(INCLUDE) \
678 $(LIBCMIS_CFLAGS) \
680 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
682 endef
684 else # !SYSTEM_LIBCMIS
686 define gb_LinkTarget__use_libcmis
687 $(call gb_LinkTarget_set_include,$(1),\
688 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
689 $$(INCLUDE) \
691 $(call gb_LinkTarget_use_static_libraries,$(1),\
692 libcmis \
695 endef
697 endif # SYSTEM_LIBCMIS
699 ifeq ($(ENABLE_JAVA),TRUE)
701 define gb_LinkTarget__use_jawt
702 $(call gb_LinkTarget_add_libs,$(1),\
703 $(JAWTLIB) \
706 endef
708 else # !ENABLE_JAVA
710 gb_LinkTarget__use_jawt :=
712 endif # ENABLE_JAVA
714 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
716 define gb_LinkTarget__use_libatomic_ops
717 $(call gb_LinkTarget_set_include,$(1),\
718 $$(INCLUDE) \
719 $(LIBATOMIC_OPS_CFLAGS) \
721 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
723 endef
724 gb_ExternalProject__use_libatomic_ops :=
726 else # !SYSTEM_LIBATOMIC_OPS
728 define gb_LinkTarget__use_libatomic_ops
729 $(call gb_LinkTarget_set_include,$(1),\
730 $(LIBATOMIC_OPS_CFLAGS) \
731 $$(INCLUDE) \
732 $(LIBATOMIC_OPS_CFLAGS) \
734 $(call gb_LinkTarget_use_external_project,$(1),\
735 libatomic_ops \
738 $(call gb_LinkTarget_add_libs,$(1),\
739 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
742 endef
744 define gb_ExternalProject__use_libatomic_ops
745 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
747 endef
749 endif # SYSTEM_LIBATOMIC_OPS
752 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
754 define gb_LinkTarget__use_libexttextcat
755 $(call gb_LinkTarget_set_include,$(1),\
756 $$(INCLUDE) \
757 $(LIBEXTTEXTCAT_CFLAGS) \
759 $(call gb_LinkTarget_add_defs,$(1),\
760 -DSYSTEM_LIBEXTTEXTCAT \
762 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
764 endef
766 else # !SYSTEM_LIBEXTTEXTCAT
768 define gb_LinkTarget__use_libexttextcat
769 $(call gb_LinkTarget_set_include,$(1),\
770 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
771 $$(INCLUDE) \
774 ifeq ($(COM),MSC)
775 $(call gb_LinkTarget_use_static_libraries,$(1),\
776 libexttextcat \
778 else
779 $(call gb_LinkTarget_add_libs,$(1),\
780 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
782 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
783 endif
786 endef
788 endif # SYSTEM_LIBEXTTEXTCAT
791 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
793 define gb_LinkTarget__use_libnumbertext
794 $(call gb_LinkTarget_set_include,$(1),\
795 $$(INCLUDE) \
796 $(LIBNUMBERTEXT_CFLAGS) \
798 $(call gb_LinkTarget_add_defs,$(1),\
799 -DSYSTEM_LIBNUMBERTEXT \
801 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
803 endef
805 else # !SYSTEM_LIBNUMBERTEXT
807 ifneq ($(ENABLE_LIBNUMBERTEXT),)
809 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
810 libnumbertext_numbertext \
813 define gb_LinkTarget__use_libnumbertext
814 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
815 $(call gb_LinkTarget_set_include,$(1),\
816 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
817 $$(INCLUDE) \
819 $(call gb_LinkTarget_add_defs,$(1),\
820 -DENABLE_LIBNUMBERTEXT \
823 ifeq ($(COM),MSC)
824 $(call gb_LinkTarget_use_static_libraries,$(1),\
825 libnumbertext \
827 else
829 $(call gb_LinkTarget_add_libs,$(1),\
830 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
832 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
834 endif
836 endef
838 else # !ENABLE_LIBNUMBERTEXT
840 define gb_LinkTarget__use_libnumbertext
841 endef
843 endif # ENABLE_LIBNUMBERTEXT
845 endif # SYSTEM_LIBNUMBERTEXT
848 ifneq ($(SYSTEM_LIBXML),)
850 define gb_LinkTarget__use_libxml2
851 $(call gb_LinkTarget_add_defs,$(1),\
852 -DSYSTEM_LIBXML \
854 $(call gb_LinkTarget_set_include,$(1),\
855 $$(INCLUDE) \
856 $(LIBXML_CFLAGS) \
858 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
860 endef
861 gb_ExternalProject__use_libxml2:=
863 else # !SYSTEM_LIBXML
865 $(eval $(call gb_Helper_register_packages_for_install,ure,\
866 libxml2 \
869 define gb_LinkTarget__use_libxml2
870 $(call gb_LinkTarget_use_package,$(1),libxml2)
871 $(call gb_LinkTarget_set_include,$(1),\
872 $$(INCLUDE) \
873 $(LIBXML_CFLAGS) \
876 $(call gb_LinkTarget_add_libs,$(1),\
877 $(LIBXML_LIBS) \
880 ifeq ($(COM),MSC)
881 $(call gb_LinkTarget_use_external,$(1),icu_headers)
882 endif
884 endef
885 define gb_ExternalProject__use_libxml2
886 $(call gb_ExternalProject_use_package,$(1),libxml2)
888 ifeq ($(COM),MSC)
889 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
890 endif
892 endef
894 endif # SYSTEM_LIBXML
897 ifneq ($(SYSTEM_LIBXSLT),)
899 define gb_LinkTarget__use_libxslt
900 $(call gb_LinkTarget_set_include,$(1),\
901 $$(INCLUDE) \
902 $(LIBXSLT_CFLAGS) \
904 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
906 endef
908 define gb_LinkTarget__use_libexslt
909 $(call gb_LinkTarget_set_include,$(1),\
910 $$(INCLUDE) \
911 $(LIBEXSLT_CFLAGS) \
914 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
916 endef
918 else # !SYSTEM_LIBXSLT
920 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
921 libxslt \
924 define gb_LinkTarget__use_libxslt
925 $(call gb_LinkTarget_use_package,$(1),libxslt)
926 $(call gb_LinkTarget_set_include,$(1),\
927 $$(INCLUDE) \
928 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
931 ifeq ($(COM),MSC)
932 $(call gb_LinkTarget_add_libs,$(1),\
933 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
935 else
936 $(call gb_LinkTarget_add_libs,$(1),\
937 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
939 endif
941 endef
943 define gb_LinkTarget__use_libexslt
944 $(call gb_LinkTarget_use_package,$(1),libxslt)
945 $(call gb_LinkTarget_set_include,$(1),\
946 $$(INCLUDE) \
947 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
950 ifeq ($(COM),MSC)
951 $(call gb_LinkTarget_add_libs,$(1),\
952 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
954 else
955 $(call gb_LinkTarget_add_libs,$(1),\
956 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
958 endif
960 endef
962 endif # SYSTEM_LIBXSLT
965 ifneq ($(SYSTEM_XMLSEC),)
967 define gb_LinkTarget__use_xmlsec
968 $(call gb_LinkTarget_add_defs,$(1),\
969 -DSYSTEM_XMLSEC \
971 $(call gb_LinkTarget_set_include,$(1),\
972 $$(INCLUDE) \
973 $(XMLSEC_CFLAGS) \
975 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
977 endef
979 gb_ExternalProject__use_xmlsec:=
981 else # !SYSTEM_XMLSEC
983 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
984 xmlsec \
987 define gb_LinkTarget__use_xmlsec
989 endef
991 endif # SYSTEM_XMLSEC
993 ifneq ($(SYSTEM_LIBLANGTAG),)
995 define gb_LinkTarget__use_liblangtag
996 $(call gb_LinkTarget_set_include,$(1),\
997 $$(INCLUDE) \
998 $(LIBLANGTAG_CFLAGS) \
1001 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1003 endef
1005 gb_ExternalProject__use_liblangtag :=
1007 else # !SYSTEM_LIBLANGTAG
1009 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1010 liblangtag_data \
1013 ifeq ($(COM),MSC)
1015 define gb_LinkTarget__use_liblangtag
1016 $(call gb_LinkTarget_set_include,$(1),\
1017 $(LIBLANGTAG_CFLAGS) \
1018 $$(INCLUDE) \
1020 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1021 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1023 endef
1025 else
1027 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1028 liblangtag \
1031 define gb_LinkTarget__use_liblangtag
1032 $(call gb_LinkTarget_set_include,$(1),\
1033 $(LIBLANGTAG_CFLAGS) \
1034 $$(INCLUDE) \
1036 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1037 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1039 endef
1041 endif # MSC
1043 define gb_ExternalProject__use_liblangtag
1044 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1046 endef
1048 endif # SYSTEM_LIBLANGTAG
1051 gb_ExternalProject__use_apr :=
1053 ifeq ($(WITH_WEBDAV),serf)
1055 define gb_LinkTarget__use_apr
1056 $(call gb_LinkTarget_set_include,$(1),\
1057 $$(INCLUDE) \
1058 $(APR_CFLAGS) \
1060 $(call gb_LinkTarget_add_libs,$(1),\
1061 $(APR_LIBS) \
1062 $(if $(filter $(OS),LINUX),-lpthread) \
1063 $(if $(filter $(OS),MACOSX),-liconv) \
1066 ifeq ($(SYSTEM_APR),)
1067 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1068 mswsock \
1069 rpcrt4 \
1070 shell32 \
1072 $(call gb_LinkTarget_add_defs,$(1),\
1073 -DAPR_DECLARE_STATIC \
1074 -DAPU_DECLARE_STATIC \
1076 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1077 endif
1079 endef
1081 define gb_ExternalProject__use_apr
1082 ifeq ($(SYSTEM_APR),)
1083 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1084 endif
1086 endef
1088 define gb_LinkTarget__use_serf
1089 $(call gb_LinkTarget_set_include,$(1),\
1090 $(SERF_CFLAGS) \
1091 $$(INCLUDE) \
1093 $(call gb_LinkTarget_add_libs,$(1),\
1094 $(SERF_LIBS) \
1097 ifeq ($(SYSTEM_SERF),)
1098 $(call gb_LinkTarget_use_external_project,$(1),serf)
1099 endif
1101 endef
1103 else ifeq ($(WITH_WEBDAV),neon)
1105 ifneq ($(SYSTEM_NEON),)
1107 define gb_LinkTarget__use_neon
1108 $(call gb_LinkTarget_add_defs,$(1),\
1109 -DNEON_VERSION=0x$(NEON_VERSION) \
1110 -DSYSTEM_NEON \
1112 $(call gb_LinkTarget_set_include,$(1),\
1113 $$(INCLUDE) \
1114 $(NEON_CFLAGS) \
1117 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1119 endef
1121 else # !SYSTEM_NEON
1123 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1124 neon \
1127 define gb_LinkTarget__use_neon
1128 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1129 $(call gb_LinkTarget_set_include,$(1),\
1130 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1131 $$(INCLUDE) \
1133 $(call gb_LinkTarget_use_libraries,$(1),\
1134 neon \
1137 endef
1139 endif # SYSTEM_NEON
1141 endif # WITH_WEBDAV
1143 ifneq ($(SYSTEM_REDLAND),)
1145 define gb_LinkTarget__use_librdf
1146 $(call gb_LinkTarget_add_defs,$(1),\
1147 -DSYSTEM_REDLAND \
1149 $(call gb_LinkTarget_set_include,$(1),\
1150 $$(INCLUDE) \
1151 $(REDLAND_CFLAGS) \
1153 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1155 endef
1157 gb_LinkTarget__use_redland_headers:=
1159 gb_LinkTarget__use_raptor_headers:=
1161 gb_LinkTarget__use_rasqal_headers:=
1163 else # !SYSTEM_REDLAND
1165 define gb_LinkTarget__use_redland_headers
1166 $(call gb_LinkTarget_set_include,$(1),\
1167 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1168 $$(INCLUDE) \
1171 endef
1173 define gb_LinkTarget__use_raptor_headers
1174 $(call gb_LinkTarget_set_include,$(1),\
1175 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1176 $$(INCLUDE) \
1179 endef
1181 define gb_LinkTarget__use_rasqal_headers
1182 $(call gb_LinkTarget_set_include,$(1),\
1183 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1184 $$(INCLUDE) \
1187 endef
1189 ifneq ($(OS),ANDROID)
1191 ifeq ($(COM),MSC)
1192 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1193 raptor2 \
1194 rasqal \
1195 rdf \
1197 else
1198 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1199 raptor \
1200 rasqal \
1201 redland \
1203 endif
1205 define gb_LinkTarget__use_librdf
1206 ifeq ($(COM),MSC)
1207 $(call gb_LinkTarget_use_libraries,$(1),\
1208 raptor2 \
1209 rdf \
1211 else
1212 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1214 $(call gb_LinkTarget_add_libs,$(1),\
1215 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1216 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1217 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1219 endif
1221 endef
1223 else # ANDROID
1225 define gb_LinkTarget__use_librdf
1226 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1228 endef
1230 endif # ANDROID
1232 endif # SYSTEM_REDLAND
1235 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1237 ifneq ($(SYSTEM_CAIRO),)
1239 define gb_LinkTarget__use_cairo
1240 $(call gb_LinkTarget_set_include,$(1),\
1241 $$(INCLUDE) \
1242 $(CAIRO_CFLAGS) \
1244 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1245 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1247 endef
1249 else # !SYSTEM_CAIRO
1251 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1252 cairo \
1253 $(if $(filter $(OS),WNT),,pixman) \
1256 define gb_LinkTarget__use_cairo
1257 $(call gb_LinkTarget_use_package,$(1),cairo)
1258 $(call gb_LinkTarget_use_package,$(1),pixman)
1259 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1260 $(call gb_LinkTarget_set_include,$(1),\
1261 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1262 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1263 $$(INCLUDE) \
1265 $(call gb_LinkTarget_add_libs,$(1),\
1266 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1267 $(if $(filter-out MACOSX WNT,$(OS)), \
1268 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1272 endef
1274 endif # SYSTEM_CAIRO
1276 else ifeq ($(OS),ANDROID)
1278 define gb_LinkTarget__use_cairo
1279 $(call gb_LinkTarget_use_package,$(1),cairo)
1280 $(call gb_LinkTarget_use_package,$(1),pixman)
1281 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1282 $(call gb_LinkTarget_set_include,$(1),\
1283 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1284 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1285 $$(INCLUDE) \
1287 $(call gb_LinkTarget_add_libs,$(1),\
1288 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1289 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1292 endef
1294 endif # CAIRO
1296 ifneq ($(SYSTEM_FREETYPE),)
1298 define gb_LinkTarget__use_freetype_headers
1299 $(call gb_LinkTarget_set_include,$(1),\
1300 $$(INCLUDE) \
1301 $(FREETYPE_CFLAGS) \
1304 endef
1306 gb_ExternalProject__use_freetype :=
1308 else
1310 define gb_LinkTarget__use_freetype_headers
1311 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1312 $(call gb_LinkTarget_set_include,$(1),\
1313 $(FREETYPE_CFLAGS) \
1314 $$(INCLUDE) \
1317 endef
1319 define gb_ExternalProject__use_freetype
1320 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1322 endef
1324 endif # SYSTEM_FREETYPE
1326 define gb_LinkTarget__use_freetype
1327 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1328 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1330 endef
1332 ifneq ($(SYSTEM_FONTCONFIG),)
1334 define gb_LinkTarget__use_fontconfig
1335 $(call gb_LinkTarget_set_include,$(1),\
1336 $$(INCLUDE) \
1337 $(FONTCONFIG_CFLAGS) \
1340 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1342 endef
1344 else
1346 define gb_LinkTarget__use_fontconfig
1347 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1348 $(call gb_LinkTarget_set_include,$(1),\
1349 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1350 $$(INCLUDE) \
1353 $(call gb_LinkTarget_add_libs,$(1),\
1354 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1357 endef
1359 endif # SYSTEM_FONTCONFIG
1361 ifneq ($(SYSTEM_GRAPHITE),)
1363 define gb_LinkTarget__use_graphite
1364 $(call gb_LinkTarget_set_include,$(1),\
1365 $$(INCLUDE) \
1366 $(GRAPHITE_CFLAGS) \
1368 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1370 endef
1372 gb_ExternalProject__use_graphite:=
1374 else # !SYSTEM_GRAPHITE
1376 define gb_LinkTarget__use_graphite
1377 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1378 $(call gb_LinkTarget_set_include,$(1),\
1379 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1380 $$(INCLUDE) \
1382 $(call gb_LinkTarget_use_static_libraries,$(1),\
1383 graphite \
1386 endef
1388 define gb_ExternalProject__use_graphite
1389 $(call gb_ExternalProject_use_static_libraries,$(1),\
1390 graphite \
1393 endef
1394 endif # SYSTEM_GRAPHITE
1396 ifneq ($(SYSTEM_ICU),)
1398 gb_LinkTarget__use_icu_headers:=
1399 gb_ExternalProject__use_icu:=
1401 define gb_LinkTarget__use_icudata
1402 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1404 endef
1405 define gb_LinkTarget__use_icui18n
1406 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1408 endef
1409 define gb_LinkTarget__use_icuuc
1410 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1412 endef
1414 else # !SYSTEM_ICU
1416 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1417 icu_ure \
1420 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1421 icu \
1424 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1425 gb_ICU_suffix:=lo
1426 else
1427 gb_ICU_suffix:=
1428 endif
1430 define gb_LinkTarget__use_icu_headers
1431 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1432 $(call gb_LinkTarget_set_include,$(1),\
1433 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1434 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1435 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1436 $$(INCLUDE) \
1439 endef
1441 define gb_ExternalProject__use_icu
1442 $(call gb_ExternalProject_use_package,$(1),icu)
1444 endef
1446 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1447 define gb_LinkTarget__use_icudata
1448 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1450 ifeq ($(OS),WNT)
1451 $(call gb_LinkTarget_add_libs,$(1),\
1452 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1454 else
1455 $(call gb_LinkTarget_add_libs,$(1),\
1456 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1458 endif
1460 endef
1462 define gb_LinkTarget__use_icui18n
1463 $(call gb_LinkTarget_use_package,$(1),icu)
1465 ifeq ($(OS),WNT)
1466 $(call gb_LinkTarget_add_libs,$(1),\
1467 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1469 else
1470 $(call gb_LinkTarget_add_libs,$(1),\
1471 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1473 endif
1475 endef
1477 define gb_LinkTarget__use_icuuc
1478 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1480 ifeq ($(OS),WNT)
1481 $(call gb_LinkTarget_add_libs,$(1),\
1482 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1484 else
1485 $(call gb_LinkTarget_add_libs,$(1),\
1486 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1488 endif
1490 endef
1492 endif # SYSTEM_ICU
1494 ifneq ($(SYSTEM_HARFBUZZ),)
1496 define gb_LinkTarget__use_harfbuzz
1497 $(call gb_LinkTarget_set_include,$(1),\
1498 $$(INCLUDE) \
1499 $(HARFBUZZ_CFLAGS) \
1501 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1503 endef
1505 gb_ExternalProject__use_harfbuzz :=
1507 else # SYSTEM_HARFBUZZ != TRUE
1509 define gb_LinkTarget__use_harfbuzz
1510 $(call gb_LinkTarget_set_include,$(1),\
1511 $(HARFBUZZ_CFLAGS) \
1512 $$(INCLUDE) \
1514 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1515 $(call gb_LinkTarget_use_external,$(1),icuuc)
1516 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1518 endef
1520 define gb_ExternalProject__use_harfbuzz
1521 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1523 endef
1525 endif # SYSTEM_HARFBUZZ
1527 ifeq ($(DISABLE_OPENSSL),TRUE)
1529 gb_ExternalProject__use_openssl:=
1530 gb_LinkTarget__use_openssl_headers:=
1531 gb_LinkTarget__use_openssl:=
1533 else # !DISABLE_OPENSSL
1535 ifneq ($(SYSTEM_OPENSSL),)
1537 gb_LinkTarget__use_openssl_headers:=
1538 gb_ExternalProject__use_openssl:=
1540 define gb_LinkTarget__use_openssl
1541 $(call gb_LinkTarget_set_include,$(1),\
1542 $$(INCLUDE) \
1543 $(OPENSSL_CFLAGS) \
1545 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1547 endef
1549 else # !SYSTEM_OPENSSL
1551 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1552 openssl \
1555 define gb_ExternalProject__use_openssl
1556 $(call gb_ExternalProject_use_package,$(1),openssl)
1558 endef
1560 define gb_LinkTarget__use_openssl_headers
1561 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1562 $(call gb_LinkTarget_set_include,$(1),\
1563 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1564 $$(INCLUDE) \
1567 endef
1569 define gb_LinkTarget__use_openssl
1570 $(call gb_LinkTarget_use_package,$(1),openssl)
1571 ifeq ($(OS),WNT)
1572 $(call gb_LinkTarget_add_libs,$(1),\
1573 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1574 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1576 else
1577 $(call gb_LinkTarget_add_libs,$(1),\
1578 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1579 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1581 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1582 ifeq ($(OS),SOLARIS)
1583 $(call gb_LinkTarget_add_libs,$(1),\
1584 -lnsl \
1585 -lsocket \
1587 endif
1588 endif
1590 endef
1592 endif # SYSTEM_OPENSSL
1593 endif # DISABLE_OPENSSL
1596 ifeq ($(DISABLE_OPENSSL),TRUE)
1598 define gb_LinkTarget__use_gnutls
1599 $(call gb_LinkTarget_set_include,$(1),\
1600 $$(INCLUDE) \
1601 $(GNUTLS_CFLAGS) \
1604 $(call gb_LinkTarget_add_defs,$(1),\
1605 -DDISABLE_OPENSSL \
1608 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1610 endef
1612 define gb_LinkTarget__use_libgcrypt
1613 $(call gb_LinkTarget_set_include,$(1),\
1614 $$(INCLUDE) \
1615 $(LIBGCRYPT_CFLAGS) \
1618 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1620 endef
1622 else # !DISABLE_OPENSSL
1624 gb_LinkTarget__use_gnutls:=
1625 gb_LinkTarget__use_libgcrypt:=
1627 endif # DISABLE_OPENSSL
1630 ifneq ($(SYSTEM_CDR),)
1632 define gb_LinkTarget__use_cdr
1633 $(call gb_LinkTarget_set_include,$(1),\
1634 $$(INCLUDE) \
1635 $(CDR_CFLAGS) \
1637 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1639 endef
1641 else # !SYSTEM_CDR
1643 define gb_LinkTarget__use_cdr
1644 $(call gb_LinkTarget_set_include,$(1),\
1645 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1646 $$(INCLUDE) \
1648 $(call gb_LinkTarget_add_libs,$(1),\
1649 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1651 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1652 endef
1654 endif # SYSTEM_CDR
1657 ifneq ($(SYSTEM_EBOOK),)
1659 define gb_LinkTarget__use_ebook
1660 $(call gb_LinkTarget_set_include,$(1),\
1661 $$(INCLUDE) \
1662 $(EBOOK_CFLAGS) \
1664 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1666 endef
1668 gb_ExternalProject__use_ebook :=
1670 else # !SYSTEM_EBOOK
1672 define gb_LinkTarget__use_ebook
1673 $(call gb_LinkTarget_set_include,$(1),\
1674 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1675 $$(INCLUDE) \
1677 $(call gb_LinkTarget_add_libs,$(1),\
1678 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1680 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1682 endef
1684 define gb_ExternalProject__use_ebook
1685 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1687 endef
1689 endif # SYSTEM_EBOOK
1692 ifneq ($(SYSTEM_ETONYEK),)
1694 define gb_LinkTarget__use_etonyek
1695 $(call gb_LinkTarget_set_include,$(1),\
1696 $$(INCLUDE) \
1697 $(ETONYEK_CFLAGS) \
1699 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1701 endef
1703 gb_ExternalProject__use_etonyek :=
1705 else # !SYSTEM_ETONYEK
1707 ifeq ($(COM),MSC)
1709 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1710 etonyek \
1713 define gb_LinkTarget__use_etonyek
1714 $(call gb_LinkTarget_set_include,$(1),\
1715 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1716 $$(INCLUDE) \
1718 $(call gb_LinkTarget_use_libraries,$(1),\
1719 etonyek \
1722 endef
1724 else # !MSC
1726 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1727 libetonyek \
1730 define gb_LinkTarget__use_etonyek
1731 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1733 $(call gb_LinkTarget_set_include,$(1),\
1734 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1735 -DLIBETONYEK_VISIBILITY \
1736 $$(INCLUDE) \
1738 $(call gb_LinkTarget_add_libs,$(1),\
1739 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1741 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1743 endef
1745 define gb_ExternalProject__use_etonyek
1746 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1748 endef
1750 endif
1752 endif # SYSTEM_ETONYEK
1755 ifneq ($(SYSTEM_FREEHAND),)
1757 define gb_LinkTarget__use_freehand
1758 $(call gb_LinkTarget_set_include,$(1),\
1759 $$(INCLUDE) \
1760 $(FREEHAND_CFLAGS) \
1762 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1764 endef
1766 gb_ExternalProject__use_freehand :=
1768 else # !SYSTEM_FREEHAND
1770 define gb_LinkTarget__use_freehand
1771 $(call gb_LinkTarget_set_include,$(1),\
1772 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1773 $$(INCLUDE) \
1775 $(call gb_LinkTarget_add_libs,$(1),\
1776 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1778 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1780 endef
1782 define gb_ExternalProject__use_freehand
1783 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1785 endef
1787 endif # SYSTEM_FREEHAND
1790 ifneq ($(SYSTEM_ODFGEN),)
1792 define gb_LinkTarget__use_odfgen
1793 $(call gb_LinkTarget_set_include,$(1),\
1794 $$(INCLUDE) \
1795 $(ODFGEN_CFLAGS) \
1797 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1799 endef
1801 else # !SYSTEM_ODFGEN
1803 ifeq ($(COM),MSC)
1805 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1806 odfgen \
1809 define gb_LinkTarget__use_odfgen
1810 $(call gb_LinkTarget_set_include,$(1),\
1811 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1812 $$(INCLUDE) \
1814 $(call gb_LinkTarget_use_libraries,$(1),\
1815 odfgen \
1818 endef
1820 else # !MSC
1822 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1823 libodfgen \
1826 define gb_LinkTarget__use_odfgen
1827 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1829 $(call gb_LinkTarget_set_include,$(1),\
1830 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1831 -DLIBODFGEN_VISIBILITY \
1832 $$(INCLUDE) \
1834 $(call gb_LinkTarget_add_libs,$(1),\
1835 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1838 endef
1840 endif
1842 endif # SYSTEM_ODFGEN
1844 ifneq ($(SYSTEM_EPUBGEN),)
1846 define gb_LinkTarget__use_epubgen
1847 $(call gb_LinkTarget_set_include,$(1),\
1848 $$(INCLUDE) \
1849 $(EPUBGEN_CFLAGS) \
1851 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1853 endef
1854 gb_ExternalProject__use_epubgen :=
1856 else # !SYSTEM_EPUBGEN
1858 define gb_LinkTarget__use_epubgen
1859 $(call gb_LinkTarget_set_include,$(1),\
1860 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1861 $$(INCLUDE) \
1863 $(call gb_LinkTarget_add_libs,$(1),\
1864 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1866 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1868 endef
1869 define gb_ExternalProject__use_epubgen
1870 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1872 endef
1874 endif # SYSTEM_EPUBGEN
1876 ifneq ($(SYSTEM_REVENGE),)
1878 define gb_LinkTarget__use_revenge
1879 $(call gb_LinkTarget_set_include,$(1),\
1880 $$(INCLUDE) \
1881 $(REVENGE_CFLAGS) \
1883 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1885 endef
1887 gb_ExternalProject__use_revenge :=
1889 else # !SYSTEM_REVENGE
1891 ifeq ($(COM),MSC)
1893 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1894 revenge \
1897 define gb_LinkTarget__use_revenge
1898 $(call gb_LinkTarget_set_include,$(1),\
1899 $(REVENGE_CFLAGS) \
1900 $$(INCLUDE) \
1902 $(call gb_LinkTarget_use_libraries,$(1),\
1903 revenge \
1906 endef
1908 define gb_ExternalProject__use_revenge
1909 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1911 endef
1913 else # !MSC
1915 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1916 librevenge \
1919 define gb_LinkTarget__use_revenge
1920 $(call gb_LinkTarget_use_package,$(1),librevenge)
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 $(REVENGE_CFLAGS) \
1924 -DLIBREVENGE_VISIBILITY \
1925 $$(INCLUDE) \
1927 $(call gb_LinkTarget_add_libs,$(1),\
1928 $(REVENGE_LIBS) \
1930 endef
1932 define gb_ExternalProject__use_revenge
1933 $(call gb_ExternalProject_use_package,$(1),librevenge)
1935 endef
1937 endif # MSC
1939 endif # SYSTEM_REVENGE
1942 ifneq ($(SYSTEM_ABW),)
1944 define gb_LinkTarget__use_abw
1945 $(call gb_LinkTarget_set_include,$(1),\
1946 $$(INCLUDE) \
1947 $(ABW_CFLAGS) \
1949 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1951 endef
1952 gb_ExternalProject__use_abw :=
1954 else # !SYSTEM_ABW
1956 define gb_LinkTarget__use_abw
1957 $(call gb_LinkTarget_set_include,$(1),\
1958 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1959 $$(INCLUDE) \
1961 $(call gb_LinkTarget_add_libs,$(1),\
1962 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1964 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1966 endef
1967 define gb_ExternalProject__use_abw
1968 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1970 endef
1972 endif # SYSTEM_ABW
1975 ifneq ($(SYSTEM_MSPUB),)
1977 define gb_LinkTarget__use_mspub
1978 $(call gb_LinkTarget_set_include,$(1),\
1979 $$(INCLUDE) \
1980 $(MSPUB_CFLAGS) \
1982 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1984 endef
1986 else # !SYSTEM_MSPUB
1988 define gb_LinkTarget__use_mspub
1989 $(call gb_LinkTarget_set_include,$(1),\
1990 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1991 $$(INCLUDE) \
1993 $(call gb_LinkTarget_add_libs,$(1),\
1994 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1996 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1998 endef
2000 endif # SYSTEM_MSPUB
2003 ifneq ($(SYSTEM_PAGEMAKER),)
2005 define gb_LinkTarget__use_pagemaker
2006 $(call gb_LinkTarget_set_include,$(1),\
2007 $$(INCLUDE) \
2008 $(PAGEMAKER_CFLAGS) \
2010 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2012 endef
2013 gb_ExternalProject__use_pagemaker :=
2015 else # !SYSTEM_PAGEMAKER
2017 define gb_LinkTarget__use_pagemaker
2018 $(call gb_LinkTarget_set_include,$(1),\
2019 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2020 $$(INCLUDE) \
2022 $(call gb_LinkTarget_add_libs,$(1),\
2023 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2025 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2027 endef
2028 define gb_ExternalProject__use_pagemaker
2029 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2031 endef
2033 endif # SYSTEM_PAGEMAKER
2036 ifneq ($(SYSTEM_QXP),)
2038 define gb_LinkTarget__use_qxp
2039 $(call gb_LinkTarget_set_include,$(1),\
2040 $$(INCLUDE) \
2041 $(QXP_CFLAGS) \
2043 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2045 endef
2046 gb_ExternalProject__use_qxp :=
2048 else # !SYSTEM_QXP
2050 define gb_LinkTarget__use_qxp
2051 $(call gb_LinkTarget_set_include,$(1),\
2052 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2053 $$(INCLUDE) \
2055 $(call gb_LinkTarget_add_libs,$(1),\
2056 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2058 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2060 endef
2061 define gb_ExternalProject__use_qxp
2062 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2064 endef
2066 endif # SYSTEM_QXP
2069 ifneq ($(SYSTEM_ZMF),)
2071 define gb_LinkTarget__use_zmf
2072 $(call gb_LinkTarget_set_include,$(1),\
2073 $$(INCLUDE) \
2074 $(ZMF_CFLAGS) \
2076 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2078 endef
2079 gb_ExternalProject__use_zmf :=
2081 else # !SYSTEM_ZMF
2083 define gb_LinkTarget__use_zmf
2084 $(call gb_LinkTarget_set_include,$(1),\
2085 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2086 $$(INCLUDE) \
2088 $(call gb_LinkTarget_add_libs,$(1),\
2089 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2091 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2093 endef
2094 define gb_ExternalProject__use_zmf
2095 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2097 endef
2099 endif # SYSTEM_ZMF
2102 ifneq ($(SYSTEM_VISIO),)
2104 define gb_LinkTarget__use_visio
2105 $(call gb_LinkTarget_set_include,$(1),\
2106 $$(INCLUDE) \
2107 $(VISIO_CFLAGS) \
2109 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2111 endef
2113 else # !SYSTEM_VISIO
2115 define gb_LinkTarget__use_visio
2116 $(call gb_LinkTarget_set_include,$(1),\
2117 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2118 $$(INCLUDE) \
2120 $(call gb_LinkTarget_add_libs,$(1),\
2121 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2123 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2125 endef
2127 endif # SYSTEM_VISIO
2130 ifneq ($(SYSTEM_WPD),)
2132 define gb_LinkTarget__use_wpd
2133 $(call gb_LinkTarget_set_include,$(1),\
2134 $$(INCLUDE) \
2135 $(WPD_CFLAGS) \
2137 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2139 endef
2140 gb_ExternalProject__use_wpd :=
2142 else # !SYSTEM_WPD
2144 ifeq ($(COM),MSC)
2146 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2147 wpd \
2150 define gb_LinkTarget__use_wpd
2151 $(call gb_LinkTarget_set_include,$(1),\
2152 $(WPD_CFLAGS) \
2153 $$(INCLUDE) \
2155 $(call gb_LinkTarget_use_libraries,$(1),\
2156 wpd \
2159 endef
2161 define gb_ExternalProject__use_wpd
2162 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2164 endef
2166 else # !MSC
2168 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2169 libwpd \
2172 define gb_LinkTarget__use_wpd
2173 $(call gb_LinkTarget_use_package,$(1),libwpd)
2175 $(call gb_LinkTarget_set_include,$(1),\
2176 $(WPD_CFLAGS) \
2177 $$(INCLUDE) \
2179 $(call gb_LinkTarget_add_libs,$(1),\
2180 $(WPD_LIBS) \
2183 endef
2185 define gb_ExternalProject__use_wpd
2186 $(call gb_ExternalProject_use_package,$(1),libwpd)
2188 endef
2190 endif # MSC
2192 endif # SYSTEM_WPD
2195 ifneq ($(SYSTEM_WPG),)
2197 define gb_LinkTarget__use_wpg
2198 $(call gb_LinkTarget_set_include,$(1),\
2199 $$(INCLUDE) \
2200 $(WPG_CFLAGS) \
2202 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2204 endef
2205 gb_ExternalProject__use_wpg :=
2207 else # !SYSTEM_WPG
2209 ifeq ($(COM),MSC)
2211 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2212 wpg \
2215 define gb_LinkTarget__use_wpg
2216 $(call gb_LinkTarget_set_include,$(1),\
2217 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2218 $$(INCLUDE) \
2220 $(call gb_LinkTarget_use_libraries,$(1),\
2221 wpg \
2224 endef
2226 else # !MSC
2228 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2229 libwpg \
2232 define gb_LinkTarget__use_wpg
2233 $(call gb_LinkTarget_use_package,$(1),libwpg)
2235 $(call gb_LinkTarget_set_include,$(1),\
2236 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2237 $$(INCLUDE) \
2239 $(call gb_LinkTarget_add_libs,$(1),\
2240 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2243 endef
2245 endif # MSC
2247 endif # SYSTEM_WPG
2250 ifneq ($(SYSTEM_WPS),)
2252 define gb_LinkTarget__use_wps
2253 $(call gb_LinkTarget_set_include,$(1),\
2254 $$(INCLUDE) \
2255 $(WPS_CFLAGS) \
2257 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2259 endef
2260 gb_ExternalProject__use_wps :=
2262 else # !SYSTEM_WPS
2264 ifeq ($(COM),MSC)
2266 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2267 wps \
2270 define gb_LinkTarget__use_wps
2271 $(call gb_LinkTarget_set_include,$(1),\
2272 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2273 $$(INCLUDE) \
2276 $(call gb_LinkTarget_use_libraries,$(1),\
2277 wps \
2280 endef
2282 else # !MSC
2284 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2285 libwps \
2288 define gb_LinkTarget__use_wps
2289 $(call gb_LinkTarget_use_package,$(1),libwps)
2291 $(call gb_LinkTarget_set_include,$(1),\
2292 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2293 $$(INCLUDE) \
2295 $(call gb_LinkTarget_add_libs,$(1),\
2296 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2299 endef
2301 endif # MSC
2303 endif # SYSTEM_WPS
2306 ifneq ($(SYSTEM_MWAW),)
2308 define gb_LinkTarget__use_mwaw
2309 $(call gb_LinkTarget_set_include,$(1),\
2310 $$(INCLUDE) \
2311 $(MWAW_CFLAGS) \
2313 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2315 endef
2317 else # !SYSTEM_MWAW
2319 ifeq ($(COM),MSC)
2321 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2322 mwaw \
2325 define gb_LinkTarget__use_mwaw
2326 $(call gb_LinkTarget_set_include,$(1),\
2327 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2328 $$(INCLUDE) \
2331 $(call gb_LinkTarget_use_libraries,$(1),\
2332 mwaw \
2335 endef
2337 else # !MSC
2339 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2340 libmwaw \
2343 define gb_LinkTarget__use_mwaw
2344 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2346 $(call gb_LinkTarget_set_include,$(1),\
2347 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2348 $$(INCLUDE) \
2350 $(call gb_LinkTarget_add_libs,$(1),\
2351 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2354 endef
2356 endif # MSC
2358 endif # SYSTEM_MWAW
2360 ifneq ($(SYSTEM_STAROFFICE),)
2362 define gb_LinkTarget__use_staroffice
2363 $(call gb_LinkTarget_set_include,$(1),\
2364 $$(INCLUDE) \
2365 $(STAROFFICE_CFLAGS) \
2367 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2369 endef
2371 else # !SYSTEM_STAROFFICE
2373 ifeq ($(COM),MSC)
2375 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2376 staroffice \
2379 define gb_LinkTarget__use_staroffice
2380 $(call gb_LinkTarget_set_include,$(1),\
2381 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2382 $$(INCLUDE) \
2385 $(call gb_LinkTarget_use_libraries,$(1),\
2386 staroffice \
2389 endef
2391 else # !MSC
2393 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2394 libstaroffice \
2397 define gb_LinkTarget__use_staroffice
2398 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2400 $(call gb_LinkTarget_set_include,$(1),\
2401 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2402 $$(INCLUDE) \
2404 $(call gb_LinkTarget_add_libs,$(1),\
2405 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2408 endef
2410 endif # MSC
2412 endif # SYSTEM_STAROFFICE
2415 ifneq ($(SYSTEM_LCMS2),)
2417 define gb_LinkTarget__use_lcms2
2418 $(call gb_LinkTarget_set_include,$(1),\
2419 $$(INCLUDE) \
2420 $(LCMS2_CFLAGS) \
2422 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2424 endef
2426 gb_ExternalProject__use_lcms2 :=
2428 else # !SYSTEM_LCMS2
2430 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2431 lcms2 \
2434 define gb_ExternalProject__use_lcms2
2435 $(call gb_ExternalProject_use_package,$(1),lcms2)
2437 endef
2439 ifeq ($(OS),ANDROID)
2441 define gb_LinkTarget__use_lcms2
2442 $(call gb_LinkTarget_use_package,$(1),lcms2)
2443 $(call gb_LinkTarget_set_include,$(1),\
2444 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2445 $$(INCLUDE) \
2448 endef
2450 else
2452 define gb_LinkTarget__use_lcms2
2453 $(call gb_LinkTarget_use_package,$(1),lcms2)
2454 $(call gb_LinkTarget_set_include,$(1),\
2455 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2456 $$(INCLUDE) \
2458 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2460 endef
2462 endif # ANDROID
2463 endif # SYSTEM_LCMS2
2465 ifneq ($(ENABLE_LPSOLVE),)
2467 ifneq ($(SYSTEM_LPSOLVE),)
2469 define gb_LinkTarget__use_lpsolve
2470 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2471 $(call gb_LinkTarget_add_defs,$(1),\
2472 -DSYSTEM_LPSOLVE \
2475 endef
2477 else # !SYSTEM_LPSOLVE
2479 define gb_LinkTarget__use_lpsolve
2480 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2481 ifeq ($(COM),MSC)
2482 $(call gb_LinkTarget_add_libs,$(1),\
2483 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2485 else
2486 $(call gb_LinkTarget_add_libs,$(1),\
2487 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2489 endif
2490 $(call gb_LinkTarget_set_include,$(1),\
2491 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2492 $$(INCLUDE) \
2495 endef
2497 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2498 lpsolve \
2501 endif # SYSTEM_LPSOLVE
2503 else
2505 gb_LinkTarget__use_lpsolve :=
2507 endif # ENABLE_LPSOLVE
2509 ifneq ($(ENABLE_COINMP),)
2511 ifneq ($(SYSTEM_COINMP),TRUE)
2513 define gb_LinkTarget__use_coinmp
2514 $(call gb_LinkTarget_use_package,$(1),coinmp)
2515 ifeq ($(COM),MSC)
2516 $(call gb_LinkTarget_add_libs,$(1),\
2517 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2519 else
2520 $(call gb_LinkTarget_add_libs,$(1),\
2521 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2522 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2523 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2524 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2525 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2526 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2527 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2529 endif
2530 $(call gb_LinkTarget_set_include,$(1),\
2531 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2532 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2533 $$(INCLUDE) \
2536 endef
2538 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2539 coinmp \
2542 else # SYSTEM_COINMP
2544 define gb_LinkTarget__use_coinmp
2545 $(call gb_LinkTarget_set_include,$(1),\
2546 $$(INCLUDE) \
2547 $(COINMP_CFLAGS) \
2549 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2551 endef
2553 endif
2555 else
2557 gb_LinkTarget__use_coinmp :=
2559 endif # ENABLE_COINMP
2561 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2563 define gb_LinkTarget__use_mDNSResponder
2564 $(call gb_LinkTarget_set_include,$(1),\
2565 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2566 $$(INCLUDE) \
2568 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2569 endef
2571 endif # MDNSRESPONDER
2573 ifeq ($(ENABLE_GIO),TRUE)
2575 define gb_LinkTarget__use_gio
2576 $(call gb_LinkTarget_set_include,$(1),\
2577 $$(INCLUDE) \
2578 $(GIO_CFLAGS) \
2581 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2583 endef
2585 else # ENABLE_GIO
2587 define gb_LinkTarget__use_gio
2589 endef
2591 endif # ENABLE_GIO
2593 ifeq ($(ENABLE_AVAHI),TRUE)
2595 define gb_LinkTarget__use_avahi
2596 $(call gb_LinkTarget_set_include,$(1),\
2597 $$(INCLUDE) \
2598 $(AVAHI_CFLAGS) \
2601 $(call gb_LinkTarget_add_defs,$(1),\
2602 -DENABLE_AVAHI \
2605 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2607 endef
2609 else # ENABLE_AVAHI
2611 gb_LinkTarget__use_avahi :=
2613 endif # ENABLE_AVAHI
2615 ifeq ($(ENABLE_CUPS),TRUE)
2617 define gb_LinkTarget__use_cups
2618 $(call gb_LinkTarget_add_defs,$(1),\
2619 -DENABLE_CUPS \
2622 $(call gb_LinkTarget_add_libs,$(1),\
2623 -lcups \
2626 endef
2628 else # ENABLE_CUPS
2630 define gb_LinkTarget__use_cups
2632 endef
2634 endif # ENABLE_CUPS
2636 ifeq ($(ENABLE_DBUS),TRUE)
2638 define gb_LinkTarget__use_dbus
2639 $(call gb_LinkTarget_set_include,$(1),\
2640 $$(INCLUDE) \
2641 $(DBUS_CFLAGS) \
2644 $(call gb_LinkTarget_add_libs,$(1),\
2645 $(DBUS_LIBS) \
2648 endef
2650 else # ENABLE_DBUS
2652 define gb_LinkTarget__use_dbus
2654 endef
2656 endif # ENABLE_DBUS
2659 ifneq ($(SYSTEM_LIBPNG),)
2661 define gb_LinkTarget__use_libpng
2662 $(call gb_LinkTarget_set_include,$(1),\
2663 $$(INCLUDE) \
2664 $(LIBPNG_CFLAGS) \
2667 $(call gb_LinkTarget_add_libs,$(1),\
2668 $(LIBPNG_LIBS) \
2671 endef
2673 gb_ExternalProject__use_libpng :=
2675 else # !SYSTEM_LIBPNG
2677 define gb_LinkTarget__use_libpng
2678 $(call gb_LinkTarget_set_include,$(1),\
2679 $(LIBPNG_CFLAGS) \
2680 $$(INCLUDE) \
2682 $(call gb_LinkTarget_use_static_libraries,$(1),\
2683 libpng \
2685 $(call gb_LinkTarget__use_zlib,$(1))
2687 endef
2689 define gb_ExternalProject__use_libpng
2690 $(call gb_ExternalProject_use_static_libraries,$(1),\
2691 libpng \
2694 endef
2696 endif # !SYSTEM_LIBPNG
2699 ifneq ($(SYSTEM_CURL),)
2701 define gb_LinkTarget__use_curl
2702 $(call gb_LinkTarget_add_defs,$(1),\
2703 -DSYSTEM_CURL \
2705 $(call gb_LinkTarget_set_include,$(1),\
2706 $$(INCLUDE) \
2707 $(CURL_CFLAGS) \
2709 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2711 endef
2713 else # !SYSTEM_CURL
2715 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2716 curl \
2719 define gb_LinkTarget__use_curl
2720 $(call gb_LinkTarget_use_package,$(1),curl)
2721 $(call gb_LinkTarget_set_include,$(1),\
2722 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2723 $$(INCLUDE) \
2726 ifeq ($(COM),MSC)
2727 $(call gb_LinkTarget_add_libs,$(1),\
2728 $(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 \
2730 else
2731 $(call gb_LinkTarget_add_libs,$(1),\
2732 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2734 endif
2736 endef
2738 endif # SYSTEM_CURL
2740 ifeq ($(ENABLE_VALGRIND),TRUE)
2742 define gb_LinkTarget__use_valgrind
2743 $(call gb_LinkTarget_add_defs,$(1),\
2744 -DHAVE_VALGRIND_HEADERS \
2747 $(call gb_LinkTarget_set_include,$(1),\
2748 $$(INCLUDE) \
2749 $(VALGRIND_CFLAGS) \
2752 endef
2754 else # !ENABLE_VALGRIND
2756 define gb_LinkTarget__use_valgrind
2758 endef
2760 endif # ENABLE_VALGRIND
2762 ifeq ($(ENABLE_POPPLER),TRUE)
2764 ifneq ($(SYSTEM_POPPLER),)
2766 define gb_LinkTarget__use_poppler
2767 $(call gb_LinkTarget_set_include,$(1),\
2768 $(POPPLER_CFLAGS) \
2769 $$(INCLUDE) \
2772 $(call gb_LinkTarget_add_libs,$(1),\
2773 $(POPPLER_LIBS) \
2776 endef
2778 else # !SYSTEM_POPPLER
2780 define gb_LinkTarget__use_poppler
2781 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2783 $(call gb_LinkTarget_set_include,$(1),\
2784 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2785 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2786 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2787 $$(INCLUDE) \
2790 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2792 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2794 ifeq ($(OS),MACOSX)
2795 $(call gb_LinkTarget_add_libs,$(1),\
2796 -lobjc \
2798 else ifeq ($(OS),LINUX)
2799 $(call gb_LinkTarget_add_libs,$(1),\
2800 -pthread \
2802 else ifeq ($(OS),WNT)
2803 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2804 advapi32 \
2805 gdi32 \
2807 endif
2809 endef
2811 endif # SYSTEM_POPPLER
2813 endif # ENABLE_POPPLER
2816 ifneq ($(SYSTEM_CLUCENE),)
2818 define gb_LinkTarget__use_clucene
2819 $(call gb_LinkTarget_add_defs,$(1),\
2820 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2823 $(call gb_LinkTarget_set_include,$(1),\
2824 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2825 $$(INCLUDE) \
2828 $(call gb_LinkTarget_add_libs,$(1),\
2829 $(CLUCENE_LIBS) \
2832 endef
2834 else # !SYSTEM_CLUCENE
2836 define gb_LinkTarget__use_clucene
2837 $(call gb_LinkTarget_set_include,$(1),\
2838 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2839 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2840 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2841 $$(INCLUDE) \
2844 $(call gb_LinkTarget_use_libraries,$(1),\
2845 clucene \
2848 endef
2850 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2851 clucene \
2854 endif # SYSTEM_CLUCENE
2856 define gb_LinkTarget__use_gobject
2857 $(call gb_LinkTarget_add_libs,$(1),\
2858 $(GOBJECT_LIBS) \
2861 $(call gb_LinkTarget_set_include,$(1),\
2862 $$(INCLUDE) \
2863 $(GOBJECT_CFLAGS) \
2865 endef
2867 ifneq ($(SYSTEM_HSQLDB),)
2869 define gb_LinkTarget__use_hsqldb
2871 $(call gb_LinkTarget_add_defs,$(1),\
2872 -DSYSTEM_HSQLDB \
2873 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2876 endef
2878 else # !SYSTEM_HSQLDB
2880 define gb_LinkTarget__use_hsqldb
2882 endef
2884 endif # SYSTEM_HSQLDB
2886 ifeq ($(ENABLE_LDAP),TRUE)
2887 ifneq ($(SYSTEM_OPENLDAP),)
2889 define gb_LinkTarget__use_openldap
2891 $(call gb_LinkTarget_add_libs,$(1),\
2892 -lldap \
2893 -llber \
2896 endef
2898 gb_ExternalProject__use_openldap :=
2900 else # !SYSTEM_OPENLDAP
2902 define gb_LinkTarget__use_openldap
2903 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2904 $(call gb_LinkTarget_set_include,$(1),\
2905 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2906 $$(INCLUDE) \
2908 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2909 $(call gb_LinkTarget_add_libs,$(1), \
2910 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2911 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2914 endef
2915 endif
2917 define gb_ExternalProject__use_openldap
2918 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2920 endef
2922 endif # SYSTEM_OPENLDAP
2924 ifneq ($(SYSTEM_LIBTOMMATH),)
2926 define gb_LinkTarget__use_libtommath
2927 $(call gb_LinkTarget_set_include,$(1),\
2928 $(LIBTOMMATH_CFLAGS) \
2929 $$(INCLUDE) \
2931 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2933 endef
2935 else # !SYSTEM_LIBTOMMATH
2936 define gb_LinkTarget__use_libtommath
2937 $(call gb_LinkTarget_set_include,$(1),\
2938 -I${WORKDIR}/UnpackedTarball/libtommath \
2939 $$(INCLUDE) \
2941 $(call gb_LinkTarget_add_libs,$(1),\
2942 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2944 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2946 endef
2948 endif # SYSTEM_LIBTOMMATH
2950 define gb_ExternalProject__use_libtommath
2951 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2953 endef
2955 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2957 ifneq ($(SYSTEM_FIREBIRD),)
2959 define gb_LinkTarget__use_libfbembed
2960 $(call gb_LinkTarget_set_include,$(1),\
2961 $(FIREBIRD_CFLAGS) \
2962 $$(INCLUDE) \
2964 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2966 endef
2968 else # !SYSTEM_FIREBIRD
2970 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2971 firebird \
2974 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2975 #$(call gb_LinkTarget__use_libtommath,$(1))
2977 define gb_LinkTarget__use_libfbembed
2978 $(call gb_LinkTarget_use_package,$(1),firebird)
2979 $(call gb_LinkTarget_set_include,$(1),\
2980 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2981 $$(INCLUDE) \
2983 ifeq ($(COM),MSC)
2984 $(call gb_LinkTarget_add_libs,$(1),\
2985 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2987 else
2988 $(call gb_LinkTarget_add_libs,$(1),\
2989 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2991 endif
2993 endef
2996 # endef
2998 endif # SYSTEM_FIREBIRD
3000 else # !ENABLE_FIREBIRD_SDBC
3002 gb_LinkTarget__use_firebird :=
3003 # gb_LinkTarget__use_atomic_ops :=
3004 # gb_LinkTarget__use_libtommath :=
3006 endif # ENABLE_FIREBIRD_SDBC
3009 ifneq ($(SYSTEM_POSTGRESQL),)
3011 define gb_LinkTarget__use_postgresql
3013 $(call gb_LinkTarget_set_include,$(1),\
3014 $(POSTGRESQL_INC) \
3015 $$(INCLUDE) \
3018 $(call gb_LinkTarget_add_libs,$(1),\
3019 -lpq \
3022 $(call gb_LinkTarget_add_ldflags,$(1),\
3023 $(POSTGRESQL_LIB) \
3026 endef
3028 else # !SYSTEM_POSTGRESQL
3030 define gb_LinkTarget__use_postgresql
3032 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3034 $(call gb_LinkTarget_set_include,$(1),\
3035 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3036 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3037 $$(INCLUDE) \
3040 $(call gb_LinkTarget_add_libs,$(1),\
3041 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3044 ifeq ($(OS),WNT)
3045 $(call gb_LinkTarget_use_external,$(1),openssl)
3047 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3048 secur32 \
3049 ws2_32 \
3052 endif
3054 endef
3056 endif # SYSTEM_POSTGRESQL
3058 ifeq ($(ENABLE_KF5),TRUE)
3060 define gb_LinkTarget__use_kf5
3061 $(call gb_LinkTarget_set_include,$(1),\
3062 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3063 $$(INCLUDE) \
3066 $(call gb_LinkTarget_add_cxxflags,$(1),\
3067 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3070 $(call gb_LinkTarget_add_libs,$(1),\
3071 $(KF5_LIBS) \
3074 endef
3076 else # !ENABLE_KF5
3078 define gb_LinkTarget__use_kf5
3080 endef
3082 endif # ENABLE_KF5
3086 ifeq ($(ENABLE_QT5),TRUE)
3088 define gb_LinkTarget__use_qt5
3089 $(call gb_LinkTarget_set_include,$(1),\
3090 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3091 $$(INCLUDE) \
3094 $(call gb_LinkTarget_add_defs,$(1),\
3095 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3098 $(call gb_LinkTarget_add_libs,$(1),\
3099 $(QT5_LIBS) \
3102 endef
3104 else # !ENABLE_QT5
3106 define gb_LinkTarget__use_qt5
3108 endef
3110 endif # ENABLE_QT5
3112 # PYTHON
3113 # extra python_headers external because pyuno wrapper must not link python
3114 ifneq ($(SYSTEM_PYTHON),)
3116 define gb_LinkTarget__use_python_headers
3117 $(call gb_LinkTarget_add_defs,$(1),\
3118 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3121 $(call gb_LinkTarget_set_include,$(1),\
3122 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3123 $$(INCLUDE) \
3126 endef
3128 define gb_LinkTarget__use_python
3129 $(call gb_LinkTarget__use_python_headers,$(1))
3131 $(call gb_LinkTarget_add_libs,$(1),\
3132 $(PYTHON_LIBS) \
3135 endef
3137 else # !SYSTEM_PYTHON
3139 $(eval $(call gb_Helper_register_packages_for_install,python,\
3140 python3 \
3143 define gb_LinkTarget__use_python_headers
3144 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3145 $(call gb_LinkTarget_set_include,$(1),\
3146 -I$(call gb_UnpackedTarball_get_dir,python3) \
3147 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3148 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3149 $$(INCLUDE) \
3152 endef
3154 define gb_LinkTarget__use_python
3155 $(call gb_LinkTarget__use_python_headers,$(1))
3156 ifeq ($(OS),MACOSX)
3157 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3158 else
3159 $(call gb_LinkTarget_use_package,$(1),python3)
3160 endif
3162 ifeq ($(OS),WNT)
3163 $(call gb_LinkTarget_add_libs,$(1),\
3164 $(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 \
3166 else ifeq ($(OS),MACOSX)
3167 $(call gb_LinkTarget_add_libs,$(1),\
3168 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3170 else
3171 $(call gb_LinkTarget_add_libs,$(1),\
3172 -L$(call gb_UnpackedTarball_get_dir,python3) \
3173 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3175 endif
3177 endef
3179 # this is only used by python currently
3180 define gb_ExternalProject__use_libffi
3181 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3183 endef
3185 endif # SYSTEM_PYTHON
3187 # ORCUS
3188 ifneq ($(SYSTEM_LIBORCUS),)
3190 define gb_LinkTarget__use_orcus
3191 $(call gb_LinkTarget_set_include,$(1),\
3192 $$(INCLUDE) \
3193 $(ORCUS_CFLAGS) \
3195 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3196 endef
3198 define gb_LinkTarget__use_orcus-parser
3200 endef
3202 else # !SYSTEM_LIBORCUS
3204 ifeq ($(COM),MSC)
3206 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3207 orcus \
3208 orcus-parser \
3211 define gb_LinkTarget__use_orcus
3212 $(call gb_LinkTarget_set_include,$(1),\
3213 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3214 $$(INCLUDE) \
3217 $(call gb_LinkTarget_use_libraries,$(1),\
3218 orcus \
3221 endef
3223 define gb_LinkTarget__use_orcus-parser
3224 $(call gb_LinkTarget_set_include,$(1),\
3225 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3226 $$(INCLUDE) \
3229 $(call gb_LinkTarget_use_libraries,$(1),\
3230 orcus-parser \
3233 endef
3235 else # !MSC
3237 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3238 liborcus \
3241 define gb_LinkTarget__use_orcus
3242 $(call gb_LinkTarget_use_package,$(1),liborcus)
3244 $(call gb_LinkTarget_set_include,$(1),\
3245 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3246 $$(INCLUDE) \
3249 $(call gb_LinkTarget_add_libs,$(1),\
3250 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3253 $(if $(SYSTEM_BOOST), \
3254 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3255 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3258 endef
3260 define gb_LinkTarget__use_orcus-parser
3261 $(call gb_LinkTarget_use_package,$(1),liborcus)
3263 $(call gb_LinkTarget_set_include,$(1),\
3264 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3265 $$(INCLUDE) \
3268 $(call gb_LinkTarget_add_libs,$(1),\
3269 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3272 endef
3274 endif # MSC
3276 endif # SYSTEM_LIBORCUS
3278 ifeq ($(ENABLE_EOT),TRUE)
3280 ifneq ($(SYSTEM_LIBEOT),)
3282 define gb_LinkTarget__use_libeot
3283 $(call gb_LinkTarget_set_include,$(1),\
3284 $$(INCLUDE) \
3285 $(LIBEOT_CFLAGS) \
3287 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3289 endef
3291 gb_ExternalProject__use_libeot :=
3293 else # !SYSTEM_LIBEOT
3295 define gb_LinkTarget__use_libeot
3296 $(call gb_LinkTarget_set_include,$(1),\
3297 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3298 $$(INCLUDE) \
3300 $(call gb_LinkTarget_add_libs,$(1),\
3301 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3303 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3305 endef
3307 define gb_ExternalProject__use_libeot
3308 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3310 endef
3312 endif # SYSTEM_LIBEOT
3314 else # !ENABLE_EOT
3316 gb_LinkTarget__use_libeot :=
3317 gb_ExternalProject__use_libeot :=
3319 endif # ENABLE_EOT
3321 ### X11 stuff ###
3323 ifeq ($(USING_X11), TRUE)
3325 define gb_LinkTarget__use_Xrandr
3326 $(call gb_LinkTarget_set_include,$(1),\
3327 $$(INCLUDE) \
3328 $(XRANDR_CFLAGS) \
3331 $(call gb_LinkTarget_add_libs,$(1),\
3332 $(XRANDR_LIBS) \
3334 endef
3336 define gb_LinkTarget__use_Xrender
3337 $(call gb_LinkTarget_set_include,$(1),\
3338 $$(INCLUDE) \
3339 $(XRENDER_CFLAGS) \
3342 $(call gb_LinkTarget_add_libs,$(1),\
3343 $(XRENDER_LIBS) \
3345 endef
3347 endif # USING_X11
3350 gb_ExternalProject__use_nss3:=
3353 ifneq ($(SYSTEM_NSS),)
3355 define gb_LinkTarget__use_nss3
3356 $(call gb_LinkTarget_add_defs,$(1),\
3357 -DSYSTEM_NSS \
3360 $(call gb_LinkTarget_set_include,$(1),\
3361 $$(INCLUDE) \
3362 $(NSS_CFLAGS) \
3365 $(call gb_LinkTarget_add_libs,$(1),\
3366 $(NSS_LIBS) \
3369 endef
3371 define gb_LinkTarget__use_plc4
3372 $(call gb_LinkTarget__use_nss3,$(1))
3374 endef
3376 define gb_LinkTarget__use_ssl3
3377 $(call gb_LinkTarget__use_nss3,$(1))
3379 endef
3381 else # !SYSTEM_NSS
3383 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3384 nss \
3387 define gb_LinkTarget__use_nss3
3388 $(call gb_LinkTarget_use_package,$(1),nss)
3389 $(call gb_LinkTarget_set_include,$(1),\
3390 $$(INCLUDE) \
3391 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3392 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3395 ifeq ($(COM),MSC)
3396 $(call gb_LinkTarget_add_libs,$(1),\
3397 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3398 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3399 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3401 else
3402 $(call gb_LinkTarget_add_libs,$(1),\
3403 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3404 -lnspr4 \
3405 -lnss3 \
3406 -lsmime3 \
3408 endif
3410 endef
3412 define gb_LinkTarget__use_plc4
3413 $(call gb_LinkTarget_use_package,$(1),nss)
3414 ifeq ($(COM),MSC)
3415 $(call gb_LinkTarget_add_libs,$(1),\
3416 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3418 else
3419 $(call gb_LinkTarget_add_libs,$(1),\
3420 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3422 endif
3424 endef
3426 define gb_LinkTarget__use_ssl3
3427 $(call gb_LinkTarget_use_package,$(1),nss)
3428 ifeq ($(COM),MSC)
3429 $(call gb_LinkTarget_add_libs,$(1),\
3430 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3432 else
3433 $(call gb_LinkTarget_add_libs,$(1),\
3434 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3436 endif
3438 endef
3440 define gb_ExternalProject__use_nss3
3441 $(call gb_ExternalProject_use_package,$(1),nss)
3443 endef
3445 endif # SYSTEM_NSS
3447 ifeq ($(ENABLE_BREAKPAD),TRUE)
3449 define gb_LinkTarget__use_breakpad
3450 $(call gb_LinkTarget_set_include,$(1),\
3451 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3452 $$(INCLUDE) \
3455 ifeq ($(COM),MSC)
3456 $(call gb_LinkTarget_use_static_libraries,$(1),\
3457 breakpad \
3459 else
3460 $(call gb_LinkTarget_add_libs,$(1),\
3461 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3463 endif
3465 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3467 endef
3469 endif # ENABLE_BREAKPAD
3471 ifeq ($(ENABLE_GPGMEPP),TRUE)
3473 ifneq ($(SYSTEM_GPGMEPP),)
3475 gb_ExternalProject__use_gpgmepp:=
3476 gb_ExternalProject__use_libassuan:=
3477 gb_ExternalProject__use_libgpg-error:=
3479 define gb_LinkTarget__use_gpgmepp
3480 $(call gb_LinkTarget_set_include,$(1),\
3481 $$(INCLUDE) \
3482 $$(GPGMEPP_CFLAGS) \
3485 $(call gb_LinkTarget_add_libs,$(1),\
3486 $(GPGMEPP_LIBS) \
3489 endef
3491 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3493 define gb_ExternalProject__use_gpgmepp
3494 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3496 endef
3497 define gb_ExternalProject__use_libassuan
3498 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3500 endef
3501 define gb_ExternalProject__use_libgpg-error
3502 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3504 endef
3506 ifneq ($(filter WNT,$(OS)),)
3508 define gb_LinkTarget__use_libgpg-error
3509 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3511 $(call gb_LinkTarget_set_include,$(1),\
3512 $(GPG_ERROR_CFLAGS) \
3513 $$(INCLUDE) \
3515 $(call gb_LinkTarget_add_libs,$(1),\
3516 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3519 endef
3521 define gb_LinkTarget__use_libassuan
3522 $(call gb_LinkTarget_use_package,$(1),libassuan)
3524 $(call gb_LinkTarget_set_include,$(1),\
3525 $(LIBASSUAN_CFLAGS) \
3526 $$(INCLUDE) \
3528 $(call gb_LinkTarget_add_libs,$(1),\
3529 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3532 endef
3534 define gb_LinkTarget__use_gpgmepp
3535 $(call gb_LinkTarget_set_include,$(1),\
3536 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3537 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3538 $$(GPG_ERROR_CFLAGS) \
3539 $$(INCLUDE) \
3541 $(call gb_LinkTarget_use_libraries,$(1),\
3542 gpgmepp \
3545 endef
3547 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3548 libassuan \
3549 libgpg-error \
3552 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3553 gpgmepp \
3556 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3557 gpgme-w32spawn \
3560 endif
3562 ifneq ($(filter MACOSX LINUX,$(OS)),)
3564 define gb_LinkTarget__use_gpgmepp
3565 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3567 $(call gb_LinkTarget_set_include,$(1),\
3568 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3569 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3570 $$(GPG_ERROR_CFLAGS) \
3571 $$(INCLUDE) \
3573 $(call gb_LinkTarget_add_libs,$(1),\
3574 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3575 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3576 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3577 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3580 endef
3582 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3583 gpgmepp \
3584 libassuan \
3585 libgpg-error \
3588 endif
3590 endif
3592 else # !ENABLE_GPGMEPP
3594 gb_ExternalProject__use_gpgmepp :=
3595 gb_ExternalProject__use_libassuan :=
3596 gb_ExternalProject__use_libgpg-error :=
3598 gb_LinkTarget__use_gpgmepp :=
3599 gb_LinkTarget__use_libassuan :=
3600 gb_LinkTarget__use_libgpg-error :=
3602 endif # ENABLE_GPGMEPP
3604 define gb_LinkTarget__use_dconf
3605 $(call gb_LinkTarget_set_include,$(1),\
3606 $$(INCLUDE) \
3607 $(DCONF_CFLAGS) \
3610 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3611 endef
3613 ### Jars ############################################################
3615 ifneq ($(SYSTEM_HSQLDB),)
3617 define gb_Jar__use_hsqldb
3618 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3619 endef
3620 define gb_JunitTest__use_hsqldb
3621 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3622 endef
3624 else # !SYSTEM_HSQLDB
3626 ifeq ($(ENABLE_JAVA),TRUE)
3627 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3628 hsqldb \
3630 endif
3632 define gb_Jar__use_hsqldb
3633 $(call gb_Jar_use_jar,$(1),hsqldb)
3634 endef
3635 define gb_JunitTest__use_hsqldb
3636 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3637 endef
3639 endif # SYSTEM_HSQLDB
3642 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3644 ifneq ($(SYSTEM_BSH),)
3646 define gb_Jar__use_bsh
3647 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3648 endef
3650 else # !SYSTEM_BSH
3652 ifeq ($(ENABLE_JAVA),TRUE)
3653 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3654 bsh \
3656 endif
3658 define gb_Jar__use_bsh
3659 $(call gb_Jar_use_jar,$(1),bsh)
3660 endef
3662 endif # SYSTEM_BSH
3664 endif
3666 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3668 ifneq ($(SYSTEM_RHINO),)
3670 define gb_Jar__use_rhino
3671 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3672 endef
3674 else # !SYSTEM_RHINO
3676 ifeq ($(ENABLE_JAVA),TRUE)
3677 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3678 js \
3680 endif
3682 define gb_Jar__use_rhino
3683 $(call gb_Jar_use_jar,$(1),js)
3684 endef
3686 endif # SYSTEM_RHINO
3688 endif
3690 ifneq ($(SYSTEM_APACHE_COMMONS),)
3692 define gb_Jar__use_commons-logging
3693 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3694 endef
3695 gb_ExternalProject__use_commons-logging :=
3697 else # !SYSTEM_APACHE_COMMONS
3699 ifeq ($(ENABLE_JAVA),TRUE)
3700 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3701 commons-logging-$(COMMONS_LOGGING_VERSION) \
3703 endif
3705 define gb_Jar__use_commons-logging
3706 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3707 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3708 endef
3709 define gb_ExternalProject__use_commons-logging
3710 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3711 endef
3713 endif # SYSTEM_APACHE_COMMONS
3716 ifneq ($(SYSTEM_JFREEREPORT),)
3718 define gb_Jar__use_flow-engine
3719 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3720 endef
3722 define gb_Jar__use_flute
3723 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3724 endef
3726 define gb_Jar__use_libbase
3727 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3728 endef
3730 define gb_Jar__use_libfonts
3731 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3732 endef
3734 define gb_Jar__use_libformula
3735 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3736 endef
3738 define gb_Jar__use_liblayout
3739 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3740 endef
3742 define gb_Jar__use_libloader
3743 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3744 endef
3746 define gb_Jar__use_librepository
3747 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3748 endef
3750 define gb_Jar__use_libserializer
3751 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3752 endef
3754 define gb_Jar__use_libxml
3755 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3756 endef
3758 define gb_Jar__use_sac
3759 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3760 endef
3762 else # !SYSTEM_JFREEREPORT
3764 ifeq ($(ENABLE_JAVA),TRUE)
3765 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3766 flow-engine \
3767 flute-1.1.6 \
3768 libbase-1.1.6 \
3769 libfonts-1.1.6 \
3770 libformula-1.1.7 \
3771 liblayout \
3772 libloader-1.1.6 \
3773 librepository-1.1.6 \
3774 libserializer-1.1.6 \
3775 libxml-1.1.7 \
3776 sac \
3778 endif
3780 define gb_Jar__use_flow-engine
3781 $(call gb_Jar_use_jar,$(1),flow-engine)
3782 endef
3784 define gb_Jar__use_flute
3785 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3786 endef
3788 define gb_Jar__use_libbase
3789 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3790 endef
3792 define gb_Jar__use_libfonts
3793 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3794 endef
3796 define gb_Jar__use_libformula
3797 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3798 endef
3800 define gb_Jar__use_liblayout
3801 $(call gb_Jar_use_jar,$(1),liblayout)
3802 endef
3804 define gb_Jar__use_libloader
3805 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3806 endef
3808 define gb_Jar__use_librepository
3809 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3810 endef
3812 define gb_Jar__use_libserializer
3813 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3814 endef
3816 define gb_Jar__use_libxml
3817 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3818 endef
3820 define gb_Jar__use_sac
3821 $(call gb_Jar_use_jar,$(1),sac)
3822 endef
3824 endif # SYSTEM_JFREEREPORT
3827 # Executables
3829 # FIXME: the library target should be for build too
3830 define gb_Executable__register_bestreversemap
3831 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3832 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3834 endef
3836 # TODO depending on the whole URE might be overkill, but I do not have a
3837 # Windows machine to debug it...
3838 # FIXME: the library target should be for build too
3839 define gb_Executable__register_climaker
3840 $(call gb_Executable_add_runtime_dependencies,climaker,\
3841 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3842 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3843 $(call gb_UnoApi_get_target,udkapi) \
3844 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3846 endef
3848 define gb_Executable__register_cppumaker
3849 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3850 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3852 endef
3854 # This is used to determine what we need for 'build' platform.
3855 # FIXME: the library target should be for build too
3856 define gb_Executable__register_gengal
3857 $(call gb_Executable_add_runtime_dependencies,gengal,\
3858 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3859 $(call gb_Package_get_target_for_build,postprocess_images) \
3860 $(call gb_Package_get_target_for_build,postprocess_registry) \
3861 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3862 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3863 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3864 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3865 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3866 $(call gb_UnoApi_get_target,offapi) \
3867 $(call gb_UnoApi_get_target,udkapi) \
3869 endef
3871 ifeq ($(SYSTEM_ICU),)
3873 define gb_Executable__register_gendict
3874 $(call gb_Executable_add_runtime_dependencies,gendict,\
3875 $(call gb_Package_get_target_for_build,icu) \
3876 $(call gb_Package_get_target_for_build,icu_ure) \
3878 endef
3880 endif
3882 define gb_Executable__register_idlc
3883 $(call gb_Executable_add_runtime_dependencies,idlc,\
3884 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3886 endef
3888 define gb_Executable__register_localize
3889 $(call gb_Executable_add_runtime_dependencies,localize,\
3890 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3891 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3894 endef
3896 # FIXME ure/services.rdb needs cleanup
3897 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3898 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3899 # FIXME: the library target should be for build too
3900 define gb_Executable__register_saxparser
3901 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3902 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3903 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3904 $(call gb_Rdb_get_target_for_build,saxparser) \
3905 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3906 $(call gb_UnoApi_get_target,udkapi) \
3908 endef
3910 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3911 # required due to the settings for URE_SERVICES and URE_TYPES in
3912 # cppuhelper/source/unorc
3913 # FIXME: the library target should be for build too
3914 define gb_Executable__register_uno
3915 $(call gb_Executable_add_runtime_dependencies,uno,\
3916 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3917 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3918 $(call gb_UnoApi_get_target,udkapi) \
3920 endef
3923 # External executables
3925 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3927 gb_ExternalExecutable__register_xmllint :=
3929 else # ! SYSTEM_LIBXML_FOR_BUILD
3931 define gb_ExternalExecutable__register_xmllint
3932 $(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)
3933 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3934 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3935 $(call gb_Package_get_target,libxml2) \
3938 endef
3940 endif # SYSTEM_LIBXML_FOR_BUILD
3942 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3944 gb_ExternalExecutable__register_xsltproc :=
3946 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3948 define gb_ExternalExecutable__register_xsltproc
3949 $(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)
3950 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3951 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3952 $(call gb_Package_get_target,libxml2) \
3953 $(call gb_Package_get_target,libxslt) \
3956 endef
3958 endif # SYSTEM_LIBXSLT_FOR_BUILD
3960 ifneq (,$(SYSTEM_UCPP))
3962 gb_ExternalExecutable__register_ucpp :=
3964 else # ! SYSTEM_UCPP
3966 define gb_ExternalExecutable__register_ucpp
3967 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3969 endef
3971 endif # SYSTEM_UCPP
3973 ifeq (,$(PYTHON_FOR_BUILD))
3975 define gb_ExternalExecutable__register_python
3976 ifeq ($(OS),MACOSX)
3978 # use set_external, to avoid having the command added as prerequisite for the
3979 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3980 # matching rule to build that specific file)
3981 $(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))
3982 # the Zip ensures that internal python has been built (cannot use the Package
3983 # target, as that is not used on Mac)
3984 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3986 else
3988 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3989 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3990 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3992 endif
3994 endef
3996 else
3998 define gb_ExternalExecutable__register_python
3999 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4000 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4002 endef
4004 endif # PYTHON_FOR_BUILD
4006 ifneq ($(SYSTEM_GENBRK),)
4008 define gb_ExternalExecutable__register_genbrk
4009 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4011 endef
4013 else # ! SYSTEM_GENBRK
4015 define gb_ExternalExecutable__register_genbrk
4016 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4017 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4018 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4019 $(call gb_Package_get_target_for_build,icu) \
4020 $(call gb_Package_get_target_for_build,icu_ure) \
4023 endef
4025 endif
4027 ifneq ($(SYSTEM_GENCCODE),)
4029 define gb_ExternalExecutable__register_genccode
4030 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4032 endef
4034 else # ! SYSTEM_GENCCODE
4036 define gb_ExternalExecutable__register_genccode
4037 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4038 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4039 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4040 $(call gb_Package_get_target_for_build,icu) \
4041 $(call gb_Package_get_target_for_build,icu_ure) \
4044 endef
4046 endif
4048 ifneq ($(SYSTEM_GENCMN),)
4050 define gb_ExternalExecutable__register_gencmn
4051 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4053 endef
4055 else # ! SYSTEM_GENCMN
4057 define gb_ExternalExecutable__register_gencmn
4058 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4059 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4060 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4061 $(call gb_Package_get_target_for_build,icu) \
4062 $(call gb_Package_get_target_for_build,icu_ure) \
4065 endef
4067 endif
4069 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4071 $(eval $(call gb_Helper_register_jars,OXT,\
4072 owncloud-android-library \
4075 define gb_Jar__use_owncloud_android_lib
4076 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4077 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4078 endef
4079 define gb_ExternalProject__use_owncloud_android_lib
4080 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4081 endef
4083 endif
4085 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4086 ifneq ($(SYSTEM_BZIP2),)
4088 define gb_LinkTarget__use_bzip2
4089 $(call gb_LinkTarget_set_include,$(1),\
4090 $(BZIP2_CFLAGS) \
4091 $$(INCLUDE) \
4093 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4095 endef
4097 gb_ExternalProject__use_bzip2 :=
4099 else # !SYSTEM_BZIP2
4101 define gb_LinkTarget__use_bzip2
4102 $(call gb_LinkTarget_set_include,$(1),\
4103 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4104 $$(INCLUDE) \
4107 ifeq ($(COM),MSC)
4108 $(call gb_LinkTarget_add_libs,$(1),\
4109 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4111 else
4112 $(call gb_LinkTarget_add_libs,$(1),\
4113 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4115 endif
4117 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4118 endef
4120 define gb_ExternalProject__use_bzip2
4121 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4122 endef
4124 endif
4125 endif
4127 define gb_LinkTarget__use_clew
4128 $(call gb_LinkTarget_set_include,$(1), \
4129 -I$(SRCDIR)/external/clew/source/include \
4130 $$(INCLUDE) \
4132 $(call gb_LinkTarget_use_libraries,$(1),clew)
4133 endef
4135 ifneq ($(ENABLE_PDFIUM),)
4136 define gb_LinkTarget__use_pdfium
4137 $(call gb_LinkTarget_set_include,$(1),\
4138 -I$(call gb_UnpackedTarball_get_dir,pdfium) \
4139 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4140 -DCOMPONENT_BUILD \
4141 $$(INCLUDE) \
4143 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4144 endef
4145 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4146 pdfium \
4148 endif
4150 ifneq ($(SYSTEM_QRCODEGEN),)
4152 define gb_LinkTarget__use_qrcodegen
4153 $(call gb_LinkTarget_set_include,$(1),\
4154 -DSYSTEM_QRCODEGEN \
4155 $$(INCLUDE) \
4156 $(QRCODEGEN_CFLAGS) \
4158 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4160 endef
4162 gb_ExternalProject__use_qrcodegen :=
4164 else # !SYSTEM_QRCODEGEN
4166 ifneq ($(ENABLE_QRCODEGEN),)
4168 define gb_LinkTarget__use_qrcodegen
4169 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4170 $(call gb_LinkTarget_set_include,$(1),\
4171 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4172 $$(INCLUDE) \
4174 $(call gb_LinkTarget_use_static_libraries,$(1),\
4175 qrcodegen \
4178 endef
4180 define gb_ExternalProject__use_qrcodegen
4181 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4183 endef
4185 else # !ENABLE_QRCODEGEN
4187 define gb_LinkTarget__use_qrcodegen
4188 endef
4190 endif # ENABLE_QRCODEGEN
4192 endif # SYSTEM_QRCODEGEN
4194 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4195 $(if $(UCRT_REDISTDIR),ucrt) \
4198 # vim: set noet sw=4 ts=4: