Draw button focus so that it doesn't obscure the actual button
[LibreOffice.git] / RepositoryExternal.mk
blobd70b1f0519686bb13ae46f0cb83812e1e03f3231
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 gb_LinkTarget__use_glm_headers :=
94 gb_ExternalProject__use_glm_headers :=
96 else
98 define gb_LinkTarget__use_glm_headers
99 $(call gb_LinkTarget_use_unpacked,$(1),glm)
100 $(call gb_LinkTarget_set_include,$(1),\
101 $(GLM_CFLAGS) \
102 $$(INCLUDE) \
105 endef
107 define gb_ExternalProject__use_glm_headers
108 $(call gb_ExternalProject_use_unpacked,$(1),glm)
110 endef
112 endif
114 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
116 define gb_LinkTarget__use_sane_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(if $(filter WNT,$(OS)), \
119 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
120 -I$(SRCDIR)/external/sane/inc) \
121 $$(INCLUDE) \
124 ifeq ($(OS),WNT)
125 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
126 endif
128 endef
130 else
132 gb_LinkTarget__use_sane_headers :=
134 endif
136 ifneq ($(SYSTEM_BLUEZ),)
138 gb_LinkTarget__use_bluez_bluetooth_headers :=
140 else # !SYSTEM_BLUEZ
142 define gb_LinkTarget__use_bluez_bluetooth_headers
143 $(call gb_LinkTarget_set_include,$(1),\
144 -I$(SRCDIR)/external/bluez_bluetooth/inc \
145 $$(INCLUDE) \
148 endef
150 endif # SYSTEM_BLUEZ
152 # External libraries
154 ifneq ($(SYSTEM_CPPUNIT),)
156 define gb_LinkTarget__use_cppunit
157 $(call gb_LinkTarget_set_include,$(1),\
158 $$(INCLUDE) \
159 $(CPPUNIT_CFLAGS) \
162 $(call gb_LinkTarget_add_libs,$(1),\
163 $(CPPUNIT_LIBS) \
166 endef
168 else # !SYSTEM_CPPUNIT
170 define gb_LinkTarget__use_cppunit
171 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
173 $(call gb_LinkTarget_set_include,$(1),\
174 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
175 $$(INCLUDE) \
178 ifeq ($(COM),MSC)
179 $(call gb_LinkTarget_add_libs,$(1),\
180 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
182 else
183 $(call gb_LinkTarget_add_libs,$(1),\
184 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
186 endif
188 endef
190 endif # SYSTEM_CPPUNIT
192 ifneq ($(SYSTEM_EPOXY),)
194 define gb_LinkTarget__use_epoxy
195 $(call gb_LinkTarget_set_include,$(1),\
196 $$(INCLUDE) \
197 $(EPOXY_CFLAGS) \
199 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
201 endef
203 gb_ExternalProject__use_epoxy :=
205 else # !SYSTEM_EPOXY
207 define gb_LinkTarget__use_epoxy
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
210 $$(INCLUDE) \
213 $(call gb_LinkTarget_use_libraries,$(1),\
214 epoxy \
217 endef
219 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
220 epoxy \
223 define gb_ExternalProject__use_epoxy
224 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
226 endef
228 endif # SYSTEM_EPOXY
230 define gb_LinkTarget__use_iconv
231 $(call gb_LinkTarget_add_libs,$(1),-liconv)
233 endef
235 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
237 define gb_LinkTarget__use_mariadb-connector-c
238 $(call gb_LinkTarget_set_include,$(1),\
239 $$(INCLUDE) \
240 $(MARIADB_CFLAGS) \
242 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
244 endef
245 gb_ExternalProject__use_mariadb-connector-c :=
247 else # !SYSTEM_MARIADB_CONNECTOR_C
249 define gb_LinkTarget__use_mariadb-connector-c
250 $(call gb_LinkTarget_set_include,$(1),\
251 $$(INCLUDE) \
252 $(MARIADB_CFLAGS) \
254 $(call gb_LinkTarget_use_static_libraries,$(1),\
255 mariadb-connector-c \
258 endef
259 define gb_ExternalProject__use_mariadb-connector-c
260 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
262 endef
264 endif # SYSTEM_MARIADB_CONNECTOR_C
267 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
269 define gb_LinkTarget__use_mysql
271 $(call gb_LinkTarget_add_defs,$(1),\
272 -DSYSTEM_MARIADB \
275 $(call gb_LinkTarget_add_libs,$(1),\
276 $(MARIADB_LIBS) \
279 $(call gb_LinkTarget_set_include,$(1),\
280 $(MARIADB_CFLAGS) \
281 $$(INCLUDE) \
283 endef
285 else
287 define gb_LinkTarget__use_mysql
289 $(call gb_LinkTarget_set_include,$(1),\
290 $$(INCLUDE) \
293 endef
295 endif
297 ifneq ($(SYSTEM_MYSQL_CONNECTOR_CPP),)
299 define gb_LinkTarget__use_mysql-connector-cpp
300 $(call gb_LinkTarget_add_libs,$(1),\
301 -lmysqlcppconn \
304 $(call gb_LinkTarget_add_defs,$(1),\
305 -DSYSTEM_MYSQL_CPPCONN \
307 endef
309 else
311 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
312 mysqlcppconn \
315 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
316 define gb_LinkTarget__use_mysql-connector-cpp
318 $(call gb_LinkTarget_use_unpacked,$(1),mysql-connector-cpp)
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DCPPCONN_LIB_BUILD \
324 $(call gb_LinkTarget_set_include,$(1),\
325 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp) \
326 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp)/cppconn \
327 $$(INCLUDE) \
330 endef
332 endif
334 ifneq ($(SYSTEM_ZLIB),)
336 define gb_LinkTarget__use_zlib
337 $(call gb_LinkTarget_add_defs,$(1),\
338 -DSYSTEM_ZLIB \
340 $(call gb_LinkTarget_add_libs,$(1),-lz)
342 endef
344 # nothing on system
345 define gb_LinkTarget__use_zlib_x64
347 endef
349 gb_ExternalProject__use_zlib :=
351 else # !SYSTEM_ZLIB
353 define gb_LinkTarget__use_zlib_multiarch
354 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
356 $(call gb_LinkTarget_set_include,$(1),\
357 $(ZLIB_CFLAGS) \
358 $$(INCLUDE) \
361 $(call gb_LinkTarget_use_static_libraries,$(1),\
362 $(2) \
365 endef
367 define gb_LinkTarget__use_zlib
368 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
370 endef
372 define gb_LinkTarget__use_zlib_x64
373 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
375 endef
377 define gb_ExternalProject__use_zlib
378 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
380 endef
382 endif # SYSTEM_ZLIB
385 ifneq ($(SYSTEM_LIBJPEG),)
387 define gb_LinkTarget__use_libjpeg
388 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
389 $(call gb_LinkTarget_set_ldflags,$(1),\
390 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
393 endef
395 gb_ExternalProject__use_libjpeg :=
397 else
399 define gb_LinkTarget__use_libjpeg
400 $(call gb_LinkTarget_set_include,$(1),\
401 $(LIBJPEG_CFLAGS) \
402 $$(INCLUDE) \
404 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
405 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
407 endef
409 define gb_ExternalProject__use_libjpeg
410 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
412 endef
414 endif # SYSTEM_LIBJPEG
416 ifneq ($(SYSTEM_MYTHES),)
418 define gb_LinkTarget__use_mythes
419 $(call gb_LinkTarget_set_include,$(1),\
420 $$(INCLUDE) \
421 $(MYTHES_CFLAGS) \
423 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
425 endef
427 else # !SYSTEM_MYTHES
429 define gb_LinkTarget__use_mythes
430 $(call gb_LinkTarget_set_include,$(1),\
431 -I$(call gb_UnpackedTarball_get_dir,mythes) \
432 $$(INCLUDE) \
435 ifeq ($(COM),MSC)
436 $(call gb_LinkTarget_use_static_libraries,$(1),\
437 mythes \
439 else
440 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
441 $(call gb_LinkTarget_use_external_project,$(1),mythes)
442 endif
444 endef
446 endif # SYSTEM_MYTHES
449 ifneq ($(SYSTEM_EXPAT),)
451 define gb_LinkTarget__use_expat_impl
452 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
454 $(call gb_LinkTarget_add_defs,$(1),\
455 -DSYSTEM_EXPAT \
458 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
460 endef
462 gb_ExternalProject__use_expat :=
464 else # !SYSTEM_EXPAT
466 define gb_LinkTarget__use_expat_impl
467 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
469 $(call gb_LinkTarget_set_include,$(1),\
470 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
471 $$(INCLUDE) \
474 $(call gb_LinkTarget_use_static_libraries,$(1),\
475 $(2) \
478 endef
480 define gb_ExternalProject__use_expat
481 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
483 endef
485 endif # SYSTEM_EXPAT
487 define gb_LinkTarget__use_expat
488 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
490 endef
492 define gb_LinkTarget__use_expat_x64
493 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
495 endef
497 ifneq ($(SYSTEM_HYPH),)
499 define gb_LinkTarget__use_hyphen
500 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
502 endef
504 else # !SYSTEM_HYPH
506 define gb_LinkTarget__use_hyphen
507 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
508 $(call gb_LinkTarget_set_include,$(1),\
509 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
510 $$(INCLUDE) \
513 ifeq ($(COM),MSC)
514 $(call gb_LinkTarget_use_static_libraries,$(1),\
515 hyphen \
517 else
518 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
519 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
520 endif
522 endef
524 endif # SYSTEM_HYPH
526 ifneq ($(SYSTEM_HUNSPELL),)
528 define gb_LinkTarget__use_hunspell
529 $(call gb_LinkTarget_set_include,$(1),\
530 $$(INCLUDE) \
531 $(HUNSPELL_CFLAGS) \
533 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
535 endef
537 gb_ExternalProject__use_hunspell :=
539 else # !SYSTEM_HUNSPELL
541 define gb_LinkTarget__use_hunspell
542 $(call gb_LinkTarget_add_defs,$(1),\
543 -DHUNSPELL_STATIC \
545 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
546 $(call gb_LinkTarget_set_include,$(1),\
547 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
548 $$(INCLUDE) \
551 ifeq ($(COM),MSC)
552 $(call gb_LinkTarget_use_static_libraries,$(1),\
553 hunspell \
555 else
556 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
557 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
558 endif
560 endef
562 define gb_ExternalProject__use_hunspell
563 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
565 endef
567 endif # SYSTEM_HUNSPELL
570 ifneq ($(SYSTEM_BOOST),)
572 define gb_LinkTarget__use_boost_lib
573 $(call gb_LinkTarget_set_include,$(1),\
574 $$(INCLUDE) \
575 $(BOOST_CPPFLAGS) \
578 $(call gb_LinkTarget_add_ldflags,$(1),\
579 $(BOOST_LDFLAGS) \
582 $(call gb_LinkTarget_add_libs,$(1),$(2))
584 endef
586 define gb_LinkTarget__use_boost_locale
587 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
589 endef
591 define gb_LinkTarget__use_boost_date_time
592 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
594 endef
596 define gb_LinkTarget__use_boost_filesystem
597 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
599 endef
601 gb_ExternalProject__use_boost_filesystem :=
603 define gb_LinkTarget__use_boost_iostreams
604 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
606 endef
608 gb_ExternalProject__use_boost_iostreams :=
610 define gb_LinkTarget__use_boost_system
611 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
613 endef
615 gb_ExternalProject__use_boost_system :=
617 define gb_LinkTarget__use_boost_headers
618 $(call gb_LinkTarget_set_include,$(1),\
619 $$(INCLUDE) \
620 $(BOOST_CPPFLAGS) \
623 endef
625 gb_ExternalProject__use_boost_headers:=
627 else # !SYSTEM_BOOST
629 define gb_LinkTarget__use_boost_lib
630 $(call gb_LinkTarget_add_defs,$(1),\
631 -DBOOST_ALL_NO_LIB \
634 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
636 endef
638 define gb_LinkTarget__use_boost_locale
639 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
640 $(call gb_LinkTarget_add_libs,$(1),\
641 $(if $(filter $(OS),MACOSX),-liconv) \
644 endef
646 define gb_LinkTarget__use_boost_date_time
647 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
649 endef
651 define gb_LinkTarget__use_boost_filesystem
652 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
654 endef
656 define gb_ExternalProject__use_boost_filesystem
657 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
658 endef
660 define gb_LinkTarget__use_boost_iostreams
661 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
663 endef
665 define gb_ExternalProject__use_boost_iostreams
666 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
667 endef
669 define gb_LinkTarget__use_boost_system
670 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
672 endef
674 define gb_ExternalProject__use_boost_system
675 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
676 endef
678 define gb_LinkTarget__use_boost_headers
679 $(call gb_LinkTarget_use_unpacked,$(1),boost)
680 $(call gb_LinkTarget_set_include,$(1),\
681 $(BOOST_CPPFLAGS) \
682 $$(INCLUDE) \
685 endef
687 define gb_ExternalProject__use_boost_headers
688 $(call gb_ExternalProject_use_unpacked,$(1),boost)
690 endef
692 endif # SYSTEM_BOOST
695 ifneq ($(SYSTEM_LIBCMIS),)
697 define gb_LinkTarget__use_libcmis
698 $(call gb_LinkTarget_set_include,$(1),\
699 $$(INCLUDE) \
700 $(LIBCMIS_CFLAGS) \
702 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
704 endef
706 else # !SYSTEM_LIBCMIS
708 define gb_LinkTarget__use_libcmis
709 $(call gb_LinkTarget_set_include,$(1),\
710 -I$(call gb_UnpackedTarball_get_dir,libcmis)/src \
711 $$(INCLUDE) \
713 $(call gb_LinkTarget_use_static_libraries,$(1),\
714 libcmis \
717 endef
719 endif # SYSTEM_LIBCMIS
721 ifeq ($(ENABLE_JAVA),TRUE)
723 define gb_LinkTarget__use_jawt
724 $(call gb_LinkTarget_add_libs,$(1),\
725 $(JAWTLIB) \
728 endef
730 else # !ENABLE_JAVA
732 gb_LinkTarget__use_jawt :=
734 endif # ENABLE_JAVA
736 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
738 define gb_LinkTarget__use_libatomic_ops
739 $(call gb_LinkTarget_set_include,$(1),\
740 $$(INCLUDE) \
741 $(LIBATOMIC_OPS_CFLAGS) \
743 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
745 endef
746 gb_ExternalProject__use_libatomic_ops :=
748 else # !SYSTEM_LIBATOMIC_OPS
750 define gb_LinkTarget__use_libatomic_ops
751 $(call gb_LinkTarget_set_include,$(1),\
752 $(LIBATOMIC_OPS_CFLAGS) \
753 $$(INCLUDE) \
754 $(LIBATOMIC_OPS_CFLAGS) \
756 $(call gb_LinkTarget_use_external_project,$(1),\
757 libatomic_ops \
760 $(call gb_LinkTarget_add_libs,$(1),\
761 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
764 endef
766 define gb_ExternalProject__use_libatomic_ops
767 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
769 endef
771 endif # SYSTEM_LIBATOMIC_OPS
774 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
776 define gb_LinkTarget__use_libexttextcat
777 $(call gb_LinkTarget_set_include,$(1),\
778 $$(INCLUDE) \
779 $(LIBEXTTEXTCAT_CFLAGS) \
781 $(call gb_LinkTarget_add_defs,$(1),\
782 -DSYSTEM_LIBEXTTEXTCAT \
784 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
786 endef
788 else # !SYSTEM_LIBEXTTEXTCAT
790 define gb_LinkTarget__use_libexttextcat
791 $(call gb_LinkTarget_set_include,$(1),\
792 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
793 $$(INCLUDE) \
796 ifeq ($(COM),MSC)
797 $(call gb_LinkTarget_use_static_libraries,$(1),\
798 libexttextcat \
800 else
801 $(call gb_LinkTarget_add_libs,$(1),\
802 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
804 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
805 endif
808 endef
810 endif # SYSTEM_LIBEXTTEXTCAT
813 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
815 define gb_LinkTarget__use_libnumbertext
816 $(call gb_LinkTarget_set_include,$(1),\
817 $$(INCLUDE) \
818 $(LIBNUMBERTEXT_CFLAGS) \
820 $(call gb_LinkTarget_add_defs,$(1),\
821 -DSYSTEM_LIBNUMBERTEXT \
823 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
825 endef
827 else # !SYSTEM_LIBNUMBERTEXT
829 ifneq ($(ENABLE_LIBNUMBERTEXT),)
831 define gb_LinkTarget__use_libnumbertext
832 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
833 $(call gb_LinkTarget_set_include,$(1),\
834 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
835 $$(INCLUDE) \
837 $(call gb_LinkTarget_add_defs,$(1),\
838 -DENABLE_LIBNUMBERTEXT \
841 ifeq ($(COM),MSC)
842 $(call gb_LinkTarget_use_static_libraries,$(1),\
843 libnumbertext \
845 else
847 $(call gb_LinkTarget_add_libs,$(1),\
848 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
850 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
852 endif
854 endef
856 else # !ENABLE_LIBNUMBERTEXT
858 define gb_LinkTarget__use_libnumbertext
859 endef
861 endif # ENABLE_LIBNUMBERTEXT
863 endif # SYSTEM_LIBNUMBERTEXT
866 ifneq ($(SYSTEM_LIBXML),)
868 define gb_LinkTarget__use_libxml2
869 $(call gb_LinkTarget_add_defs,$(1),\
870 -DSYSTEM_LIBXML \
872 $(call gb_LinkTarget_set_include,$(1),\
873 $$(INCLUDE) \
874 $(LIBXML_CFLAGS) \
876 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
878 endef
879 gb_ExternalProject__use_libxml2:=
881 else # !SYSTEM_LIBXML
883 $(eval $(call gb_Helper_register_packages_for_install,ure,\
884 libxml2 \
887 define gb_LinkTarget__use_libxml2
888 $(call gb_LinkTarget_use_package,$(1),libxml2)
889 $(call gb_LinkTarget_set_include,$(1),\
890 $$(INCLUDE) \
891 $(LIBXML_CFLAGS) \
894 $(call gb_LinkTarget_add_libs,$(1),\
895 $(LIBXML_LIBS) \
898 ifeq ($(COM),MSC)
899 $(call gb_LinkTarget_use_external,$(1),icu_headers)
900 endif
902 endef
903 define gb_ExternalProject__use_libxml2
904 $(call gb_ExternalProject_use_package,$(1),libxml2)
906 ifeq ($(COM),MSC)
907 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
908 endif
910 endef
912 endif # SYSTEM_LIBXML
915 ifneq ($(SYSTEM_LIBXSLT),)
917 define gb_LinkTarget__use_libxslt
918 $(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
920 $(LIBXSLT_CFLAGS) \
922 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
924 endef
926 define gb_LinkTarget__use_libexslt
927 $(call gb_LinkTarget_set_include,$(1),\
928 $$(INCLUDE) \
929 $(LIBEXSLT_CFLAGS) \
932 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
934 endef
936 else # !SYSTEM_LIBXSLT
938 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
939 libxslt \
942 define gb_LinkTarget__use_libxslt
943 $(call gb_LinkTarget_use_package,$(1),libxslt)
944 $(call gb_LinkTarget_set_include,$(1),\
945 $$(INCLUDE) \
946 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
949 ifeq ($(COM),MSC)
950 $(call gb_LinkTarget_add_libs,$(1),\
951 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
953 else
954 $(call gb_LinkTarget_add_libs,$(1),\
955 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
957 endif
959 endef
961 define gb_LinkTarget__use_libexslt
962 $(call gb_LinkTarget_use_package,$(1),libxslt)
963 $(call gb_LinkTarget_set_include,$(1),\
964 $$(INCLUDE) \
965 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
968 ifeq ($(COM),MSC)
969 $(call gb_LinkTarget_add_libs,$(1),\
970 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
972 else
973 $(call gb_LinkTarget_add_libs,$(1),\
974 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
976 endif
978 endef
980 endif # SYSTEM_LIBXSLT
983 ifneq ($(SYSTEM_XMLSEC),)
985 define gb_LinkTarget__use_xmlsec
986 $(call gb_LinkTarget_add_defs,$(1),\
987 -DSYSTEM_XMLSEC \
989 $(call gb_LinkTarget_set_include,$(1),\
990 $$(INCLUDE) \
991 $(XMLSEC_CFLAGS) \
993 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
995 endef
997 gb_ExternalProject__use_xmlsec:=
999 else # !SYSTEM_XMLSEC
1001 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1002 xmlsec \
1005 define gb_LinkTarget__use_xmlsec
1007 endef
1009 endif # SYSTEM_XMLSEC
1011 ifneq ($(SYSTEM_LIBLANGTAG),)
1013 define gb_LinkTarget__use_liblangtag
1014 $(call gb_LinkTarget_set_include,$(1),\
1015 $$(INCLUDE) \
1016 $(LIBLANGTAG_CFLAGS) \
1019 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1021 endef
1023 gb_ExternalProject__use_liblangtag :=
1025 else # !SYSTEM_LIBLANGTAG
1027 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1028 liblangtag_data \
1031 ifeq ($(COM),MSC)
1033 define gb_LinkTarget__use_liblangtag
1034 $(call gb_LinkTarget_set_include,$(1),\
1035 $(LIBLANGTAG_CFLAGS) \
1036 $$(INCLUDE) \
1038 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1039 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1041 endef
1043 else
1045 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1046 liblangtag \
1049 define gb_LinkTarget__use_liblangtag
1050 $(call gb_LinkTarget_set_include,$(1),\
1051 $(LIBLANGTAG_CFLAGS) \
1052 $$(INCLUDE) \
1054 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1055 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1057 endef
1059 endif # MSC
1061 define gb_ExternalProject__use_liblangtag
1062 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1064 endef
1066 endif # SYSTEM_LIBLANGTAG
1069 gb_ExternalProject__use_apr :=
1071 ifeq ($(WITH_WEBDAV),serf)
1073 define gb_LinkTarget__use_apr
1074 $(call gb_LinkTarget_set_include,$(1),\
1075 $$(INCLUDE) \
1076 $(APR_CFLAGS) \
1078 $(call gb_LinkTarget_add_libs,$(1),\
1079 $(APR_LIBS) \
1080 $(if $(filter $(OS),LINUX),-lpthread) \
1081 $(if $(filter $(OS),MACOSX),-liconv) \
1084 ifeq ($(SYSTEM_APR),)
1085 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1086 mswsock \
1087 rpcrt4 \
1088 shell32 \
1090 $(call gb_LinkTarget_add_defs,$(1),\
1091 -DAPR_DECLARE_STATIC \
1092 -DAPU_DECLARE_STATIC \
1094 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1095 endif
1097 endef
1099 define gb_ExternalProject__use_apr
1100 ifeq ($(SYSTEM_APR),)
1101 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1102 endif
1104 endef
1106 define gb_LinkTarget__use_serf
1107 $(call gb_LinkTarget_set_include,$(1),\
1108 $(SERF_CFLAGS) \
1109 $$(INCLUDE) \
1111 $(call gb_LinkTarget_add_libs,$(1),\
1112 $(SERF_LIBS) \
1115 ifeq ($(SYSTEM_SERF),)
1116 $(call gb_LinkTarget_use_external_project,$(1),serf)
1117 endif
1119 endef
1121 else ifeq ($(WITH_WEBDAV),neon)
1123 ifneq ($(SYSTEM_NEON),)
1125 define gb_LinkTarget__use_neon
1126 $(call gb_LinkTarget_add_defs,$(1),\
1127 -DNEON_VERSION=0x$(NEON_VERSION) \
1128 -DSYSTEM_NEON \
1130 $(call gb_LinkTarget_set_include,$(1),\
1131 $$(INCLUDE) \
1132 $(NEON_CFLAGS) \
1135 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1137 endef
1139 else # !SYSTEM_NEON
1141 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1142 neon \
1145 define gb_LinkTarget__use_neon
1146 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1147 $(call gb_LinkTarget_set_include,$(1),\
1148 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1149 $$(INCLUDE) \
1151 $(call gb_LinkTarget_use_libraries,$(1),\
1152 neon \
1155 endef
1157 endif # SYSTEM_NEON
1159 endif # WITH_WEBDAV
1161 ifneq ($(SYSTEM_REDLAND),)
1163 define gb_LinkTarget__use_librdf
1164 $(call gb_LinkTarget_add_defs,$(1),\
1165 -DSYSTEM_REDLAND \
1167 $(call gb_LinkTarget_set_include,$(1),\
1168 $$(INCLUDE) \
1169 $(REDLAND_CFLAGS) \
1171 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1173 endef
1175 gb_LinkTarget__use_redland_headers:=
1177 gb_LinkTarget__use_raptor_headers:=
1179 gb_LinkTarget__use_rasqal_headers:=
1181 else # !SYSTEM_REDLAND
1183 define gb_LinkTarget__use_redland_headers
1184 $(call gb_LinkTarget_set_include,$(1),\
1185 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1186 $$(INCLUDE) \
1189 endef
1191 define gb_LinkTarget__use_raptor_headers
1192 $(call gb_LinkTarget_set_include,$(1),\
1193 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1194 $$(INCLUDE) \
1197 endef
1199 define gb_LinkTarget__use_rasqal_headers
1200 $(call gb_LinkTarget_set_include,$(1),\
1201 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1202 $$(INCLUDE) \
1205 endef
1207 ifneq ($(OS),ANDROID)
1209 ifeq ($(COM),MSC)
1210 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1211 raptor2 \
1212 rasqal \
1213 rdf \
1215 else
1216 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1217 raptor \
1218 rasqal \
1219 redland \
1221 endif
1223 define gb_LinkTarget__use_librdf
1224 ifeq ($(COM),MSC)
1225 $(call gb_LinkTarget_use_libraries,$(1),\
1226 raptor2 \
1227 rdf \
1229 else
1230 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1232 $(call gb_LinkTarget_add_libs,$(1),\
1233 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1234 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1235 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1237 endif
1239 endef
1241 else # ANDROID
1243 define gb_LinkTarget__use_librdf
1244 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1246 endef
1248 endif # ANDROID
1250 endif # SYSTEM_REDLAND
1253 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1255 ifneq ($(SYSTEM_CAIRO),)
1257 define gb_LinkTarget__use_cairo
1258 $(call gb_LinkTarget_set_include,$(1),\
1259 $$(INCLUDE) \
1260 $(CAIRO_CFLAGS) \
1262 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1263 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1265 endef
1267 else # !SYSTEM_CAIRO
1269 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1270 cairo \
1271 $(if $(filter $(OS),WNT),,pixman) \
1274 define gb_LinkTarget__use_cairo
1275 $(call gb_LinkTarget_use_package,$(1),cairo)
1276 $(call gb_LinkTarget_use_package,$(1),pixman)
1277 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1278 $(call gb_LinkTarget_set_include,$(1),\
1279 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1280 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1281 $$(INCLUDE) \
1283 $(call gb_LinkTarget_add_libs,$(1),\
1284 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1285 $(if $(filter-out MACOSX WNT,$(OS)), \
1286 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1290 endef
1292 endif # SYSTEM_CAIRO
1294 else ifeq ($(OS),ANDROID)
1296 define gb_LinkTarget__use_cairo
1297 $(call gb_LinkTarget_use_package,$(1),cairo)
1298 $(call gb_LinkTarget_use_package,$(1),pixman)
1299 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1300 $(call gb_LinkTarget_set_include,$(1),\
1301 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1302 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1303 $$(INCLUDE) \
1305 $(call gb_LinkTarget_add_libs,$(1),\
1306 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1307 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1310 endef
1312 endif # CAIRO
1314 ifneq ($(SYSTEM_FREETYPE),)
1316 define gb_LinkTarget__use_freetype_headers
1317 $(call gb_LinkTarget_set_include,$(1),\
1318 $$(INCLUDE) \
1319 $(FREETYPE_CFLAGS) \
1322 endef
1324 gb_ExternalProject__use_freetype :=
1326 else
1328 define gb_LinkTarget__use_freetype_headers
1329 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1330 $(call gb_LinkTarget_set_include,$(1),\
1331 $(FREETYPE_CFLAGS) \
1332 $$(INCLUDE) \
1335 endef
1337 define gb_ExternalProject__use_freetype
1338 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1340 endef
1342 endif # SYSTEM_FREETYPE
1344 define gb_LinkTarget__use_freetype
1345 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1346 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1348 endef
1350 ifneq ($(SYSTEM_FONTCONFIG),)
1352 define gb_LinkTarget__use_fontconfig
1353 $(call gb_LinkTarget_set_include,$(1),\
1354 $$(INCLUDE) \
1355 $(FONTCONFIG_CFLAGS) \
1358 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1360 endef
1362 else
1364 define gb_LinkTarget__use_fontconfig
1365 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1366 $(call gb_LinkTarget_set_include,$(1),\
1367 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1368 $$(INCLUDE) \
1371 $(call gb_LinkTarget_add_libs,$(1),\
1372 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1375 endef
1377 endif # SYSTEM_FONTCONFIG
1379 ifneq ($(SYSTEM_GRAPHITE),)
1381 define gb_LinkTarget__use_graphite
1382 $(call gb_LinkTarget_set_include,$(1),\
1383 $$(INCLUDE) \
1384 $(GRAPHITE_CFLAGS) \
1386 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1388 endef
1390 gb_ExternalProject__use_graphite:=
1392 else # !SYSTEM_GRAPHITE
1394 define gb_LinkTarget__use_graphite
1395 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1396 $(call gb_LinkTarget_set_include,$(1),\
1397 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1398 $$(INCLUDE) \
1400 $(call gb_LinkTarget_use_static_libraries,$(1),\
1401 graphite \
1404 endef
1406 define gb_ExternalProject__use_graphite
1407 $(call gb_ExternalProject_use_static_libraries,$(1),\
1408 graphite \
1411 endef
1412 endif # SYSTEM_GRAPHITE
1414 ifneq ($(SYSTEM_ICU),)
1416 gb_LinkTarget__use_icu_headers:=
1417 gb_ExternalProject__use_icu:=
1419 define gb_LinkTarget__use_icudata
1420 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1422 endef
1423 define gb_LinkTarget__use_icui18n
1424 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1426 endef
1427 define gb_LinkTarget__use_icuuc
1428 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1430 endef
1432 else # !SYSTEM_ICU
1434 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1435 icu_ure \
1438 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1439 icu \
1442 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1443 gb_ICU_suffix:=lo
1444 else
1445 gb_ICU_suffix:=
1446 endif
1448 define gb_LinkTarget__use_icu_headers
1449 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1450 $(call gb_LinkTarget_set_include,$(1),\
1451 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1452 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1453 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1454 $$(INCLUDE) \
1457 endef
1459 define gb_ExternalProject__use_icu
1460 $(call gb_ExternalProject_use_package,$(1),icu)
1462 endef
1464 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1465 define gb_LinkTarget__use_icudata
1466 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1468 ifeq ($(OS),WNT)
1469 $(call gb_LinkTarget_add_libs,$(1),\
1470 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1472 else
1473 $(call gb_LinkTarget_add_libs,$(1),\
1474 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1476 endif
1478 endef
1480 define gb_LinkTarget__use_icui18n
1481 $(call gb_LinkTarget_use_package,$(1),icu)
1483 ifeq ($(OS),WNT)
1484 $(call gb_LinkTarget_add_libs,$(1),\
1485 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1487 else
1488 $(call gb_LinkTarget_add_libs,$(1),\
1489 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1491 endif
1493 endef
1495 define gb_LinkTarget__use_icuuc
1496 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1498 ifeq ($(OS),WNT)
1499 $(call gb_LinkTarget_add_libs,$(1),\
1500 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1502 else
1503 $(call gb_LinkTarget_add_libs,$(1),\
1504 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1506 endif
1508 endef
1510 endif # SYSTEM_ICU
1512 ifneq ($(SYSTEM_HARFBUZZ),)
1514 define gb_LinkTarget__use_harfbuzz
1515 $(call gb_LinkTarget_set_include,$(1),\
1516 $$(INCLUDE) \
1517 $(HARFBUZZ_CFLAGS) \
1519 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1521 endef
1523 gb_ExternalProject__use_harfbuzz :=
1525 else # SYSTEM_HARFBUZZ != TRUE
1527 define gb_LinkTarget__use_harfbuzz
1528 $(call gb_LinkTarget_set_include,$(1),\
1529 $(HARFBUZZ_CFLAGS) \
1530 $$(INCLUDE) \
1532 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1533 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1535 endef
1537 define gb_ExternalProject__use_harfbuzz
1538 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1540 endef
1542 endif # SYSTEM_HARFBUZZ
1544 ifeq ($(DISABLE_OPENSSL),TRUE)
1546 gb_ExternalProject__use_openssl:=
1547 gb_LinkTarget__use_openssl_headers:=
1548 gb_LinkTarget__use_openssl:=
1550 else # !DISABLE_OPENSSL
1552 ifneq ($(SYSTEM_OPENSSL),)
1554 gb_LinkTarget__use_openssl_headers:=
1555 gb_ExternalProject__use_openssl:=
1557 define gb_LinkTarget__use_openssl
1558 $(call gb_LinkTarget_set_include,$(1),\
1559 $$(INCLUDE) \
1560 $(OPENSSL_CFLAGS) \
1562 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1564 endef
1566 else # !SYSTEM_OPENSSL
1568 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1569 openssl \
1572 define gb_ExternalProject__use_openssl
1573 $(call gb_ExternalProject_use_package,$(1),openssl)
1575 endef
1577 define gb_LinkTarget__use_openssl_headers
1578 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1579 $(call gb_LinkTarget_set_include,$(1),\
1580 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1581 $$(INCLUDE) \
1584 endef
1586 define gb_LinkTarget__use_openssl
1587 $(call gb_LinkTarget_use_package,$(1),openssl)
1588 ifeq ($(OS),WNT)
1589 $(call gb_LinkTarget_add_libs,$(1),\
1590 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1591 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1593 else
1594 $(call gb_LinkTarget_add_libs,$(1),\
1595 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1596 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1598 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1599 ifeq ($(OS),SOLARIS)
1600 $(call gb_LinkTarget_add_libs,$(1),\
1601 -lnsl \
1602 -lsocket \
1604 endif
1605 endif
1607 endef
1609 endif # SYSTEM_OPENSSL
1610 endif # DISABLE_OPENSSL
1613 ifeq ($(DISABLE_OPENSSL),TRUE)
1615 define gb_LinkTarget__use_gnutls
1616 $(call gb_LinkTarget_set_include,$(1),\
1617 $$(INCLUDE) \
1618 $(GNUTLS_CFLAGS) \
1621 $(call gb_LinkTarget_add_defs,$(1),\
1622 -DDISABLE_OPENSSL \
1625 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1627 endef
1629 define gb_LinkTarget__use_libgcrypt
1630 $(call gb_LinkTarget_set_include,$(1),\
1631 $$(INCLUDE) \
1632 $(LIBGCRYPT_CFLAGS) \
1635 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1637 endef
1639 else # !DISABLE_OPENSSL
1641 gb_LinkTarget__use_gnutls:=
1642 gb_LinkTarget__use_libgcrypt:=
1644 endif # DISABLE_OPENSSL
1647 ifneq ($(SYSTEM_CDR),)
1649 define gb_LinkTarget__use_cdr
1650 $(call gb_LinkTarget_set_include,$(1),\
1651 $$(INCLUDE) \
1652 $(CDR_CFLAGS) \
1654 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1656 endef
1658 else # !SYSTEM_CDR
1660 define gb_LinkTarget__use_cdr
1661 $(call gb_LinkTarget_set_include,$(1),\
1662 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1663 $$(INCLUDE) \
1665 $(call gb_LinkTarget_add_libs,$(1),\
1666 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1668 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1669 endef
1671 endif # SYSTEM_CDR
1674 ifneq ($(SYSTEM_EBOOK),)
1676 define gb_LinkTarget__use_ebook
1677 $(call gb_LinkTarget_set_include,$(1),\
1678 $$(INCLUDE) \
1679 $(EBOOK_CFLAGS) \
1681 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1683 endef
1685 gb_ExternalProject__use_ebook :=
1687 else # !SYSTEM_EBOOK
1689 define gb_LinkTarget__use_ebook
1690 $(call gb_LinkTarget_set_include,$(1),\
1691 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1692 $$(INCLUDE) \
1694 $(call gb_LinkTarget_add_libs,$(1),\
1695 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1697 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1699 endef
1701 define gb_ExternalProject__use_ebook
1702 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1704 endef
1706 endif # SYSTEM_EBOOK
1709 ifneq ($(SYSTEM_ETONYEK),)
1711 define gb_LinkTarget__use_etonyek
1712 $(call gb_LinkTarget_set_include,$(1),\
1713 $$(INCLUDE) \
1714 $(ETONYEK_CFLAGS) \
1716 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1718 endef
1720 gb_ExternalProject__use_etonyek :=
1722 else # !SYSTEM_ETONYEK
1724 ifeq ($(COM),MSC)
1726 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1727 etonyek \
1730 define gb_LinkTarget__use_etonyek
1731 $(call gb_LinkTarget_set_include,$(1),\
1732 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1733 $$(INCLUDE) \
1735 $(call gb_LinkTarget_use_libraries,$(1),\
1736 etonyek \
1739 endef
1741 else # !MSC
1743 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1744 libetonyek \
1747 define gb_LinkTarget__use_etonyek
1748 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1750 $(call gb_LinkTarget_set_include,$(1),\
1751 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1752 -DLIBETONYEK_VISIBILITY \
1753 $$(INCLUDE) \
1755 $(call gb_LinkTarget_add_libs,$(1),\
1756 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1758 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1760 endef
1762 define gb_ExternalProject__use_etonyek
1763 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1765 endef
1767 endif
1769 endif # SYSTEM_ETONYEK
1772 ifneq ($(SYSTEM_FREEHAND),)
1774 define gb_LinkTarget__use_freehand
1775 $(call gb_LinkTarget_set_include,$(1),\
1776 $$(INCLUDE) \
1777 $(FREEHAND_CFLAGS) \
1779 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1781 endef
1783 gb_ExternalProject__use_freehand :=
1785 else # !SYSTEM_FREEHAND
1787 define gb_LinkTarget__use_freehand
1788 $(call gb_LinkTarget_set_include,$(1),\
1789 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1790 $$(INCLUDE) \
1792 $(call gb_LinkTarget_add_libs,$(1),\
1793 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1795 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1797 endef
1799 define gb_ExternalProject__use_freehand
1800 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1802 endef
1804 endif # SYSTEM_FREEHAND
1807 ifneq ($(SYSTEM_ODFGEN),)
1809 define gb_LinkTarget__use_odfgen
1810 $(call gb_LinkTarget_set_include,$(1),\
1811 $$(INCLUDE) \
1812 $(ODFGEN_CFLAGS) \
1814 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1816 endef
1818 else # !SYSTEM_ODFGEN
1820 ifeq ($(COM),MSC)
1822 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1823 odfgen \
1826 define gb_LinkTarget__use_odfgen
1827 $(call gb_LinkTarget_set_include,$(1),\
1828 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1829 $$(INCLUDE) \
1831 $(call gb_LinkTarget_use_libraries,$(1),\
1832 odfgen \
1835 endef
1837 else # !MSC
1839 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1840 libodfgen \
1843 define gb_LinkTarget__use_odfgen
1844 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1846 $(call gb_LinkTarget_set_include,$(1),\
1847 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1848 -DLIBODFGEN_VISIBILITY \
1849 $$(INCLUDE) \
1851 $(call gb_LinkTarget_add_libs,$(1),\
1852 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1855 endef
1857 endif
1859 endif # SYSTEM_ODFGEN
1861 ifneq ($(SYSTEM_EPUBGEN),)
1863 define gb_LinkTarget__use_epubgen
1864 $(call gb_LinkTarget_set_include,$(1),\
1865 $$(INCLUDE) \
1866 $(EPUBGEN_CFLAGS) \
1868 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1870 endef
1871 gb_ExternalProject__use_epubgen :=
1873 else # !SYSTEM_EPUBGEN
1875 define gb_LinkTarget__use_epubgen
1876 $(call gb_LinkTarget_set_include,$(1),\
1877 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1878 $$(INCLUDE) \
1880 $(call gb_LinkTarget_add_libs,$(1),\
1881 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1883 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1885 endef
1886 define gb_ExternalProject__use_epubgen
1887 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1889 endef
1891 endif # SYSTEM_EPUBGEN
1893 ifneq ($(SYSTEM_REVENGE),)
1895 define gb_LinkTarget__use_revenge
1896 $(call gb_LinkTarget_set_include,$(1),\
1897 $$(INCLUDE) \
1898 $(REVENGE_CFLAGS) \
1900 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1902 endef
1904 gb_ExternalProject__use_revenge :=
1906 else # !SYSTEM_REVENGE
1908 ifeq ($(COM),MSC)
1910 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1911 revenge \
1914 define gb_LinkTarget__use_revenge
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 $(REVENGE_CFLAGS) \
1917 $$(INCLUDE) \
1919 $(call gb_LinkTarget_use_libraries,$(1),\
1920 revenge \
1923 endef
1925 define gb_ExternalProject__use_revenge
1926 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1928 endef
1930 else # !MSC
1932 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1933 librevenge \
1936 define gb_LinkTarget__use_revenge
1937 $(call gb_LinkTarget_use_package,$(1),librevenge)
1939 $(call gb_LinkTarget_set_include,$(1),\
1940 $(REVENGE_CFLAGS) \
1941 -DLIBREVENGE_VISIBILITY \
1942 $$(INCLUDE) \
1944 $(call gb_LinkTarget_add_libs,$(1),\
1945 $(REVENGE_LIBS) \
1947 endef
1949 define gb_ExternalProject__use_revenge
1950 $(call gb_ExternalProject_use_package,$(1),librevenge)
1952 endef
1954 endif # MSC
1956 endif # SYSTEM_REVENGE
1959 ifneq ($(SYSTEM_ABW),)
1961 define gb_LinkTarget__use_abw
1962 $(call gb_LinkTarget_set_include,$(1),\
1963 $$(INCLUDE) \
1964 $(ABW_CFLAGS) \
1966 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1968 endef
1969 gb_ExternalProject__use_abw :=
1971 else # !SYSTEM_ABW
1973 define gb_LinkTarget__use_abw
1974 $(call gb_LinkTarget_set_include,$(1),\
1975 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1976 $$(INCLUDE) \
1978 $(call gb_LinkTarget_add_libs,$(1),\
1979 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1981 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1983 endef
1984 define gb_ExternalProject__use_abw
1985 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1987 endef
1989 endif # SYSTEM_ABW
1992 ifneq ($(SYSTEM_MSPUB),)
1994 define gb_LinkTarget__use_mspub
1995 $(call gb_LinkTarget_set_include,$(1),\
1996 $$(INCLUDE) \
1997 $(MSPUB_CFLAGS) \
1999 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2001 endef
2003 else # !SYSTEM_MSPUB
2005 define gb_LinkTarget__use_mspub
2006 $(call gb_LinkTarget_set_include,$(1),\
2007 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2008 $$(INCLUDE) \
2010 $(call gb_LinkTarget_add_libs,$(1),\
2011 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2013 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2015 endef
2017 endif # SYSTEM_MSPUB
2020 ifneq ($(SYSTEM_PAGEMAKER),)
2022 define gb_LinkTarget__use_pagemaker
2023 $(call gb_LinkTarget_set_include,$(1),\
2024 $$(INCLUDE) \
2025 $(PAGEMAKER_CFLAGS) \
2027 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2029 endef
2030 gb_ExternalProject__use_pagemaker :=
2032 else # !SYSTEM_PAGEMAKER
2034 define gb_LinkTarget__use_pagemaker
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2037 $$(INCLUDE) \
2039 $(call gb_LinkTarget_add_libs,$(1),\
2040 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2042 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2044 endef
2045 define gb_ExternalProject__use_pagemaker
2046 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2048 endef
2050 endif # SYSTEM_PAGEMAKER
2053 ifneq ($(SYSTEM_QXP),)
2055 define gb_LinkTarget__use_qxp
2056 $(call gb_LinkTarget_set_include,$(1),\
2057 $$(INCLUDE) \
2058 $(QXP_CFLAGS) \
2060 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2062 endef
2063 gb_ExternalProject__use_qxp :=
2065 else # !SYSTEM_QXP
2067 define gb_LinkTarget__use_qxp
2068 $(call gb_LinkTarget_set_include,$(1),\
2069 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2070 $$(INCLUDE) \
2072 $(call gb_LinkTarget_add_libs,$(1),\
2073 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2075 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2077 endef
2078 define gb_ExternalProject__use_qxp
2079 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2081 endef
2083 endif # SYSTEM_QXP
2086 ifneq ($(SYSTEM_ZMF),)
2088 define gb_LinkTarget__use_zmf
2089 $(call gb_LinkTarget_set_include,$(1),\
2090 $$(INCLUDE) \
2091 $(ZMF_CFLAGS) \
2093 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2095 endef
2096 gb_ExternalProject__use_zmf :=
2098 else # !SYSTEM_ZMF
2100 define gb_LinkTarget__use_zmf
2101 $(call gb_LinkTarget_set_include,$(1),\
2102 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2103 $$(INCLUDE) \
2105 $(call gb_LinkTarget_add_libs,$(1),\
2106 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2108 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2110 endef
2111 define gb_ExternalProject__use_zmf
2112 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2114 endef
2116 endif # SYSTEM_ZMF
2119 ifneq ($(SYSTEM_VISIO),)
2121 define gb_LinkTarget__use_visio
2122 $(call gb_LinkTarget_set_include,$(1),\
2123 $$(INCLUDE) \
2124 $(VISIO_CFLAGS) \
2126 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2128 endef
2130 else # !SYSTEM_VISIO
2132 define gb_LinkTarget__use_visio
2133 $(call gb_LinkTarget_set_include,$(1),\
2134 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2135 $$(INCLUDE) \
2137 $(call gb_LinkTarget_add_libs,$(1),\
2138 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2140 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2142 endef
2144 endif # SYSTEM_VISIO
2147 ifneq ($(SYSTEM_WPD),)
2149 define gb_LinkTarget__use_wpd
2150 $(call gb_LinkTarget_set_include,$(1),\
2151 $$(INCLUDE) \
2152 $(WPD_CFLAGS) \
2154 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2156 endef
2157 gb_ExternalProject__use_wpd :=
2159 else # !SYSTEM_WPD
2161 ifeq ($(COM),MSC)
2163 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2164 wpd \
2167 define gb_LinkTarget__use_wpd
2168 $(call gb_LinkTarget_set_include,$(1),\
2169 $(WPD_CFLAGS) \
2170 $$(INCLUDE) \
2172 $(call gb_LinkTarget_use_libraries,$(1),\
2173 wpd \
2176 endef
2178 define gb_ExternalProject__use_wpd
2179 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2181 endef
2183 else # !MSC
2185 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2186 libwpd \
2189 define gb_LinkTarget__use_wpd
2190 $(call gb_LinkTarget_use_package,$(1),libwpd)
2192 $(call gb_LinkTarget_set_include,$(1),\
2193 $(WPD_CFLAGS) \
2194 $$(INCLUDE) \
2196 $(call gb_LinkTarget_add_libs,$(1),\
2197 $(WPD_LIBS) \
2200 endef
2202 define gb_ExternalProject__use_wpd
2203 $(call gb_ExternalProject_use_package,$(1),libwpd)
2205 endef
2207 endif # MSC
2209 endif # SYSTEM_WPD
2212 ifneq ($(SYSTEM_WPG),)
2214 define gb_LinkTarget__use_wpg
2215 $(call gb_LinkTarget_set_include,$(1),\
2216 $$(INCLUDE) \
2217 $(WPG_CFLAGS) \
2219 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2221 endef
2222 gb_ExternalProject__use_wpg :=
2224 else # !SYSTEM_WPG
2226 ifeq ($(COM),MSC)
2228 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2229 wpg \
2232 define gb_LinkTarget__use_wpg
2233 $(call gb_LinkTarget_set_include,$(1),\
2234 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2235 $$(INCLUDE) \
2237 $(call gb_LinkTarget_use_libraries,$(1),\
2238 wpg \
2241 endef
2243 else # !MSC
2245 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2246 libwpg \
2249 define gb_LinkTarget__use_wpg
2250 $(call gb_LinkTarget_use_package,$(1),libwpg)
2252 $(call gb_LinkTarget_set_include,$(1),\
2253 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2254 $$(INCLUDE) \
2256 $(call gb_LinkTarget_add_libs,$(1),\
2257 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2260 endef
2262 endif # MSC
2264 endif # SYSTEM_WPG
2267 ifneq ($(SYSTEM_WPS),)
2269 define gb_LinkTarget__use_wps
2270 $(call gb_LinkTarget_set_include,$(1),\
2271 $$(INCLUDE) \
2272 $(WPS_CFLAGS) \
2274 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2276 endef
2277 gb_ExternalProject__use_wps :=
2279 else # !SYSTEM_WPS
2281 ifeq ($(COM),MSC)
2283 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2284 wps \
2287 define gb_LinkTarget__use_wps
2288 $(call gb_LinkTarget_set_include,$(1),\
2289 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2290 $$(INCLUDE) \
2293 $(call gb_LinkTarget_use_libraries,$(1),\
2294 wps \
2297 endef
2299 else # !MSC
2301 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2302 libwps \
2305 define gb_LinkTarget__use_wps
2306 $(call gb_LinkTarget_use_package,$(1),libwps)
2308 $(call gb_LinkTarget_set_include,$(1),\
2309 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2310 $$(INCLUDE) \
2312 $(call gb_LinkTarget_add_libs,$(1),\
2313 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2316 endef
2318 endif # MSC
2320 endif # SYSTEM_WPS
2323 ifneq ($(SYSTEM_MWAW),)
2325 define gb_LinkTarget__use_mwaw
2326 $(call gb_LinkTarget_set_include,$(1),\
2327 $$(INCLUDE) \
2328 $(MWAW_CFLAGS) \
2330 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2332 endef
2334 else # !SYSTEM_MWAW
2336 ifeq ($(COM),MSC)
2338 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2339 mwaw \
2342 define gb_LinkTarget__use_mwaw
2343 $(call gb_LinkTarget_set_include,$(1),\
2344 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2345 $$(INCLUDE) \
2348 $(call gb_LinkTarget_use_libraries,$(1),\
2349 mwaw \
2352 endef
2354 else # !MSC
2356 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2357 libmwaw \
2360 define gb_LinkTarget__use_mwaw
2361 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2363 $(call gb_LinkTarget_set_include,$(1),\
2364 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2365 $$(INCLUDE) \
2367 $(call gb_LinkTarget_add_libs,$(1),\
2368 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2371 endef
2373 endif # MSC
2375 endif # SYSTEM_MWAW
2377 ifneq ($(SYSTEM_STAROFFICE),)
2379 define gb_LinkTarget__use_staroffice
2380 $(call gb_LinkTarget_set_include,$(1),\
2381 $$(INCLUDE) \
2382 $(STAROFFICE_CFLAGS) \
2384 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2386 endef
2388 else # !SYSTEM_STAROFFICE
2390 ifeq ($(COM),MSC)
2392 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2393 staroffice \
2396 define gb_LinkTarget__use_staroffice
2397 $(call gb_LinkTarget_set_include,$(1),\
2398 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2399 $$(INCLUDE) \
2402 $(call gb_LinkTarget_use_libraries,$(1),\
2403 staroffice \
2406 endef
2408 else # !MSC
2410 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2411 libstaroffice \
2414 define gb_LinkTarget__use_staroffice
2415 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2417 $(call gb_LinkTarget_set_include,$(1),\
2418 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2419 $$(INCLUDE) \
2421 $(call gb_LinkTarget_add_libs,$(1),\
2422 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2425 endef
2427 endif # MSC
2429 endif # SYSTEM_STAROFFICE
2432 ifneq ($(SYSTEM_LCMS2),)
2434 define gb_LinkTarget__use_lcms2
2435 $(call gb_LinkTarget_set_include,$(1),\
2436 $$(INCLUDE) \
2437 $(LCMS2_CFLAGS) \
2439 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2441 endef
2443 gb_ExternalProject__use_lcms2 :=
2445 else # !SYSTEM_LCMS2
2447 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2448 lcms2 \
2451 define gb_ExternalProject__use_lcms2
2452 $(call gb_ExternalProject_use_package,$(1),lcms2)
2454 endef
2456 ifeq ($(OS),ANDROID)
2458 define gb_LinkTarget__use_lcms2
2459 $(call gb_LinkTarget_use_package,$(1),lcms2)
2460 $(call gb_LinkTarget_set_include,$(1),\
2461 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2462 $$(INCLUDE) \
2465 endef
2467 else
2469 define gb_LinkTarget__use_lcms2
2470 $(call gb_LinkTarget_use_package,$(1),lcms2)
2471 $(call gb_LinkTarget_set_include,$(1),\
2472 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2473 $$(INCLUDE) \
2475 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2477 endef
2479 endif # ANDROID
2480 endif # SYSTEM_LCMS2
2482 ifneq ($(ENABLE_LPSOLVE),)
2484 ifneq ($(SYSTEM_LPSOLVE),)
2486 define gb_LinkTarget__use_lpsolve
2487 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2488 $(call gb_LinkTarget_add_defs,$(1),\
2489 -DSYSTEM_LPSOLVE \
2492 endef
2494 else # !SYSTEM_LPSOLVE
2496 define gb_LinkTarget__use_lpsolve
2497 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2498 ifeq ($(COM),MSC)
2499 $(call gb_LinkTarget_add_libs,$(1),\
2500 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2502 else
2503 $(call gb_LinkTarget_add_libs,$(1),\
2504 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2506 endif
2507 $(call gb_LinkTarget_set_include,$(1),\
2508 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2509 $$(INCLUDE) \
2512 endef
2514 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2515 lpsolve \
2518 endif # SYSTEM_LPSOLVE
2520 else
2522 gb_LinkTarget__use_lpsolve :=
2524 endif # ENABLE_LPSOLVE
2526 ifneq ($(ENABLE_COINMP),)
2528 ifneq ($(SYSTEM_COINMP),TRUE)
2530 define gb_LinkTarget__use_coinmp
2531 $(call gb_LinkTarget_use_package,$(1),coinmp)
2532 ifeq ($(COM),MSC)
2533 $(call gb_LinkTarget_add_libs,$(1),\
2534 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2536 else
2537 $(call gb_LinkTarget_add_libs,$(1),\
2538 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2539 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2540 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2541 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2542 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2543 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2544 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2546 endif
2547 $(call gb_LinkTarget_set_include,$(1),\
2548 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2549 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2550 $$(INCLUDE) \
2553 endef
2555 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2556 coinmp \
2559 else # SYSTEM_COINMP
2561 define gb_LinkTarget__use_coinmp
2562 $(call gb_LinkTarget_set_include,$(1),\
2563 $$(INCLUDE) \
2564 $(COINMP_CFLAGS) \
2566 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2568 endef
2570 endif
2572 else
2574 gb_LinkTarget__use_coinmp :=
2576 endif # ENABLE_COINMP
2578 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2580 define gb_LinkTarget__use_mDNSResponder
2581 $(call gb_LinkTarget_set_include,$(1),\
2582 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2583 $$(INCLUDE) \
2585 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2586 endef
2588 endif # MDNSRESPONDER
2590 ifeq ($(ENABLE_GIO),TRUE)
2592 define gb_LinkTarget__use_gio
2593 $(call gb_LinkTarget_set_include,$(1),\
2594 $$(INCLUDE) \
2595 $(GIO_CFLAGS) \
2598 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2600 endef
2602 else # ENABLE_GIO
2604 define gb_LinkTarget__use_gio
2606 endef
2608 endif # ENABLE_GIO
2610 ifeq ($(ENABLE_AVAHI),TRUE)
2612 define gb_LinkTarget__use_avahi
2613 $(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(AVAHI_CFLAGS) \
2618 $(call gb_LinkTarget_add_defs,$(1),\
2619 -DENABLE_AVAHI \
2622 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2624 endef
2626 else # ENABLE_AVAHI
2628 gb_LinkTarget__use_avahi :=
2630 endif # ENABLE_AVAHI
2633 define gb_LinkTarget__use_gtk
2634 $(call gb_LinkTarget_set_include,$(1),\
2635 $$(INCLUDE) \
2636 $(GTK_CFLAGS) \
2639 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2641 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2643 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2645 $(call gb_LinkTarget_set_include,$(1),\
2646 $$(INCLUDE) \
2647 $(GTK_PRINT_CFLAGS) \
2650 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2652 endif
2654 endef
2656 define gb_LinkTarget__use_gthread
2657 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2658 endef
2660 ifeq ($(ENABLE_CUPS),TRUE)
2662 define gb_LinkTarget__use_cups
2663 $(call gb_LinkTarget_add_defs,$(1),\
2664 -DENABLE_CUPS \
2667 $(call gb_LinkTarget_add_libs,$(1),\
2668 -lcups \
2671 endef
2673 else # ENABLE_CUPS
2675 define gb_LinkTarget__use_cups
2677 endef
2679 endif # ENABLE_DBUS
2681 ifeq ($(ENABLE_DBUS),TRUE)
2683 define gb_LinkTarget__use_dbus
2684 $(call gb_LinkTarget_set_include,$(1),\
2685 $$(INCLUDE) \
2686 $(DBUS_CFLAGS) \
2689 $(call gb_LinkTarget_add_libs,$(1),\
2690 $(DBUS_LIBS) \
2693 endef
2695 else # ENABLE_DBUS
2697 define gb_LinkTarget__use_dbus
2699 endef
2701 endif # ENABLE_DBUS
2704 ifneq ($(SYSTEM_LIBPNG),)
2706 define gb_LinkTarget__use_libpng
2707 $(call gb_LinkTarget_set_include,$(1),\
2708 $$(INCLUDE) \
2709 $(LIBPNG_CFLAGS) \
2712 $(call gb_LinkTarget_add_libs,$(1),\
2713 $(LIBPNG_LIBS) \
2716 endef
2718 gb_ExternalProject__use_libpng :=
2720 else # !SYSTEM_LIBPNG
2722 define gb_LinkTarget__use_libpng
2723 $(call gb_LinkTarget_set_include,$(1),\
2724 $(LIBPNG_CFLAGS) \
2725 $$(INCLUDE) \
2727 $(call gb_LinkTarget_use_static_libraries,$(1),\
2728 libpng \
2730 $(call gb_LinkTarget__use_zlib,$(1))
2732 endef
2734 define gb_ExternalProject__use_libpng
2735 $(call gb_ExternalProject_use_static_libraries,$(1),\
2736 libpng \
2739 endef
2741 endif # !SYSTEM_LIBPNG
2744 ifneq ($(SYSTEM_CURL),)
2746 define gb_LinkTarget__use_curl
2747 $(call gb_LinkTarget_add_defs,$(1),\
2748 -DSYSTEM_CURL \
2750 $(call gb_LinkTarget_set_include,$(1),\
2751 $$(INCLUDE) \
2752 $(CURL_CFLAGS) \
2754 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2756 endef
2758 else # !SYSTEM_CURL
2760 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2761 curl \
2764 define gb_LinkTarget__use_curl
2765 $(call gb_LinkTarget_use_package,$(1),curl)
2766 $(call gb_LinkTarget_set_include,$(1),\
2767 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2768 $$(INCLUDE) \
2771 ifeq ($(COM),MSC)
2772 $(call gb_LinkTarget_add_libs,$(1),\
2773 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2775 else
2776 $(call gb_LinkTarget_add_libs,$(1),\
2777 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2779 endif
2781 endef
2783 endif # SYSTEM_CURL
2785 ifeq ($(ENABLE_VALGRIND),TRUE)
2787 define gb_LinkTarget__use_valgrind
2788 $(call gb_LinkTarget_add_defs,$(1),\
2789 -DHAVE_VALGRIND_HEADERS \
2792 $(call gb_LinkTarget_set_include,$(1),\
2793 $$(INCLUDE) \
2794 $(VALGRIND_CFLAGS) \
2797 endef
2799 else # !ENABLE_VALGRIND
2801 define gb_LinkTarget__use_valgrind
2803 endef
2805 endif # ENABLE_VALGRIND
2807 ifneq ($(SYSTEM_POPPLER),)
2809 define gb_LinkTarget__use_poppler
2810 $(call gb_LinkTarget_set_include,$(1),\
2811 $(POPPLER_CFLAGS) \
2812 $$(INCLUDE) \
2815 $(call gb_LinkTarget_add_libs,$(1),\
2816 $(POPPLER_LIBS) \
2819 endef
2821 else # !SYSTEM_POPPLER
2823 define gb_LinkTarget__use_poppler
2824 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2826 $(call gb_LinkTarget_set_include,$(1),\
2827 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2828 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2829 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2830 $$(INCLUDE) \
2833 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2835 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2837 ifeq ($(OS),MACOSX)
2838 $(call gb_LinkTarget_add_libs,$(1),\
2839 -lobjc \
2841 else ifeq ($(OS),LINUX)
2842 $(call gb_LinkTarget_add_libs,$(1),\
2843 -pthread \
2845 else ifeq ($(OS),WNT)
2846 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2847 advapi32 \
2848 gdi32 \
2850 endif
2852 endef
2854 endif # SYSTEM_POPPLER
2857 ifneq ($(SYSTEM_CLUCENE),)
2859 define gb_LinkTarget__use_clucene
2860 $(call gb_LinkTarget_add_defs,$(1),\
2861 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2864 $(call gb_LinkTarget_set_include,$(1),\
2865 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2866 $$(INCLUDE) \
2869 $(call gb_LinkTarget_add_libs,$(1),\
2870 $(CLUCENE_LIBS) \
2873 endef
2875 else # !SYSTEM_CLUCENE
2877 define gb_LinkTarget__use_clucene
2878 $(call gb_LinkTarget_set_include,$(1),\
2879 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2880 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2881 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2882 $$(INCLUDE) \
2885 $(call gb_LinkTarget_use_libraries,$(1),\
2886 clucene \
2889 endef
2891 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2892 clucene \
2895 endif # SYSTEM_CLUCENE
2897 define gb_LinkTarget__use_gobject
2898 $(call gb_LinkTarget_add_libs,$(1),\
2899 $(GOBJECT_LIBS) \
2902 $(call gb_LinkTarget_set_include,$(1),\
2903 $$(INCLUDE) \
2904 $(GOBJECT_CFLAGS) \
2906 endef
2908 ifneq ($(SYSTEM_HSQLDB),)
2910 define gb_LinkTarget__use_hsqldb
2912 $(call gb_LinkTarget_add_defs,$(1),\
2913 -DSYSTEM_HSQLDB \
2914 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2917 endef
2919 else # !SYSTEM_HSQLDB
2921 define gb_LinkTarget__use_hsqldb
2923 endef
2925 endif # SYSTEM_HSQLDB
2928 ifneq ($(SYSTEM_OPENLDAP),)
2930 define gb_LinkTarget__use_openldap
2932 $(call gb_LinkTarget_add_libs,$(1),\
2933 -lldap \
2934 -llber \
2937 endef
2939 gb_ExternalProject__use_openldap :=
2941 else # !SYSTEM_OPENLDAP
2943 define gb_LinkTarget__use_openldap
2944 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2945 $(call gb_LinkTarget_set_include,$(1),\
2946 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2947 $$(INCLUDE) \
2949 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2950 $(call gb_LinkTarget_add_libs,$(1), \
2951 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2952 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2955 endef
2957 define gb_ExternalProject__use_openldap
2958 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2960 endef
2962 endif # SYSTEM_OPENLDAP
2964 ifneq ($(SYSTEM_LIBTOMMATH),)
2966 define gb_LinkTarget__use_libtommath
2967 $(call gb_LinkTarget_set_include,$(1),\
2968 $(LIBTOMMATH_CFLAGS) \
2969 $$(INCLUDE) \
2971 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2973 endef
2975 else # !SYSTEM_LIBTOMMATH
2976 define gb_LinkTarget__use_libtommath
2977 $(call gb_LinkTarget_set_include,$(1),\
2978 -I${WORKDIR}/UnpackedTarball/libtommath \
2979 $$(INCLUDE) \
2981 $(call gb_LinkTarget_add_libs,$(1),\
2982 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2984 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2986 endef
2988 endif # SYSTEM_LIBTOMMATH
2990 define gb_ExternalProject__use_libtommath
2991 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2993 endef
2995 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2997 ifneq ($(SYSTEM_FIREBIRD),)
2999 define gb_LinkTarget__use_libfbembed
3000 $(call gb_LinkTarget_set_include,$(1),\
3001 $(FIREBIRD_CFLAGS) \
3002 $$(INCLUDE) \
3004 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3006 endef
3008 else # !SYSTEM_FIREBIRD
3010 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3011 firebird \
3014 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3015 #$(call gb_LinkTarget__use_libtommath,$(1))
3017 define gb_LinkTarget__use_libfbembed
3018 $(call gb_LinkTarget_use_package,$(1),firebird)
3019 $(call gb_LinkTarget_set_include,$(1),\
3020 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3021 $$(INCLUDE) \
3023 ifeq ($(COM),MSC)
3024 $(call gb_LinkTarget_add_libs,$(1),\
3025 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3027 else
3028 $(call gb_LinkTarget_add_libs,$(1),\
3029 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3031 endif
3033 endef
3036 # endef
3038 endif # SYSTEM_FIREBIRD
3040 else # !ENABLE_FIREBIRD_SDBC
3042 gb_LinkTarget__use_firebird :=
3043 # gb_LinkTarget__use_atomic_ops :=
3044 # gb_LinkTarget__use_libtommath :=
3046 endif # ENABLE_FIREBIRD_SDBC
3049 ifneq ($(SYSTEM_POSTGRESQL),)
3051 define gb_LinkTarget__use_postgresql
3053 $(call gb_LinkTarget_set_include,$(1),\
3054 $(POSTGRESQL_INC) \
3055 $$(INCLUDE) \
3058 $(call gb_LinkTarget_add_libs,$(1),\
3059 -lpq \
3062 $(call gb_LinkTarget_add_ldflags,$(1),\
3063 $(POSTGRESQL_LIB) \
3066 endef
3068 else # !SYSTEM_POSTGRESQL
3070 define gb_LinkTarget__use_postgresql
3072 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3074 $(call gb_LinkTarget_set_include,$(1),\
3075 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3076 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3077 $$(INCLUDE) \
3080 $(call gb_LinkTarget_add_libs,$(1),\
3081 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3084 ifeq ($(OS),WNT)
3085 $(call gb_LinkTarget_use_external,$(1),openssl)
3087 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3088 secur32 \
3089 ws2_32 \
3092 endif
3094 endef
3096 endif # SYSTEM_POSTGRESQL
3098 ifeq ($(ENABLE_KDE4),TRUE)
3100 define gb_LinkTarget__use_kde4
3101 $(call gb_LinkTarget_set_include,$(1),\
3102 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3103 $$(INCLUDE) \
3106 $(call gb_LinkTarget_add_defs,$(1),\
3107 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3110 $(call gb_LinkTarget_add_libs,$(1),\
3111 $(KDE4_LIBS) \
3114 endef
3116 else # !ENABLE_KDE4
3118 define gb_LinkTarget__use_kde4
3120 endef
3122 endif # ENABLE_KDE4
3125 ifeq ($(ENABLE_KDE5),TRUE)
3127 define gb_LinkTarget__use_kde5
3128 $(call gb_LinkTarget_set_include,$(1),\
3129 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3130 $$(INCLUDE) \
3133 $(call gb_LinkTarget_add_defs,$(1),\
3134 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3137 $(call gb_LinkTarget_add_libs,$(1),\
3138 $(KF5_LIBS) \
3141 ifeq ($(COM),GCC)
3142 $(call gb_LinkTarget_add_cxxflags,$(1),\
3143 -Wno-shadow \
3145 endif
3147 endef
3149 else # !ENABLE_KDE5
3151 define gb_LinkTarget__use_kde5
3153 endef
3155 endif # ENABLE_KDE5
3159 ifeq ($(ENABLE_QT5),TRUE)
3161 define gb_LinkTarget__use_qt5
3162 $(call gb_LinkTarget_set_include,$(1),\
3163 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3164 $$(INCLUDE) \
3167 $(call gb_LinkTarget_add_defs,$(1),\
3168 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3171 $(call gb_LinkTarget_add_libs,$(1),\
3172 $(QT5_LIBS) \
3175 ifeq ($(COM),GCC)
3176 $(call gb_LinkTarget_add_cxxflags,$(1),\
3177 -Wno-shadow \
3179 endif
3181 endef
3183 else # !ENABLE_QT5
3185 define gb_LinkTarget__use_qt5
3187 endef
3189 endif # ENABLE_QT5
3191 # PYTHON
3192 # extra python_headers external because pyuno wrapper must not link python
3193 ifneq ($(SYSTEM_PYTHON),)
3195 define gb_LinkTarget__use_python_headers
3196 $(call gb_LinkTarget_add_defs,$(1),\
3197 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3200 $(call gb_LinkTarget_set_include,$(1),\
3201 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3202 $$(INCLUDE) \
3205 endef
3207 define gb_LinkTarget__use_python
3208 $(call gb_LinkTarget__use_python_headers,$(1))
3210 $(call gb_LinkTarget_add_libs,$(1),\
3211 $(PYTHON_LIBS) \
3214 endef
3216 else # !SYSTEM_PYTHON
3218 $(eval $(call gb_Helper_register_packages_for_install,python,\
3219 python3 \
3222 define gb_LinkTarget__use_python_headers
3223 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3224 $(call gb_LinkTarget_set_include,$(1),\
3225 -I$(call gb_UnpackedTarball_get_dir,python3) \
3226 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3227 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3228 $$(INCLUDE) \
3231 endef
3233 define gb_LinkTarget__use_python
3234 $(call gb_LinkTarget__use_python_headers,$(1))
3235 ifeq ($(OS),MACOSX)
3236 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3237 else
3238 $(call gb_LinkTarget_use_package,$(1),python3)
3239 endif
3241 ifeq ($(OS),WNT)
3242 $(call gb_LinkTarget_add_libs,$(1),\
3243 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(if $(filter X86_64,$(CPUNAME)),amd64,win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3245 else ifeq ($(OS),MACOSX)
3246 $(call gb_LinkTarget_add_libs,$(1),\
3247 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3249 else
3250 $(call gb_LinkTarget_add_libs,$(1),\
3251 -L$(call gb_UnpackedTarball_get_dir,python3) \
3252 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3254 endif
3256 endef
3258 endif # SYSTEM_PYTHON
3260 # ORCUS
3261 ifneq ($(SYSTEM_LIBORCUS),)
3263 define gb_LinkTarget__use_orcus
3264 $(call gb_LinkTarget_set_include,$(1),\
3265 $$(INCLUDE) \
3266 $(ORCUS_CFLAGS) \
3268 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3269 endef
3271 define gb_LinkTarget__use_orcus-parser
3273 endef
3275 else # !SYSTEM_LIBORCUS
3277 ifeq ($(COM),MSC)
3279 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3280 orcus \
3281 orcus-parser \
3284 define gb_LinkTarget__use_orcus
3285 $(call gb_LinkTarget_set_include,$(1),\
3286 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3287 $$(INCLUDE) \
3290 $(call gb_LinkTarget_use_libraries,$(1),\
3291 orcus \
3294 endef
3296 define gb_LinkTarget__use_orcus-parser
3297 $(call gb_LinkTarget_set_include,$(1),\
3298 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3299 $$(INCLUDE) \
3302 $(call gb_LinkTarget_use_libraries,$(1),\
3303 orcus-parser \
3306 endef
3308 else # !MSC
3310 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3311 liborcus \
3314 define gb_LinkTarget__use_orcus
3315 $(call gb_LinkTarget_use_package,$(1),liborcus)
3317 $(call gb_LinkTarget_set_include,$(1),\
3318 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3319 $$(INCLUDE) \
3322 $(call gb_LinkTarget_add_libs,$(1),\
3323 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.13 \
3326 $(if $(SYSTEM_BOOST), \
3327 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3328 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3331 endef
3333 define gb_LinkTarget__use_orcus-parser
3334 $(call gb_LinkTarget_use_package,$(1),liborcus)
3336 $(call gb_LinkTarget_set_include,$(1),\
3337 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3338 $$(INCLUDE) \
3341 $(call gb_LinkTarget_add_libs,$(1),\
3342 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.13 \
3345 endef
3347 endif # MSC
3349 endif # SYSTEM_LIBORCUS
3351 ifeq ($(ENABLE_EOT),TRUE)
3353 ifneq ($(SYSTEM_LIBEOT),)
3355 define gb_LinkTarget__use_libeot
3356 $(call gb_LinkTarget_set_include,$(1),\
3357 $$(INCLUDE) \
3358 $(LIBEOT_CFLAGS) \
3360 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3362 endef
3364 gb_ExternalProject__use_libeot :=
3366 else # !SYSTEM_LIBEOT
3368 define gb_LinkTarget__use_libeot
3369 $(call gb_LinkTarget_set_include,$(1),\
3370 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3371 $$(INCLUDE) \
3373 $(call gb_LinkTarget_add_libs,$(1),\
3374 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3376 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3378 endef
3380 define gb_ExternalProject__use_libeot
3381 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3383 endef
3385 endif # SYSTEM_LIBEOT
3387 else # !ENABLE_EOT
3389 gb_LinkTarget__use_libeot :=
3390 gb_ExternalProject__use_libeot :=
3392 endif # ENABLE_EOT
3394 ### X11 stuff ###
3396 ifeq ($(USING_X11), TRUE)
3398 define gb_LinkTarget__use_Xrandr
3399 $(call gb_LinkTarget_set_include,$(1),\
3400 $$(INCLUDE) \
3401 $(XRANDR_CFLAGS) \
3404 $(call gb_LinkTarget_add_libs,$(1),\
3405 $(XRANDR_LIBS) \
3407 endef
3409 define gb_LinkTarget__use_Xrender
3410 $(call gb_LinkTarget_set_include,$(1),\
3411 $$(INCLUDE) \
3412 $(XRENDER_CFLAGS) \
3415 $(call gb_LinkTarget_add_libs,$(1),\
3416 $(XRENDER_LIBS) \
3418 endef
3420 endif # USING_X11
3423 gb_ExternalProject__use_nss3:=
3426 ifneq ($(SYSTEM_NSS),)
3428 define gb_LinkTarget__use_nss3
3429 $(call gb_LinkTarget_add_defs,$(1),\
3430 -DSYSTEM_NSS \
3433 $(call gb_LinkTarget_set_include,$(1),\
3434 $$(INCLUDE) \
3435 $(NSS_CFLAGS) \
3438 $(call gb_LinkTarget_add_libs,$(1),\
3439 $(NSS_LIBS) \
3442 endef
3444 define gb_LinkTarget__use_plc4
3445 $(call gb_LinkTarget__use_nss3,$(1))
3447 endef
3449 define gb_LinkTarget__use_ssl3
3450 $(call gb_LinkTarget__use_nss3,$(1))
3452 endef
3454 else # !SYSTEM_NSS
3456 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3457 nss \
3460 define gb_LinkTarget__use_nss3
3461 $(call gb_LinkTarget_use_package,$(1),nss)
3462 $(call gb_LinkTarget_set_include,$(1),\
3463 $$(INCLUDE) \
3464 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3465 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3468 ifeq ($(COM),MSC)
3469 $(call gb_LinkTarget_add_libs,$(1),\
3470 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3471 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3472 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3474 else
3475 $(call gb_LinkTarget_add_libs,$(1),\
3476 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3477 -lnspr4 \
3478 -lnss3 \
3479 -lsmime3 \
3481 endif
3483 endef
3485 define gb_LinkTarget__use_plc4
3486 $(call gb_LinkTarget_use_package,$(1),nss)
3487 ifeq ($(COM),MSC)
3488 $(call gb_LinkTarget_add_libs,$(1),\
3489 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3491 else
3492 $(call gb_LinkTarget_add_libs,$(1),\
3493 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3495 endif
3497 endef
3499 define gb_LinkTarget__use_ssl3
3500 $(call gb_LinkTarget_use_package,$(1),nss)
3501 ifeq ($(COM),MSC)
3502 $(call gb_LinkTarget_add_libs,$(1),\
3503 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3505 else
3506 $(call gb_LinkTarget_add_libs,$(1),\
3507 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3509 endif
3511 endef
3513 define gb_ExternalProject__use_nss3
3514 $(call gb_ExternalProject_use_package,$(1),nss)
3516 endef
3518 endif # SYSTEM_NSS
3520 ifeq ($(ENABLE_BREAKPAD),TRUE)
3522 define gb_LinkTarget__use_breakpad
3523 $(call gb_LinkTarget_set_include,$(1),\
3524 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3525 $$(INCLUDE) \
3528 ifeq ($(COM),MSC)
3529 $(call gb_LinkTarget_use_static_libraries,$(1),\
3530 breakpad \
3532 else
3533 $(call gb_LinkTarget_add_libs,$(1),\
3534 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3536 endif
3538 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3540 endef
3542 endif # ENABLE_BREAKPAD
3544 ifeq ($(ENABLE_GPGMEPP),TRUE)
3546 ifneq ($(SYSTEM_GPGMEPP),)
3548 gb_ExternalProject__use_gpgmepp:=
3549 gb_ExternalProject__use_libassuan:=
3550 gb_ExternalProject__use_libgpg-error:=
3552 define gb_LinkTarget__use_gpgmepp
3553 $(call gb_LinkTarget_set_include,$(1),\
3554 $$(INCLUDE) \
3555 $$(GPGMEPP_CFLAGS) \
3558 $(call gb_LinkTarget_add_libs,$(1),\
3559 $(GPGMEPP_LIBS) \
3562 endef
3564 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3566 define gb_ExternalProject__use_gpgmepp
3567 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3569 endef
3570 define gb_ExternalProject__use_libassuan
3571 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3573 endef
3574 define gb_ExternalProject__use_libgpg-error
3575 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3577 endef
3579 ifneq ($(filter WNT,$(OS)),)
3581 define gb_LinkTarget__use_libgpg-error
3582 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3584 $(call gb_LinkTarget_set_include,$(1),\
3585 $(GPG_ERROR_CFLAGS) \
3586 $$(INCLUDE) \
3588 $(call gb_LinkTarget_add_libs,$(1),\
3589 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3592 endef
3594 define gb_LinkTarget__use_libassuan
3595 $(call gb_LinkTarget_use_package,$(1),libassuan)
3597 $(call gb_LinkTarget_set_include,$(1),\
3598 $(LIBASSUAN_CFLAGS) \
3599 $$(INCLUDE) \
3601 $(call gb_LinkTarget_add_libs,$(1),\
3602 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3605 endef
3607 define gb_LinkTarget__use_gpgmepp
3608 $(call gb_LinkTarget_set_include,$(1),\
3609 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3610 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3611 $$(GPG_ERROR_CFLAGS) \
3612 $$(INCLUDE) \
3614 $(call gb_LinkTarget_use_libraries,$(1),\
3615 gpgmepp \
3618 endef
3620 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3621 libassuan \
3622 libgpg-error \
3625 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3626 gpgmepp \
3629 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3630 gpgme-w32spawn \
3633 endif
3635 ifneq ($(filter MACOSX LINUX,$(OS)),)
3637 define gb_LinkTarget__use_gpgmepp
3638 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3640 $(call gb_LinkTarget_set_include,$(1),\
3641 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3642 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3643 $$(GPG_ERROR_CFLAGS) \
3644 $$(INCLUDE) \
3646 $(call gb_LinkTarget_add_libs,$(1),\
3647 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3648 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3649 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3650 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3653 endef
3655 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3656 gpgmepp \
3657 libassuan \
3658 libgpg-error \
3661 endif
3663 endif
3665 else # !ENABLE_GPGMEPP
3667 gb_ExternalProject__use_gpgmepp :=
3668 gb_ExternalProject__use_libassuan :=
3669 gb_ExternalProject__use_libgpg-error :=
3671 gb_LinkTarget__use_gpgmepp :=
3672 gb_LinkTarget__use_libassuan :=
3673 gb_LinkTarget__use_libgpg-error :=
3675 endif # ENABLE_GPGMEPP
3677 define gb_LinkTarget__use_dconf
3678 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3679 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3680 endef
3682 ### Jars ############################################################
3684 ifneq ($(SYSTEM_HSQLDB),)
3686 define gb_Jar__use_hsqldb
3687 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3688 endef
3689 define gb_JunitTest__use_hsqldb
3690 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3691 endef
3693 else # !SYSTEM_HSQLDB
3695 ifeq ($(ENABLE_JAVA),TRUE)
3696 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3697 hsqldb \
3699 endif
3701 define gb_Jar__use_hsqldb
3702 $(call gb_Jar_use_jar,$(1),hsqldb)
3703 endef
3704 define gb_JunitTest__use_hsqldb
3705 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3706 endef
3708 endif # SYSTEM_HSQLDB
3711 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3713 ifneq ($(SYSTEM_BSH),)
3715 define gb_Jar__use_bsh
3716 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3717 endef
3719 else # !SYSTEM_BSH
3721 ifeq ($(ENABLE_JAVA),TRUE)
3722 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3723 bsh \
3725 endif
3727 define gb_Jar__use_bsh
3728 $(call gb_Jar_use_jar,$(1),bsh)
3729 endef
3731 endif # SYSTEM_BSH
3733 endif
3735 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3737 ifneq ($(SYSTEM_RHINO),)
3739 define gb_Jar__use_rhino
3740 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3741 endef
3743 else # !SYSTEM_RHINO
3745 ifeq ($(ENABLE_JAVA),TRUE)
3746 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3747 js \
3749 endif
3751 define gb_Jar__use_rhino
3752 $(call gb_Jar_use_jar,$(1),js)
3753 endef
3755 endif # SYSTEM_RHINO
3757 endif
3759 ifneq ($(SYSTEM_APACHE_COMMONS),)
3761 define gb_Jar__use_commons-logging
3762 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3763 endef
3764 gb_ExternalProject__use_commons-logging :=
3766 else # !SYSTEM_APACHE_COMMONS
3768 ifeq ($(ENABLE_JAVA),TRUE)
3769 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3770 commons-logging-$(COMMONS_LOGGING_VERSION) \
3772 endif
3774 define gb_Jar__use_commons-logging
3775 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3776 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3777 endef
3778 define gb_ExternalProject__use_commons-logging
3779 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3780 endef
3782 endif # SYSTEM_APACHE_COMMONS
3785 ifneq ($(SYSTEM_JFREEREPORT),)
3787 define gb_Jar__use_flow-engine
3788 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3789 endef
3791 define gb_Jar__use_flute
3792 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3793 endef
3795 define gb_Jar__use_libbase
3796 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3797 endef
3799 define gb_Jar__use_libfonts
3800 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3801 endef
3803 define gb_Jar__use_libformula
3804 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3805 endef
3807 define gb_Jar__use_liblayout
3808 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3809 endef
3811 define gb_Jar__use_libloader
3812 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3813 endef
3815 define gb_Jar__use_librepository
3816 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3817 endef
3819 define gb_Jar__use_libserializer
3820 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3821 endef
3823 define gb_Jar__use_libxml
3824 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3825 endef
3827 define gb_Jar__use_sac
3828 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3829 endef
3831 else # !SYSTEM_JFREEREPORT
3833 ifeq ($(ENABLE_JAVA),TRUE)
3834 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3835 flow-engine \
3836 flute-1.1.6 \
3837 libbase-1.1.6 \
3838 libfonts-1.1.6 \
3839 libformula-1.1.7 \
3840 liblayout \
3841 libloader-1.1.6 \
3842 librepository-1.1.6 \
3843 libserializer-1.1.6 \
3844 libxml-1.1.7 \
3845 sac \
3847 endif
3849 define gb_Jar__use_flow-engine
3850 $(call gb_Jar_use_jar,$(1),flow-engine)
3851 endef
3853 define gb_Jar__use_flute
3854 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3855 endef
3857 define gb_Jar__use_libbase
3858 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3859 endef
3861 define gb_Jar__use_libfonts
3862 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3863 endef
3865 define gb_Jar__use_libformula
3866 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3867 endef
3869 define gb_Jar__use_liblayout
3870 $(call gb_Jar_use_jar,$(1),liblayout)
3871 endef
3873 define gb_Jar__use_libloader
3874 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3875 endef
3877 define gb_Jar__use_librepository
3878 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3879 endef
3881 define gb_Jar__use_libserializer
3882 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3883 endef
3885 define gb_Jar__use_libxml
3886 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3887 endef
3889 define gb_Jar__use_sac
3890 $(call gb_Jar_use_jar,$(1),sac)
3891 endef
3893 endif # SYSTEM_JFREEREPORT
3896 # Executables
3898 # FIXME: the library target should be for build too
3899 define gb_Executable__register_bestreversemap
3900 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3901 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3903 endef
3905 # TODO depending on the whole URE might be overkill, but I do not have a
3906 # Windows machine to debug it...
3907 # FIXME: the library target should be for build too
3908 define gb_Executable__register_climaker
3909 $(call gb_Executable_add_runtime_dependencies,climaker,\
3910 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3911 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3912 $(call gb_UnoApi_get_target,udkapi) \
3913 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3915 endef
3917 define gb_Executable__register_cppumaker
3918 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3919 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3921 endef
3923 # This is used to determine what we need for 'build' platform.
3924 # FIXME: the library target should be for build too
3925 define gb_Executable__register_gengal
3926 $(call gb_Executable_add_runtime_dependencies,gengal,\
3927 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3928 $(call gb_Package_get_target_for_build,postprocess_images) \
3929 $(call gb_Package_get_target_for_build,postprocess_registry) \
3930 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3931 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3932 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3933 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3934 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3935 $(call gb_UnoApi_get_target,offapi) \
3936 $(call gb_UnoApi_get_target,udkapi) \
3938 endef
3940 ifeq ($(SYSTEM_ICU),)
3942 define gb_Executable__register_gendict
3943 $(call gb_Executable_add_runtime_dependencies,gendict,\
3944 $(call gb_Package_get_target_for_build,icu) \
3945 $(call gb_Package_get_target_for_build,icu_ure) \
3947 endef
3949 endif
3951 define gb_Executable__register_idlc
3952 $(call gb_Executable_add_runtime_dependencies,idlc,\
3953 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3955 endef
3957 define gb_Executable__register_localize
3958 $(call gb_Executable_add_runtime_dependencies,localize,\
3959 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3960 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3963 endef
3965 # FIXME ure/services.rdb needs cleanup
3966 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3967 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3968 # FIXME: the library target should be for build too
3969 define gb_Executable__register_saxparser
3970 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3971 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3972 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3973 $(call gb_Rdb_get_target_for_build,saxparser) \
3974 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3975 $(call gb_UnoApi_get_target,udkapi) \
3977 endef
3979 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3980 # required due to the settings for URE_SERVICES and URE_TYPES in
3981 # cppuhelper/source/unorc
3982 # FIXME: the library target should be for build too
3983 define gb_Executable__register_uno
3984 $(call gb_Executable_add_runtime_dependencies,uno,\
3985 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3986 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3987 $(call gb_UnoApi_get_target,udkapi) \
3989 endef
3992 # External executables
3994 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3996 gb_ExternalExecutable__register_xmllint :=
3998 else # ! SYSTEM_LIBXML_FOR_BUILD
4000 define gb_ExternalExecutable__register_xmllint
4001 $(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)
4002 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4003 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4004 $(call gb_Package_get_target,libxml2) \
4007 endef
4009 endif # SYSTEM_LIBXML_FOR_BUILD
4011 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4013 gb_ExternalExecutable__register_xsltproc :=
4015 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4017 define gb_ExternalExecutable__register_xsltproc
4018 $(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)
4019 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4020 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4021 $(call gb_Package_get_target,libxml2) \
4022 $(call gb_Package_get_target,libxslt) \
4025 endef
4027 endif # SYSTEM_LIBXSLT_FOR_BUILD
4029 ifneq (,$(SYSTEM_UCPP))
4031 gb_ExternalExecutable__register_ucpp :=
4033 else # ! SYSTEM_UCPP
4035 define gb_ExternalExecutable__register_ucpp
4036 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4038 endef
4040 endif # SYSTEM_UCPP
4042 ifeq (,$(PYTHON_FOR_BUILD))
4044 define gb_ExternalExecutable__register_python
4045 ifeq ($(OS),MACOSX)
4047 # use set_external, to avoid having the command added as prerequisite for the
4048 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4049 # matching rule to build that specific file)
4050 $(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))
4051 # the Zip ensures that internal python has been built (cannot use the Package
4052 # target, as that is not used on Mac)
4053 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4055 else
4057 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4058 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4059 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4061 endif
4063 endef
4065 else
4067 define gb_ExternalExecutable__register_python
4068 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4069 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4071 endef
4073 endif # PYTHON_FOR_BUILD
4075 ifneq ($(SYSTEM_GENBRK),)
4077 define gb_ExternalExecutable__register_genbrk
4078 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4080 endef
4082 else # ! SYSTEM_GENBRK
4084 define gb_ExternalExecutable__register_genbrk
4085 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4086 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4087 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4088 $(call gb_Package_get_target_for_build,icu) \
4089 $(call gb_Package_get_target_for_build,icu_ure) \
4092 endef
4094 endif
4096 ifneq ($(SYSTEM_GENCCODE),)
4098 define gb_ExternalExecutable__register_genccode
4099 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4101 endef
4103 else # ! SYSTEM_GENCCODE
4105 define gb_ExternalExecutable__register_genccode
4106 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4107 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4108 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4109 $(call gb_Package_get_target_for_build,icu) \
4110 $(call gb_Package_get_target_for_build,icu_ure) \
4113 endef
4115 endif
4117 ifneq ($(SYSTEM_GENCMN),)
4119 define gb_ExternalExecutable__register_gencmn
4120 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4122 endef
4124 else # ! SYSTEM_GENCMN
4126 define gb_ExternalExecutable__register_gencmn
4127 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4128 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4129 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4130 $(call gb_Package_get_target_for_build,icu) \
4131 $(call gb_Package_get_target_for_build,icu_ure) \
4134 endef
4136 endif
4138 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4140 $(eval $(call gb_Helper_register_jars,OXT,\
4141 owncloud-android-library \
4144 define gb_Jar__use_owncloud_android_lib
4145 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4146 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4147 endef
4148 define gb_ExternalProject__use_owncloud_android_lib
4149 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4150 endef
4152 endif
4154 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4155 ifneq ($(SYSTEM_BZIP2),)
4157 define gb_LinkTarget__use_bzip2
4158 $(call gb_LinkTarget_set_include,$(1),\
4159 $(BZIP2_CFLAGS) \
4160 $$(INCLUDE) \
4162 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4164 endef
4166 gb_ExternalProject__use_bzip2 :=
4168 else # !SYSTEM_BZIP2
4170 define gb_LinkTarget__use_bzip2
4171 $(call gb_LinkTarget_set_include,$(1),\
4172 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4173 $$(INCLUDE) \
4176 ifeq ($(COM),MSC)
4177 $(call gb_LinkTarget_add_libs,$(1),\
4178 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4180 else
4181 $(call gb_LinkTarget_add_libs,$(1),\
4182 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4184 endif
4186 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4187 endef
4189 define gb_ExternalProject__use_bzip2
4190 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4191 endef
4193 endif
4194 endif
4196 define gb_LinkTarget__use_clew
4197 $(call gb_LinkTarget_set_include,$(1), \
4198 -I$(SRCDIR)/external/clew/source/include \
4199 $$(INCLUDE) \
4201 $(call gb_LinkTarget_use_libraries,$(1),clew)
4202 endef
4204 ifneq ($(ENABLE_PDFIUM),)
4205 define gb_LinkTarget__use_pdfium
4206 $(call gb_LinkTarget_set_include,$(1),\
4207 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4208 $$(INCLUDE) \
4210 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4211 endef
4212 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4213 pdfium \
4215 endif
4217 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4218 $(if $(UCRT_REDISTDIR),ucrt) \
4221 # vim: set noet sw=4 ts=4: