PRODUCTNAME -> %PRODUCTNAME
[LibreOffice.git] / RepositoryExternal.mk
blobad8f0204cd4e4f1b9dc14b15a031e094e9923013
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/private \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
133 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
134 -I$(call gb_UnpackedTarball_get_dir,skia) \
135 -I$(SRCDIR)/external/skia/inc/ \
136 $$(INCLUDE) \
138 $(call gb_LinkTarget_use_libraries,$(1),skia)
139 $(call gb_LinkTarget_add_defs,$(1),\
140 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
141 -DSKIA_DLL \
143 endef
144 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
145 skia \
147 endif
149 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
151 define gb_LinkTarget__use_sane_headers
152 $(call gb_LinkTarget_set_include,$(1),\
153 $(if $(filter WNT,$(OS)), \
154 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
155 -I$(SRCDIR)/external/sane/inc) \
156 $$(INCLUDE) \
159 ifeq ($(OS),WNT)
160 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
161 endif
163 endef
165 else
167 gb_LinkTarget__use_sane_headers :=
169 endif
171 ifneq ($(SYSTEM_BLUEZ),)
173 gb_LinkTarget__use_bluez_bluetooth_headers :=
175 else # !SYSTEM_BLUEZ
177 define gb_LinkTarget__use_bluez_bluetooth_headers
178 $(call gb_LinkTarget_set_include,$(1),\
179 -I$(SRCDIR)/external/bluez_bluetooth/inc \
180 $$(INCLUDE) \
183 endef
185 endif # SYSTEM_BLUEZ
187 # External libraries
189 ifneq ($(SYSTEM_CPPUNIT),)
191 define gb_LinkTarget__use_cppunit
192 $(call gb_LinkTarget_set_include,$(1),\
193 $$(INCLUDE) \
194 $(CPPUNIT_CFLAGS) \
197 $(call gb_LinkTarget_add_libs,$(1),\
198 $(CPPUNIT_LIBS) \
201 endef
203 else # !SYSTEM_CPPUNIT
205 define gb_LinkTarget__use_cppunit
206 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
210 $$(INCLUDE) \
213 ifeq ($(COM),MSC)
214 $(call gb_LinkTarget_add_libs,$(1),\
215 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
217 else
218 $(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
221 endif
223 endef
225 endif # SYSTEM_CPPUNIT
228 ifeq ($(ENABLE_EPOXY),TRUE)
229 ifeq ($(SYSTEM_EPOXY),TRUE)
231 define gb_LinkTarget__use_epoxy
232 $(call gb_LinkTarget_set_include,$(1),\
233 $$(INCLUDE) \
234 $(EPOXY_CFLAGS) \
236 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
238 endef
240 gb_ExternalProject__use_epoxy :=
242 else # !SYSTEM_EPOXY
244 define gb_LinkTarget__use_epoxy
245 $(call gb_LinkTarget_set_include,$(1),\
246 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
247 $$(INCLUDE) \
250 $(call gb_LinkTarget_use_libraries,$(1),\
251 epoxy \
254 endef
256 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
257 epoxy \
260 define gb_ExternalProject__use_epoxy
261 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
263 endef
265 endif # !SYSTEM_EPOXY
266 else # !ENABLE_EPOXY
268 gb_LinkTarget__use_epoxy :=
269 gb_ExternalProject__use_epoxy :=
271 endif # !ENABLE_EPOXY
274 define gb_LinkTarget__use_iconv
275 ifeq ($(COM),MSC)
276 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
277 else
278 $(call gb_LinkTarget_add_libs,$(1),-liconv)
279 endif
280 endef
282 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
284 define gb_LinkTarget__use_mariadb-connector-c
285 $(call gb_LinkTarget_set_include,$(1),\
286 $$(INCLUDE) \
287 $(MARIADB_CFLAGS) \
289 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
291 endef
292 gb_ExternalProject__use_mariadb-connector-c :=
294 else # !SYSTEM_MARIADB_CONNECTOR_C
296 define gb_LinkTarget__use_mariadb-connector-c
297 $(call gb_LinkTarget_set_include,$(1),\
298 $$(INCLUDE) \
299 $(MARIADB_CFLAGS) \
301 $(call gb_LinkTarget_use_static_libraries,$(1),\
302 mariadb-connector-c \
304 ifeq ($(OS),MACOSX)
305 $(call gb_LinkTarget_add_libs,$(1),\
306 -liconv \
308 endif
309 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
310 ws2_32 \
311 advapi32 \
312 kernel32 \
313 shlwapi \
314 crypt32 \
317 endef
318 define gb_ExternalProject__use_mariadb-connector-c
319 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
321 endef
323 endif # SYSTEM_MARIADB_CONNECTOR_C
326 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
328 define gb_LinkTarget__use_mysql
330 $(call gb_LinkTarget_add_defs,$(1),\
331 -DSYSTEM_MARIADB \
334 $(call gb_LinkTarget_add_libs,$(1),\
335 $(MARIADB_LIBS) \
338 $(call gb_LinkTarget_set_include,$(1),\
339 $(MARIADB_CFLAGS) \
340 $$(INCLUDE) \
342 endef
344 else
346 define gb_LinkTarget__use_mysql
348 $(call gb_LinkTarget_set_include,$(1),\
349 $$(INCLUDE) \
352 endef
354 endif
356 ifneq ($(SYSTEM_ZLIB),)
358 define gb_LinkTarget__use_zlib
359 $(call gb_LinkTarget_add_defs,$(1),\
360 -DSYSTEM_ZLIB \
361 -DZLIB_CONST \
363 $(call gb_LinkTarget_add_libs,$(1),-lz)
365 endef
367 # nothing on system
368 define gb_LinkTarget__use_zlib_x64
370 endef
372 gb_ExternalProject__use_zlib :=
374 else # !SYSTEM_ZLIB
376 define gb_LinkTarget__use_zlib_multiarch
377 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
379 $(call gb_LinkTarget_add_defs,$(1), \
380 -DZLIB_CONST \
383 $(call gb_LinkTarget_set_include,$(1),\
384 $(ZLIB_CFLAGS) \
385 $$(INCLUDE) \
388 $(call gb_LinkTarget_use_static_libraries,$(1),\
389 $(2) \
392 endef
394 define gb_LinkTarget__use_zlib
395 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
397 endef
399 define gb_LinkTarget__use_zlib_x64
400 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
402 endef
404 define gb_ExternalProject__use_zlib
405 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
407 endef
409 endif # SYSTEM_ZLIB
412 ifneq ($(SYSTEM_LIBJPEG),)
414 define gb_LinkTarget__use_libjpeg
415 $(call gb_LinkTarget_set_include,$(1),\
416 $$(INCLUDE) \
417 $(LIBJPEG_CFLAGS) \
419 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
420 $(call gb_LinkTarget_set_ldflags,$(1),\
421 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
424 endef
426 gb_ExternalProject__use_libjpeg :=
428 else
430 define gb_LinkTarget__use_libjpeg
431 $(call gb_LinkTarget_set_include,$(1),\
432 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
433 $$(INCLUDE) \
435 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
437 endef
439 define gb_ExternalProject__use_libjpeg
440 $(call gb_ExternalProject_use_static_libraries,$(1),libjpeg-turbo)
442 endef
444 endif # SYSTEM_LIBJPEG
446 ifneq ($(SYSTEM_MYTHES),)
448 define gb_LinkTarget__use_mythes
449 $(call gb_LinkTarget_set_include,$(1),\
450 $$(INCLUDE) \
451 $(MYTHES_CFLAGS) \
453 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
455 endef
457 else # !SYSTEM_MYTHES
459 define gb_LinkTarget__use_mythes
460 $(call gb_LinkTarget_set_include,$(1),\
461 -I$(call gb_UnpackedTarball_get_dir,mythes) \
462 $$(INCLUDE) \
465 ifeq ($(COM),MSC)
466 $(call gb_LinkTarget_use_static_libraries,$(1),\
467 mythes \
469 else
470 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
471 $(call gb_LinkTarget_use_external_project,$(1),mythes)
472 endif
474 endef
476 endif # SYSTEM_MYTHES
479 ifneq ($(SYSTEM_EXPAT),)
481 define gb_LinkTarget__use_expat_impl
482 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
484 $(call gb_LinkTarget_add_defs,$(1),\
485 -DSYSTEM_EXPAT \
488 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
490 endef
492 gb_ExternalProject__use_expat :=
494 else # !SYSTEM_EXPAT
496 define gb_LinkTarget__use_expat_impl
497 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
499 $(call gb_LinkTarget_set_include,$(1),\
500 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
501 $$(INCLUDE) \
504 $(call gb_LinkTarget_use_static_libraries,$(1),\
505 $(2) \
508 endef
510 define gb_ExternalProject__use_expat
511 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
513 endef
515 endif # SYSTEM_EXPAT
517 define gb_LinkTarget__use_expat
518 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
520 endef
522 define gb_LinkTarget__use_expat_x64
523 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
525 endef
527 ifneq ($(SYSTEM_HYPH),)
529 define gb_LinkTarget__use_hyphen
530 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
532 endef
534 else # !SYSTEM_HYPH
536 define gb_LinkTarget__use_hyphen
537 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
538 $(call gb_LinkTarget_set_include,$(1),\
539 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
540 $$(INCLUDE) \
543 ifeq ($(COM),MSC)
544 $(call gb_LinkTarget_use_static_libraries,$(1),\
545 hyphen \
547 else
548 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
549 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
550 endif
552 endef
554 endif # SYSTEM_HYPH
556 ifneq ($(SYSTEM_HUNSPELL),)
558 define gb_LinkTarget__use_hunspell
559 $(call gb_LinkTarget_set_include,$(1),\
560 $$(INCLUDE) \
561 $(HUNSPELL_CFLAGS) \
563 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
565 endef
567 gb_ExternalProject__use_hunspell :=
569 else # !SYSTEM_HUNSPELL
570 ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
572 define gb_LinkTarget__use_hunspell
573 $(call gb_LinkTarget_add_defs,$(1),\
574 -DHUNSPELL_STATIC \
576 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
577 $(call gb_LinkTarget_set_include,$(1),\
578 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
579 $$(INCLUDE) \
582 ifeq ($(COM),MSC)
583 $(call gb_LinkTarget_use_static_libraries,$(1),\
584 hunspell \
586 else
587 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
588 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
589 endif
591 endef
593 define gb_ExternalProject__use_hunspell
594 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
596 endef
598 endif # ENABLE_WASM_STRIP_HUNSPELL
599 endif # SYSTEM_HUNSPELL
602 ifneq ($(SYSTEM_BOOST),)
604 define gb_LinkTarget__use_boost_lib
605 $(call gb_LinkTarget_set_include,$(1),\
606 $$(INCLUDE) \
607 $(BOOST_CPPFLAGS) \
610 $(call gb_LinkTarget_add_ldflags,$(1),\
611 $(BOOST_LDFLAGS) \
614 $(call gb_LinkTarget_add_libs,$(1),$(2))
616 endef
618 define gb_LinkTarget__use_boost_locale
619 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
621 endef
623 define gb_LinkTarget__use_boost_date_time
624 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
626 endef
628 define gb_LinkTarget__use_boost_filesystem
629 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
631 endef
633 gb_ExternalProject__use_boost_filesystem :=
635 define gb_LinkTarget__use_boost_iostreams
636 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
638 endef
640 gb_ExternalProject__use_boost_iostreams :=
642 define gb_LinkTarget__use_boost_system
643 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
645 endef
647 gb_ExternalProject__use_boost_system :=
649 define gb_LinkTarget__use_boost_headers
650 $(call gb_LinkTarget_set_include,$(1),\
651 $$(INCLUDE) \
652 $(BOOST_CPPFLAGS) \
655 endef
657 gb_ExternalProject__use_boost_headers:=
659 else # !SYSTEM_BOOST
661 define gb_LinkTarget__use_boost_lib
662 $(call gb_LinkTarget_add_defs,$(1),\
663 -DBOOST_ALL_NO_LIB \
666 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
668 endef
670 define gb_LinkTarget__use_boost_locale
671 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
672 $(call gb_LinkTarget_add_libs,$(1),\
673 $(if $(filter $(OS),MACOSX),-liconv) \
676 endef
678 define gb_LinkTarget__use_boost_date_time
679 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
681 endef
683 define gb_LinkTarget__use_boost_filesystem
684 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
686 endef
688 define gb_ExternalProject__use_boost_filesystem
689 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
690 endef
692 define gb_LinkTarget__use_boost_iostreams
693 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
695 endef
697 define gb_ExternalProject__use_boost_iostreams
698 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
699 endef
701 define gb_LinkTarget__use_boost_system
702 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
704 endef
706 define gb_ExternalProject__use_boost_system
707 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
708 endef
710 define gb_LinkTarget__use_boost_headers
711 $(call gb_LinkTarget_use_unpacked,$(1),boost)
712 $(call gb_LinkTarget_set_include,$(1),\
713 $(BOOST_CPPFLAGS) \
714 $$(INCLUDE) \
717 endef
719 define gb_ExternalProject__use_boost_headers
720 $(call gb_ExternalProject_use_unpacked,$(1),boost)
722 endef
724 endif # SYSTEM_BOOST
727 ifneq ($(SYSTEM_LIBCMIS),)
729 define gb_LinkTarget__use_libcmis
730 $(call gb_LinkTarget_set_include,$(1),\
731 $$(INCLUDE) \
732 $(LIBCMIS_CFLAGS) \
734 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
736 endef
738 else # !SYSTEM_LIBCMIS
740 define gb_LinkTarget__use_libcmis
741 $(call gb_LinkTarget_set_include,$(1),\
742 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
743 $$(INCLUDE) \
745 $(call gb_LinkTarget_use_static_libraries,$(1),\
746 libcmis \
749 endef
751 endif # SYSTEM_LIBCMIS
753 ifeq ($(ENABLE_JAVA),TRUE)
755 define gb_LinkTarget__use_jawt
756 $(call gb_LinkTarget_add_libs,$(1),\
757 $(JAWTLIB) \
760 endef
762 else # !ENABLE_JAVA
764 gb_LinkTarget__use_jawt :=
766 endif # ENABLE_JAVA
768 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
770 define gb_LinkTarget__use_libatomic_ops
771 $(call gb_LinkTarget_set_include,$(1),\
772 $$(INCLUDE) \
773 $(LIBATOMIC_OPS_CFLAGS) \
775 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
777 endef
778 gb_ExternalProject__use_libatomic_ops :=
780 else # !SYSTEM_LIBATOMIC_OPS
782 define gb_LinkTarget__use_libatomic_ops
783 $(call gb_LinkTarget_set_include,$(1),\
784 $(LIBATOMIC_OPS_CFLAGS) \
785 $$(INCLUDE) \
786 $(LIBATOMIC_OPS_CFLAGS) \
788 $(call gb_LinkTarget_use_external_project,$(1),\
789 libatomic_ops \
792 $(call gb_LinkTarget_add_libs,$(1),\
793 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
796 endef
798 define gb_ExternalProject__use_libatomic_ops
799 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
801 endef
803 endif # SYSTEM_LIBATOMIC_OPS
806 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
808 define gb_LinkTarget__use_libexttextcat
809 $(call gb_LinkTarget_set_include,$(1),\
810 $$(INCLUDE) \
811 $(LIBEXTTEXTCAT_CFLAGS) \
813 $(call gb_LinkTarget_add_defs,$(1),\
814 -DSYSTEM_LIBEXTTEXTCAT \
816 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
818 endef
820 else # !SYSTEM_LIBEXTTEXTCAT
822 define gb_LinkTarget__use_libexttextcat
823 $(call gb_LinkTarget_set_include,$(1),\
824 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
825 $$(INCLUDE) \
828 ifeq ($(COM),MSC)
829 $(call gb_LinkTarget_use_static_libraries,$(1),\
830 libexttextcat \
832 else
833 $(call gb_LinkTarget_add_libs,$(1),\
834 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
836 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
837 endif
840 endef
842 endif # SYSTEM_LIBEXTTEXTCAT
845 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
847 define gb_LinkTarget__use_libnumbertext
848 $(call gb_LinkTarget_set_include,$(1),\
849 $$(INCLUDE) \
850 $(LIBNUMBERTEXT_CFLAGS) \
852 $(call gb_LinkTarget_add_defs,$(1),\
853 -DSYSTEM_LIBNUMBERTEXT \
855 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
857 endef
859 else # !SYSTEM_LIBNUMBERTEXT
861 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
862 libnumbertext_numbertext \
865 define gb_LinkTarget__use_libnumbertext
866 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
867 $(call gb_LinkTarget_set_include,$(1),\
868 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
869 $$(INCLUDE) \
872 ifeq ($(COM),MSC)
873 $(call gb_LinkTarget_use_static_libraries,$(1),\
874 libnumbertext \
876 else
878 $(call gb_LinkTarget_add_libs,$(1),\
879 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
881 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
883 endif
885 endef
887 endif # SYSTEM_LIBNUMBERTEXT
890 ifneq ($(SYSTEM_LIBXML),)
892 define gb_LinkTarget__use_libxml2
893 $(call gb_LinkTarget_add_defs,$(1),\
894 -DSYSTEM_LIBXML \
896 $(call gb_LinkTarget_set_include,$(1),\
897 $$(INCLUDE) \
898 $(LIBXML_CFLAGS) \
900 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
902 endef
903 gb_ExternalProject__use_libxml2:=
905 else # !SYSTEM_LIBXML
907 $(eval $(call gb_Helper_register_packages_for_install,ure,\
908 libxml2 \
911 define gb_LinkTarget__use_libxml2
912 $(call gb_LinkTarget_use_package,$(1),libxml2)
913 $(call gb_LinkTarget_set_include,$(1),\
914 $$(INCLUDE) \
915 $(LIBXML_CFLAGS) \
918 $(call gb_LinkTarget_add_libs,$(1),\
919 $(LIBXML_LIBS) \
922 ifeq ($(COM),MSC)
923 $(call gb_LinkTarget_use_external,$(1),icu_headers)
924 endif
926 endef
927 define gb_ExternalProject__use_libxml2
928 $(call gb_ExternalProject_use_package,$(1),libxml2)
930 ifeq ($(COM),MSC)
931 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
932 endif
934 endef
936 endif # SYSTEM_LIBXML
939 ifneq ($(SYSTEM_LIBXSLT),)
941 define gb_LinkTarget__use_libxslt
942 $(call gb_LinkTarget_set_include,$(1),\
943 $$(INCLUDE) \
944 $(LIBXSLT_CFLAGS) \
946 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
948 endef
950 define gb_LinkTarget__use_libexslt
951 $(call gb_LinkTarget_set_include,$(1),\
952 $$(INCLUDE) \
953 $(LIBEXSLT_CFLAGS) \
956 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
958 endef
960 else # !SYSTEM_LIBXSLT
962 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
963 libxslt \
966 define gb_LinkTarget__use_libxslt
967 $(call gb_LinkTarget_use_package,$(1),libxslt)
968 $(call gb_LinkTarget_set_include,$(1),\
969 $$(INCLUDE) \
970 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
973 ifeq ($(COM),MSC)
974 $(call gb_LinkTarget_add_libs,$(1),\
975 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
977 else
978 $(call gb_LinkTarget_add_libs,$(1),\
979 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
981 endif
983 endef
985 define gb_LinkTarget__use_libexslt
986 $(call gb_LinkTarget_use_package,$(1),libxslt)
987 $(call gb_LinkTarget_set_include,$(1),\
988 $$(INCLUDE) \
989 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
992 ifeq ($(COM),MSC)
993 $(call gb_LinkTarget_add_libs,$(1),\
994 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
996 else
997 $(call gb_LinkTarget_add_libs,$(1),\
998 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
1000 endif
1002 endef
1004 endif # SYSTEM_LIBXSLT
1007 ifneq ($(SYSTEM_XMLSEC),)
1009 define gb_LinkTarget__use_xmlsec
1010 $(call gb_LinkTarget_add_defs,$(1),\
1011 -DSYSTEM_XMLSEC \
1013 $(call gb_LinkTarget_set_include,$(1),\
1014 $$(INCLUDE) \
1015 $(XMLSEC_CFLAGS) \
1017 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1019 endef
1021 gb_ExternalProject__use_xmlsec:=
1023 else # !SYSTEM_XMLSEC
1025 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1026 xmlsec \
1029 define gb_LinkTarget__use_xmlsec
1031 endef
1033 endif # SYSTEM_XMLSEC
1035 ifneq ($(SYSTEM_LIBLANGTAG),)
1037 define gb_LinkTarget__use_liblangtag
1038 $(call gb_LinkTarget_set_include,$(1),\
1039 $$(INCLUDE) \
1040 $(LIBLANGTAG_CFLAGS) \
1043 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1045 endef
1047 gb_ExternalProject__use_liblangtag :=
1049 else # !SYSTEM_LIBLANGTAG
1051 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1052 liblangtag_data \
1055 ifeq ($(COM),MSC)
1057 define gb_LinkTarget__use_liblangtag
1058 $(call gb_LinkTarget_set_include,$(1),\
1059 $(LIBLANGTAG_CFLAGS) \
1060 $$(INCLUDE) \
1062 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1063 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1065 endef
1067 else
1069 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1070 liblangtag \
1073 define gb_LinkTarget__use_liblangtag
1074 $(call gb_LinkTarget_set_include,$(1),\
1075 $(LIBLANGTAG_CFLAGS) \
1076 $$(INCLUDE) \
1078 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1079 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1081 endef
1083 endif # MSC
1085 define gb_ExternalProject__use_liblangtag
1086 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1088 endef
1090 endif # SYSTEM_LIBLANGTAG
1093 ifneq ($(SYSTEM_REDLAND),)
1095 define gb_LinkTarget__use_librdf
1096 $(call gb_LinkTarget_add_defs,$(1),\
1097 -DSYSTEM_REDLAND \
1099 $(call gb_LinkTarget_set_include,$(1),\
1100 $$(INCLUDE) \
1101 $(REDLAND_CFLAGS) \
1103 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1105 endef
1107 gb_LinkTarget__use_redland_headers:=
1109 gb_LinkTarget__use_raptor_headers:=
1111 gb_LinkTarget__use_rasqal_headers:=
1113 else # !SYSTEM_REDLAND
1115 define gb_LinkTarget__use_redland_headers
1116 $(call gb_LinkTarget_set_include,$(1),\
1117 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1118 $$(INCLUDE) \
1121 endef
1123 define gb_LinkTarget__use_raptor_headers
1124 $(call gb_LinkTarget_set_include,$(1),\
1125 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1126 $$(INCLUDE) \
1129 endef
1131 define gb_LinkTarget__use_rasqal_headers
1132 $(call gb_LinkTarget_set_include,$(1),\
1133 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1134 $$(INCLUDE) \
1137 endef
1139 ifneq ($(OS),ANDROID)
1141 ifeq ($(COM),MSC)
1142 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1143 raptor2 \
1144 rasqal \
1145 rdf \
1147 else
1148 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1149 raptor \
1150 rasqal \
1151 redland \
1153 endif
1155 define gb_LinkTarget__use_librdf
1156 ifeq ($(COM),MSC)
1157 $(call gb_LinkTarget_use_libraries,$(1),\
1158 raptor2 \
1159 rdf \
1161 else
1162 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1164 $(call gb_LinkTarget_add_libs,$(1),\
1165 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1166 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1167 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1169 endif
1171 endef
1173 else # ANDROID
1175 define gb_LinkTarget__use_librdf
1176 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1178 endef
1180 endif # ANDROID
1182 endif # SYSTEM_REDLAND
1184 ifneq ($(SYSTEM_CAIRO),)
1186 define gb_LinkTarget__use_cairo
1187 $(call gb_LinkTarget_set_include,$(1),\
1188 $$(INCLUDE) \
1189 $(CAIRO_CFLAGS) \
1191 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1192 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1194 endef
1196 else # !SYSTEM_CAIRO
1198 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1200 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1201 cairo \
1202 pixman \
1205 define gb_LinkTarget__use_cairo
1206 $(call gb_LinkTarget_use_package,$(1),cairo)
1207 $(call gb_LinkTarget_use_package,$(1),pixman)
1208 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1209 $(call gb_LinkTarget_set_include,$(1),\
1210 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1211 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1212 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1213 $$(INCLUDE) \
1215 $(call gb_LinkTarget_add_libs,$(1),\
1216 $(if $(filter EMSCRIPTEN,$(OS)), \
1217 $(call gb_UnpackedTarball_get_dir,cairo)/src/.libs/libcairo.a \
1218 $(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs/libpixman-1.a, \
1219 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1220 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1) \
1223 endef
1225 endif # !MACOSX, !WNT
1227 endif # !SYSTEM_CAIRO
1229 ifneq ($(SYSTEM_FREETYPE),)
1231 define gb_LinkTarget__use_freetype_headers
1232 $(call gb_LinkTarget_set_include,$(1),\
1233 $$(INCLUDE) \
1234 $(FREETYPE_CFLAGS) \
1237 endef
1239 gb_ExternalProject__use_freetype :=
1241 else
1243 define gb_LinkTarget__use_freetype_headers
1244 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1245 $(call gb_LinkTarget_set_include,$(1),\
1246 $(FREETYPE_CFLAGS) \
1247 $$(INCLUDE) \
1250 endef
1252 define gb_ExternalProject__use_freetype
1253 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1255 endef
1257 endif # SYSTEM_FREETYPE
1259 define gb_LinkTarget__use_freetype
1260 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1261 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1263 endef
1265 ifneq ($(SYSTEM_FONTCONFIG),)
1267 define gb_LinkTarget__use_fontconfig
1268 $(call gb_LinkTarget_set_include,$(1),\
1269 $$(INCLUDE) \
1270 $(FONTCONFIG_CFLAGS) \
1273 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1275 endef
1277 ifeq ($(OS),EMSCRIPTEN)
1278 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1279 libfontconfig_data \
1281 endif
1283 gb_ExternalProject__use_fontconfig :=
1285 else # SYSTEM_FONTCONFIG
1287 define gb_LinkTarget__use_fontconfig
1288 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1289 $(call gb_LinkTarget_set_include,$(1),\
1290 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1291 $$(INCLUDE) \
1294 $(call gb_LinkTarget_add_libs,$(1),\
1295 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1298 endef
1300 define gb_ExternalProject__use_fontconfig
1301 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1303 endef
1305 endif # SYSTEM_FONTCONFIG
1307 ifneq ($(SYSTEM_GRAPHITE),)
1309 define gb_LinkTarget__use_graphite
1310 $(call gb_LinkTarget_set_include,$(1),\
1311 $$(INCLUDE) \
1312 $(GRAPHITE_CFLAGS) \
1314 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1316 endef
1318 gb_ExternalProject__use_graphite:=
1320 else # !SYSTEM_GRAPHITE
1322 define gb_LinkTarget__use_graphite
1323 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1324 $(call gb_LinkTarget_set_include,$(1),\
1325 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1326 $$(INCLUDE) \
1328 $(call gb_LinkTarget_use_static_libraries,$(1),\
1329 graphite \
1332 endef
1334 define gb_ExternalProject__use_graphite
1335 $(call gb_ExternalProject_use_static_libraries,$(1),\
1336 graphite \
1339 endef
1340 endif # SYSTEM_GRAPHITE
1342 ifneq ($(SYSTEM_ICU),)
1344 gb_LinkTarget__use_icu_headers:=
1345 gb_ExternalProject__use_icu:=
1347 define gb_LinkTarget__use_icudata
1348 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1350 endef
1351 define gb_LinkTarget__use_icui18n
1352 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1354 endef
1355 define gb_LinkTarget__use_icuuc
1356 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1358 endef
1360 else # !SYSTEM_ICU
1362 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1363 icu_ure \
1366 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1367 icu \
1370 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1371 gb_ICU_suffix:=lo
1372 else
1373 gb_ICU_suffix:=
1374 endif
1376 define gb_LinkTarget__use_icu_headers
1377 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1378 $(call gb_LinkTarget_set_include,$(1),\
1379 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1380 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1381 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1382 $$(INCLUDE) \
1385 endef
1387 define gb_ExternalProject__use_icu
1388 $(call gb_ExternalProject_use_package,$(1),icu)
1390 endef
1392 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1393 define gb_LinkTarget__use_icudata
1394 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1396 ifeq ($(OS),WNT)
1397 $(call gb_LinkTarget_add_libs,$(1),\
1398 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1400 else
1401 $(call gb_LinkTarget_add_libs,$(1),\
1402 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1404 endif
1406 endef
1408 define gb_LinkTarget__use_icui18n
1409 $(call gb_LinkTarget_use_package,$(1),icu)
1411 ifeq ($(OS),WNT)
1412 $(call gb_LinkTarget_add_libs,$(1),\
1413 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1415 else
1416 $(call gb_LinkTarget_add_libs,$(1),\
1417 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1419 endif
1421 endef
1423 define gb_LinkTarget__use_icuuc
1424 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1426 ifeq ($(OS),WNT)
1427 $(call gb_LinkTarget_add_libs,$(1),\
1428 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1430 else
1431 $(call gb_LinkTarget_add_libs,$(1),\
1432 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1434 endif
1436 endef
1438 endif # SYSTEM_ICU
1440 ifneq ($(SYSTEM_HARFBUZZ),)
1442 define gb_LinkTarget__use_harfbuzz
1443 $(call gb_LinkTarget_set_include,$(1),\
1444 $$(INCLUDE) \
1445 $(HARFBUZZ_CFLAGS) \
1447 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1449 endef
1451 gb_ExternalProject__use_harfbuzz :=
1453 else # SYSTEM_HARFBUZZ != TRUE
1455 define gb_LinkTarget__use_harfbuzz
1456 $(call gb_LinkTarget_set_include,$(1),\
1457 $(HARFBUZZ_CFLAGS) \
1458 $$(INCLUDE) \
1460 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1461 $(call gb_LinkTarget_use_external,$(1),icuuc)
1462 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1464 endef
1466 define gb_ExternalProject__use_harfbuzz
1467 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1469 endef
1471 endif # SYSTEM_HARFBUZZ
1473 ifneq ($(ENABLE_OPENSSL),TRUE)
1475 gb_ExternalProject__use_openssl:=
1476 gb_LinkTarget__use_openssl_headers:=
1477 gb_LinkTarget__use_openssl:=
1479 else # ENABLE_OPENSSL
1481 ifneq ($(SYSTEM_OPENSSL),)
1483 gb_LinkTarget__use_openssl_headers:=
1484 gb_ExternalProject__use_openssl:=
1486 define gb_LinkTarget__use_openssl
1487 $(call gb_LinkTarget_set_include,$(1),\
1488 $$(INCLUDE) \
1489 $(OPENSSL_CFLAGS) \
1491 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1493 endef
1495 else # !SYSTEM_OPENSSL
1497 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1498 openssl \
1501 define gb_ExternalProject__use_openssl
1502 $(call gb_ExternalProject_use_package,$(1),openssl)
1504 endef
1506 define gb_LinkTarget__use_openssl_headers
1507 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1508 $(call gb_LinkTarget_set_include,$(1),\
1509 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1510 $$(INCLUDE) \
1513 endef
1515 define gb_LinkTarget__use_openssl
1516 $(call gb_LinkTarget_use_package,$(1),openssl)
1517 ifeq ($(OS),WNT)
1518 $(call gb_LinkTarget_add_libs,$(1),\
1519 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1520 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1522 else
1523 $(call gb_LinkTarget_add_libs,$(1),\
1524 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1525 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1526 $(if $(filter $(OS),LINUX),-pthread) \
1528 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1529 ifeq ($(OS),SOLARIS)
1530 $(call gb_LinkTarget_add_libs,$(1),\
1531 -lnsl \
1532 -lsocket \
1534 endif
1535 endif
1537 endef
1539 endif # SYSTEM_OPENSSL
1540 endif # ENABLE_OPENSSL
1543 ifneq ($(SYSTEM_CDR),)
1545 define gb_LinkTarget__use_cdr
1546 $(call gb_LinkTarget_set_include,$(1),\
1547 $$(INCLUDE) \
1548 $(CDR_CFLAGS) \
1550 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1552 endef
1554 else # !SYSTEM_CDR
1556 define gb_LinkTarget__use_cdr
1557 $(call gb_LinkTarget_set_include,$(1),\
1558 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1559 $$(INCLUDE) \
1561 $(call gb_LinkTarget_add_libs,$(1),\
1562 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1564 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1565 endef
1567 endif # SYSTEM_CDR
1570 ifneq ($(SYSTEM_EBOOK),)
1572 define gb_LinkTarget__use_ebook
1573 $(call gb_LinkTarget_set_include,$(1),\
1574 $$(INCLUDE) \
1575 $(EBOOK_CFLAGS) \
1577 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1579 endef
1581 gb_ExternalProject__use_ebook :=
1583 else # !SYSTEM_EBOOK
1585 define gb_LinkTarget__use_ebook
1586 $(call gb_LinkTarget_set_include,$(1),\
1587 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1588 $$(INCLUDE) \
1590 $(call gb_LinkTarget_add_libs,$(1),\
1591 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1593 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1595 endef
1597 define gb_ExternalProject__use_ebook
1598 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1600 endef
1602 endif # SYSTEM_EBOOK
1605 ifneq ($(SYSTEM_ETONYEK),)
1607 define gb_LinkTarget__use_etonyek
1608 $(call gb_LinkTarget_set_include,$(1),\
1609 $$(INCLUDE) \
1610 $(ETONYEK_CFLAGS) \
1612 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1614 endef
1616 gb_ExternalProject__use_etonyek :=
1618 else # !SYSTEM_ETONYEK
1620 ifeq ($(COM),MSC)
1622 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1623 etonyek \
1626 define gb_LinkTarget__use_etonyek
1627 $(call gb_LinkTarget_set_include,$(1),\
1628 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1629 $$(INCLUDE) \
1631 $(call gb_LinkTarget_use_libraries,$(1),\
1632 etonyek \
1635 endef
1637 else # !MSC
1639 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1640 libetonyek \
1643 define gb_LinkTarget__use_etonyek
1644 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1646 $(call gb_LinkTarget_set_include,$(1),\
1647 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1648 -DLIBETONYEK_VISIBILITY \
1649 $$(INCLUDE) \
1651 $(call gb_LinkTarget_add_libs,$(1),\
1652 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1654 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1656 endef
1658 define gb_ExternalProject__use_etonyek
1659 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1661 endef
1663 endif
1665 endif # SYSTEM_ETONYEK
1668 ifneq ($(SYSTEM_FREEHAND),)
1670 define gb_LinkTarget__use_freehand
1671 $(call gb_LinkTarget_set_include,$(1),\
1672 $$(INCLUDE) \
1673 $(FREEHAND_CFLAGS) \
1675 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1677 endef
1679 gb_ExternalProject__use_freehand :=
1681 else # !SYSTEM_FREEHAND
1683 define gb_LinkTarget__use_freehand
1684 $(call gb_LinkTarget_set_include,$(1),\
1685 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1686 $$(INCLUDE) \
1688 $(call gb_LinkTarget_add_libs,$(1),\
1689 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1691 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1693 endef
1695 define gb_ExternalProject__use_freehand
1696 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1698 endef
1700 endif # SYSTEM_FREEHAND
1703 ifneq ($(SYSTEM_ODFGEN),)
1705 define gb_LinkTarget__use_odfgen
1706 $(call gb_LinkTarget_set_include,$(1),\
1707 $$(INCLUDE) \
1708 $(ODFGEN_CFLAGS) \
1710 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1712 endef
1714 else # !SYSTEM_ODFGEN
1716 ifeq ($(COM),MSC)
1718 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1719 odfgen \
1722 define gb_LinkTarget__use_odfgen
1723 $(call gb_LinkTarget_set_include,$(1),\
1724 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1725 $$(INCLUDE) \
1727 $(call gb_LinkTarget_use_libraries,$(1),\
1728 odfgen \
1731 endef
1733 else # !MSC
1735 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1736 libodfgen \
1739 define gb_LinkTarget__use_odfgen
1740 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1742 $(call gb_LinkTarget_set_include,$(1),\
1743 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1744 -DLIBODFGEN_VISIBILITY \
1745 $$(INCLUDE) \
1747 $(call gb_LinkTarget_add_libs,$(1),\
1748 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1751 endef
1753 endif
1755 endif # SYSTEM_ODFGEN
1757 ifneq ($(SYSTEM_EPUBGEN),)
1759 define gb_LinkTarget__use_epubgen
1760 $(call gb_LinkTarget_set_include,$(1),\
1761 $$(INCLUDE) \
1762 $(EPUBGEN_CFLAGS) \
1764 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1766 endef
1767 gb_ExternalProject__use_epubgen :=
1769 else # !SYSTEM_EPUBGEN
1770 ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
1772 define gb_LinkTarget__use_epubgen
1773 $(call gb_LinkTarget_set_include,$(1),\
1774 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1775 $$(INCLUDE) \
1777 $(call gb_LinkTarget_add_libs,$(1),\
1778 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1780 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1782 endef
1783 define gb_ExternalProject__use_epubgen
1784 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1786 endef
1788 endif # ENABLE_WASM_STRIP_EPUB
1789 endif # SYSTEM_EPUBGEN
1791 ifneq ($(SYSTEM_REVENGE),)
1793 define gb_LinkTarget__use_revenge
1794 $(call gb_LinkTarget_set_include,$(1),\
1795 $$(INCLUDE) \
1796 $(REVENGE_CFLAGS) \
1798 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1800 endef
1802 gb_ExternalProject__use_revenge :=
1804 else # !SYSTEM_REVENGE
1806 ifeq ($(COM),MSC)
1808 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1809 revenge \
1812 define gb_LinkTarget__use_revenge
1813 $(call gb_LinkTarget_set_include,$(1),\
1814 $(REVENGE_CFLAGS) \
1815 $$(INCLUDE) \
1817 $(call gb_LinkTarget_use_libraries,$(1),\
1818 revenge \
1821 endef
1823 define gb_ExternalProject__use_revenge
1824 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1826 endef
1828 else # !MSC
1830 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1831 librevenge \
1834 define gb_LinkTarget__use_revenge
1835 $(call gb_LinkTarget_use_package,$(1),librevenge)
1837 $(call gb_LinkTarget_set_include,$(1),\
1838 $(REVENGE_CFLAGS) \
1839 -DLIBREVENGE_VISIBILITY \
1840 $$(INCLUDE) \
1842 $(call gb_LinkTarget_add_libs,$(1),\
1843 $(REVENGE_LIBS) \
1845 endef
1847 define gb_ExternalProject__use_revenge
1848 $(call gb_ExternalProject_use_package,$(1),librevenge)
1850 endef
1852 endif # MSC
1854 endif # SYSTEM_REVENGE
1857 ifneq ($(SYSTEM_ABW),)
1859 define gb_LinkTarget__use_abw
1860 $(call gb_LinkTarget_set_include,$(1),\
1861 $$(INCLUDE) \
1862 $(ABW_CFLAGS) \
1864 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1866 endef
1867 gb_ExternalProject__use_abw :=
1869 else # !SYSTEM_ABW
1871 define gb_LinkTarget__use_abw
1872 $(call gb_LinkTarget_set_include,$(1),\
1873 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1874 $$(INCLUDE) \
1876 $(call gb_LinkTarget_add_libs,$(1),\
1877 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1879 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1881 endef
1882 define gb_ExternalProject__use_abw
1883 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1885 endef
1887 endif # SYSTEM_ABW
1890 ifneq ($(SYSTEM_MSPUB),)
1892 define gb_LinkTarget__use_mspub
1893 $(call gb_LinkTarget_set_include,$(1),\
1894 $$(INCLUDE) \
1895 $(MSPUB_CFLAGS) \
1897 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1899 endef
1901 else # !SYSTEM_MSPUB
1903 define gb_LinkTarget__use_mspub
1904 $(call gb_LinkTarget_set_include,$(1),\
1905 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1906 $$(INCLUDE) \
1908 $(call gb_LinkTarget_add_libs,$(1),\
1909 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1911 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1913 endef
1915 endif # SYSTEM_MSPUB
1918 ifneq ($(SYSTEM_PAGEMAKER),)
1920 define gb_LinkTarget__use_pagemaker
1921 $(call gb_LinkTarget_set_include,$(1),\
1922 $$(INCLUDE) \
1923 $(PAGEMAKER_CFLAGS) \
1925 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1927 endef
1928 gb_ExternalProject__use_pagemaker :=
1930 else # !SYSTEM_PAGEMAKER
1932 define gb_LinkTarget__use_pagemaker
1933 $(call gb_LinkTarget_set_include,$(1),\
1934 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1935 $$(INCLUDE) \
1937 $(call gb_LinkTarget_add_libs,$(1),\
1938 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1940 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1942 endef
1943 define gb_ExternalProject__use_pagemaker
1944 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1946 endef
1948 endif # SYSTEM_PAGEMAKER
1951 ifneq ($(SYSTEM_QXP),)
1953 define gb_LinkTarget__use_qxp
1954 $(call gb_LinkTarget_set_include,$(1),\
1955 $$(INCLUDE) \
1956 $(QXP_CFLAGS) \
1958 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
1960 endef
1961 gb_ExternalProject__use_qxp :=
1963 else # !SYSTEM_QXP
1965 define gb_LinkTarget__use_qxp
1966 $(call gb_LinkTarget_set_include,$(1),\
1967 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
1968 $$(INCLUDE) \
1970 $(call gb_LinkTarget_add_libs,$(1),\
1971 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
1973 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
1975 endef
1976 define gb_ExternalProject__use_qxp
1977 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
1979 endef
1981 endif # SYSTEM_QXP
1984 ifneq ($(SYSTEM_ZMF),)
1986 define gb_LinkTarget__use_zmf
1987 $(call gb_LinkTarget_set_include,$(1),\
1988 $$(INCLUDE) \
1989 $(ZMF_CFLAGS) \
1991 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1993 endef
1994 gb_ExternalProject__use_zmf :=
1996 else # !SYSTEM_ZMF
1998 define gb_LinkTarget__use_zmf
1999 $(call gb_LinkTarget_set_include,$(1),\
2000 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2001 $$(INCLUDE) \
2003 $(call gb_LinkTarget_add_libs,$(1),\
2004 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2006 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2008 endef
2009 define gb_ExternalProject__use_zmf
2010 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2012 endef
2014 endif # SYSTEM_ZMF
2017 ifneq ($(SYSTEM_VISIO),)
2019 define gb_LinkTarget__use_visio
2020 $(call gb_LinkTarget_set_include,$(1),\
2021 $$(INCLUDE) \
2022 $(VISIO_CFLAGS) \
2024 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2026 endef
2028 else # !SYSTEM_VISIO
2030 define gb_LinkTarget__use_visio
2031 $(call gb_LinkTarget_set_include,$(1),\
2032 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2033 $$(INCLUDE) \
2035 $(call gb_LinkTarget_add_libs,$(1),\
2036 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2038 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2040 endef
2042 endif # SYSTEM_VISIO
2045 ifneq ($(SYSTEM_WPD),)
2047 define gb_LinkTarget__use_wpd
2048 $(call gb_LinkTarget_set_include,$(1),\
2049 $$(INCLUDE) \
2050 $(WPD_CFLAGS) \
2052 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2054 endef
2055 gb_ExternalProject__use_wpd :=
2057 else # !SYSTEM_WPD
2059 ifeq ($(COM),MSC)
2061 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2062 wpd \
2065 define gb_LinkTarget__use_wpd
2066 $(call gb_LinkTarget_set_include,$(1),\
2067 $(WPD_CFLAGS) \
2068 $$(INCLUDE) \
2070 $(call gb_LinkTarget_use_libraries,$(1),\
2071 wpd \
2074 endef
2076 define gb_ExternalProject__use_wpd
2077 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2079 endef
2081 else # !MSC
2083 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2084 libwpd \
2087 define gb_LinkTarget__use_wpd
2088 $(call gb_LinkTarget_use_package,$(1),libwpd)
2090 $(call gb_LinkTarget_set_include,$(1),\
2091 $(WPD_CFLAGS) \
2092 $$(INCLUDE) \
2094 $(call gb_LinkTarget_add_libs,$(1),\
2095 $(WPD_LIBS) \
2098 endef
2100 define gb_ExternalProject__use_wpd
2101 $(call gb_ExternalProject_use_package,$(1),libwpd)
2103 endef
2105 endif # MSC
2107 endif # SYSTEM_WPD
2110 ifneq ($(SYSTEM_WPG),)
2112 define gb_LinkTarget__use_wpg
2113 $(call gb_LinkTarget_set_include,$(1),\
2114 $$(INCLUDE) \
2115 $(WPG_CFLAGS) \
2117 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2119 endef
2120 gb_ExternalProject__use_wpg :=
2122 else # !SYSTEM_WPG
2124 ifeq ($(COM),MSC)
2126 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2127 wpg \
2130 define gb_LinkTarget__use_wpg
2131 $(call gb_LinkTarget_set_include,$(1),\
2132 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2133 $$(INCLUDE) \
2135 $(call gb_LinkTarget_use_libraries,$(1),\
2136 wpg \
2139 endef
2141 else # !MSC
2143 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2144 libwpg \
2147 define gb_LinkTarget__use_wpg
2148 $(call gb_LinkTarget_use_package,$(1),libwpg)
2150 $(call gb_LinkTarget_set_include,$(1),\
2151 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2152 $$(INCLUDE) \
2154 $(call gb_LinkTarget_add_libs,$(1),\
2155 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2158 endef
2160 endif # MSC
2162 endif # SYSTEM_WPG
2165 ifneq ($(SYSTEM_WPS),)
2167 define gb_LinkTarget__use_wps
2168 $(call gb_LinkTarget_set_include,$(1),\
2169 $$(INCLUDE) \
2170 $(WPS_CFLAGS) \
2172 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2174 endef
2175 gb_ExternalProject__use_wps :=
2177 else # !SYSTEM_WPS
2179 ifeq ($(COM),MSC)
2181 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2182 wps \
2185 define gb_LinkTarget__use_wps
2186 $(call gb_LinkTarget_set_include,$(1),\
2187 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2188 $$(INCLUDE) \
2191 $(call gb_LinkTarget_use_libraries,$(1),\
2192 wps \
2195 endef
2197 else # !MSC
2199 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2200 libwps \
2203 define gb_LinkTarget__use_wps
2204 $(call gb_LinkTarget_use_package,$(1),libwps)
2206 $(call gb_LinkTarget_set_include,$(1),\
2207 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2208 $$(INCLUDE) \
2210 $(call gb_LinkTarget_add_libs,$(1),\
2211 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2214 endef
2216 endif # MSC
2218 endif # SYSTEM_WPS
2221 ifneq ($(SYSTEM_MWAW),)
2223 define gb_LinkTarget__use_mwaw
2224 $(call gb_LinkTarget_set_include,$(1),\
2225 $$(INCLUDE) \
2226 $(MWAW_CFLAGS) \
2228 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2230 endef
2232 else # !SYSTEM_MWAW
2234 ifeq ($(COM),MSC)
2236 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2237 mwaw \
2240 define gb_LinkTarget__use_mwaw
2241 $(call gb_LinkTarget_set_include,$(1),\
2242 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2243 $$(INCLUDE) \
2246 $(call gb_LinkTarget_use_libraries,$(1),\
2247 mwaw \
2250 endef
2252 else # !MSC
2254 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2255 libmwaw \
2258 define gb_LinkTarget__use_mwaw
2259 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2261 $(call gb_LinkTarget_set_include,$(1),\
2262 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2263 $$(INCLUDE) \
2265 $(call gb_LinkTarget_add_libs,$(1),\
2266 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2269 endef
2271 endif # MSC
2273 endif # SYSTEM_MWAW
2275 ifneq ($(SYSTEM_STAROFFICE),)
2277 define gb_LinkTarget__use_staroffice
2278 $(call gb_LinkTarget_set_include,$(1),\
2279 $$(INCLUDE) \
2280 $(STAROFFICE_CFLAGS) \
2282 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2284 endef
2286 else # !SYSTEM_STAROFFICE
2288 ifeq ($(COM),MSC)
2290 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2291 staroffice \
2294 define gb_LinkTarget__use_staroffice
2295 $(call gb_LinkTarget_set_include,$(1),\
2296 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2297 $$(INCLUDE) \
2300 $(call gb_LinkTarget_use_libraries,$(1),\
2301 staroffice \
2304 endef
2306 else # !MSC
2308 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2309 libstaroffice \
2312 define gb_LinkTarget__use_staroffice
2313 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2315 $(call gb_LinkTarget_set_include,$(1),\
2316 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2317 $$(INCLUDE) \
2319 $(call gb_LinkTarget_add_libs,$(1),\
2320 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2323 endef
2325 endif # MSC
2327 endif # SYSTEM_STAROFFICE
2330 ifneq ($(SYSTEM_LCMS2),)
2332 define gb_LinkTarget__use_lcms2
2333 $(call gb_LinkTarget_set_include,$(1),\
2334 $$(INCLUDE) \
2335 $(LCMS2_CFLAGS) \
2337 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2339 endef
2341 gb_ExternalProject__use_lcms2 :=
2343 else # !SYSTEM_LCMS2
2345 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2346 lcms2 \
2349 define gb_ExternalProject__use_lcms2
2350 $(call gb_ExternalProject_use_package,$(1),lcms2)
2352 endef
2354 ifeq ($(OS),ANDROID)
2356 define gb_LinkTarget__use_lcms2
2357 $(call gb_LinkTarget_use_package,$(1),lcms2)
2358 $(call gb_LinkTarget_set_include,$(1),\
2359 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2360 $$(INCLUDE) \
2363 endef
2365 else
2367 define gb_LinkTarget__use_lcms2
2368 $(call gb_LinkTarget_use_package,$(1),lcms2)
2369 $(call gb_LinkTarget_set_include,$(1),\
2370 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2371 $$(INCLUDE) \
2373 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2375 endef
2377 endif # ANDROID
2378 endif # SYSTEM_LCMS2
2380 ifneq ($(ENABLE_LPSOLVE),)
2382 ifneq ($(SYSTEM_LPSOLVE),)
2384 define gb_LinkTarget__use_lpsolve
2385 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2386 $(call gb_LinkTarget_add_defs,$(1),\
2387 -DSYSTEM_LPSOLVE \
2390 endef
2392 else # !SYSTEM_LPSOLVE
2394 define gb_LinkTarget__use_lpsolve
2395 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2396 ifeq ($(COM),MSC)
2397 $(call gb_LinkTarget_add_libs,$(1),\
2398 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2400 else
2401 $(call gb_LinkTarget_add_libs,$(1),\
2402 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2404 endif
2405 $(call gb_LinkTarget_set_include,$(1),\
2406 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2407 $$(INCLUDE) \
2410 endef
2412 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2413 lpsolve \
2416 endif # SYSTEM_LPSOLVE
2418 else
2420 gb_LinkTarget__use_lpsolve :=
2422 endif # ENABLE_LPSOLVE
2424 ifneq ($(ENABLE_COINMP),)
2426 ifneq ($(SYSTEM_COINMP),TRUE)
2428 define gb_LinkTarget__use_coinmp
2429 $(call gb_LinkTarget_use_package,$(1),coinmp)
2430 ifeq ($(COM),MSC)
2431 $(call gb_LinkTarget_add_libs,$(1),\
2432 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2434 else
2435 $(call gb_LinkTarget_add_libs,$(1),\
2436 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2437 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2438 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2439 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2440 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2441 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2442 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2444 endif
2445 $(call gb_LinkTarget_set_include,$(1),\
2446 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2447 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2448 $$(INCLUDE) \
2451 endef
2453 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2454 coinmp \
2457 else # SYSTEM_COINMP
2459 define gb_LinkTarget__use_coinmp
2460 $(call gb_LinkTarget_set_include,$(1),\
2461 $$(INCLUDE) \
2462 $(COINMP_CFLAGS) \
2464 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2466 endef
2468 endif
2470 else
2472 gb_LinkTarget__use_coinmp :=
2474 endif # ENABLE_COINMP
2476 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2478 define gb_LinkTarget__use_mDNSResponder
2479 $(call gb_LinkTarget_set_include,$(1),\
2480 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2481 $$(INCLUDE) \
2483 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2484 endef
2486 endif # MDNSRESPONDER
2488 ifeq ($(ENABLE_GIO),TRUE)
2490 define gb_LinkTarget__use_gio
2491 $(call gb_LinkTarget_set_include,$(1),\
2492 $$(INCLUDE) \
2493 $(GIO_CFLAGS) \
2496 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2498 endef
2500 else # ENABLE_GIO
2502 define gb_LinkTarget__use_gio
2504 endef
2506 endif # ENABLE_GIO
2508 ifeq ($(ENABLE_AVAHI),TRUE)
2510 define gb_LinkTarget__use_avahi
2511 $(call gb_LinkTarget_set_include,$(1),\
2512 $$(INCLUDE) \
2513 $(AVAHI_CFLAGS) \
2516 $(call gb_LinkTarget_add_defs,$(1),\
2517 -DENABLE_AVAHI \
2520 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2522 endef
2524 else # ENABLE_AVAHI
2526 gb_LinkTarget__use_avahi :=
2528 endif # ENABLE_AVAHI
2530 ifeq ($(ENABLE_CUPS),TRUE)
2532 define gb_LinkTarget__use_cups
2533 $(call gb_LinkTarget_add_defs,$(1),\
2534 -DENABLE_CUPS \
2537 $(call gb_LinkTarget_add_libs,$(1),\
2538 -lcups \
2541 endef
2543 else # ENABLE_CUPS
2545 define gb_LinkTarget__use_cups
2547 endef
2549 endif # ENABLE_CUPS
2551 ifeq ($(ENABLE_DBUS),TRUE)
2553 define gb_LinkTarget__use_dbus
2554 $(call gb_LinkTarget_set_include,$(1),\
2555 $$(INCLUDE) \
2556 $(DBUS_CFLAGS) \
2559 $(call gb_LinkTarget_add_libs,$(1),\
2560 $(DBUS_LIBS) \
2563 endef
2565 else # ENABLE_DBUS
2567 define gb_LinkTarget__use_dbus
2569 endef
2571 endif # ENABLE_DBUS
2574 ifneq ($(SYSTEM_LIBPNG),)
2576 define gb_LinkTarget__use_libpng
2577 $(call gb_LinkTarget_set_include,$(1),\
2578 $$(INCLUDE) \
2579 $(LIBPNG_CFLAGS) \
2582 $(call gb_LinkTarget_add_libs,$(1),\
2583 $(LIBPNG_LIBS) \
2586 endef
2588 gb_ExternalProject__use_libpng :=
2590 else # !SYSTEM_LIBPNG
2592 define gb_LinkTarget__use_libpng
2593 $(call gb_LinkTarget_set_include,$(1),\
2594 $(LIBPNG_CFLAGS) \
2595 $$(INCLUDE) \
2597 $(call gb_LinkTarget_use_static_libraries,$(1),\
2598 libpng \
2600 $(call gb_LinkTarget__use_zlib,$(1))
2602 endef
2604 define gb_ExternalProject__use_libpng
2605 $(call gb_ExternalProject_use_static_libraries,$(1),\
2606 libpng \
2609 endef
2611 endif # !SYSTEM_LIBPNG
2613 ifneq ($(SYSTEM_LIBTIFF),)
2615 define gb_LinkTarget__use_libtiff
2616 $(call gb_LinkTarget_set_include,$(1),\
2617 $$(INCLUDE) \
2618 $(LIBTIFF_CFLAGS) \
2621 $(call gb_LinkTarget_add_libs,$(1),\
2622 $(LIBTIFF_LIBS) \
2625 endef
2627 gb_ExternalProject__use_libtiff :=
2629 else # !SYSTEM_LIBTIFF
2631 define gb_LinkTarget__use_libtiff
2632 $(call gb_LinkTarget_set_include,$(1),\
2633 $(LIBTIFF_CFLAGS) \
2634 $$(INCLUDE) \
2637 $(call gb_LinkTarget_set_include,$(1),\
2638 -I$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff \
2639 $$(INCLUDE) \
2641 ifeq ($(OS),WNT)
2642 $(call gb_LinkTarget_add_libs,$(1),\
2643 $(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs/libtiff$(gb_StaticLibrary_PLAINEXT) \
2645 else
2646 $(call gb_LinkTarget_add_libs,$(1),\
2647 -L$(call gb_UnpackedTarball_get_dir,libtiff)/libtiff/.libs -ltiff \
2649 endif
2650 $(call gb_LinkTarget_use_external_project,$(1),libtiff,full)
2652 endef
2654 define gb_ExternalProject__use_libtiff
2655 $(call gb_ExternalProject_use_external_project,$(1),libtiff)
2657 endef
2659 endif # !SYSTEM_LIBTIFF
2661 ifneq ($(SYSTEM_LIBWEBP),)
2663 define gb_LinkTarget__use_libwebp
2664 $(call gb_LinkTarget_set_include,$(1),\
2665 $$(INCLUDE) \
2666 $(LIBWEBP_CFLAGS) \
2669 $(call gb_LinkTarget_add_libs,$(1),\
2670 $(LIBWEBP_LIBS) \
2673 endef
2675 gb_ExternalProject__use_libwebp :=
2677 else # !SYSTEM_LIBWEBP
2679 define gb_LinkTarget__use_libwebp
2680 $(call gb_LinkTarget_set_include,$(1),\
2681 $(LIBWEBP_CFLAGS) \
2682 $$(INCLUDE) \
2685 $(call gb_LinkTarget_set_include,$(1),\
2686 -I$(call gb_UnpackedTarball_get_dir,libwebp)/src \
2687 $$(INCLUDE) \
2689 ifeq ($(OS),WNT)
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 $(call gb_UnpackedTarball_get_dir,libwebp)/output/lib/libwebp$(if $(MSVC_USE_DEBUG_RUNTIME),_debug)$(gb_StaticLibrary_PLAINEXT) \
2693 else
2694 $(call gb_LinkTarget_add_libs,$(1),\
2695 -L$(call gb_UnpackedTarball_get_dir,libwebp)/src/.libs -lwebp \
2697 endif
2698 $(call gb_LinkTarget_use_external_project,$(1),libwebp)
2700 endef
2702 define gb_ExternalProject__use_libwebp
2703 $(call gb_ExternalProject_use_external_project,$(1),libwebp)
2705 endef
2707 endif # !SYSTEM_LIBWEBP
2710 ifneq ($(SYSTEM_CURL),)
2712 define gb_LinkTarget__use_curl
2713 $(call gb_LinkTarget_add_defs,$(1),\
2714 -DSYSTEM_CURL \
2716 $(call gb_LinkTarget_set_include,$(1),\
2717 $$(INCLUDE) \
2718 $(CURL_CFLAGS) \
2720 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2722 endef
2724 else # !SYSTEM_CURL
2726 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2727 curl \
2730 define gb_LinkTarget__use_curl
2731 $(call gb_LinkTarget_use_package,$(1),curl)
2732 $(call gb_LinkTarget_set_include,$(1),\
2733 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2734 $$(INCLUDE) \
2737 ifeq ($(COM),MSC)
2738 $(call gb_LinkTarget_add_libs,$(1),\
2739 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2741 else
2742 $(call gb_LinkTarget_add_libs,$(1),\
2743 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2745 endif
2747 endef
2749 endif # SYSTEM_CURL
2751 ifeq ($(ENABLE_VALGRIND),TRUE)
2753 define gb_LinkTarget__use_valgrind
2754 $(call gb_LinkTarget_add_defs,$(1),\
2755 -DHAVE_VALGRIND_HEADERS \
2758 $(call gb_LinkTarget_set_include,$(1),\
2759 $$(INCLUDE) \
2760 $(VALGRIND_CFLAGS) \
2763 endef
2765 else # !ENABLE_VALGRIND
2767 define gb_LinkTarget__use_valgrind
2769 endef
2771 endif # ENABLE_VALGRIND
2773 ifeq ($(ENABLE_POPPLER),TRUE)
2775 ifneq ($(SYSTEM_POPPLER),)
2777 define gb_LinkTarget__use_poppler
2778 $(call gb_LinkTarget_set_include,$(1),\
2779 $(POPPLER_CFLAGS) \
2780 $$(INCLUDE) \
2783 $(call gb_LinkTarget_add_libs,$(1),\
2784 $(POPPLER_LIBS) \
2787 endef
2789 else # !SYSTEM_POPPLER
2791 $(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
2792 poppler_data \
2795 define gb_LinkTarget__use_poppler
2796 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2797 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2798 $(call gb_LinkTarget_set_include,$(1),\
2799 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2800 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2801 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2802 $$(INCLUDE) \
2805 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2806 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2808 ifeq ($(OS),MACOSX)
2809 $(call gb_LinkTarget_add_libs,$(1),\
2810 -lobjc \
2812 else ifeq ($(OS),LINUX)
2813 $(call gb_LinkTarget_add_libs,$(1),\
2814 -pthread \
2816 else ifeq ($(OS),WNT)
2817 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2818 advapi32 \
2819 gdi32 \
2821 endif
2823 endef
2825 endif # SYSTEM_POPPLER
2827 endif # ENABLE_POPPLER
2830 ifneq ($(SYSTEM_CLUCENE),)
2832 define gb_LinkTarget__use_clucene
2833 $(call gb_LinkTarget_add_defs,$(1),\
2834 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2837 $(call gb_LinkTarget_set_include,$(1),\
2838 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2839 $$(INCLUDE) \
2842 $(call gb_LinkTarget_add_libs,$(1),\
2843 $(CLUCENE_LIBS) \
2846 endef
2848 else # !SYSTEM_CLUCENE
2850 define gb_LinkTarget__use_clucene
2851 $(call gb_LinkTarget_set_include,$(1),\
2852 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2853 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2854 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2855 $$(INCLUDE) \
2858 $(call gb_LinkTarget_use_libraries,$(1),\
2859 clucene \
2862 endef
2864 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2865 $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,clucene) \
2868 endif # SYSTEM_CLUCENE
2870 define gb_LinkTarget__use_gobject
2871 $(call gb_LinkTarget_add_libs,$(1),\
2872 $(GOBJECT_LIBS) \
2875 $(call gb_LinkTarget_set_include,$(1),\
2876 $$(INCLUDE) \
2877 $(GOBJECT_CFLAGS) \
2879 endef
2881 ifneq ($(SYSTEM_HSQLDB),)
2883 define gb_LinkTarget__use_hsqldb
2885 $(call gb_LinkTarget_add_defs,$(1),\
2886 -DSYSTEM_HSQLDB \
2887 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2890 endef
2892 else # !SYSTEM_HSQLDB
2894 define gb_LinkTarget__use_hsqldb
2896 endef
2898 endif # SYSTEM_HSQLDB
2900 ifeq ($(ENABLE_LDAP),TRUE)
2901 ifneq ($(SYSTEM_OPENLDAP),)
2903 define gb_LinkTarget__use_openldap
2905 $(call gb_LinkTarget_add_libs,$(1),\
2906 -lldap \
2907 -llber \
2910 endef
2912 gb_ExternalProject__use_openldap :=
2914 else # !SYSTEM_OPENLDAP
2916 define gb_LinkTarget__use_openldap
2917 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2918 $(call gb_LinkTarget_set_include,$(1),\
2919 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2920 $$(INCLUDE) \
2922 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2923 $(call gb_LinkTarget_add_libs,$(1), \
2924 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2925 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2928 endef
2929 endif
2931 define gb_ExternalProject__use_openldap
2932 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2934 endef
2936 endif # SYSTEM_OPENLDAP
2938 ifneq ($(SYSTEM_LIBTOMMATH),)
2940 define gb_LinkTarget__use_libtommath
2941 $(call gb_LinkTarget_set_include,$(1),\
2942 $(LIBTOMMATH_CFLAGS) \
2943 $$(INCLUDE) \
2945 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2947 endef
2949 else # !SYSTEM_LIBTOMMATH
2950 define gb_LinkTarget__use_libtommath
2951 $(call gb_LinkTarget_set_include,$(1),\
2952 -I${WORKDIR}/UnpackedTarball/libtommath \
2953 $$(INCLUDE) \
2955 $(call gb_LinkTarget_add_libs,$(1),\
2956 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2958 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2960 endef
2962 endif # SYSTEM_LIBTOMMATH
2964 define gb_ExternalProject__use_libtommath
2965 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2967 endef
2969 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2971 ifneq ($(SYSTEM_FIREBIRD),)
2973 define gb_LinkTarget__use_libfbembed
2974 $(call gb_LinkTarget_set_include,$(1),\
2975 $(FIREBIRD_CFLAGS) \
2976 $$(INCLUDE) \
2978 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2980 endef
2982 else # !SYSTEM_FIREBIRD
2984 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2985 firebird \
2988 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2989 #$(call gb_LinkTarget__use_libtommath,$(1))
2991 define gb_LinkTarget__use_libfbembed
2992 $(call gb_LinkTarget_use_package,$(1),firebird)
2993 $(call gb_LinkTarget_set_include,$(1),\
2994 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2995 $$(INCLUDE) \
2997 ifeq ($(COM),MSC)
2998 $(call gb_LinkTarget_add_libs,$(1),\
2999 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3001 else
3002 $(call gb_LinkTarget_add_libs,$(1),\
3003 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3005 endif
3007 endef
3010 # endef
3012 endif # SYSTEM_FIREBIRD
3014 else # !ENABLE_FIREBIRD_SDBC
3016 gb_LinkTarget__use_firebird :=
3017 # gb_LinkTarget__use_atomic_ops :=
3018 # gb_LinkTarget__use_libtommath :=
3020 endif # ENABLE_FIREBIRD_SDBC
3023 ifneq ($(SYSTEM_POSTGRESQL),)
3025 define gb_LinkTarget__use_postgresql
3027 $(call gb_LinkTarget_set_include,$(1),\
3028 $(POSTGRESQL_INC) \
3029 $$(INCLUDE) \
3032 $(call gb_LinkTarget_add_libs,$(1),\
3033 -lpq \
3036 $(call gb_LinkTarget_add_ldflags,$(1),\
3037 $(POSTGRESQL_LIB) \
3040 endef
3042 else # !SYSTEM_POSTGRESQL
3044 ifeq ($(OS),WNT)
3045 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3046 postgresql \
3048 endif # WNT
3050 define gb_LinkTarget__use_postgresql
3052 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3054 $(call gb_LinkTarget_set_include,$(1),\
3055 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3056 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3057 $$(INCLUDE) \
3060 ifeq ($(OS),WNT)
3062 $(call gb_LinkTarget_add_libs,$(1),\
3063 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3066 else # !WNT
3068 $(call gb_LinkTarget_add_libs,$(1),\
3069 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3070 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3071 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3072 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3075 endif # !WNT
3077 endef # gb_LinkTarget__use_postgresql
3079 endif # !SYSTEM_POSTGRESQL
3081 ifneq (,$(filter TRUE,$(ENABLE_KF5) $(ENABLE_GTK3_KDE5)))
3083 define gb_LinkTarget__use_kf5
3084 $(call gb_LinkTarget_set_include,$(1),\
3085 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3086 $$(INCLUDE) \
3089 $(call gb_LinkTarget_add_cxxflags,$(1),\
3090 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3093 $(call gb_LinkTarget_add_libs,$(1),\
3094 $(KF5_LIBS) \
3097 endef
3099 else # !ENABLE_KF5
3101 define gb_LinkTarget__use_kf5
3103 endef
3105 endif # ENABLE_KF5
3109 ifneq (,$(filter TRUE,$(ENABLE_QT5) $(ENABLE_GTK3_KDE5)))
3111 define gb_LinkTarget__use_qt5
3112 $(call gb_LinkTarget_set_include,$(1),\
3113 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3114 $$(INCLUDE) \
3117 $(call gb_LinkTarget_add_defs,$(1),\
3118 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3121 $(call gb_LinkTarget_add_libs,$(1),\
3122 $(QT5_LIBS) \
3125 endef
3127 else # !ENABLE_QT5
3129 define gb_LinkTarget__use_qt5
3131 endef
3133 endif # ENABLE_QT5
3135 ifeq ($(ENABLE_QT6),TRUE)
3137 define gb_LinkTarget__use_qt6
3138 $(call gb_LinkTarget_set_include,$(1),\
3139 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3140 $$(INCLUDE) \
3143 $(call gb_LinkTarget_add_defs,$(1),\
3144 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3147 $(call gb_LinkTarget_add_libs,$(1),\
3148 $(QT6_LIBS) \
3151 endef
3153 else # !ENABLE_QT6
3155 define gb_LinkTarget__use_qt6
3157 endef
3159 endif # ENABLE_QT6
3162 # PYTHON
3163 # extra python_headers external because pyuno wrapper must not link python
3164 ifneq ($(SYSTEM_PYTHON),)
3166 define gb_LinkTarget__use_python_headers
3167 $(call gb_LinkTarget_add_defs,$(1),\
3168 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3171 $(call gb_LinkTarget_set_include,$(1),\
3172 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3173 $$(INCLUDE) \
3176 endef
3178 define gb_LinkTarget__use_python
3179 $(call gb_LinkTarget__use_python_headers,$(1))
3181 $(call gb_LinkTarget_add_libs,$(1),\
3182 $(PYTHON_LIBS) \
3185 endef
3187 else # !SYSTEM_PYTHON
3189 $(eval $(call gb_Helper_register_packages_for_install,python,\
3190 python3 \
3191 $(if $(filter WNT,$(OS)),libffi) \
3194 define gb_LinkTarget__use_python_headers
3195 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3196 $(call gb_LinkTarget_set_include,$(1),\
3197 -I$(call gb_UnpackedTarball_get_dir,python3) \
3198 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3199 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3200 $$(INCLUDE) \
3203 endef
3205 define gb_LinkTarget__use_python
3206 $(call gb_LinkTarget__use_python_headers,$(1))
3207 ifeq ($(OS),MACOSX)
3208 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3209 else
3210 $(call gb_LinkTarget_use_package,$(1),python3)
3211 endif
3213 ifeq ($(OS),WNT)
3214 ifeq ($(CPUNAME),X86_64)
3215 python_arch_subdir=amd64/
3216 else ifeq ($(CPUNAME),AARCH64)
3217 python_arch_subdir=arm64/
3218 else
3219 python_arch_subdir=win32/
3220 endif
3221 $(call gb_LinkTarget_add_libs,$(1),\
3222 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3224 else ifeq ($(OS),MACOSX)
3225 $(call gb_LinkTarget_add_libs,$(1),\
3226 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3228 else
3229 $(call gb_LinkTarget_add_libs,$(1),\
3230 -L$(call gb_UnpackedTarball_get_dir,python3) \
3231 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3233 endif
3235 endef
3237 # this is only used by python currently
3238 define gb_ExternalProject__use_libffi
3239 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3241 endef
3243 endif # SYSTEM_PYTHON
3245 # ORCUS
3246 ifneq ($(SYSTEM_LIBORCUS),)
3248 define gb_LinkTarget__use_orcus
3249 $(call gb_LinkTarget_set_include,$(1),\
3250 $$(INCLUDE) \
3251 $(ORCUS_CFLAGS) \
3253 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3254 endef
3256 define gb_LinkTarget__use_orcus-parser
3258 endef
3260 else # !SYSTEM_LIBORCUS
3262 ifeq ($(COM),MSC)
3264 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3265 orcus \
3266 orcus-parser \
3269 define gb_LinkTarget__use_orcus
3270 $(call gb_LinkTarget_set_include,$(1),\
3271 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3272 $$(INCLUDE) \
3275 $(call gb_LinkTarget_use_libraries,$(1),\
3276 orcus \
3279 endef
3281 define gb_LinkTarget__use_orcus-parser
3282 $(call gb_LinkTarget_set_include,$(1),\
3283 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3284 $$(INCLUDE) \
3287 $(call gb_LinkTarget_use_libraries,$(1),\
3288 orcus-parser \
3291 endef
3293 else # !MSC
3295 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3296 liborcus \
3299 define gb_LinkTarget__use_orcus
3300 $(call gb_LinkTarget_use_package,$(1),liborcus)
3302 $(call gb_LinkTarget_set_include,$(1),\
3303 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3304 $$(INCLUDE) \
3307 $(call gb_LinkTarget_add_libs,$(1),\
3308 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
3311 $(if $(SYSTEM_BOOST), \
3312 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3313 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3316 endef
3318 define gb_LinkTarget__use_orcus-parser
3319 $(call gb_LinkTarget_use_package,$(1),liborcus)
3321 $(call gb_LinkTarget_set_include,$(1),\
3322 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3323 $$(INCLUDE) \
3326 $(call gb_LinkTarget_add_libs,$(1),\
3327 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
3330 endef
3332 endif # MSC
3334 endif # SYSTEM_LIBORCUS
3336 ifeq ($(ENABLE_EOT),TRUE)
3338 ifneq ($(SYSTEM_LIBEOT),)
3340 define gb_LinkTarget__use_libeot
3341 $(call gb_LinkTarget_set_include,$(1),\
3342 $$(INCLUDE) \
3343 $(LIBEOT_CFLAGS) \
3345 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3347 endef
3349 gb_ExternalProject__use_libeot :=
3351 else # !SYSTEM_LIBEOT
3353 define gb_LinkTarget__use_libeot
3354 $(call gb_LinkTarget_set_include,$(1),\
3355 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3356 $$(INCLUDE) \
3358 $(call gb_LinkTarget_add_libs,$(1),\
3359 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3361 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3363 endef
3365 define gb_ExternalProject__use_libeot
3366 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3368 endef
3370 endif # SYSTEM_LIBEOT
3372 else # !ENABLE_EOT
3374 gb_LinkTarget__use_libeot :=
3375 gb_ExternalProject__use_libeot :=
3377 endif # ENABLE_EOT
3379 ### X11 stuff ###
3381 ifeq ($(USING_X11), TRUE)
3383 define gb_LinkTarget__use_Xrandr
3384 $(call gb_LinkTarget_set_include,$(1),\
3385 $$(INCLUDE) \
3386 $(XRANDR_CFLAGS) \
3389 $(call gb_LinkTarget_add_libs,$(1),\
3390 $(XRANDR_LIBS) \
3392 endef
3394 define gb_LinkTarget__use_Xrender
3395 $(call gb_LinkTarget_set_include,$(1),\
3396 $$(INCLUDE) \
3397 $(XRENDER_CFLAGS) \
3400 $(call gb_LinkTarget_add_libs,$(1),\
3401 $(XRENDER_LIBS) \
3403 endef
3405 endif # USING_X11
3408 gb_ExternalProject__use_nss3:=
3411 ifneq ($(SYSTEM_NSS),)
3413 define gb_LinkTarget__use_nss3
3414 $(call gb_LinkTarget_add_defs,$(1),\
3415 -DSYSTEM_NSS \
3418 $(call gb_LinkTarget_set_include,$(1),\
3419 $$(INCLUDE) \
3420 $(NSS_CFLAGS) \
3423 $(call gb_LinkTarget_add_libs,$(1),\
3424 $(NSS_LIBS) \
3427 endef
3429 define gb_LinkTarget__use_nssutil3
3430 $(call gb_LinkTarget__use_nss3,$(1))
3432 endef
3434 define gb_LinkTarget__use_plc4
3435 $(call gb_LinkTarget__use_nss3,$(1))
3437 endef
3439 define gb_LinkTarget__use_ssl3
3440 $(call gb_LinkTarget__use_nss3,$(1))
3442 endef
3444 else # !SYSTEM_NSS
3446 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3447 nss \
3450 define gb_LinkTarget__use_nss3
3451 $(call gb_LinkTarget_use_package,$(1),nss)
3452 $(call gb_LinkTarget_set_include,$(1),\
3453 $$(INCLUDE) \
3454 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3455 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3458 ifeq ($(COM),MSC)
3459 $(call gb_LinkTarget_add_libs,$(1),\
3460 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3461 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3462 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3464 else
3465 $(call gb_LinkTarget_add_libs,$(1),\
3466 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3467 -lnspr4 \
3468 -lnss3 \
3469 -lsmime3 \
3471 endif
3473 endef
3475 define gb_LinkTarget__use_plc4
3476 $(call gb_LinkTarget_use_package,$(1),nss)
3477 ifeq ($(COM),MSC)
3478 $(call gb_LinkTarget_add_libs,$(1),\
3479 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3481 else
3482 $(call gb_LinkTarget_add_libs,$(1),\
3483 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3485 endif
3487 endef
3489 define gb_LinkTarget__use_ssl3
3490 $(call gb_LinkTarget_use_package,$(1),nss)
3491 ifeq ($(COM),MSC)
3492 $(call gb_LinkTarget_add_libs,$(1),\
3493 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3495 else
3496 $(call gb_LinkTarget_add_libs,$(1),\
3497 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3499 endif
3501 endef
3503 define gb_LinkTarget__use_nssutil3
3504 $(call gb_LinkTarget_use_package,$(1),nss)
3505 $(call gb_LinkTarget_set_include,$(1),\
3506 $$(INCLUDE) \
3507 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3508 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3511 ifeq ($(COM),MSC)
3512 $(call gb_LinkTarget_add_libs,$(1),\
3513 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3515 else
3516 $(call gb_LinkTarget_add_libs,$(1),\
3517 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3518 -lnssutil3 \
3520 endif
3522 endef
3524 define gb_ExternalProject__use_nss3
3525 $(call gb_ExternalProject_use_package,$(1),nss)
3527 endef
3529 endif # SYSTEM_NSS
3531 ifeq ($(ENABLE_BREAKPAD),TRUE)
3533 define gb_LinkTarget__use_breakpad
3534 $(call gb_LinkTarget_set_include,$(1),\
3535 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3536 $$(INCLUDE) \
3539 ifeq ($(COM),MSC)
3540 $(call gb_LinkTarget_use_static_libraries,$(1),\
3541 breakpad \
3543 else
3544 $(call gb_LinkTarget_add_libs,$(1),\
3545 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3547 endif
3549 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3551 endef
3553 endif # ENABLE_BREAKPAD
3555 ifeq ($(ENABLE_GPGMEPP),TRUE)
3557 ifneq ($(SYSTEM_GPGMEPP),)
3559 gb_ExternalProject__use_gpgmepp:=
3560 gb_ExternalProject__use_libassuan:=
3561 gb_ExternalProject__use_libgpg-error:=
3563 define gb_LinkTarget__use_gpgmepp
3564 $(call gb_LinkTarget_set_include,$(1),\
3565 $$(INCLUDE) \
3566 $$(GPGMEPP_CFLAGS) \
3569 $(call gb_LinkTarget_add_libs,$(1),\
3570 $(GPGMEPP_LIBS) \
3573 endef
3575 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3577 define gb_ExternalProject__use_gpgmepp
3578 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3580 endef
3581 define gb_ExternalProject__use_libassuan
3582 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3584 endef
3585 define gb_ExternalProject__use_libgpg-error
3586 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3588 endef
3590 ifneq ($(filter WNT,$(OS)),)
3592 define gb_LinkTarget__use_libgpg-error
3593 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3595 $(call gb_LinkTarget_set_include,$(1),\
3596 $(GPG_ERROR_CFLAGS) \
3597 $$(INCLUDE) \
3599 $(call gb_LinkTarget_add_libs,$(1),\
3600 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3603 endef
3605 define gb_LinkTarget__use_libassuan
3606 $(call gb_LinkTarget_use_package,$(1),libassuan)
3608 $(call gb_LinkTarget_set_include,$(1),\
3609 $(LIBASSUAN_CFLAGS) \
3610 $$(INCLUDE) \
3612 $(call gb_LinkTarget_add_libs,$(1),\
3613 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3616 endef
3618 define gb_LinkTarget__use_gpgmepp
3619 $(call gb_LinkTarget_set_include,$(1),\
3620 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3621 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3622 $$(GPG_ERROR_CFLAGS) \
3623 $$(INCLUDE) \
3625 $(call gb_LinkTarget_use_libraries,$(1),\
3626 gpgmepp \
3629 endef
3631 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3632 gpgmepp \
3633 libassuan \
3634 libgpg-error \
3637 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3638 gpgmepp \
3641 endif
3643 ifneq ($(filter MACOSX LINUX,$(OS)),)
3645 define gb_LinkTarget__use_gpgmepp
3646 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3648 $(call gb_LinkTarget_set_include,$(1),\
3649 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3650 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3651 $$(GPG_ERROR_CFLAGS) \
3652 $$(INCLUDE) \
3654 $(call gb_LinkTarget_add_libs,$(1),\
3655 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3656 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3657 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3658 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3661 endef
3663 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3664 gpgmepp \
3665 libassuan \
3666 libgpg-error \
3669 endif
3671 endif
3673 else # !ENABLE_GPGMEPP
3675 gb_ExternalProject__use_gpgmepp :=
3676 gb_ExternalProject__use_libassuan :=
3677 gb_ExternalProject__use_libgpg-error :=
3679 gb_LinkTarget__use_gpgmepp :=
3680 gb_LinkTarget__use_libassuan :=
3681 gb_LinkTarget__use_libgpg-error :=
3683 endif # ENABLE_GPGMEPP
3685 define gb_LinkTarget__use_dconf
3686 $(call gb_LinkTarget_set_include,$(1),\
3687 $$(INCLUDE) \
3688 $(DCONF_CFLAGS) \
3691 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3692 endef
3694 ### Jars ############################################################
3696 ifneq ($(SYSTEM_HSQLDB),)
3698 define gb_Jar__use_hsqldb
3699 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3700 endef
3701 define gb_JunitTest__use_hsqldb
3702 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3703 endef
3705 else # !SYSTEM_HSQLDB
3707 ifeq ($(ENABLE_JAVA),TRUE)
3708 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3709 hsqldb \
3711 endif
3713 define gb_Jar__use_hsqldb
3714 $(call gb_Jar_use_jar,$(1),hsqldb)
3715 endef
3716 define gb_JunitTest__use_hsqldb
3717 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3718 endef
3720 endif # SYSTEM_HSQLDB
3723 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3725 ifneq ($(SYSTEM_BSH),)
3727 define gb_Jar__use_bsh
3728 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3729 endef
3731 else # !SYSTEM_BSH
3733 ifeq ($(ENABLE_JAVA),TRUE)
3734 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3735 bsh \
3737 endif
3739 define gb_Jar__use_bsh
3740 $(call gb_Jar_use_jar,$(1),bsh)
3741 endef
3743 endif # SYSTEM_BSH
3745 endif
3747 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3749 ifneq ($(SYSTEM_RHINO),)
3751 define gb_Jar__use_rhino
3752 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3753 endef
3755 else # !SYSTEM_RHINO
3757 ifeq ($(ENABLE_JAVA),TRUE)
3758 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3759 js \
3761 endif
3763 define gb_Jar__use_rhino
3764 $(call gb_Jar_use_jar,$(1),js)
3765 endef
3767 endif # SYSTEM_RHINO
3769 endif
3771 ifneq ($(SYSTEM_JFREEREPORT),)
3773 define gb_Jar__use_flow-engine
3774 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3775 endef
3777 define gb_Jar__use_flute
3778 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3779 endef
3781 define gb_Jar__use_libbase
3782 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3783 endef
3785 define gb_Jar__use_libfonts
3786 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3787 endef
3789 define gb_Jar__use_libformula
3790 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3791 endef
3793 define gb_Jar__use_liblayout
3794 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3795 endef
3797 define gb_Jar__use_libloader
3798 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3799 endef
3801 define gb_Jar__use_librepository
3802 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3803 endef
3805 define gb_Jar__use_libserializer
3806 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3807 endef
3809 define gb_Jar__use_libxml
3810 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3811 endef
3813 define gb_Jar__use_sac
3814 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3815 endef
3817 else # !SYSTEM_JFREEREPORT
3819 ifeq ($(ENABLE_JAVA),TRUE)
3820 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3821 flow-engine \
3822 flute-1.1.6 \
3823 libbase-1.1.6 \
3824 libfonts-1.1.6 \
3825 libformula-1.1.7 \
3826 liblayout \
3827 libloader-1.1.6 \
3828 librepository-1.1.6 \
3829 libserializer-1.1.6 \
3830 libxml-1.1.7 \
3831 sac \
3833 endif
3835 define gb_Jar__use_flow-engine
3836 $(call gb_Jar_use_jar,$(1),flow-engine)
3837 endef
3839 define gb_Jar__use_flute
3840 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3841 endef
3843 define gb_Jar__use_libbase
3844 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3845 endef
3847 define gb_Jar__use_libfonts
3848 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3849 endef
3851 define gb_Jar__use_libformula
3852 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3853 endef
3855 define gb_Jar__use_liblayout
3856 $(call gb_Jar_use_jar,$(1),liblayout)
3857 endef
3859 define gb_Jar__use_libloader
3860 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3861 endef
3863 define gb_Jar__use_librepository
3864 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3865 endef
3867 define gb_Jar__use_libserializer
3868 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3869 endef
3871 define gb_Jar__use_libxml
3872 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3873 endef
3875 define gb_Jar__use_sac
3876 $(call gb_Jar_use_jar,$(1),sac)
3877 endef
3879 endif # SYSTEM_JFREEREPORT
3882 # Executables
3884 define gb_Executable__register_bestreversemap
3885 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3886 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
3888 endef
3890 # TODO depending on the whole URE might be overkill, but I do not have a
3891 # Windows machine to debug it...
3892 define gb_Executable__register_climaker
3893 $(call gb_Executable_add_runtime_dependencies,climaker,\
3894 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3895 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3896 $(call gb_UnoApi_get_target_for_build,udkapi) \
3897 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3899 endef
3901 define gb_Executable__register_cppumaker
3902 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3903 $(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
3905 endef
3907 # This is used to determine what we need for 'build' platform.
3908 define gb_Executable__register_gengal
3909 $(call gb_Executable_add_runtime_dependencies,gengal,\
3910 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3911 $(call gb_Library_get_target_for_build,localedata_en) \
3912 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3913 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3914 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3915 $(call gb_Package_get_target_for_build,postprocess_registry) \
3916 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3917 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3918 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3919 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3920 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3921 $(call gb_UnoApi_get_target_for_build,offapi) \
3922 $(call gb_UnoApi_get_target_for_build,udkapi) \
3924 endef
3926 ifeq ($(SYSTEM_ICU),)
3928 define gb_Executable__register_gendict
3929 $(call gb_Executable_add_runtime_dependencies,gendict,\
3930 $(call gb_Package_get_target_for_build,icu) \
3931 $(call gb_Package_get_target_for_build,icu_ure) \
3933 endef
3935 endif
3937 define gb_Executable__register_localize
3938 $(call gb_Executable_add_runtime_dependencies,localize,\
3939 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3940 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3943 endef
3945 # FIXME ure/services.rdb needs cleanup
3946 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3947 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3948 define gb_Executable__register_saxparser
3949 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3950 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3951 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3952 $(call gb_Rdb_get_target_for_build,saxparser) \
3953 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3954 $(call gb_UnoApi_get_target_for_build,udkapi) \
3956 endef
3958 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3959 # required due to the settings for URE_SERVICES and URE_TYPES in
3960 # cppuhelper/source/unorc
3961 define gb_Executable__register_uno
3962 $(call gb_Executable_add_runtime_dependencies,uno,\
3963 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3964 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3965 $(call gb_UnoApi_get_target_for_build,udkapi) \
3967 endef
3970 # External executables
3972 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3974 gb_ExternalExecutable__register_xmllint :=
3976 else # ! SYSTEM_LIBXML_FOR_BUILD
3978 define gb_ExternalExecutable__register_xmllint
3979 $(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)
3980 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3981 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3982 $(call gb_Package_get_target,libxml2) \
3985 endef
3987 endif # SYSTEM_LIBXML_FOR_BUILD
3989 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3991 gb_ExternalExecutable__register_xsltproc :=
3993 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3995 define gb_ExternalExecutable__register_xsltproc
3996 $(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)
3997 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3998 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3999 $(call gb_Package_get_target,libxml2) \
4000 $(call gb_Package_get_target,libxslt) \
4003 endef
4005 endif # SYSTEM_LIBXSLT_FOR_BUILD
4007 ifeq (,$(PYTHON_FOR_BUILD))
4009 define gb_ExternalExecutable__register_python
4010 ifeq ($(OS),MACOSX)
4012 # use set_external, to avoid having the command added as prerequisite for the
4013 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4014 # matching rule to build that specific file)
4015 $(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))
4016 # the Zip ensures that internal python has been built (cannot use the Package
4017 # target, as that is not used on Mac)
4018 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4020 else
4022 $(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))
4023 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4024 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4026 endif
4028 endef
4030 else
4032 define gb_ExternalExecutable__register_python
4033 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4035 endef
4037 endif # PYTHON_FOR_BUILD
4039 ifneq ($(SYSTEM_GENBRK),)
4041 define gb_ExternalExecutable__register_genbrk
4042 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4044 endef
4046 else # ! SYSTEM_GENBRK
4048 define gb_ExternalExecutable__register_genbrk
4049 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4050 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4051 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4052 $(call gb_Package_get_target_for_build,icu) \
4053 $(call gb_Package_get_target_for_build,icu_ure) \
4056 endef
4058 endif
4060 ifneq ($(SYSTEM_GENCCODE),)
4062 define gb_ExternalExecutable__register_genccode
4063 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4065 endef
4067 else # ! SYSTEM_GENCCODE
4069 define gb_ExternalExecutable__register_genccode
4070 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4071 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4072 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4073 $(call gb_Package_get_target_for_build,icu) \
4074 $(call gb_Package_get_target_for_build,icu_ure) \
4077 endef
4079 endif
4081 ifneq ($(SYSTEM_GENCMN),)
4083 define gb_ExternalExecutable__register_gencmn
4084 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4086 endef
4088 else # ! SYSTEM_GENCMN
4090 define gb_ExternalExecutable__register_gencmn
4091 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4092 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4093 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4094 $(call gb_Package_get_target_for_build,icu) \
4095 $(call gb_Package_get_target_for_build,icu_ure) \
4098 endef
4100 endif
4102 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4103 ifneq ($(SYSTEM_BZIP2),)
4105 define gb_LinkTarget__use_bzip2
4106 $(call gb_LinkTarget_set_include,$(1),\
4107 $(BZIP2_CFLAGS) \
4108 $$(INCLUDE) \
4110 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4112 endef
4114 gb_ExternalProject__use_bzip2 :=
4116 else # !SYSTEM_BZIP2
4118 define gb_LinkTarget__use_bzip2
4119 $(call gb_LinkTarget_set_include,$(1),\
4120 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4121 $$(INCLUDE) \
4124 ifeq ($(COM),MSC)
4125 $(call gb_LinkTarget_add_libs,$(1),\
4126 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4128 else
4129 $(call gb_LinkTarget_add_libs,$(1),\
4130 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4132 endif
4134 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4135 endef
4137 define gb_ExternalProject__use_bzip2
4138 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4139 endef
4141 endif
4142 endif
4144 define gb_LinkTarget__use_clew
4145 $(call gb_LinkTarget_set_include,$(1), \
4146 -I$(SRCDIR)/external/clew/source/include \
4147 $$(INCLUDE) \
4149 $(call gb_LinkTarget_use_libraries,$(1),clew)
4150 endef
4152 ifneq ($(ENABLE_PDFIUM),)
4153 define gb_LinkTarget__use_pdfium
4154 $(call gb_LinkTarget_set_include,$(1),\
4155 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4156 -DCOMPONENT_BUILD \
4157 $$(INCLUDE) \
4159 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4160 endef
4161 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4162 pdfium \
4164 endif
4166 ifneq ($(SYSTEM_DRAGONBOX),)
4168 define gb_LinkTarget__use_dragonbox
4169 $(call gb_LinkTarget_set_include,$(1),\
4170 $$(INCLUDE) \
4171 $$(DRAGONBOX_CFLAGS) \
4173 endef
4175 else
4177 define gb_LinkTarget__use_dragonbox
4178 $(call gb_LinkTarget_use_unpacked,$(1),dragonbox)
4179 $(call gb_LinkTarget_set_include,$(1),\
4180 -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\
4181 $$(INCLUDE) \
4183 endef
4185 endif
4187 define gb_LinkTarget__use_dtoa
4188 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4189 $(call gb_LinkTarget_set_include,$(1),\
4190 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4191 $$(INCLUDE) \
4193 $(call gb_LinkTarget_use_static_libraries,$(1),\
4194 dtoa \
4197 endef
4199 define gb_ExternalProject__use_dtoa
4200 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4202 endef
4204 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4205 $(if $(UCRT_REDISTDIR),ucrt) \
4208 ifneq ($(SYSTEM_BOX2D),)
4210 define gb_LinkTarget__use_box2d
4211 $(call gb_LinkTarget_set_include,$(1),\
4212 -DSYSTEM_BOX2D \
4213 $$(INCLUDE) \
4214 $(BOX2D_CFLAGS) \
4216 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4218 endef
4220 gb_ExternalProject__use_box2d :=
4222 else # !SYSTEM_BOX2D
4224 define gb_LinkTarget__use_box2d
4225 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4226 $(call gb_LinkTarget_set_include,$(1),\
4227 -I$(call gb_UnpackedTarball_get_dir,box2d/include/)\
4228 $$(INCLUDE) \
4230 $(call gb_LinkTarget_use_static_libraries,$(1),\
4231 box2d \
4234 endef
4236 define gb_ExternalProject__use_box2d
4237 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4239 endef
4241 endif # SYSTEM_BOX2D
4243 ifneq ($(SYSTEM_ZXING),)
4245 define gb_LinkTarget__use_zxing
4246 $(call gb_LinkTarget_set_include,$(1),\
4247 -DSYSTEM_ZXING \
4248 $$(INCLUDE) \
4249 $(ZXING_CFLAGS) \
4251 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4253 endef
4255 gb_ExternalProject__use_zxing :=
4257 else # !SYSTEM_ZXING
4259 ifneq ($(ENABLE_ZXING),)
4261 define gb_LinkTarget__use_zxing
4262 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4263 $(call gb_LinkTarget_set_include,$(1),\
4264 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4265 $$(INCLUDE) \
4267 $(call gb_LinkTarget_use_static_libraries,$(1),\
4268 zxing \
4271 endef
4273 define gb_ExternalProject__use_zxing
4274 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4276 endef
4278 else # !ENABLE_ZXING
4280 define gb_LinkTarget__use_zxing
4281 endef
4283 endif # ENABLE_ZXING
4285 endif # SYSTEM_ZXING
4287 # vim: set noet sw=4 ts=4: