tdf#132752: docx import: improvements for first line indent in lists
[LibreOffice.git] / RepositoryExternal.mk
blob224fd7526bec35e6b2750cd33edad8c2b4bc6072
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 define gb_LinkTarget__use_glm_headers
94 $(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
98 endef
100 gb_ExternalProject__use_glm_headers :=
102 else
104 define gb_LinkTarget__use_glm_headers
105 $(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
108 $(call gb_LinkTarget_use_unpacked,$(1),glm)
109 $(call gb_LinkTarget_set_include,$(1),\
110 $(GLM_CFLAGS) \
111 $$(INCLUDE) \
114 endef
116 define gb_ExternalProject__use_glm_headers
117 $(call gb_ExternalProject_use_unpacked,$(1),glm)
119 endef
121 endif
123 ifneq ($(ENABLE_SKIA),)
124 define gb_LinkTarget__use_skia
125 $(call gb_LinkTarget_set_include,$(1),\
126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
133 -I$(call gb_UnpackedTarball_get_dir,skia) \
134 -I$(SRCDIR)/external/skia/inc/ \
135 $$(INCLUDE) \
137 $(call gb_LinkTarget_use_libraries,$(1),skia)
138 $(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
142 endef
143 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
144 skia \
146 endif
148 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
150 define gb_LinkTarget__use_sane_headers
151 $(call gb_LinkTarget_set_include,$(1),\
152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
158 ifeq ($(OS),WNT)
159 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160 endif
162 endef
164 else
166 gb_LinkTarget__use_sane_headers :=
168 endif
170 ifneq ($(SYSTEM_BLUEZ),)
172 gb_LinkTarget__use_bluez_bluetooth_headers :=
174 else # !SYSTEM_BLUEZ
176 define gb_LinkTarget__use_bluez_bluetooth_headers
177 $(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
182 endef
184 endif # SYSTEM_BLUEZ
186 # External libraries
188 ifneq ($(SYSTEM_CPPUNIT),)
190 define gb_LinkTarget__use_cppunit
191 $(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
196 $(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
200 endef
202 else # !SYSTEM_CPPUNIT
204 define gb_LinkTarget__use_cppunit
205 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
209 $$(INCLUDE) \
212 ifeq ($(COM),MSC)
213 $(call gb_LinkTarget_add_libs,$(1),\
214 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
216 else
217 $(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
220 endif
222 endef
224 endif # SYSTEM_CPPUNIT
226 ifneq ($(SYSTEM_EPOXY),)
228 define gb_LinkTarget__use_epoxy
229 $(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
231 $(EPOXY_CFLAGS) \
233 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
235 endef
237 gb_ExternalProject__use_epoxy :=
239 else # !SYSTEM_EPOXY
241 define gb_LinkTarget__use_epoxy
242 $(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
247 $(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
251 endef
253 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
257 define gb_ExternalProject__use_epoxy
258 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
260 endef
262 endif # SYSTEM_EPOXY
264 define gb_LinkTarget__use_iconv
265 ifeq ($(COM),MSC)
266 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267 else
268 $(call gb_LinkTarget_add_libs,$(1),-liconv)
269 endif
270 endef
272 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
274 define gb_LinkTarget__use_mariadb-connector-c
275 $(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
279 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
281 endef
282 gb_ExternalProject__use_mariadb-connector-c :=
284 else # !SYSTEM_MARIADB_CONNECTOR_C
286 define gb_LinkTarget__use_mariadb-connector-c
287 $(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
291 $(call gb_LinkTarget_use_static_libraries,$(1),\
292 mariadb-connector-c \
294 ifeq ($(OS),MACOSX)
295 $(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
298 endif
299 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
307 endef
308 define gb_ExternalProject__use_mariadb-connector-c
309 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
311 endef
313 endif # SYSTEM_MARIADB_CONNECTOR_C
316 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DSYSTEM_MARIADB \
324 $(call gb_LinkTarget_add_libs,$(1),\
325 $(MARIADB_LIBS) \
328 $(call gb_LinkTarget_set_include,$(1),\
329 $(MARIADB_CFLAGS) \
330 $$(INCLUDE) \
332 endef
334 else
336 define gb_LinkTarget__use_mysql
338 $(call gb_LinkTarget_set_include,$(1),\
339 $$(INCLUDE) \
342 endef
344 endif
346 ifneq ($(SYSTEM_ZLIB),)
348 define gb_LinkTarget__use_zlib
349 $(call gb_LinkTarget_add_defs,$(1),\
350 -DSYSTEM_ZLIB \
352 $(call gb_LinkTarget_add_libs,$(1),-lz)
354 endef
356 # nothing on system
357 define gb_LinkTarget__use_zlib_x64
359 endef
361 gb_ExternalProject__use_zlib :=
363 else # !SYSTEM_ZLIB
365 define gb_LinkTarget__use_zlib_multiarch
366 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
368 $(call gb_LinkTarget_set_include,$(1),\
369 $(ZLIB_CFLAGS) \
370 $$(INCLUDE) \
373 $(call gb_LinkTarget_use_static_libraries,$(1),\
374 $(2) \
377 endef
379 define gb_LinkTarget__use_zlib
380 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
382 endef
384 define gb_LinkTarget__use_zlib_x64
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
387 endef
389 define gb_ExternalProject__use_zlib
390 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
392 endef
394 endif # SYSTEM_ZLIB
397 ifneq ($(SYSTEM_LIBJPEG),)
399 define gb_LinkTarget__use_libjpeg
400 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
401 $(call gb_LinkTarget_set_ldflags,$(1),\
402 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
405 endef
407 gb_ExternalProject__use_libjpeg :=
409 else
411 define gb_LinkTarget__use_libjpeg
412 $(call gb_LinkTarget_set_include,$(1),\
413 $(LIBJPEG_CFLAGS) \
414 $$(INCLUDE) \
416 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
417 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
419 endef
421 define gb_ExternalProject__use_libjpeg
422 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
424 endef
426 endif # SYSTEM_LIBJPEG
428 ifneq ($(SYSTEM_MYTHES),)
430 define gb_LinkTarget__use_mythes
431 $(call gb_LinkTarget_set_include,$(1),\
432 $$(INCLUDE) \
433 $(MYTHES_CFLAGS) \
435 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
437 endef
439 else # !SYSTEM_MYTHES
441 define gb_LinkTarget__use_mythes
442 $(call gb_LinkTarget_set_include,$(1),\
443 -I$(call gb_UnpackedTarball_get_dir,mythes) \
444 $$(INCLUDE) \
447 ifeq ($(COM),MSC)
448 $(call gb_LinkTarget_use_static_libraries,$(1),\
449 mythes \
451 else
452 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
453 $(call gb_LinkTarget_use_external_project,$(1),mythes)
454 endif
456 endef
458 endif # SYSTEM_MYTHES
461 ifneq ($(SYSTEM_EXPAT),)
463 define gb_LinkTarget__use_expat_impl
464 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
466 $(call gb_LinkTarget_add_defs,$(1),\
467 -DSYSTEM_EXPAT \
470 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
472 endef
474 gb_ExternalProject__use_expat :=
476 else # !SYSTEM_EXPAT
478 define gb_LinkTarget__use_expat_impl
479 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
481 $(call gb_LinkTarget_set_include,$(1),\
482 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
483 $$(INCLUDE) \
486 $(call gb_LinkTarget_use_static_libraries,$(1),\
487 $(2) \
490 endef
492 define gb_ExternalProject__use_expat
493 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
495 endef
497 endif # SYSTEM_EXPAT
499 define gb_LinkTarget__use_expat
500 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
502 endef
504 define gb_LinkTarget__use_expat_x64
505 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
507 endef
509 ifneq ($(SYSTEM_HYPH),)
511 define gb_LinkTarget__use_hyphen
512 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
514 endef
516 else # !SYSTEM_HYPH
518 define gb_LinkTarget__use_hyphen
519 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
520 $(call gb_LinkTarget_set_include,$(1),\
521 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
522 $$(INCLUDE) \
525 ifeq ($(COM),MSC)
526 $(call gb_LinkTarget_use_static_libraries,$(1),\
527 hyphen \
529 else
530 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
531 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
532 endif
534 endef
536 endif # SYSTEM_HYPH
538 ifneq ($(SYSTEM_HUNSPELL),)
540 define gb_LinkTarget__use_hunspell
541 $(call gb_LinkTarget_set_include,$(1),\
542 $$(INCLUDE) \
543 $(HUNSPELL_CFLAGS) \
545 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
547 endef
549 gb_ExternalProject__use_hunspell :=
551 else # !SYSTEM_HUNSPELL
553 define gb_LinkTarget__use_hunspell
554 $(call gb_LinkTarget_add_defs,$(1),\
555 -DHUNSPELL_STATIC \
557 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
558 $(call gb_LinkTarget_set_include,$(1),\
559 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
560 $$(INCLUDE) \
563 ifeq ($(COM),MSC)
564 $(call gb_LinkTarget_use_static_libraries,$(1),\
565 hunspell \
567 else
568 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
569 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
570 endif
572 endef
574 define gb_ExternalProject__use_hunspell
575 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
577 endef
579 endif # SYSTEM_HUNSPELL
582 ifneq ($(SYSTEM_BOOST),)
584 define gb_LinkTarget__use_boost_lib
585 $(call gb_LinkTarget_set_include,$(1),\
586 $$(INCLUDE) \
587 $(BOOST_CPPFLAGS) \
590 $(call gb_LinkTarget_add_ldflags,$(1),\
591 $(BOOST_LDFLAGS) \
594 $(call gb_LinkTarget_add_libs,$(1),$(2))
596 endef
598 define gb_LinkTarget__use_boost_locale
599 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
601 endef
603 define gb_LinkTarget__use_boost_date_time
604 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
606 endef
608 define gb_LinkTarget__use_boost_filesystem
609 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
611 endef
613 gb_ExternalProject__use_boost_filesystem :=
615 define gb_LinkTarget__use_boost_iostreams
616 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
618 endef
620 gb_ExternalProject__use_boost_iostreams :=
622 define gb_LinkTarget__use_boost_system
623 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
625 endef
627 gb_ExternalProject__use_boost_system :=
629 define gb_LinkTarget__use_boost_headers
630 $(call gb_LinkTarget_set_include,$(1),\
631 $$(INCLUDE) \
632 $(BOOST_CPPFLAGS) \
635 endef
637 gb_ExternalProject__use_boost_headers:=
639 else # !SYSTEM_BOOST
641 define gb_LinkTarget__use_boost_lib
642 $(call gb_LinkTarget_add_defs,$(1),\
643 -DBOOST_ALL_NO_LIB \
646 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
648 endef
650 define gb_LinkTarget__use_boost_locale
651 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
652 $(call gb_LinkTarget_add_libs,$(1),\
653 $(if $(filter $(OS),MACOSX),-liconv) \
656 endef
658 define gb_LinkTarget__use_boost_date_time
659 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
661 endef
663 define gb_LinkTarget__use_boost_filesystem
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
666 endef
668 define gb_ExternalProject__use_boost_filesystem
669 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
670 endef
672 define gb_LinkTarget__use_boost_iostreams
673 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
675 endef
677 define gb_ExternalProject__use_boost_iostreams
678 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
679 endef
681 define gb_LinkTarget__use_boost_system
682 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
684 endef
686 define gb_ExternalProject__use_boost_system
687 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
688 endef
690 define gb_LinkTarget__use_boost_headers
691 $(call gb_LinkTarget_use_unpacked,$(1),boost)
692 $(call gb_LinkTarget_set_include,$(1),\
693 $(BOOST_CPPFLAGS) \
694 $$(INCLUDE) \
697 endef
699 define gb_ExternalProject__use_boost_headers
700 $(call gb_ExternalProject_use_unpacked,$(1),boost)
702 endef
704 endif # SYSTEM_BOOST
707 ifneq ($(SYSTEM_LIBCMIS),)
709 define gb_LinkTarget__use_libcmis
710 $(call gb_LinkTarget_set_include,$(1),\
711 $$(INCLUDE) \
712 $(LIBCMIS_CFLAGS) \
714 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
716 endef
718 else # !SYSTEM_LIBCMIS
720 define gb_LinkTarget__use_libcmis
721 $(call gb_LinkTarget_set_include,$(1),\
722 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
723 $$(INCLUDE) \
725 $(call gb_LinkTarget_use_static_libraries,$(1),\
726 libcmis \
729 endef
731 endif # SYSTEM_LIBCMIS
733 ifeq ($(ENABLE_JAVA),TRUE)
735 define gb_LinkTarget__use_jawt
736 $(call gb_LinkTarget_add_libs,$(1),\
737 $(JAWTLIB) \
740 endef
742 else # !ENABLE_JAVA
744 gb_LinkTarget__use_jawt :=
746 endif # ENABLE_JAVA
748 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
750 define gb_LinkTarget__use_libatomic_ops
751 $(call gb_LinkTarget_set_include,$(1),\
752 $$(INCLUDE) \
753 $(LIBATOMIC_OPS_CFLAGS) \
755 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
757 endef
758 gb_ExternalProject__use_libatomic_ops :=
760 else # !SYSTEM_LIBATOMIC_OPS
762 define gb_LinkTarget__use_libatomic_ops
763 $(call gb_LinkTarget_set_include,$(1),\
764 $(LIBATOMIC_OPS_CFLAGS) \
765 $$(INCLUDE) \
766 $(LIBATOMIC_OPS_CFLAGS) \
768 $(call gb_LinkTarget_use_external_project,$(1),\
769 libatomic_ops \
772 $(call gb_LinkTarget_add_libs,$(1),\
773 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
776 endef
778 define gb_ExternalProject__use_libatomic_ops
779 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
781 endef
783 endif # SYSTEM_LIBATOMIC_OPS
786 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
788 define gb_LinkTarget__use_libexttextcat
789 $(call gb_LinkTarget_set_include,$(1),\
790 $$(INCLUDE) \
791 $(LIBEXTTEXTCAT_CFLAGS) \
793 $(call gb_LinkTarget_add_defs,$(1),\
794 -DSYSTEM_LIBEXTTEXTCAT \
796 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
798 endef
800 else # !SYSTEM_LIBEXTTEXTCAT
802 define gb_LinkTarget__use_libexttextcat
803 $(call gb_LinkTarget_set_include,$(1),\
804 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
805 $$(INCLUDE) \
808 ifeq ($(COM),MSC)
809 $(call gb_LinkTarget_use_static_libraries,$(1),\
810 libexttextcat \
812 else
813 $(call gb_LinkTarget_add_libs,$(1),\
814 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
816 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
817 endif
820 endef
822 endif # SYSTEM_LIBEXTTEXTCAT
825 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
827 define gb_LinkTarget__use_libnumbertext
828 $(call gb_LinkTarget_set_include,$(1),\
829 $$(INCLUDE) \
830 $(LIBNUMBERTEXT_CFLAGS) \
832 $(call gb_LinkTarget_add_defs,$(1),\
833 -DSYSTEM_LIBNUMBERTEXT \
835 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
837 endef
839 else # !SYSTEM_LIBNUMBERTEXT
841 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
842 libnumbertext_numbertext \
845 define gb_LinkTarget__use_libnumbertext
846 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
847 $(call gb_LinkTarget_set_include,$(1),\
848 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
849 $$(INCLUDE) \
852 ifeq ($(COM),MSC)
853 $(call gb_LinkTarget_use_static_libraries,$(1),\
854 libnumbertext \
856 else
858 $(call gb_LinkTarget_add_libs,$(1),\
859 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
861 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
863 endif
865 endef
867 endif # SYSTEM_LIBNUMBERTEXT
870 ifneq ($(SYSTEM_LIBXML),)
872 define gb_LinkTarget__use_libxml2
873 $(call gb_LinkTarget_add_defs,$(1),\
874 -DSYSTEM_LIBXML \
876 $(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 $(LIBXML_CFLAGS) \
880 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
882 endef
883 gb_ExternalProject__use_libxml2:=
885 else # !SYSTEM_LIBXML
887 $(eval $(call gb_Helper_register_packages_for_install,ure,\
888 libxml2 \
891 define gb_LinkTarget__use_libxml2
892 $(call gb_LinkTarget_use_package,$(1),libxml2)
893 $(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
895 $(LIBXML_CFLAGS) \
898 $(call gb_LinkTarget_add_libs,$(1),\
899 $(LIBXML_LIBS) \
902 ifeq ($(COM),MSC)
903 $(call gb_LinkTarget_use_external,$(1),icu_headers)
904 endif
906 endef
907 define gb_ExternalProject__use_libxml2
908 $(call gb_ExternalProject_use_package,$(1),libxml2)
910 ifeq ($(COM),MSC)
911 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
912 endif
914 endef
916 endif # SYSTEM_LIBXML
919 ifneq ($(SYSTEM_LIBXSLT),)
921 define gb_LinkTarget__use_libxslt
922 $(call gb_LinkTarget_set_include,$(1),\
923 $$(INCLUDE) \
924 $(LIBXSLT_CFLAGS) \
926 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
928 endef
930 define gb_LinkTarget__use_libexslt
931 $(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBEXSLT_CFLAGS) \
936 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
938 endef
940 else # !SYSTEM_LIBXSLT
942 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
943 libxslt \
946 define gb_LinkTarget__use_libxslt
947 $(call gb_LinkTarget_use_package,$(1),libxslt)
948 $(call gb_LinkTarget_set_include,$(1),\
949 $$(INCLUDE) \
950 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
953 ifeq ($(COM),MSC)
954 $(call gb_LinkTarget_add_libs,$(1),\
955 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
957 else
958 $(call gb_LinkTarget_add_libs,$(1),\
959 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
961 endif
963 endef
965 define gb_LinkTarget__use_libexslt
966 $(call gb_LinkTarget_use_package,$(1),libxslt)
967 $(call gb_LinkTarget_set_include,$(1),\
968 $$(INCLUDE) \
969 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
972 ifeq ($(COM),MSC)
973 $(call gb_LinkTarget_add_libs,$(1),\
974 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
976 else
977 $(call gb_LinkTarget_add_libs,$(1),\
978 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
980 endif
982 endef
984 endif # SYSTEM_LIBXSLT
987 ifneq ($(SYSTEM_XMLSEC),)
989 define gb_LinkTarget__use_xmlsec
990 $(call gb_LinkTarget_add_defs,$(1),\
991 -DSYSTEM_XMLSEC \
993 $(call gb_LinkTarget_set_include,$(1),\
994 $$(INCLUDE) \
995 $(XMLSEC_CFLAGS) \
997 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
999 endef
1001 gb_ExternalProject__use_xmlsec:=
1003 else # !SYSTEM_XMLSEC
1005 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1006 xmlsec \
1009 define gb_LinkTarget__use_xmlsec
1011 endef
1013 endif # SYSTEM_XMLSEC
1015 ifneq ($(SYSTEM_LIBLANGTAG),)
1017 define gb_LinkTarget__use_liblangtag
1018 $(call gb_LinkTarget_set_include,$(1),\
1019 $$(INCLUDE) \
1020 $(LIBLANGTAG_CFLAGS) \
1023 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1025 endef
1027 gb_ExternalProject__use_liblangtag :=
1029 else # !SYSTEM_LIBLANGTAG
1031 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1032 liblangtag_data \
1035 ifeq ($(COM),MSC)
1037 define gb_LinkTarget__use_liblangtag
1038 $(call gb_LinkTarget_set_include,$(1),\
1039 $(LIBLANGTAG_CFLAGS) \
1040 $$(INCLUDE) \
1042 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1043 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1045 endef
1047 else
1049 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1050 liblangtag \
1053 define gb_LinkTarget__use_liblangtag
1054 $(call gb_LinkTarget_set_include,$(1),\
1055 $(LIBLANGTAG_CFLAGS) \
1056 $$(INCLUDE) \
1058 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1059 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1061 endef
1063 endif # MSC
1065 define gb_ExternalProject__use_liblangtag
1066 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1068 endef
1070 endif # SYSTEM_LIBLANGTAG
1073 gb_ExternalProject__use_apr :=
1075 ifeq ($(WITH_WEBDAV),serf)
1077 define gb_LinkTarget__use_apr
1078 $(call gb_LinkTarget_set_include,$(1),\
1079 $$(INCLUDE) \
1080 $(APR_CFLAGS) \
1082 $(call gb_LinkTarget_add_libs,$(1),\
1083 $(APR_LIBS) \
1084 $(if $(filter $(OS),LINUX),-lpthread) \
1085 $(if $(filter $(OS),MACOSX),-liconv) \
1088 ifeq ($(SYSTEM_APR),)
1089 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1090 mswsock \
1091 rpcrt4 \
1092 shell32 \
1094 $(call gb_LinkTarget_add_defs,$(1),\
1095 -DAPR_DECLARE_STATIC \
1096 -DAPU_DECLARE_STATIC \
1098 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1099 endif
1101 endef
1103 define gb_ExternalProject__use_apr
1104 ifeq ($(SYSTEM_APR),)
1105 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1106 endif
1108 endef
1110 ifneq ($(SYSTEM_SERF),)
1112 define gb_LinkTarget__use_serf
1113 $(call gb_LinkTarget_add_defs,$(1),\
1114 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1117 $(call gb_LinkTarget_set_include,$(1),\
1118 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1119 $$(INCLUDE) \
1122 $(call gb_LinkTarget_add_libs,$(1),\
1123 $(SERF_LIBS) \
1126 endef
1128 else # !SYSTEM_SERF
1130 define gb_LinkTarget__use_serf
1131 $(call gb_LinkTarget_set_include,$(1),\
1132 -I$(call gb_UnpackedTarball_get_dir,serf) \
1133 $$(INCLUDE) \
1136 $(call gb_LinkTarget_use_static_libraries,$(1),\
1137 serf \
1140 endef
1142 endif # SYSTEM_SERF
1144 else ifeq ($(WITH_WEBDAV),neon)
1146 ifneq ($(SYSTEM_NEON),)
1148 define gb_LinkTarget__use_neon
1149 $(call gb_LinkTarget_add_defs,$(1),\
1150 -DNEON_VERSION=0x$(NEON_VERSION) \
1151 -DSYSTEM_NEON \
1153 $(call gb_LinkTarget_set_include,$(1),\
1154 $$(INCLUDE) \
1155 $(NEON_CFLAGS) \
1158 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1160 endef
1162 else # !SYSTEM_NEON
1164 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1165 neon \
1168 define gb_LinkTarget__use_neon
1169 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1170 $(call gb_LinkTarget_set_include,$(1),\
1171 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1172 $$(INCLUDE) \
1174 $(call gb_LinkTarget_use_libraries,$(1),\
1175 neon \
1178 endef
1180 endif # SYSTEM_NEON
1182 endif # WITH_WEBDAV
1184 ifneq ($(SYSTEM_REDLAND),)
1186 define gb_LinkTarget__use_librdf
1187 $(call gb_LinkTarget_add_defs,$(1),\
1188 -DSYSTEM_REDLAND \
1190 $(call gb_LinkTarget_set_include,$(1),\
1191 $$(INCLUDE) \
1192 $(REDLAND_CFLAGS) \
1194 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1196 endef
1198 gb_LinkTarget__use_redland_headers:=
1200 gb_LinkTarget__use_raptor_headers:=
1202 gb_LinkTarget__use_rasqal_headers:=
1204 else # !SYSTEM_REDLAND
1206 define gb_LinkTarget__use_redland_headers
1207 $(call gb_LinkTarget_set_include,$(1),\
1208 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1209 $$(INCLUDE) \
1212 endef
1214 define gb_LinkTarget__use_raptor_headers
1215 $(call gb_LinkTarget_set_include,$(1),\
1216 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1217 $$(INCLUDE) \
1220 endef
1222 define gb_LinkTarget__use_rasqal_headers
1223 $(call gb_LinkTarget_set_include,$(1),\
1224 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1225 $$(INCLUDE) \
1228 endef
1230 ifneq ($(OS),ANDROID)
1232 ifeq ($(COM),MSC)
1233 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1234 raptor2 \
1235 rasqal \
1236 rdf \
1238 else
1239 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1240 raptor \
1241 rasqal \
1242 redland \
1244 endif
1246 define gb_LinkTarget__use_librdf
1247 ifeq ($(COM),MSC)
1248 $(call gb_LinkTarget_use_libraries,$(1),\
1249 raptor2 \
1250 rdf \
1252 else
1253 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1255 $(call gb_LinkTarget_add_libs,$(1),\
1256 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1257 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1258 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1260 endif
1262 endef
1264 else # ANDROID
1266 define gb_LinkTarget__use_librdf
1267 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1269 endef
1271 endif # ANDROID
1273 endif # SYSTEM_REDLAND
1276 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1278 ifneq ($(SYSTEM_CAIRO),)
1280 define gb_LinkTarget__use_cairo
1281 $(call gb_LinkTarget_set_include,$(1),\
1282 $$(INCLUDE) \
1283 $(CAIRO_CFLAGS) \
1285 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1286 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1288 endef
1290 else # !SYSTEM_CAIRO
1292 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1293 cairo \
1294 $(if $(filter $(OS),WNT),,pixman) \
1297 define gb_LinkTarget__use_cairo
1298 $(call gb_LinkTarget_use_package,$(1),cairo)
1299 $(call gb_LinkTarget_use_package,$(1),pixman)
1300 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1301 $(call gb_LinkTarget_set_include,$(1),\
1302 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1303 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1304 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1305 $$(INCLUDE) \
1307 $(call gb_LinkTarget_add_libs,$(1),\
1308 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1309 $(if $(filter-out MACOSX WNT,$(OS)), \
1310 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1314 endef
1316 endif # SYSTEM_CAIRO
1318 else ifeq ($(OS),ANDROID)
1320 define gb_LinkTarget__use_cairo
1321 $(call gb_LinkTarget_use_package,$(1),cairo)
1322 $(call gb_LinkTarget_use_package,$(1),pixman)
1323 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1324 $(call gb_LinkTarget_set_include,$(1),\
1325 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1326 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1327 $$(INCLUDE) \
1329 $(call gb_LinkTarget_add_libs,$(1),\
1330 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1331 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1334 endef
1336 endif # CAIRO
1338 ifneq ($(SYSTEM_FREETYPE),)
1340 define gb_LinkTarget__use_freetype_headers
1341 $(call gb_LinkTarget_set_include,$(1),\
1342 $$(INCLUDE) \
1343 $(FREETYPE_CFLAGS) \
1346 endef
1348 gb_ExternalProject__use_freetype :=
1350 else
1352 define gb_LinkTarget__use_freetype_headers
1353 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1354 $(call gb_LinkTarget_set_include,$(1),\
1355 $(FREETYPE_CFLAGS) \
1356 $$(INCLUDE) \
1359 endef
1361 define gb_ExternalProject__use_freetype
1362 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1364 endef
1366 endif # SYSTEM_FREETYPE
1368 define gb_LinkTarget__use_freetype
1369 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1370 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1372 endef
1374 ifneq ($(SYSTEM_FONTCONFIG),)
1376 define gb_LinkTarget__use_fontconfig
1377 $(call gb_LinkTarget_set_include,$(1),\
1378 $$(INCLUDE) \
1379 $(FONTCONFIG_CFLAGS) \
1382 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1384 endef
1386 else
1388 define gb_LinkTarget__use_fontconfig
1389 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1390 $(call gb_LinkTarget_set_include,$(1),\
1391 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1392 $$(INCLUDE) \
1395 $(call gb_LinkTarget_add_libs,$(1),\
1396 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1399 endef
1401 endif # SYSTEM_FONTCONFIG
1403 ifneq ($(SYSTEM_GRAPHITE),)
1405 define gb_LinkTarget__use_graphite
1406 $(call gb_LinkTarget_set_include,$(1),\
1407 $$(INCLUDE) \
1408 $(GRAPHITE_CFLAGS) \
1410 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1412 endef
1414 gb_ExternalProject__use_graphite:=
1416 else # !SYSTEM_GRAPHITE
1418 define gb_LinkTarget__use_graphite
1419 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1420 $(call gb_LinkTarget_set_include,$(1),\
1421 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1422 $$(INCLUDE) \
1424 $(call gb_LinkTarget_use_static_libraries,$(1),\
1425 graphite \
1428 endef
1430 define gb_ExternalProject__use_graphite
1431 $(call gb_ExternalProject_use_static_libraries,$(1),\
1432 graphite \
1435 endef
1436 endif # SYSTEM_GRAPHITE
1438 ifneq ($(SYSTEM_ICU),)
1440 gb_LinkTarget__use_icu_headers:=
1441 gb_ExternalProject__use_icu:=
1443 define gb_LinkTarget__use_icudata
1444 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1446 endef
1447 define gb_LinkTarget__use_icui18n
1448 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1450 endef
1451 define gb_LinkTarget__use_icuuc
1452 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1454 endef
1456 else # !SYSTEM_ICU
1458 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1459 icu_ure \
1462 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1463 icu \
1466 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1467 gb_ICU_suffix:=lo
1468 else
1469 gb_ICU_suffix:=
1470 endif
1472 define gb_LinkTarget__use_icu_headers
1473 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1474 $(call gb_LinkTarget_set_include,$(1),\
1475 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1476 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1477 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1478 $$(INCLUDE) \
1481 endef
1483 define gb_ExternalProject__use_icu
1484 $(call gb_ExternalProject_use_package,$(1),icu)
1486 endef
1488 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1489 define gb_LinkTarget__use_icudata
1490 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1492 ifeq ($(OS),WNT)
1493 $(call gb_LinkTarget_add_libs,$(1),\
1494 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1496 else
1497 $(call gb_LinkTarget_add_libs,$(1),\
1498 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1500 endif
1502 endef
1504 define gb_LinkTarget__use_icui18n
1505 $(call gb_LinkTarget_use_package,$(1),icu)
1507 ifeq ($(OS),WNT)
1508 $(call gb_LinkTarget_add_libs,$(1),\
1509 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1511 else
1512 $(call gb_LinkTarget_add_libs,$(1),\
1513 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1515 endif
1517 endef
1519 define gb_LinkTarget__use_icuuc
1520 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1522 ifeq ($(OS),WNT)
1523 $(call gb_LinkTarget_add_libs,$(1),\
1524 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1526 else
1527 $(call gb_LinkTarget_add_libs,$(1),\
1528 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1530 endif
1532 endef
1534 endif # SYSTEM_ICU
1536 ifneq ($(SYSTEM_HARFBUZZ),)
1538 define gb_LinkTarget__use_harfbuzz
1539 $(call gb_LinkTarget_set_include,$(1),\
1540 $$(INCLUDE) \
1541 $(HARFBUZZ_CFLAGS) \
1543 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1545 endef
1547 gb_ExternalProject__use_harfbuzz :=
1549 else # SYSTEM_HARFBUZZ != TRUE
1551 define gb_LinkTarget__use_harfbuzz
1552 $(call gb_LinkTarget_set_include,$(1),\
1553 $(HARFBUZZ_CFLAGS) \
1554 $$(INCLUDE) \
1556 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1557 $(call gb_LinkTarget_use_external,$(1),icuuc)
1558 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1560 endef
1562 define gb_ExternalProject__use_harfbuzz
1563 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1565 endef
1567 endif # SYSTEM_HARFBUZZ
1569 ifneq ($(ENABLE_OPENSSL),TRUE)
1571 gb_ExternalProject__use_openssl:=
1572 gb_LinkTarget__use_openssl_headers:=
1573 gb_LinkTarget__use_openssl:=
1575 else # ENABLE_OPENSSL
1577 ifneq ($(SYSTEM_OPENSSL),)
1579 gb_LinkTarget__use_openssl_headers:=
1580 gb_ExternalProject__use_openssl:=
1582 define gb_LinkTarget__use_openssl
1583 $(call gb_LinkTarget_set_include,$(1),\
1584 $$(INCLUDE) \
1585 $(OPENSSL_CFLAGS) \
1587 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1589 endef
1591 else # !SYSTEM_OPENSSL
1593 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1594 openssl \
1597 define gb_ExternalProject__use_openssl
1598 $(call gb_ExternalProject_use_package,$(1),openssl)
1600 endef
1602 define gb_LinkTarget__use_openssl_headers
1603 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1604 $(call gb_LinkTarget_set_include,$(1),\
1605 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1606 $$(INCLUDE) \
1609 endef
1611 define gb_LinkTarget__use_openssl
1612 $(call gb_LinkTarget_use_package,$(1),openssl)
1613 ifeq ($(OS),WNT)
1614 $(call gb_LinkTarget_add_libs,$(1),\
1615 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1616 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1618 else
1619 $(call gb_LinkTarget_add_libs,$(1),\
1620 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1621 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1622 $(if $(filter $(OS),LINUX),-pthread) \
1624 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1625 ifeq ($(OS),SOLARIS)
1626 $(call gb_LinkTarget_add_libs,$(1),\
1627 -lnsl \
1628 -lsocket \
1630 endif
1631 endif
1633 endef
1635 endif # SYSTEM_OPENSSL
1636 endif # ENABLE_OPENSSL
1639 ifneq ($(ENABLE_OPENSSL),TRUE)
1641 define gb_LinkTarget__use_gnutls
1642 $(call gb_LinkTarget_set_include,$(1),\
1643 $$(INCLUDE) \
1644 $(GNUTLS_CFLAGS) \
1647 $(call gb_LinkTarget_add_defs,$(1),\
1648 -DDISABLE_OPENSSL \
1651 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1653 endef
1655 define gb_LinkTarget__use_libgcrypt
1656 $(call gb_LinkTarget_set_include,$(1),\
1657 $$(INCLUDE) \
1658 $(LIBGCRYPT_CFLAGS) \
1661 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1663 endef
1665 else # ENABLE_OPENSSL
1667 gb_LinkTarget__use_gnutls:=
1668 gb_LinkTarget__use_libgcrypt:=
1670 endif # ENABLE_OPENSSL
1673 ifneq ($(SYSTEM_CDR),)
1675 define gb_LinkTarget__use_cdr
1676 $(call gb_LinkTarget_set_include,$(1),\
1677 $$(INCLUDE) \
1678 $(CDR_CFLAGS) \
1680 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1682 endef
1684 else # !SYSTEM_CDR
1686 define gb_LinkTarget__use_cdr
1687 $(call gb_LinkTarget_set_include,$(1),\
1688 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1689 $$(INCLUDE) \
1691 $(call gb_LinkTarget_add_libs,$(1),\
1692 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1694 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1695 endef
1697 endif # SYSTEM_CDR
1700 ifneq ($(SYSTEM_EBOOK),)
1702 define gb_LinkTarget__use_ebook
1703 $(call gb_LinkTarget_set_include,$(1),\
1704 $$(INCLUDE) \
1705 $(EBOOK_CFLAGS) \
1707 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1709 endef
1711 gb_ExternalProject__use_ebook :=
1713 else # !SYSTEM_EBOOK
1715 define gb_LinkTarget__use_ebook
1716 $(call gb_LinkTarget_set_include,$(1),\
1717 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1718 $$(INCLUDE) \
1720 $(call gb_LinkTarget_add_libs,$(1),\
1721 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1723 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1725 endef
1727 define gb_ExternalProject__use_ebook
1728 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1730 endef
1732 endif # SYSTEM_EBOOK
1735 ifneq ($(SYSTEM_ETONYEK),)
1737 define gb_LinkTarget__use_etonyek
1738 $(call gb_LinkTarget_set_include,$(1),\
1739 $$(INCLUDE) \
1740 $(ETONYEK_CFLAGS) \
1742 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1744 endef
1746 gb_ExternalProject__use_etonyek :=
1748 else # !SYSTEM_ETONYEK
1750 ifeq ($(COM),MSC)
1752 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1753 etonyek \
1756 define gb_LinkTarget__use_etonyek
1757 $(call gb_LinkTarget_set_include,$(1),\
1758 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1759 $$(INCLUDE) \
1761 $(call gb_LinkTarget_use_libraries,$(1),\
1762 etonyek \
1765 endef
1767 else # !MSC
1769 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1770 libetonyek \
1773 define gb_LinkTarget__use_etonyek
1774 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1776 $(call gb_LinkTarget_set_include,$(1),\
1777 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1778 -DLIBETONYEK_VISIBILITY \
1779 $$(INCLUDE) \
1781 $(call gb_LinkTarget_add_libs,$(1),\
1782 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1784 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1786 endef
1788 define gb_ExternalProject__use_etonyek
1789 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1791 endef
1793 endif
1795 endif # SYSTEM_ETONYEK
1798 ifneq ($(SYSTEM_FREEHAND),)
1800 define gb_LinkTarget__use_freehand
1801 $(call gb_LinkTarget_set_include,$(1),\
1802 $$(INCLUDE) \
1803 $(FREEHAND_CFLAGS) \
1805 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1807 endef
1809 gb_ExternalProject__use_freehand :=
1811 else # !SYSTEM_FREEHAND
1813 define gb_LinkTarget__use_freehand
1814 $(call gb_LinkTarget_set_include,$(1),\
1815 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1816 $$(INCLUDE) \
1818 $(call gb_LinkTarget_add_libs,$(1),\
1819 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1821 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1823 endef
1825 define gb_ExternalProject__use_freehand
1826 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1828 endef
1830 endif # SYSTEM_FREEHAND
1833 ifneq ($(SYSTEM_ODFGEN),)
1835 define gb_LinkTarget__use_odfgen
1836 $(call gb_LinkTarget_set_include,$(1),\
1837 $$(INCLUDE) \
1838 $(ODFGEN_CFLAGS) \
1840 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1842 endef
1844 else # !SYSTEM_ODFGEN
1846 ifeq ($(COM),MSC)
1848 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1849 odfgen \
1852 define gb_LinkTarget__use_odfgen
1853 $(call gb_LinkTarget_set_include,$(1),\
1854 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1855 $$(INCLUDE) \
1857 $(call gb_LinkTarget_use_libraries,$(1),\
1858 odfgen \
1861 endef
1863 else # !MSC
1865 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1866 libodfgen \
1869 define gb_LinkTarget__use_odfgen
1870 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1872 $(call gb_LinkTarget_set_include,$(1),\
1873 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1874 -DLIBODFGEN_VISIBILITY \
1875 $$(INCLUDE) \
1877 $(call gb_LinkTarget_add_libs,$(1),\
1878 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1881 endef
1883 endif
1885 endif # SYSTEM_ODFGEN
1887 ifneq ($(SYSTEM_EPUBGEN),)
1889 define gb_LinkTarget__use_epubgen
1890 $(call gb_LinkTarget_set_include,$(1),\
1891 $$(INCLUDE) \
1892 $(EPUBGEN_CFLAGS) \
1894 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1896 endef
1897 gb_ExternalProject__use_epubgen :=
1899 else # !SYSTEM_EPUBGEN
1901 define gb_LinkTarget__use_epubgen
1902 $(call gb_LinkTarget_set_include,$(1),\
1903 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1904 $$(INCLUDE) \
1906 $(call gb_LinkTarget_add_libs,$(1),\
1907 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1909 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1911 endef
1912 define gb_ExternalProject__use_epubgen
1913 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1915 endef
1917 endif # SYSTEM_EPUBGEN
1919 ifneq ($(SYSTEM_REVENGE),)
1921 define gb_LinkTarget__use_revenge
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 $$(INCLUDE) \
1924 $(REVENGE_CFLAGS) \
1926 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1928 endef
1930 gb_ExternalProject__use_revenge :=
1932 else # !SYSTEM_REVENGE
1934 ifeq ($(COM),MSC)
1936 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1937 revenge \
1940 define gb_LinkTarget__use_revenge
1941 $(call gb_LinkTarget_set_include,$(1),\
1942 $(REVENGE_CFLAGS) \
1943 $$(INCLUDE) \
1945 $(call gb_LinkTarget_use_libraries,$(1),\
1946 revenge \
1949 endef
1951 define gb_ExternalProject__use_revenge
1952 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1954 endef
1956 else # !MSC
1958 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1959 librevenge \
1962 define gb_LinkTarget__use_revenge
1963 $(call gb_LinkTarget_use_package,$(1),librevenge)
1965 $(call gb_LinkTarget_set_include,$(1),\
1966 $(REVENGE_CFLAGS) \
1967 -DLIBREVENGE_VISIBILITY \
1968 $$(INCLUDE) \
1970 $(call gb_LinkTarget_add_libs,$(1),\
1971 $(REVENGE_LIBS) \
1973 endef
1975 define gb_ExternalProject__use_revenge
1976 $(call gb_ExternalProject_use_package,$(1),librevenge)
1978 endef
1980 endif # MSC
1982 endif # SYSTEM_REVENGE
1985 ifneq ($(SYSTEM_ABW),)
1987 define gb_LinkTarget__use_abw
1988 $(call gb_LinkTarget_set_include,$(1),\
1989 $$(INCLUDE) \
1990 $(ABW_CFLAGS) \
1992 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1994 endef
1995 gb_ExternalProject__use_abw :=
1997 else # !SYSTEM_ABW
1999 define gb_LinkTarget__use_abw
2000 $(call gb_LinkTarget_set_include,$(1),\
2001 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
2002 $$(INCLUDE) \
2004 $(call gb_LinkTarget_add_libs,$(1),\
2005 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
2007 $(call gb_LinkTarget_use_external_project,$(1),libabw)
2009 endef
2010 define gb_ExternalProject__use_abw
2011 $(call gb_ExternalProject_use_external_project,$(1),libabw)
2013 endef
2015 endif # SYSTEM_ABW
2018 ifneq ($(SYSTEM_MSPUB),)
2020 define gb_LinkTarget__use_mspub
2021 $(call gb_LinkTarget_set_include,$(1),\
2022 $$(INCLUDE) \
2023 $(MSPUB_CFLAGS) \
2025 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2027 endef
2029 else # !SYSTEM_MSPUB
2031 define gb_LinkTarget__use_mspub
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2034 $$(INCLUDE) \
2036 $(call gb_LinkTarget_add_libs,$(1),\
2037 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2039 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2041 endef
2043 endif # SYSTEM_MSPUB
2046 ifneq ($(SYSTEM_PAGEMAKER),)
2048 define gb_LinkTarget__use_pagemaker
2049 $(call gb_LinkTarget_set_include,$(1),\
2050 $$(INCLUDE) \
2051 $(PAGEMAKER_CFLAGS) \
2053 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2055 endef
2056 gb_ExternalProject__use_pagemaker :=
2058 else # !SYSTEM_PAGEMAKER
2060 define gb_LinkTarget__use_pagemaker
2061 $(call gb_LinkTarget_set_include,$(1),\
2062 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2063 $$(INCLUDE) \
2065 $(call gb_LinkTarget_add_libs,$(1),\
2066 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2068 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2070 endef
2071 define gb_ExternalProject__use_pagemaker
2072 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2074 endef
2076 endif # SYSTEM_PAGEMAKER
2079 ifneq ($(SYSTEM_QXP),)
2081 define gb_LinkTarget__use_qxp
2082 $(call gb_LinkTarget_set_include,$(1),\
2083 $$(INCLUDE) \
2084 $(QXP_CFLAGS) \
2086 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2088 endef
2089 gb_ExternalProject__use_qxp :=
2091 else # !SYSTEM_QXP
2093 define gb_LinkTarget__use_qxp
2094 $(call gb_LinkTarget_set_include,$(1),\
2095 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2096 $$(INCLUDE) \
2098 $(call gb_LinkTarget_add_libs,$(1),\
2099 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2101 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2103 endef
2104 define gb_ExternalProject__use_qxp
2105 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2107 endef
2109 endif # SYSTEM_QXP
2112 ifneq ($(SYSTEM_ZMF),)
2114 define gb_LinkTarget__use_zmf
2115 $(call gb_LinkTarget_set_include,$(1),\
2116 $$(INCLUDE) \
2117 $(ZMF_CFLAGS) \
2119 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2121 endef
2122 gb_ExternalProject__use_zmf :=
2124 else # !SYSTEM_ZMF
2126 define gb_LinkTarget__use_zmf
2127 $(call gb_LinkTarget_set_include,$(1),\
2128 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2129 $$(INCLUDE) \
2131 $(call gb_LinkTarget_add_libs,$(1),\
2132 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2134 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2136 endef
2137 define gb_ExternalProject__use_zmf
2138 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2140 endef
2142 endif # SYSTEM_ZMF
2145 ifneq ($(SYSTEM_VISIO),)
2147 define gb_LinkTarget__use_visio
2148 $(call gb_LinkTarget_set_include,$(1),\
2149 $$(INCLUDE) \
2150 $(VISIO_CFLAGS) \
2152 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2154 endef
2156 else # !SYSTEM_VISIO
2158 define gb_LinkTarget__use_visio
2159 $(call gb_LinkTarget_set_include,$(1),\
2160 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2161 $$(INCLUDE) \
2163 $(call gb_LinkTarget_add_libs,$(1),\
2164 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2166 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2168 endef
2170 endif # SYSTEM_VISIO
2173 ifneq ($(SYSTEM_WPD),)
2175 define gb_LinkTarget__use_wpd
2176 $(call gb_LinkTarget_set_include,$(1),\
2177 $$(INCLUDE) \
2178 $(WPD_CFLAGS) \
2180 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2182 endef
2183 gb_ExternalProject__use_wpd :=
2185 else # !SYSTEM_WPD
2187 ifeq ($(COM),MSC)
2189 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2190 wpd \
2193 define gb_LinkTarget__use_wpd
2194 $(call gb_LinkTarget_set_include,$(1),\
2195 $(WPD_CFLAGS) \
2196 $$(INCLUDE) \
2198 $(call gb_LinkTarget_use_libraries,$(1),\
2199 wpd \
2202 endef
2204 define gb_ExternalProject__use_wpd
2205 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2207 endef
2209 else # !MSC
2211 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2212 libwpd \
2215 define gb_LinkTarget__use_wpd
2216 $(call gb_LinkTarget_use_package,$(1),libwpd)
2218 $(call gb_LinkTarget_set_include,$(1),\
2219 $(WPD_CFLAGS) \
2220 $$(INCLUDE) \
2222 $(call gb_LinkTarget_add_libs,$(1),\
2223 $(WPD_LIBS) \
2226 endef
2228 define gb_ExternalProject__use_wpd
2229 $(call gb_ExternalProject_use_package,$(1),libwpd)
2231 endef
2233 endif # MSC
2235 endif # SYSTEM_WPD
2238 ifneq ($(SYSTEM_WPG),)
2240 define gb_LinkTarget__use_wpg
2241 $(call gb_LinkTarget_set_include,$(1),\
2242 $$(INCLUDE) \
2243 $(WPG_CFLAGS) \
2245 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2247 endef
2248 gb_ExternalProject__use_wpg :=
2250 else # !SYSTEM_WPG
2252 ifeq ($(COM),MSC)
2254 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2255 wpg \
2258 define gb_LinkTarget__use_wpg
2259 $(call gb_LinkTarget_set_include,$(1),\
2260 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2261 $$(INCLUDE) \
2263 $(call gb_LinkTarget_use_libraries,$(1),\
2264 wpg \
2267 endef
2269 else # !MSC
2271 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2272 libwpg \
2275 define gb_LinkTarget__use_wpg
2276 $(call gb_LinkTarget_use_package,$(1),libwpg)
2278 $(call gb_LinkTarget_set_include,$(1),\
2279 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2280 $$(INCLUDE) \
2282 $(call gb_LinkTarget_add_libs,$(1),\
2283 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2286 endef
2288 endif # MSC
2290 endif # SYSTEM_WPG
2293 ifneq ($(SYSTEM_WPS),)
2295 define gb_LinkTarget__use_wps
2296 $(call gb_LinkTarget_set_include,$(1),\
2297 $$(INCLUDE) \
2298 $(WPS_CFLAGS) \
2300 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2302 endef
2303 gb_ExternalProject__use_wps :=
2305 else # !SYSTEM_WPS
2307 ifeq ($(COM),MSC)
2309 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2310 wps \
2313 define gb_LinkTarget__use_wps
2314 $(call gb_LinkTarget_set_include,$(1),\
2315 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2316 $$(INCLUDE) \
2319 $(call gb_LinkTarget_use_libraries,$(1),\
2320 wps \
2323 endef
2325 else # !MSC
2327 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2328 libwps \
2331 define gb_LinkTarget__use_wps
2332 $(call gb_LinkTarget_use_package,$(1),libwps)
2334 $(call gb_LinkTarget_set_include,$(1),\
2335 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2336 $$(INCLUDE) \
2338 $(call gb_LinkTarget_add_libs,$(1),\
2339 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2342 endef
2344 endif # MSC
2346 endif # SYSTEM_WPS
2349 ifneq ($(SYSTEM_MWAW),)
2351 define gb_LinkTarget__use_mwaw
2352 $(call gb_LinkTarget_set_include,$(1),\
2353 $$(INCLUDE) \
2354 $(MWAW_CFLAGS) \
2356 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2358 endef
2360 else # !SYSTEM_MWAW
2362 ifeq ($(COM),MSC)
2364 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2365 mwaw \
2368 define gb_LinkTarget__use_mwaw
2369 $(call gb_LinkTarget_set_include,$(1),\
2370 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2371 $$(INCLUDE) \
2374 $(call gb_LinkTarget_use_libraries,$(1),\
2375 mwaw \
2378 endef
2380 else # !MSC
2382 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2383 libmwaw \
2386 define gb_LinkTarget__use_mwaw
2387 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2389 $(call gb_LinkTarget_set_include,$(1),\
2390 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2391 $$(INCLUDE) \
2393 $(call gb_LinkTarget_add_libs,$(1),\
2394 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2397 endef
2399 endif # MSC
2401 endif # SYSTEM_MWAW
2403 ifneq ($(SYSTEM_STAROFFICE),)
2405 define gb_LinkTarget__use_staroffice
2406 $(call gb_LinkTarget_set_include,$(1),\
2407 $$(INCLUDE) \
2408 $(STAROFFICE_CFLAGS) \
2410 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2412 endef
2414 else # !SYSTEM_STAROFFICE
2416 ifeq ($(COM),MSC)
2418 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2419 staroffice \
2422 define gb_LinkTarget__use_staroffice
2423 $(call gb_LinkTarget_set_include,$(1),\
2424 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2425 $$(INCLUDE) \
2428 $(call gb_LinkTarget_use_libraries,$(1),\
2429 staroffice \
2432 endef
2434 else # !MSC
2436 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2437 libstaroffice \
2440 define gb_LinkTarget__use_staroffice
2441 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2443 $(call gb_LinkTarget_set_include,$(1),\
2444 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2445 $$(INCLUDE) \
2447 $(call gb_LinkTarget_add_libs,$(1),\
2448 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2451 endef
2453 endif # MSC
2455 endif # SYSTEM_STAROFFICE
2458 ifneq ($(SYSTEM_LCMS2),)
2460 define gb_LinkTarget__use_lcms2
2461 $(call gb_LinkTarget_set_include,$(1),\
2462 $$(INCLUDE) \
2463 $(LCMS2_CFLAGS) \
2465 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2467 endef
2469 gb_ExternalProject__use_lcms2 :=
2471 else # !SYSTEM_LCMS2
2473 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2474 lcms2 \
2477 define gb_ExternalProject__use_lcms2
2478 $(call gb_ExternalProject_use_package,$(1),lcms2)
2480 endef
2482 ifeq ($(OS),ANDROID)
2484 define gb_LinkTarget__use_lcms2
2485 $(call gb_LinkTarget_use_package,$(1),lcms2)
2486 $(call gb_LinkTarget_set_include,$(1),\
2487 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2488 $$(INCLUDE) \
2491 endef
2493 else
2495 define gb_LinkTarget__use_lcms2
2496 $(call gb_LinkTarget_use_package,$(1),lcms2)
2497 $(call gb_LinkTarget_set_include,$(1),\
2498 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2499 $$(INCLUDE) \
2501 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2503 endef
2505 endif # ANDROID
2506 endif # SYSTEM_LCMS2
2508 ifneq ($(ENABLE_LPSOLVE),)
2510 ifneq ($(SYSTEM_LPSOLVE),)
2512 define gb_LinkTarget__use_lpsolve
2513 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2514 $(call gb_LinkTarget_add_defs,$(1),\
2515 -DSYSTEM_LPSOLVE \
2518 endef
2520 else # !SYSTEM_LPSOLVE
2522 define gb_LinkTarget__use_lpsolve
2523 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2524 ifeq ($(COM),MSC)
2525 $(call gb_LinkTarget_add_libs,$(1),\
2526 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2528 else
2529 $(call gb_LinkTarget_add_libs,$(1),\
2530 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2532 endif
2533 $(call gb_LinkTarget_set_include,$(1),\
2534 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2535 $$(INCLUDE) \
2538 endef
2540 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2541 lpsolve \
2544 endif # SYSTEM_LPSOLVE
2546 else
2548 gb_LinkTarget__use_lpsolve :=
2550 endif # ENABLE_LPSOLVE
2552 ifneq ($(ENABLE_COINMP),)
2554 ifneq ($(SYSTEM_COINMP),TRUE)
2556 define gb_LinkTarget__use_coinmp
2557 $(call gb_LinkTarget_use_package,$(1),coinmp)
2558 ifeq ($(COM),MSC)
2559 $(call gb_LinkTarget_add_libs,$(1),\
2560 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2562 else
2563 $(call gb_LinkTarget_add_libs,$(1),\
2564 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2565 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2566 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2567 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2568 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2569 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2570 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2572 endif
2573 $(call gb_LinkTarget_set_include,$(1),\
2574 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2575 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2576 $$(INCLUDE) \
2579 endef
2581 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2582 coinmp \
2585 else # SYSTEM_COINMP
2587 define gb_LinkTarget__use_coinmp
2588 $(call gb_LinkTarget_set_include,$(1),\
2589 $$(INCLUDE) \
2590 $(COINMP_CFLAGS) \
2592 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2594 endef
2596 endif
2598 else
2600 gb_LinkTarget__use_coinmp :=
2602 endif # ENABLE_COINMP
2604 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2606 define gb_LinkTarget__use_mDNSResponder
2607 $(call gb_LinkTarget_set_include,$(1),\
2608 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2609 $$(INCLUDE) \
2611 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2612 endef
2614 endif # MDNSRESPONDER
2616 ifeq ($(ENABLE_GIO),TRUE)
2618 define gb_LinkTarget__use_gio
2619 $(call gb_LinkTarget_set_include,$(1),\
2620 $$(INCLUDE) \
2621 $(GIO_CFLAGS) \
2624 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2626 endef
2628 else # ENABLE_GIO
2630 define gb_LinkTarget__use_gio
2632 endef
2634 endif # ENABLE_GIO
2636 ifeq ($(ENABLE_AVAHI),TRUE)
2638 define gb_LinkTarget__use_avahi
2639 $(call gb_LinkTarget_set_include,$(1),\
2640 $$(INCLUDE) \
2641 $(AVAHI_CFLAGS) \
2644 $(call gb_LinkTarget_add_defs,$(1),\
2645 -DENABLE_AVAHI \
2648 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2650 endef
2652 else # ENABLE_AVAHI
2654 gb_LinkTarget__use_avahi :=
2656 endif # ENABLE_AVAHI
2658 ifeq ($(ENABLE_CUPS),TRUE)
2660 define gb_LinkTarget__use_cups
2661 $(call gb_LinkTarget_add_defs,$(1),\
2662 -DENABLE_CUPS \
2665 $(call gb_LinkTarget_add_libs,$(1),\
2666 -lcups \
2669 endef
2671 else # ENABLE_CUPS
2673 define gb_LinkTarget__use_cups
2675 endef
2677 endif # ENABLE_CUPS
2679 ifeq ($(ENABLE_DBUS),TRUE)
2681 define gb_LinkTarget__use_dbus
2682 $(call gb_LinkTarget_set_include,$(1),\
2683 $$(INCLUDE) \
2684 $(DBUS_CFLAGS) \
2687 $(call gb_LinkTarget_add_libs,$(1),\
2688 $(DBUS_LIBS) \
2691 endef
2693 else # ENABLE_DBUS
2695 define gb_LinkTarget__use_dbus
2697 endef
2699 endif # ENABLE_DBUS
2702 ifneq ($(SYSTEM_LIBPNG),)
2704 define gb_LinkTarget__use_libpng
2705 $(call gb_LinkTarget_set_include,$(1),\
2706 $$(INCLUDE) \
2707 $(LIBPNG_CFLAGS) \
2710 $(call gb_LinkTarget_add_libs,$(1),\
2711 $(LIBPNG_LIBS) \
2714 endef
2716 gb_ExternalProject__use_libpng :=
2718 else # !SYSTEM_LIBPNG
2720 define gb_LinkTarget__use_libpng
2721 $(call gb_LinkTarget_set_include,$(1),\
2722 $(LIBPNG_CFLAGS) \
2723 $$(INCLUDE) \
2725 $(call gb_LinkTarget_use_static_libraries,$(1),\
2726 libpng \
2728 $(call gb_LinkTarget__use_zlib,$(1))
2730 endef
2732 define gb_ExternalProject__use_libpng
2733 $(call gb_ExternalProject_use_static_libraries,$(1),\
2734 libpng \
2737 endef
2739 endif # !SYSTEM_LIBPNG
2742 ifneq ($(SYSTEM_CURL),)
2744 define gb_LinkTarget__use_curl
2745 $(call gb_LinkTarget_add_defs,$(1),\
2746 -DSYSTEM_CURL \
2748 $(call gb_LinkTarget_set_include,$(1),\
2749 $$(INCLUDE) \
2750 $(CURL_CFLAGS) \
2752 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2754 endef
2756 else # !SYSTEM_CURL
2758 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2759 curl \
2762 define gb_LinkTarget__use_curl
2763 $(call gb_LinkTarget_use_package,$(1),curl)
2764 $(call gb_LinkTarget_set_include,$(1),\
2765 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2766 $$(INCLUDE) \
2769 ifeq ($(COM),MSC)
2770 $(call gb_LinkTarget_add_libs,$(1),\
2771 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2773 else
2774 $(call gb_LinkTarget_add_libs,$(1),\
2775 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2777 endif
2779 endef
2781 endif # SYSTEM_CURL
2783 ifeq ($(ENABLE_VALGRIND),TRUE)
2785 define gb_LinkTarget__use_valgrind
2786 $(call gb_LinkTarget_add_defs,$(1),\
2787 -DHAVE_VALGRIND_HEADERS \
2790 $(call gb_LinkTarget_set_include,$(1),\
2791 $$(INCLUDE) \
2792 $(VALGRIND_CFLAGS) \
2795 endef
2797 else # !ENABLE_VALGRIND
2799 define gb_LinkTarget__use_valgrind
2801 endef
2803 endif # ENABLE_VALGRIND
2805 ifeq ($(ENABLE_POPPLER),TRUE)
2807 ifneq ($(SYSTEM_POPPLER),)
2809 define gb_LinkTarget__use_poppler
2810 $(call gb_LinkTarget_set_include,$(1),\
2811 $(POPPLER_CFLAGS) \
2812 $$(INCLUDE) \
2815 $(call gb_LinkTarget_add_libs,$(1),\
2816 $(POPPLER_LIBS) \
2819 endef
2821 else # !SYSTEM_POPPLER
2823 define gb_LinkTarget__use_poppler
2824 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2826 $(call gb_LinkTarget_set_include,$(1),\
2827 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2828 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2829 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2830 $$(INCLUDE) \
2833 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2835 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2837 ifeq ($(OS),MACOSX)
2838 $(call gb_LinkTarget_add_libs,$(1),\
2839 -lobjc \
2841 else ifeq ($(OS),LINUX)
2842 $(call gb_LinkTarget_add_libs,$(1),\
2843 -pthread \
2845 else ifeq ($(OS),WNT)
2846 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2847 advapi32 \
2848 gdi32 \
2850 endif
2852 endef
2854 endif # SYSTEM_POPPLER
2856 endif # ENABLE_POPPLER
2859 ifneq ($(SYSTEM_CLUCENE),)
2861 define gb_LinkTarget__use_clucene
2862 $(call gb_LinkTarget_add_defs,$(1),\
2863 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2866 $(call gb_LinkTarget_set_include,$(1),\
2867 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2868 $$(INCLUDE) \
2871 $(call gb_LinkTarget_add_libs,$(1),\
2872 $(CLUCENE_LIBS) \
2875 endef
2877 else # !SYSTEM_CLUCENE
2879 define gb_LinkTarget__use_clucene
2880 $(call gb_LinkTarget_set_include,$(1),\
2881 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2882 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2883 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2884 $$(INCLUDE) \
2887 $(call gb_LinkTarget_use_libraries,$(1),\
2888 clucene \
2891 endef
2893 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2894 clucene \
2897 endif # SYSTEM_CLUCENE
2899 define gb_LinkTarget__use_gobject
2900 $(call gb_LinkTarget_add_libs,$(1),\
2901 $(GOBJECT_LIBS) \
2904 $(call gb_LinkTarget_set_include,$(1),\
2905 $$(INCLUDE) \
2906 $(GOBJECT_CFLAGS) \
2908 endef
2910 ifneq ($(SYSTEM_HSQLDB),)
2912 define gb_LinkTarget__use_hsqldb
2914 $(call gb_LinkTarget_add_defs,$(1),\
2915 -DSYSTEM_HSQLDB \
2916 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2919 endef
2921 else # !SYSTEM_HSQLDB
2923 define gb_LinkTarget__use_hsqldb
2925 endef
2927 endif # SYSTEM_HSQLDB
2929 ifeq ($(ENABLE_LDAP),TRUE)
2930 ifneq ($(SYSTEM_OPENLDAP),)
2932 define gb_LinkTarget__use_openldap
2934 $(call gb_LinkTarget_add_libs,$(1),\
2935 -lldap \
2936 -llber \
2939 endef
2941 gb_ExternalProject__use_openldap :=
2943 else # !SYSTEM_OPENLDAP
2945 define gb_LinkTarget__use_openldap
2946 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2947 $(call gb_LinkTarget_set_include,$(1),\
2948 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2949 $$(INCLUDE) \
2951 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2952 $(call gb_LinkTarget_add_libs,$(1), \
2953 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2954 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2957 endef
2958 endif
2960 define gb_ExternalProject__use_openldap
2961 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2963 endef
2965 endif # SYSTEM_OPENLDAP
2967 ifneq ($(SYSTEM_LIBTOMMATH),)
2969 define gb_LinkTarget__use_libtommath
2970 $(call gb_LinkTarget_set_include,$(1),\
2971 $(LIBTOMMATH_CFLAGS) \
2972 $$(INCLUDE) \
2974 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2976 endef
2978 else # !SYSTEM_LIBTOMMATH
2979 define gb_LinkTarget__use_libtommath
2980 $(call gb_LinkTarget_set_include,$(1),\
2981 -I${WORKDIR}/UnpackedTarball/libtommath \
2982 $$(INCLUDE) \
2984 $(call gb_LinkTarget_add_libs,$(1),\
2985 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2987 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2989 endef
2991 endif # SYSTEM_LIBTOMMATH
2993 define gb_ExternalProject__use_libtommath
2994 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2996 endef
2998 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
3000 ifneq ($(SYSTEM_FIREBIRD),)
3002 define gb_LinkTarget__use_libfbembed
3003 $(call gb_LinkTarget_set_include,$(1),\
3004 $(FIREBIRD_CFLAGS) \
3005 $$(INCLUDE) \
3007 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3009 endef
3011 else # !SYSTEM_FIREBIRD
3013 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3014 firebird \
3017 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3018 #$(call gb_LinkTarget__use_libtommath,$(1))
3020 define gb_LinkTarget__use_libfbembed
3021 $(call gb_LinkTarget_use_package,$(1),firebird)
3022 $(call gb_LinkTarget_set_include,$(1),\
3023 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3024 $$(INCLUDE) \
3026 ifeq ($(COM),MSC)
3027 $(call gb_LinkTarget_add_libs,$(1),\
3028 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3030 else
3031 $(call gb_LinkTarget_add_libs,$(1),\
3032 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3034 endif
3036 endef
3039 # endef
3041 endif # SYSTEM_FIREBIRD
3043 else # !ENABLE_FIREBIRD_SDBC
3045 gb_LinkTarget__use_firebird :=
3046 # gb_LinkTarget__use_atomic_ops :=
3047 # gb_LinkTarget__use_libtommath :=
3049 endif # ENABLE_FIREBIRD_SDBC
3052 ifneq ($(SYSTEM_POSTGRESQL),)
3054 define gb_LinkTarget__use_postgresql
3056 $(call gb_LinkTarget_set_include,$(1),\
3057 $(POSTGRESQL_INC) \
3058 $$(INCLUDE) \
3061 $(call gb_LinkTarget_add_libs,$(1),\
3062 -lpq \
3065 $(call gb_LinkTarget_add_ldflags,$(1),\
3066 $(POSTGRESQL_LIB) \
3069 endef
3071 else # !SYSTEM_POSTGRESQL
3073 ifeq ($(OS),WNT)
3074 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3075 postgresql \
3077 endif # WNT
3079 define gb_LinkTarget__use_postgresql
3081 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3083 $(call gb_LinkTarget_set_include,$(1),\
3084 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3085 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3086 $$(INCLUDE) \
3089 ifeq ($(OS),WNT)
3091 $(call gb_LinkTarget_add_libs,$(1),\
3092 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3095 else # WNT
3097 $(call gb_LinkTarget_add_libs,$(1),\
3098 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3099 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3100 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3103 endif # WNT
3105 endef
3107 endif # SYSTEM_POSTGRESQL
3109 ifeq ($(ENABLE_KF5),TRUE)
3111 define gb_LinkTarget__use_kf5
3112 $(call gb_LinkTarget_set_include,$(1),\
3113 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3114 $$(INCLUDE) \
3117 $(call gb_LinkTarget_add_cxxflags,$(1),\
3118 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3121 $(call gb_LinkTarget_add_libs,$(1),\
3122 $(KF5_LIBS) \
3125 endef
3127 else # !ENABLE_KF5
3129 define gb_LinkTarget__use_kf5
3131 endef
3133 endif # ENABLE_KF5
3137 ifeq ($(ENABLE_QT5),TRUE)
3139 define gb_LinkTarget__use_qt5
3140 $(call gb_LinkTarget_set_include,$(1),\
3141 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3142 $$(INCLUDE) \
3145 $(call gb_LinkTarget_add_defs,$(1),\
3146 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3149 $(call gb_LinkTarget_add_libs,$(1),\
3150 $(QT5_LIBS) \
3153 endef
3155 else # !ENABLE_QT5
3157 define gb_LinkTarget__use_qt5
3159 endef
3161 endif # ENABLE_QT5
3163 # PYTHON
3164 # extra python_headers external because pyuno wrapper must not link python
3165 ifneq ($(SYSTEM_PYTHON),)
3167 define gb_LinkTarget__use_python_headers
3168 $(call gb_LinkTarget_add_defs,$(1),\
3169 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3172 $(call gb_LinkTarget_set_include,$(1),\
3173 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3174 $$(INCLUDE) \
3177 endef
3179 define gb_LinkTarget__use_python
3180 $(call gb_LinkTarget__use_python_headers,$(1))
3182 $(call gb_LinkTarget_add_libs,$(1),\
3183 $(PYTHON_LIBS) \
3186 endef
3188 else # !SYSTEM_PYTHON
3190 $(eval $(call gb_Helper_register_packages_for_install,python,\
3191 python3 \
3192 $(if $(filter WNT,$(OS)),libffi) \
3195 define gb_LinkTarget__use_python_headers
3196 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3197 $(call gb_LinkTarget_set_include,$(1),\
3198 -I$(call gb_UnpackedTarball_get_dir,python3) \
3199 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3200 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3201 $$(INCLUDE) \
3204 endef
3206 define gb_LinkTarget__use_python
3207 $(call gb_LinkTarget__use_python_headers,$(1))
3208 ifeq ($(OS),MACOSX)
3209 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3210 else
3211 $(call gb_LinkTarget_use_package,$(1),python3)
3212 endif
3214 ifeq ($(OS),WNT)
3215 ifeq ($(CPUNAME),X86_64)
3216 python_arch_subdir=amd64
3217 else ifeq ($(CPUNAME),AARCH64)
3218 python_arch_subdir=arm64
3219 else
3220 python_arch_subdir=win32
3221 endif
3222 $(call gb_LinkTarget_add_libs,$(1),\
3223 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3225 else ifeq ($(OS),MACOSX)
3226 $(call gb_LinkTarget_add_libs,$(1),\
3227 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3229 else
3230 $(call gb_LinkTarget_add_libs,$(1),\
3231 -L$(call gb_UnpackedTarball_get_dir,python3) \
3232 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3234 endif
3236 endef
3238 # this is only used by python currently
3239 define gb_ExternalProject__use_libffi
3240 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3242 endef
3244 endif # SYSTEM_PYTHON
3246 # ORCUS
3247 ifneq ($(SYSTEM_LIBORCUS),)
3249 define gb_LinkTarget__use_orcus
3250 $(call gb_LinkTarget_set_include,$(1),\
3251 $$(INCLUDE) \
3252 $(ORCUS_CFLAGS) \
3254 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3255 endef
3257 define gb_LinkTarget__use_orcus-parser
3259 endef
3261 else # !SYSTEM_LIBORCUS
3263 ifeq ($(COM),MSC)
3265 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3266 orcus \
3267 orcus-parser \
3270 define gb_LinkTarget__use_orcus
3271 $(call gb_LinkTarget_set_include,$(1),\
3272 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3273 $$(INCLUDE) \
3276 $(call gb_LinkTarget_use_libraries,$(1),\
3277 orcus \
3280 endef
3282 define gb_LinkTarget__use_orcus-parser
3283 $(call gb_LinkTarget_set_include,$(1),\
3284 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3285 $$(INCLUDE) \
3288 $(call gb_LinkTarget_use_libraries,$(1),\
3289 orcus-parser \
3292 endef
3294 else # !MSC
3296 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3297 liborcus \
3300 define gb_LinkTarget__use_orcus
3301 $(call gb_LinkTarget_use_package,$(1),liborcus)
3303 $(call gb_LinkTarget_set_include,$(1),\
3304 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3305 $$(INCLUDE) \
3308 $(call gb_LinkTarget_add_libs,$(1),\
3309 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3312 $(if $(SYSTEM_BOOST), \
3313 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3314 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3317 endef
3319 define gb_LinkTarget__use_orcus-parser
3320 $(call gb_LinkTarget_use_package,$(1),liborcus)
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3324 $$(INCLUDE) \
3327 $(call gb_LinkTarget_add_libs,$(1),\
3328 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3331 endef
3333 endif # MSC
3335 endif # SYSTEM_LIBORCUS
3337 ifeq ($(ENABLE_EOT),TRUE)
3339 ifneq ($(SYSTEM_LIBEOT),)
3341 define gb_LinkTarget__use_libeot
3342 $(call gb_LinkTarget_set_include,$(1),\
3343 $$(INCLUDE) \
3344 $(LIBEOT_CFLAGS) \
3346 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3348 endef
3350 gb_ExternalProject__use_libeot :=
3352 else # !SYSTEM_LIBEOT
3354 define gb_LinkTarget__use_libeot
3355 $(call gb_LinkTarget_set_include,$(1),\
3356 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3357 $$(INCLUDE) \
3359 $(call gb_LinkTarget_add_libs,$(1),\
3360 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3362 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3364 endef
3366 define gb_ExternalProject__use_libeot
3367 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3369 endef
3371 endif # SYSTEM_LIBEOT
3373 else # !ENABLE_EOT
3375 gb_LinkTarget__use_libeot :=
3376 gb_ExternalProject__use_libeot :=
3378 endif # ENABLE_EOT
3380 ### X11 stuff ###
3382 ifeq ($(USING_X11), TRUE)
3384 define gb_LinkTarget__use_Xrandr
3385 $(call gb_LinkTarget_set_include,$(1),\
3386 $$(INCLUDE) \
3387 $(XRANDR_CFLAGS) \
3390 $(call gb_LinkTarget_add_libs,$(1),\
3391 $(XRANDR_LIBS) \
3393 endef
3395 define gb_LinkTarget__use_Xrender
3396 $(call gb_LinkTarget_set_include,$(1),\
3397 $$(INCLUDE) \
3398 $(XRENDER_CFLAGS) \
3401 $(call gb_LinkTarget_add_libs,$(1),\
3402 $(XRENDER_LIBS) \
3404 endef
3406 endif # USING_X11
3409 gb_ExternalProject__use_nss3:=
3412 ifneq ($(SYSTEM_NSS),)
3414 define gb_LinkTarget__use_nss3
3415 $(call gb_LinkTarget_add_defs,$(1),\
3416 -DSYSTEM_NSS \
3419 $(call gb_LinkTarget_set_include,$(1),\
3420 $$(INCLUDE) \
3421 $(NSS_CFLAGS) \
3424 $(call gb_LinkTarget_add_libs,$(1),\
3425 $(NSS_LIBS) \
3428 endef
3430 define gb_LinkTarget__use_plc4
3431 $(call gb_LinkTarget__use_nss3,$(1))
3433 endef
3435 define gb_LinkTarget__use_ssl3
3436 $(call gb_LinkTarget__use_nss3,$(1))
3438 endef
3440 else # !SYSTEM_NSS
3442 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3443 nss \
3446 define gb_LinkTarget__use_nss3
3447 $(call gb_LinkTarget_use_package,$(1),nss)
3448 $(call gb_LinkTarget_set_include,$(1),\
3449 $$(INCLUDE) \
3450 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3451 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3454 ifeq ($(COM),MSC)
3455 $(call gb_LinkTarget_add_libs,$(1),\
3456 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3457 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3458 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3460 else
3461 $(call gb_LinkTarget_add_libs,$(1),\
3462 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3463 -lnspr4 \
3464 -lnss3 \
3465 -lsmime3 \
3467 endif
3469 endef
3471 define gb_LinkTarget__use_plc4
3472 $(call gb_LinkTarget_use_package,$(1),nss)
3473 ifeq ($(COM),MSC)
3474 $(call gb_LinkTarget_add_libs,$(1),\
3475 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3477 else
3478 $(call gb_LinkTarget_add_libs,$(1),\
3479 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3481 endif
3483 endef
3485 define gb_LinkTarget__use_ssl3
3486 $(call gb_LinkTarget_use_package,$(1),nss)
3487 ifeq ($(COM),MSC)
3488 $(call gb_LinkTarget_add_libs,$(1),\
3489 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3491 else
3492 $(call gb_LinkTarget_add_libs,$(1),\
3493 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3495 endif
3497 endef
3499 define gb_ExternalProject__use_nss3
3500 $(call gb_ExternalProject_use_package,$(1),nss)
3502 endef
3504 endif # SYSTEM_NSS
3506 ifeq ($(ENABLE_BREAKPAD),TRUE)
3508 define gb_LinkTarget__use_breakpad
3509 $(call gb_LinkTarget_set_include,$(1),\
3510 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3511 $$(INCLUDE) \
3514 ifeq ($(COM),MSC)
3515 $(call gb_LinkTarget_use_static_libraries,$(1),\
3516 breakpad \
3518 else
3519 $(call gb_LinkTarget_add_libs,$(1),\
3520 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3522 endif
3524 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3526 endef
3528 endif # ENABLE_BREAKPAD
3530 ifeq ($(ENABLE_GPGMEPP),TRUE)
3532 ifneq ($(SYSTEM_GPGMEPP),)
3534 gb_ExternalProject__use_gpgmepp:=
3535 gb_ExternalProject__use_libassuan:=
3536 gb_ExternalProject__use_libgpg-error:=
3538 define gb_LinkTarget__use_gpgmepp
3539 $(call gb_LinkTarget_set_include,$(1),\
3540 $$(INCLUDE) \
3541 $$(GPGMEPP_CFLAGS) \
3544 $(call gb_LinkTarget_add_libs,$(1),\
3545 $(GPGMEPP_LIBS) \
3548 endef
3550 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3552 define gb_ExternalProject__use_gpgmepp
3553 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3555 endef
3556 define gb_ExternalProject__use_libassuan
3557 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3559 endef
3560 define gb_ExternalProject__use_libgpg-error
3561 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3563 endef
3565 ifneq ($(filter WNT,$(OS)),)
3567 define gb_LinkTarget__use_libgpg-error
3568 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3570 $(call gb_LinkTarget_set_include,$(1),\
3571 $(GPG_ERROR_CFLAGS) \
3572 $$(INCLUDE) \
3574 $(call gb_LinkTarget_add_libs,$(1),\
3575 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3578 endef
3580 define gb_LinkTarget__use_libassuan
3581 $(call gb_LinkTarget_use_package,$(1),libassuan)
3583 $(call gb_LinkTarget_set_include,$(1),\
3584 $(LIBASSUAN_CFLAGS) \
3585 $$(INCLUDE) \
3587 $(call gb_LinkTarget_add_libs,$(1),\
3588 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3591 endef
3593 define gb_LinkTarget__use_gpgmepp
3594 $(call gb_LinkTarget_set_include,$(1),\
3595 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3596 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3597 $$(GPG_ERROR_CFLAGS) \
3598 $$(INCLUDE) \
3600 $(call gb_LinkTarget_use_libraries,$(1),\
3601 gpgmepp \
3604 endef
3606 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3607 gpgmepp \
3608 libassuan \
3609 libgpg-error \
3612 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3613 gpgmepp \
3616 endif
3618 ifneq ($(filter MACOSX LINUX,$(OS)),)
3620 define gb_LinkTarget__use_gpgmepp
3621 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3623 $(call gb_LinkTarget_set_include,$(1),\
3624 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3625 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3626 $$(GPG_ERROR_CFLAGS) \
3627 $$(INCLUDE) \
3629 $(call gb_LinkTarget_add_libs,$(1),\
3630 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3631 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3632 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3633 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3636 endef
3638 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3639 gpgmepp \
3640 libassuan \
3641 libgpg-error \
3644 endif
3646 endif
3648 else # !ENABLE_GPGMEPP
3650 gb_ExternalProject__use_gpgmepp :=
3651 gb_ExternalProject__use_libassuan :=
3652 gb_ExternalProject__use_libgpg-error :=
3654 gb_LinkTarget__use_gpgmepp :=
3655 gb_LinkTarget__use_libassuan :=
3656 gb_LinkTarget__use_libgpg-error :=
3658 endif # ENABLE_GPGMEPP
3660 define gb_LinkTarget__use_dconf
3661 $(call gb_LinkTarget_set_include,$(1),\
3662 $$(INCLUDE) \
3663 $(DCONF_CFLAGS) \
3666 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3667 endef
3669 ### Jars ############################################################
3671 ifneq ($(SYSTEM_HSQLDB),)
3673 define gb_Jar__use_hsqldb
3674 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3675 endef
3676 define gb_JunitTest__use_hsqldb
3677 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3678 endef
3680 else # !SYSTEM_HSQLDB
3682 ifeq ($(ENABLE_JAVA),TRUE)
3683 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3684 hsqldb \
3686 endif
3688 define gb_Jar__use_hsqldb
3689 $(call gb_Jar_use_jar,$(1),hsqldb)
3690 endef
3691 define gb_JunitTest__use_hsqldb
3692 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3693 endef
3695 endif # SYSTEM_HSQLDB
3698 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3700 ifneq ($(SYSTEM_BSH),)
3702 define gb_Jar__use_bsh
3703 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3704 endef
3706 else # !SYSTEM_BSH
3708 ifeq ($(ENABLE_JAVA),TRUE)
3709 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3710 bsh \
3712 endif
3714 define gb_Jar__use_bsh
3715 $(call gb_Jar_use_jar,$(1),bsh)
3716 endef
3718 endif # SYSTEM_BSH
3720 endif
3722 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3724 ifneq ($(SYSTEM_RHINO),)
3726 define gb_Jar__use_rhino
3727 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3728 endef
3730 else # !SYSTEM_RHINO
3732 ifeq ($(ENABLE_JAVA),TRUE)
3733 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3734 js \
3736 endif
3738 define gb_Jar__use_rhino
3739 $(call gb_Jar_use_jar,$(1),js)
3740 endef
3742 endif # SYSTEM_RHINO
3744 endif
3746 ifneq ($(SYSTEM_JFREEREPORT),)
3748 define gb_Jar__use_flow-engine
3749 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3750 endef
3752 define gb_Jar__use_flute
3753 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3754 endef
3756 define gb_Jar__use_libbase
3757 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3758 endef
3760 define gb_Jar__use_libfonts
3761 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3762 endef
3764 define gb_Jar__use_libformula
3765 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3766 endef
3768 define gb_Jar__use_liblayout
3769 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3770 endef
3772 define gb_Jar__use_libloader
3773 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3774 endef
3776 define gb_Jar__use_librepository
3777 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3778 endef
3780 define gb_Jar__use_libserializer
3781 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3782 endef
3784 define gb_Jar__use_libxml
3785 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3786 endef
3788 define gb_Jar__use_sac
3789 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3790 endef
3792 else # !SYSTEM_JFREEREPORT
3794 ifeq ($(ENABLE_JAVA),TRUE)
3795 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3796 flow-engine \
3797 flute-1.1.6 \
3798 libbase-1.1.6 \
3799 libfonts-1.1.6 \
3800 libformula-1.1.7 \
3801 liblayout \
3802 libloader-1.1.6 \
3803 librepository-1.1.6 \
3804 libserializer-1.1.6 \
3805 libxml-1.1.7 \
3806 sac \
3808 endif
3810 define gb_Jar__use_flow-engine
3811 $(call gb_Jar_use_jar,$(1),flow-engine)
3812 endef
3814 define gb_Jar__use_flute
3815 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3816 endef
3818 define gb_Jar__use_libbase
3819 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3820 endef
3822 define gb_Jar__use_libfonts
3823 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3824 endef
3826 define gb_Jar__use_libformula
3827 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3828 endef
3830 define gb_Jar__use_liblayout
3831 $(call gb_Jar_use_jar,$(1),liblayout)
3832 endef
3834 define gb_Jar__use_libloader
3835 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3836 endef
3838 define gb_Jar__use_librepository
3839 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3840 endef
3842 define gb_Jar__use_libserializer
3843 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3844 endef
3846 define gb_Jar__use_libxml
3847 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3848 endef
3850 define gb_Jar__use_sac
3851 $(call gb_Jar_use_jar,$(1),sac)
3852 endef
3854 endif # SYSTEM_JFREEREPORT
3857 # Executables
3859 # FIXME: the library target should be for build too
3860 define gb_Executable__register_bestreversemap
3861 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3862 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3864 endef
3866 # TODO depending on the whole URE might be overkill, but I do not have a
3867 # Windows machine to debug it...
3868 # FIXME: the library target should be for build too
3869 define gb_Executable__register_climaker
3870 $(call gb_Executable_add_runtime_dependencies,climaker,\
3871 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3872 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3873 $(call gb_UnoApi_get_target,udkapi) \
3874 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3876 endef
3878 define gb_Executable__register_cppumaker
3879 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3880 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3882 endef
3884 # This is used to determine what we need for 'build' platform.
3885 # FIXME: the library target should be for build too
3886 define gb_Executable__register_gengal
3887 $(call gb_Executable_add_runtime_dependencies,gengal,\
3888 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3889 $(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \
3890 $(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \
3891 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3892 $(call gb_Package_get_target_for_build,postprocess_registry) \
3893 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3894 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3895 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3896 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3897 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3898 $(call gb_UnoApi_get_target,offapi) \
3899 $(call gb_UnoApi_get_target,udkapi) \
3901 endef
3903 ifeq ($(SYSTEM_ICU),)
3905 define gb_Executable__register_gendict
3906 $(call gb_Executable_add_runtime_dependencies,gendict,\
3907 $(call gb_Package_get_target_for_build,icu) \
3908 $(call gb_Package_get_target_for_build,icu_ure) \
3910 endef
3912 endif
3914 define gb_Executable__register_idlc
3915 $(call gb_Executable_add_runtime_dependencies,idlc,\
3916 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3918 endef
3920 define gb_Executable__register_localize
3921 $(call gb_Executable_add_runtime_dependencies,localize,\
3922 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3923 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3926 endef
3928 # FIXME ure/services.rdb needs cleanup
3929 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3930 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3931 # FIXME: the library target should be for build too
3932 define gb_Executable__register_saxparser
3933 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3934 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3935 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3936 $(call gb_Rdb_get_target_for_build,saxparser) \
3937 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3938 $(call gb_UnoApi_get_target,udkapi) \
3940 endef
3942 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3943 # required due to the settings for URE_SERVICES and URE_TYPES in
3944 # cppuhelper/source/unorc
3945 # FIXME: the library target should be for build too
3946 define gb_Executable__register_uno
3947 $(call gb_Executable_add_runtime_dependencies,uno,\
3948 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3949 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3950 $(call gb_UnoApi_get_target,udkapi) \
3952 endef
3955 # External executables
3957 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3959 gb_ExternalExecutable__register_xmllint :=
3961 else # ! SYSTEM_LIBXML_FOR_BUILD
3963 define gb_ExternalExecutable__register_xmllint
3964 $(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)
3965 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3966 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3967 $(call gb_Package_get_target,libxml2) \
3970 endef
3972 endif # SYSTEM_LIBXML_FOR_BUILD
3974 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3976 gb_ExternalExecutable__register_xsltproc :=
3978 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3980 define gb_ExternalExecutable__register_xsltproc
3981 $(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)
3982 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3983 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3984 $(call gb_Package_get_target,libxml2) \
3985 $(call gb_Package_get_target,libxslt) \
3988 endef
3990 endif # SYSTEM_LIBXSLT_FOR_BUILD
3992 ifneq (,$(SYSTEM_UCPP))
3994 gb_ExternalExecutable__register_ucpp :=
3996 else # ! SYSTEM_UCPP
3998 define gb_ExternalExecutable__register_ucpp
3999 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4001 endef
4003 endif # SYSTEM_UCPP
4005 ifeq (,$(PYTHON_FOR_BUILD))
4007 define gb_ExternalExecutable__register_python
4008 ifeq ($(OS),MACOSX)
4010 # use set_external, to avoid having the command added as prerequisite for the
4011 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4012 # matching rule to build that specific file)
4013 $(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))
4014 # the Zip ensures that internal python has been built (cannot use the Package
4015 # target, as that is not used on Mac)
4016 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4018 else
4020 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4021 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4022 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4024 endif
4026 endef
4028 else
4030 define gb_ExternalExecutable__register_python
4031 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4033 endef
4035 endif # PYTHON_FOR_BUILD
4037 ifneq ($(SYSTEM_GENBRK),)
4039 define gb_ExternalExecutable__register_genbrk
4040 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4042 endef
4044 else # ! SYSTEM_GENBRK
4046 define gb_ExternalExecutable__register_genbrk
4047 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4048 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4049 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4050 $(call gb_Package_get_target_for_build,icu) \
4051 $(call gb_Package_get_target_for_build,icu_ure) \
4054 endef
4056 endif
4058 ifneq ($(SYSTEM_GENCCODE),)
4060 define gb_ExternalExecutable__register_genccode
4061 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4063 endef
4065 else # ! SYSTEM_GENCCODE
4067 define gb_ExternalExecutable__register_genccode
4068 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4069 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4070 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4071 $(call gb_Package_get_target_for_build,icu) \
4072 $(call gb_Package_get_target_for_build,icu_ure) \
4075 endef
4077 endif
4079 ifneq ($(SYSTEM_GENCMN),)
4081 define gb_ExternalExecutable__register_gencmn
4082 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4084 endef
4086 else # ! SYSTEM_GENCMN
4088 define gb_ExternalExecutable__register_gencmn
4089 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4090 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4091 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4092 $(call gb_Package_get_target_for_build,icu) \
4093 $(call gb_Package_get_target_for_build,icu_ure) \
4096 endef
4098 endif
4100 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4101 ifneq ($(SYSTEM_BZIP2),)
4103 define gb_LinkTarget__use_bzip2
4104 $(call gb_LinkTarget_set_include,$(1),\
4105 $(BZIP2_CFLAGS) \
4106 $$(INCLUDE) \
4108 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4110 endef
4112 gb_ExternalProject__use_bzip2 :=
4114 else # !SYSTEM_BZIP2
4116 define gb_LinkTarget__use_bzip2
4117 $(call gb_LinkTarget_set_include,$(1),\
4118 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4119 $$(INCLUDE) \
4122 ifeq ($(COM),MSC)
4123 $(call gb_LinkTarget_add_libs,$(1),\
4124 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4126 else
4127 $(call gb_LinkTarget_add_libs,$(1),\
4128 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4130 endif
4132 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4133 endef
4135 define gb_ExternalProject__use_bzip2
4136 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4137 endef
4139 endif
4140 endif
4142 define gb_LinkTarget__use_clew
4143 $(call gb_LinkTarget_set_include,$(1), \
4144 -I$(SRCDIR)/external/clew/source/include \
4145 $$(INCLUDE) \
4147 $(call gb_LinkTarget_use_libraries,$(1),clew)
4148 endef
4150 ifneq ($(ENABLE_PDFIUM),)
4151 define gb_LinkTarget__use_pdfium
4152 $(call gb_LinkTarget_set_include,$(1),\
4153 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4154 -DCOMPONENT_BUILD \
4155 $$(INCLUDE) \
4157 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4158 endef
4159 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4160 pdfium \
4162 endif
4164 define gb_LinkTarget__use_dtoa
4165 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4166 $(call gb_LinkTarget_set_include,$(1),\
4167 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4168 $$(INCLUDE) \
4170 $(call gb_LinkTarget_use_static_libraries,$(1),\
4171 dtoa \
4174 endef
4176 define gb_ExternalProject__use_dtoa
4177 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4179 endef
4181 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4182 $(if $(UCRT_REDISTDIR),ucrt) \
4185 ifneq ($(SYSTEM_BOX2D),)
4187 define gb_LinkTarget__use_box2d
4188 $(call gb_LinkTarget_set_include,$(1),\
4189 -DSYSTEM_BOX2D \
4190 $$(INCLUDE) \
4191 $(BOX2D_CFLAGS) \
4193 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4195 endef
4197 gb_ExternalProject__use_box2d :=
4199 else # !SYSTEM_BOX2D
4201 define gb_LinkTarget__use_box2d
4202 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4203 $(call gb_LinkTarget_set_include,$(1),\
4204 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4205 $$(INCLUDE) \
4207 $(call gb_LinkTarget_use_static_libraries,$(1),\
4208 box2d \
4211 endef
4213 define gb_ExternalProject__use_box2d
4214 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4216 endef
4218 endif # SYSTEM_BOX2D
4220 ifneq ($(SYSTEM_ZXING),)
4222 define gb_LinkTarget__use_zxing
4223 $(call gb_LinkTarget_set_include,$(1),\
4224 -DSYSTEM_ZXING \
4225 $$(INCLUDE) \
4226 $(ZXING_CFLAGS) \
4228 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4230 endef
4232 gb_ExternalProject__use_zxing :=
4234 else # !SYSTEM_ZXING
4236 ifneq ($(ENABLE_ZXING),)
4238 define gb_LinkTarget__use_zxing
4239 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4240 $(call gb_LinkTarget_set_include,$(1),\
4241 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4242 $$(INCLUDE) \
4244 $(call gb_LinkTarget_use_static_libraries,$(1),\
4245 zxing \
4248 endef
4250 define gb_ExternalProject__use_zxing
4251 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4253 endef
4255 else # !ENABLE_ZXING
4257 define gb_LinkTarget__use_zxing
4258 endef
4260 endif # ENABLE_ZXING
4262 endif # SYSTEM_ZXING
4264 # vim: set noet sw=4 ts=4: