Thread the software interpreter
[LibreOffice.git] / RepositoryExternal.mk
blobdb70ce875e71dd52489e2bfb07a9b28699c38a50
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 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
119 $$(INCLUDE) \
122 endef
124 else
126 gb_LinkTarget__use_sane_headers :=
128 endif
130 ifneq ($(SYSTEM_BLUEZ),)
132 gb_LinkTarget__use_bluez_bluetooth_headers :=
134 else # !SYSTEM_BLUEZ
136 define gb_LinkTarget__use_bluez_bluetooth_headers
137 $(call gb_LinkTarget_set_include,$(1),\
138 -I$(SRCDIR)/external/bluez_bluetooth/inc \
139 $$(INCLUDE) \
142 endef
144 endif # SYSTEM_BLUEZ
146 # External libraries
148 ifneq ($(SYSTEM_CPPUNIT),)
150 define gb_LinkTarget__use_cppunit
151 $(call gb_LinkTarget_set_include,$(1),\
152 $$(INCLUDE) \
153 $(CPPUNIT_CFLAGS) \
156 $(call gb_LinkTarget_add_libs,$(1),\
157 $(CPPUNIT_LIBS) \
160 endef
162 else # !SYSTEM_CPPUNIT
164 define gb_LinkTarget__use_cppunit
165 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
167 $(call gb_LinkTarget_set_include,$(1),\
168 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
169 $$(INCLUDE) \
172 ifeq ($(COM),MSC)
173 $(call gb_LinkTarget_add_libs,$(1),\
174 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
176 else
177 $(call gb_LinkTarget_add_libs,$(1),\
178 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
180 endif
182 endef
184 endif # SYSTEM_CPPUNIT
186 ifneq ($(SYSTEM_EPOXY),)
188 define gb_LinkTarget__use_epoxy
189 $(call gb_LinkTarget_set_include,$(1),\
190 $$(INCLUDE) \
191 $(EPOXY_CFLAGS) \
193 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
195 endef
197 gb_ExternalProject__use_epoxy :=
199 else # !SYSTEM_EPOXY
201 define gb_LinkTarget__use_epoxy
202 $(call gb_LinkTarget_set_include,$(1),\
203 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
204 $$(INCLUDE) \
207 $(call gb_LinkTarget_use_libraries,$(1),\
208 epoxy \
211 endef
213 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
214 epoxy \
217 define gb_ExternalProject__use_epoxy
218 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
220 endef
222 endif # SYSTEM_EPOXY
224 define gb_LinkTarget__use_iconv
225 $(call gb_LinkTarget_add_libs,$(1),-liconv)
227 endef
229 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
231 define gb_LinkTarget__use_mariadb-connector-c
232 $(call gb_LinkTarget_set_include,$(1),\
233 $$(INCLUDE) \
234 $(MARIADB_CFLAGS) \
236 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
238 endef
239 gb_ExternalProject__use_mariadb-connector-c :=
241 else # !SYSTEM_MARIADB_CONNECTOR_C
243 define gb_LinkTarget__use_mariadb-connector-c
244 $(call gb_LinkTarget_set_include,$(1),\
245 $$(INCLUDE) \
246 $(MARIADB_CFLAGS) \
248 $(call gb_LinkTarget_use_static_libraries,$(1),\
249 mariadb-connector-c \
252 endef
253 define gb_ExternalProject__use_mariadb-connector-c
254 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
256 endef
258 endif # SYSTEM_MARIADB_CONNECTOR_C
261 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
263 define gb_LinkTarget__use_mysql
265 $(call gb_LinkTarget_add_defs,$(1),\
266 -DSYSTEM_MARIADB \
269 $(call gb_LinkTarget_add_libs,$(1),\
270 $(MARIADB_LIBS) \
273 $(call gb_LinkTarget_set_include,$(1),\
274 $(MARIADB_CFLAGS) \
275 $$(INCLUDE) \
277 endef
279 else
281 define gb_LinkTarget__use_mysql
283 $(call gb_LinkTarget_set_include,$(1),\
284 $$(INCLUDE) \
287 endef
289 endif
291 ifneq ($(SYSTEM_MYSQL_CONNECTOR_CPP),)
293 define gb_LinkTarget__use_mysql-connector-cpp
294 $(call gb_LinkTarget_add_libs,$(1),\
295 -lmysqlcppconn \
298 $(call gb_LinkTarget_add_defs,$(1),\
299 -DSYSTEM_MYSQL_CPPCONN \
301 endef
303 else
305 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
306 mysqlcppconn \
309 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
310 define gb_LinkTarget__use_mysql-connector-cpp
312 $(call gb_LinkTarget_use_unpacked,$(1),mysql-connector-cpp)
314 $(call gb_LinkTarget_add_defs,$(1),\
315 -DCPPCONN_LIB_BUILD \
318 $(call gb_LinkTarget_set_include,$(1),\
319 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp) \
320 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp)/cppconn \
321 $$(INCLUDE) \
324 endef
326 endif
328 ifneq ($(SYSTEM_ZLIB),)
330 define gb_LinkTarget__use_zlib
331 $(call gb_LinkTarget_add_defs,$(1),\
332 -DSYSTEM_ZLIB \
334 $(call gb_LinkTarget_add_libs,$(1),-lz)
336 endef
338 # nothing on system
339 define gb_LinkTarget__use_zlib_x64
341 endef
343 gb_ExternalProject__use_zlib :=
345 else # !SYSTEM_ZLIB
347 define gb_LinkTarget__use_zlib_multiarch
348 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
350 $(call gb_LinkTarget_set_include,$(1),\
351 $(ZLIB_CFLAGS) \
352 $$(INCLUDE) \
355 $(call gb_LinkTarget_use_static_libraries,$(1),\
356 $(2) \
359 endef
361 define gb_LinkTarget__use_zlib
362 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
364 endef
366 define gb_LinkTarget__use_zlib_x64
367 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
369 endef
371 define gb_ExternalProject__use_zlib
372 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
374 endef
376 endif # SYSTEM_ZLIB
379 ifneq ($(SYSTEM_LIBJPEG),)
381 define gb_LinkTarget__use_libjpeg
382 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
383 $(call gb_LinkTarget_set_ldflags,$(1),\
384 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
387 endef
389 gb_ExternalProject__use_libjpeg :=
391 else
393 define gb_LinkTarget__use_libjpeg
394 $(call gb_LinkTarget_set_include,$(1),\
395 $(LIBJPEG_CFLAGS) \
396 $$(INCLUDE) \
398 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
399 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
401 endef
403 define gb_ExternalProject__use_libjpeg
404 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
406 endef
408 endif # SYSTEM_LIBJPEG
410 ifneq ($(SYSTEM_MYTHES),)
412 define gb_LinkTarget__use_mythes
413 $(call gb_LinkTarget_set_include,$(1),\
414 $$(INCLUDE) \
415 $(MYTHES_CFLAGS) \
417 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
419 endef
421 else # !SYSTEM_MYTHES
423 define gb_LinkTarget__use_mythes
424 $(call gb_LinkTarget_set_include,$(1),\
425 -I$(call gb_UnpackedTarball_get_dir,mythes) \
426 $$(INCLUDE) \
429 ifeq ($(COM),MSC)
430 $(call gb_LinkTarget_use_static_libraries,$(1),\
431 mythes \
433 else
434 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
435 $(call gb_LinkTarget_use_external_project,$(1),mythes)
436 endif
438 endef
440 endif # SYSTEM_MYTHES
443 ifneq ($(SYSTEM_EXPAT),)
445 define gb_LinkTarget__use_expat_impl
446 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
448 $(call gb_LinkTarget_add_defs,$(1),\
449 -DSYSTEM_EXPAT \
452 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
454 endef
456 gb_ExternalProject__use_expat :=
458 else # !SYSTEM_EXPAT
460 define gb_LinkTarget__use_expat_impl
461 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
463 $(call gb_LinkTarget_set_include,$(1),\
464 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
465 $$(INCLUDE) \
468 $(call gb_LinkTarget_use_static_libraries,$(1),\
469 $(2) \
472 endef
474 define gb_ExternalProject__use_expat
475 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
477 endef
479 endif # SYSTEM_EXPAT
481 define gb_LinkTarget__use_expat
482 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
484 endef
486 define gb_LinkTarget__use_expat_x64
487 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
489 endef
491 ifneq ($(SYSTEM_HYPH),)
493 define gb_LinkTarget__use_hyphen
494 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
496 endef
498 else # !SYSTEM_HYPH
500 define gb_LinkTarget__use_hyphen
501 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
502 $(call gb_LinkTarget_set_include,$(1),\
503 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
504 $$(INCLUDE) \
507 ifeq ($(COM),MSC)
508 $(call gb_LinkTarget_use_static_libraries,$(1),\
509 hyphen \
511 else
512 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
513 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
514 endif
516 endef
518 endif # SYSTEM_HYPH
520 ifneq ($(SYSTEM_HUNSPELL),)
522 define gb_LinkTarget__use_hunspell
523 $(call gb_LinkTarget_set_include,$(1),\
524 $$(INCLUDE) \
525 $(HUNSPELL_CFLAGS) \
527 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
529 endef
531 gb_ExternalProject__use_hunspell :=
533 else # !SYSTEM_HUNSPELL
535 define gb_LinkTarget__use_hunspell
536 $(call gb_LinkTarget_add_defs,$(1),\
537 -DHUNSPELL_STATIC \
539 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
540 $(call gb_LinkTarget_set_include,$(1),\
541 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
542 $$(INCLUDE) \
545 ifeq ($(COM),MSC)
546 $(call gb_LinkTarget_use_static_libraries,$(1),\
547 hunspell \
549 else
550 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
551 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
552 endif
554 endef
556 define gb_ExternalProject__use_hunspell
557 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
559 endef
561 endif # SYSTEM_HUNSPELL
564 ifneq ($(SYSTEM_BOOST),)
566 define gb_LinkTarget__use_boost_lib
567 $(call gb_LinkTarget_set_include,$(1),\
568 $$(INCLUDE) \
569 $(BOOST_CPPFLAGS) \
572 $(call gb_LinkTarget_add_ldflags,$(1),\
573 $(BOOST_LDFLAGS) \
576 $(call gb_LinkTarget_add_libs,$(1),$(2))
578 endef
580 define gb_LinkTarget__use_boost_locale
581 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
583 endef
585 define gb_LinkTarget__use_boost_date_time
586 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
588 endef
590 define gb_LinkTarget__use_boost_filesystem
591 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
593 endef
595 gb_ExternalProject__use_boost_filesystem :=
597 define gb_LinkTarget__use_boost_iostreams
598 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
600 endef
602 gb_ExternalProject__use_boost_iostreams :=
604 define gb_LinkTarget__use_boost_system
605 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
607 endef
609 gb_ExternalProject__use_boost_system :=
611 define gb_LinkTarget__use_boost_headers
612 $(call gb_LinkTarget_set_include,$(1),\
613 $$(INCLUDE) \
614 $(BOOST_CPPFLAGS) \
617 endef
619 gb_ExternalProject__use_boost_headers:=
621 else # !SYSTEM_BOOST
623 define gb_LinkTarget__use_boost_lib
624 $(call gb_LinkTarget_add_defs,$(1),\
625 -DBOOST_ALL_NO_LIB \
628 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
630 endef
632 define gb_LinkTarget__use_boost_locale
633 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
634 $(call gb_LinkTarget_add_libs,$(1),\
635 $(if $(filter $(OS),MACOSX),-liconv) \
638 endef
640 define gb_LinkTarget__use_boost_date_time
641 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
643 endef
645 define gb_LinkTarget__use_boost_filesystem
646 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
648 endef
650 define gb_ExternalProject__use_boost_filesystem
651 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
652 endef
654 define gb_LinkTarget__use_boost_iostreams
655 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
657 endef
659 define gb_ExternalProject__use_boost_iostreams
660 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
661 endef
663 define gb_LinkTarget__use_boost_system
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
666 endef
668 define gb_ExternalProject__use_boost_system
669 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
670 endef
672 define gb_LinkTarget__use_boost_headers
673 $(call gb_LinkTarget_use_unpacked,$(1),boost)
674 $(call gb_LinkTarget_set_include,$(1),\
675 $(BOOST_CPPFLAGS) \
676 $$(INCLUDE) \
679 endef
681 define gb_ExternalProject__use_boost_headers
682 $(call gb_ExternalProject_use_unpacked,$(1),boost)
684 endef
686 endif # SYSTEM_BOOST
689 ifneq ($(SYSTEM_LIBCMIS),)
691 define gb_LinkTarget__use_libcmis
692 $(call gb_LinkTarget_set_include,$(1),\
693 $$(INCLUDE) \
694 $(LIBCMIS_CFLAGS) \
696 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
698 endef
700 else # !SYSTEM_LIBCMIS
702 define gb_LinkTarget__use_libcmis
703 $(call gb_LinkTarget_set_include,$(1),\
704 -I$(call gb_UnpackedTarball_get_dir,libcmis)/src \
705 $$(INCLUDE) \
707 $(call gb_LinkTarget_use_static_libraries,$(1),\
708 libcmis \
711 endef
713 endif # SYSTEM_LIBCMIS
715 ifeq ($(ENABLE_JAVA),TRUE)
717 define gb_LinkTarget__use_jawt
718 $(call gb_LinkTarget_add_libs,$(1),\
719 $(JAWTLIB) \
722 endef
724 else # !ENABLE_JAVA
726 gb_LinkTarget__use_jawt :=
728 endif # ENABLE_JAVA
730 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
732 define gb_LinkTarget__use_libatomic_ops
733 $(call gb_LinkTarget_set_include,$(1),\
734 $$(INCLUDE) \
735 $(LIBATOMIC_OPS_CFLAGS) \
737 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
739 endef
740 gb_ExternalProject__use_libatomic_ops :=
742 else # !SYSTEM_LIBATOMIC_OPS
744 define gb_LinkTarget__use_libatomic_ops
745 $(call gb_LinkTarget_set_include,$(1),\
746 $(LIBATOMIC_OPS_CFLAGS) \
747 $$(INCLUDE) \
748 $(LIBATOMIC_OPS_CFLAGS) \
750 $(call gb_LinkTarget_use_external_project,$(1),\
751 libatomic_ops \
754 $(call gb_LinkTarget_add_libs,$(1),\
755 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
758 endef
760 define gb_ExternalProject__use_libatomic_ops
761 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
763 endef
765 endif # SYSTEM_LIBATOMIC_OPS
768 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
770 define gb_LinkTarget__use_libexttextcat
771 $(call gb_LinkTarget_set_include,$(1),\
772 $$(INCLUDE) \
773 $(LIBEXTTEXTCAT_CFLAGS) \
775 $(call gb_LinkTarget_add_defs,$(1),\
776 -DSYSTEM_LIBEXTTEXTCAT \
778 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
780 endef
782 else # !SYSTEM_LIBEXTTEXTCAT
784 define gb_LinkTarget__use_libexttextcat
785 $(call gb_LinkTarget_set_include,$(1),\
786 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
787 $$(INCLUDE) \
790 ifeq ($(COM),MSC)
791 $(call gb_LinkTarget_use_static_libraries,$(1),\
792 libexttextcat \
794 else
795 $(call gb_LinkTarget_add_libs,$(1),\
796 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
798 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
799 endif
802 endef
804 endif # SYSTEM_LIBEXTTEXTCAT
807 ifneq ($(SYSTEM_LIBXML),)
809 define gb_LinkTarget__use_libxml2
810 $(call gb_LinkTarget_add_defs,$(1),\
811 -DSYSTEM_LIBXML \
813 $(call gb_LinkTarget_set_include,$(1),\
814 $$(INCLUDE) \
815 $(LIBXML_CFLAGS) \
817 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
819 endef
820 gb_ExternalProject__use_libxml2:=
822 else # !SYSTEM_LIBXML
824 $(eval $(call gb_Helper_register_packages_for_install,ure,\
825 libxml2 \
828 define gb_LinkTarget__use_libxml2
829 $(call gb_LinkTarget_use_package,$(1),libxml2)
830 $(call gb_LinkTarget_set_include,$(1),\
831 $$(INCLUDE) \
832 $(LIBXML_CFLAGS) \
835 $(call gb_LinkTarget_add_libs,$(1),\
836 $(LIBXML_LIBS) \
839 ifeq ($(COM),MSC)
840 $(call gb_LinkTarget_use_external,$(1),icu_headers)
841 endif
843 endef
844 define gb_ExternalProject__use_libxml2
845 $(call gb_ExternalProject_use_package,$(1),libxml2)
847 ifeq ($(COM),MSC)
848 $(call gb_ExternalProject_use_external_project,$(1),icu)
849 endif
851 endef
853 endif # SYSTEM_LIBXML
856 ifneq ($(SYSTEM_LIBXSLT),)
858 define gb_LinkTarget__use_libxslt
859 $(call gb_LinkTarget_set_include,$(1),\
860 $$(INCLUDE) \
861 $(LIBXSLT_CFLAGS) \
863 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
865 endef
867 define gb_LinkTarget__use_libexslt
868 $(call gb_LinkTarget_set_include,$(1),\
869 $$(INCLUDE) \
870 $(LIBEXSLT_CFLAGS) \
873 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
875 endef
877 else # !SYSTEM_LIBXSLT
879 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
880 libxslt \
883 define gb_LinkTarget__use_libxslt
884 $(call gb_LinkTarget_use_package,$(1),libxslt)
885 $(call gb_LinkTarget_set_include,$(1),\
886 $$(INCLUDE) \
887 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
890 ifeq ($(COM),MSC)
891 $(call gb_LinkTarget_add_libs,$(1),\
892 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
894 else
895 $(call gb_LinkTarget_add_libs,$(1),\
896 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
898 endif
900 endef
902 define gb_LinkTarget__use_libexslt
903 $(call gb_LinkTarget_use_package,$(1),libxslt)
904 $(call gb_LinkTarget_set_include,$(1),\
905 $$(INCLUDE) \
906 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
909 ifeq ($(COM),MSC)
910 $(call gb_LinkTarget_add_libs,$(1),\
911 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
913 else
914 $(call gb_LinkTarget_add_libs,$(1),\
915 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
917 endif
919 endef
921 endif # SYSTEM_LIBXSLT
924 ifneq ($(SYSTEM_XMLSEC),)
926 define gb_LinkTarget__use_xmlsec
927 $(call gb_LinkTarget_add_defs,$(1),\
928 -DSYSTEM_XMLSEC \
930 $(call gb_LinkTarget_set_include,$(1),\
931 $$(INCLUDE) \
932 $(XMLSEC_CFLAGS) \
934 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
936 endef
938 gb_ExternalProject__use_xmlsec:=
940 else # !SYSTEM_XMLSEC
942 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
943 xmlsec \
946 define gb_LinkTarget__use_xmlsec
948 endef
950 endif # SYSTEM_XMLSEC
952 ifneq ($(SYSTEM_LIBLANGTAG),)
954 define gb_LinkTarget__use_liblangtag
955 $(call gb_LinkTarget_set_include,$(1),\
956 $$(INCLUDE) \
957 $(LIBLANGTAG_CFLAGS) \
960 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
962 endef
964 gb_ExternalProject__use_liblangtag :=
966 else # !SYSTEM_LIBLANGTAG
968 $(eval $(call gb_Helper_register_packages_for_install,ure,\
969 liblangtag_data \
972 ifeq ($(COM),MSC)
974 define gb_LinkTarget__use_liblangtag
975 $(call gb_LinkTarget_set_include,$(1),\
976 $(LIBLANGTAG_CFLAGS) \
977 $$(INCLUDE) \
979 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
980 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
982 endef
984 else
986 $(eval $(call gb_Helper_register_packages_for_install,ure,\
987 liblangtag \
990 define gb_LinkTarget__use_liblangtag
991 $(call gb_LinkTarget_set_include,$(1),\
992 $(LIBLANGTAG_CFLAGS) \
993 $$(INCLUDE) \
995 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
996 $(call gb_LinkTarget_use_package,$(1),liblangtag)
998 endef
1000 endif # MSC
1002 define gb_ExternalProject__use_liblangtag
1003 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1005 endef
1007 endif # SYSTEM_LIBLANGTAG
1010 gb_ExternalProject__use_apr :=
1012 ifeq ($(WITH_WEBDAV),serf)
1014 define gb_LinkTarget__use_apr
1015 $(call gb_LinkTarget_set_include,$(1),\
1016 $$(INCLUDE) \
1017 $(APR_CFLAGS) \
1019 $(call gb_LinkTarget_add_libs,$(1),\
1020 $(APR_LIBS) \
1021 $(if $(filter $(OS),LINUX),-lpthread) \
1022 $(if $(filter $(OS),MACOSX),-liconv) \
1025 ifeq ($(SYSTEM_APR),)
1026 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1027 mswsock \
1028 rpcrt4 \
1029 shell32 \
1031 $(call gb_LinkTarget_add_defs,$(1),\
1032 -DAPR_DECLARE_STATIC \
1033 -DAPU_DECLARE_STATIC \
1035 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1036 endif
1038 endef
1040 define gb_ExternalProject__use_apr
1041 ifeq ($(SYSTEM_APR),)
1042 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1043 endif
1045 endef
1047 define gb_LinkTarget__use_serf
1048 $(call gb_LinkTarget_set_include,$(1),\
1049 $(SERF_CFLAGS) \
1050 $$(INCLUDE) \
1052 $(call gb_LinkTarget_add_libs,$(1),\
1053 $(SERF_LIBS) \
1056 ifeq ($(SYSTEM_SERF),)
1057 $(call gb_LinkTarget_use_external_project,$(1),serf)
1058 endif
1060 endef
1062 else ifeq ($(WITH_WEBDAV),neon)
1064 ifneq ($(SYSTEM_NEON),)
1066 define gb_LinkTarget__use_neon
1067 $(call gb_LinkTarget_add_defs,$(1),\
1068 -DNEON_VERSION=0x$(NEON_VERSION) \
1069 -DSYSTEM_NEON \
1071 $(call gb_LinkTarget_set_include,$(1),\
1072 $$(INCLUDE) \
1073 $(NEON_CFLAGS) \
1076 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1078 endef
1080 else # !SYSTEM_NEON
1082 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1083 neon \
1086 define gb_LinkTarget__use_neon
1087 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1088 $(call gb_LinkTarget_set_include,$(1),\
1089 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1090 $$(INCLUDE) \
1092 $(call gb_LinkTarget_use_libraries,$(1),\
1093 neon \
1096 endef
1098 endif # SYSTEM_NEON
1100 endif # WITH_WEBDAV
1102 ifneq ($(SYSTEM_REDLAND),)
1104 define gb_LinkTarget__use_librdf
1105 $(call gb_LinkTarget_add_defs,$(1),\
1106 -DSYSTEM_REDLAND \
1108 $(call gb_LinkTarget_set_include,$(1),\
1109 $$(INCLUDE) \
1110 $(REDLAND_CFLAGS) \
1112 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1114 endef
1116 gb_LinkTarget__use_redland_headers:=
1118 gb_LinkTarget__use_raptor_headers:=
1120 gb_LinkTarget__use_rasqal_headers:=
1122 else # !SYSTEM_REDLAND
1124 define gb_LinkTarget__use_redland_headers
1125 $(call gb_LinkTarget_set_include,$(1),\
1126 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1127 $$(INCLUDE) \
1130 endef
1132 define gb_LinkTarget__use_raptor_headers
1133 $(call gb_LinkTarget_set_include,$(1),\
1134 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1135 $$(INCLUDE) \
1138 endef
1140 define gb_LinkTarget__use_rasqal_headers
1141 $(call gb_LinkTarget_set_include,$(1),\
1142 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1143 $$(INCLUDE) \
1146 endef
1148 ifneq ($(OS),ANDROID)
1150 ifeq ($(COM),MSC)
1151 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1152 raptor2 \
1153 rasqal \
1154 rdf \
1156 else
1157 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1158 raptor \
1159 rasqal \
1160 redland \
1162 endif
1164 define gb_LinkTarget__use_librdf
1165 ifeq ($(COM),MSC)
1166 $(call gb_LinkTarget_use_libraries,$(1),\
1167 raptor2 \
1168 rdf \
1170 else
1171 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1173 $(call gb_LinkTarget_add_libs,$(1),\
1174 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1175 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1176 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1178 endif
1180 endef
1182 else # ANDROID
1184 define gb_LinkTarget__use_librdf
1185 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1187 endef
1189 endif # ANDROID
1191 endif # SYSTEM_REDLAND
1194 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1196 ifneq ($(SYSTEM_CAIRO),)
1198 define gb_LinkTarget__use_cairo
1199 $(call gb_LinkTarget_set_include,$(1),\
1200 $$(INCLUDE) \
1201 $(CAIRO_CFLAGS) \
1203 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1204 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1206 endef
1208 else # !SYSTEM_CAIRO
1210 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1211 cairo \
1212 $(if $(filter $(OS),WNT),,pixman) \
1215 define gb_LinkTarget__use_cairo
1216 $(call gb_LinkTarget_use_package,$(1),cairo)
1217 $(call gb_LinkTarget_use_package,$(1),pixman)
1218 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1219 $(call gb_LinkTarget_set_include,$(1),\
1220 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1221 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1222 $$(INCLUDE) \
1224 $(call gb_LinkTarget_add_libs,$(1),\
1225 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1226 $(if $(filter-out MACOSX WNT,$(OS)), \
1227 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1231 endef
1233 endif # SYSTEM_CAIRO
1235 else ifeq ($(OS),ANDROID)
1237 define gb_LinkTarget__use_cairo
1238 $(call gb_LinkTarget_use_package,$(1),cairo)
1239 $(call gb_LinkTarget_use_package,$(1),pixman)
1240 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1241 $(call gb_LinkTarget_set_include,$(1),\
1242 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1243 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1244 $$(INCLUDE) \
1246 $(call gb_LinkTarget_add_libs,$(1),\
1247 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1248 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1251 endef
1253 endif # CAIRO
1255 ifneq ($(SYSTEM_FREETYPE),)
1257 define gb_LinkTarget__use_freetype_headers
1258 $(call gb_LinkTarget_set_include,$(1),\
1259 $$(INCLUDE) \
1260 $(FREETYPE_CFLAGS) \
1263 endef
1265 gb_ExternalProject__use_freetype :=
1267 else
1269 define gb_LinkTarget__use_freetype_headers
1270 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1271 $(call gb_LinkTarget_set_include,$(1),\
1272 $(FREETYPE_CFLAGS) \
1273 $$(INCLUDE) \
1276 endef
1278 define gb_ExternalProject__use_freetype
1279 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1281 endef
1283 endif # SYSTEM_FREETYPE
1285 define gb_LinkTarget__use_freetype
1286 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1287 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1289 endef
1291 ifneq ($(SYSTEM_FONTCONFIG),)
1293 define gb_LinkTarget__use_fontconfig
1294 $(call gb_LinkTarget_set_include,$(1),\
1295 $$(INCLUDE) \
1296 $(FONTCONFIG_CFLAGS) \
1299 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1301 endef
1303 else
1305 define gb_LinkTarget__use_fontconfig
1306 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1307 $(call gb_LinkTarget_set_include,$(1),\
1308 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1309 $$(INCLUDE) \
1312 $(call gb_LinkTarget_add_libs,$(1),\
1313 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1316 endef
1318 endif # SYSTEM_FONTCONFIG
1320 ifneq ($(SYSTEM_GRAPHITE),)
1322 define gb_LinkTarget__use_graphite
1323 $(call gb_LinkTarget_set_include,$(1),\
1324 $$(INCLUDE) \
1325 $(GRAPHITE_CFLAGS) \
1327 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1329 endef
1331 gb_ExternalProject__use_graphite:=
1333 else # !SYSTEM_GRAPHITE
1335 define gb_LinkTarget__use_graphite
1336 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1337 $(call gb_LinkTarget_set_include,$(1),\
1338 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1339 $$(INCLUDE) \
1341 $(call gb_LinkTarget_use_static_libraries,$(1),\
1342 graphite \
1345 endef
1347 define gb_ExternalProject__use_graphite
1348 $(call gb_ExternalProject_use_static_libraries,$(1),\
1349 graphite \
1352 endef
1353 endif # SYSTEM_GRAPHITE
1355 ifneq ($(SYSTEM_ICU),)
1357 gb_LinkTarget__use_icu_headers:=
1358 gb_ExternalProject__use_icu:=
1360 define gb_LinkTarget__use_icudata
1361 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1363 endef
1364 define gb_LinkTarget__use_icui18n
1365 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1367 endef
1368 define gb_LinkTarget__use_icuuc
1369 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1371 endef
1373 else # !SYSTEM_ICU
1375 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1376 icu_ure \
1379 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1380 icu \
1383 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1384 gb_ICU_suffix:=lo
1385 else
1386 gb_ICU_suffix:=
1387 endif
1389 define gb_LinkTarget__use_icu_headers
1390 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1391 $(call gb_LinkTarget_set_include,$(1),\
1392 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1393 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1394 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1395 $$(INCLUDE) \
1398 endef
1400 define gb_ExternalProject__use_icu
1401 $(call gb_ExternalProject_use_package,$(1),icu)
1403 endef
1405 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1406 define gb_LinkTarget__use_icudata
1407 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1409 ifeq ($(OS),WNT)
1410 $(call gb_LinkTarget_add_libs,$(1),\
1411 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1413 else
1414 $(call gb_LinkTarget_add_libs,$(1),\
1415 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1417 endif
1419 endef
1421 define gb_LinkTarget__use_icui18n
1422 $(call gb_LinkTarget_use_package,$(1),icu)
1424 ifeq ($(OS),WNT)
1425 $(call gb_LinkTarget_add_libs,$(1),\
1426 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1428 else
1429 $(call gb_LinkTarget_add_libs,$(1),\
1430 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1432 endif
1434 endef
1436 define gb_LinkTarget__use_icuuc
1437 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1439 ifeq ($(OS),WNT)
1440 $(call gb_LinkTarget_add_libs,$(1),\
1441 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1443 else
1444 $(call gb_LinkTarget_add_libs,$(1),\
1445 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1447 endif
1449 endef
1451 endif # SYSTEM_ICU
1453 ifneq ($(SYSTEM_HARFBUZZ),)
1455 define gb_LinkTarget__use_harfbuzz
1456 $(call gb_LinkTarget_set_include,$(1),\
1457 $$(INCLUDE) \
1458 $(HARFBUZZ_CFLAGS) \
1460 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1462 endef
1464 gb_ExternalProject__use_harfbuzz :=
1466 else # SYSTEM_HARFBUZZ != TRUE
1468 define gb_LinkTarget__use_harfbuzz
1469 $(call gb_LinkTarget_set_include,$(1),\
1470 $(HARFBUZZ_CFLAGS) \
1471 $$(INCLUDE) \
1473 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1474 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1476 endef
1478 define gb_ExternalProject__use_harfbuzz
1479 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1481 endef
1483 endif # SYSTEM_HARFBUZZ
1485 ifeq ($(DISABLE_OPENSSL),TRUE)
1487 gb_ExternalProject__use_openssl:=
1488 gb_LinkTarget__use_openssl_headers:=
1489 gb_LinkTarget__use_openssl:=
1491 else # !DISABLE_OPENSSL
1493 ifneq ($(SYSTEM_OPENSSL),)
1495 gb_LinkTarget__use_openssl_headers:=
1496 gb_ExternalProject__use_openssl:=
1498 define gb_LinkTarget__use_openssl
1499 $(call gb_LinkTarget_set_include,$(1),\
1500 $$(INCLUDE) \
1501 $(OPENSSL_CFLAGS) \
1503 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1505 endef
1507 else # !SYSTEM_OPENSSL
1509 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1510 openssl \
1513 define gb_ExternalProject__use_openssl
1514 $(call gb_ExternalProject_use_package,$(1),openssl)
1516 endef
1518 define gb_LinkTarget__use_openssl_headers
1519 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1520 $(call gb_LinkTarget_set_include,$(1),\
1521 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1522 $$(INCLUDE) \
1525 endef
1527 define gb_LinkTarget__use_openssl
1528 $(call gb_LinkTarget_use_package,$(1),openssl)
1529 ifeq ($(OS),WNT)
1530 $(call gb_LinkTarget_add_libs,$(1),\
1531 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1532 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1534 else
1535 $(call gb_LinkTarget_add_libs,$(1),\
1536 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1537 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1539 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1540 ifeq ($(OS),SOLARIS)
1541 $(call gb_LinkTarget_add_libs,$(1),\
1542 -lnsl \
1543 -lsocket \
1545 endif
1546 endif
1548 endef
1550 endif # SYSTEM_OPENSSL
1551 endif # DISABLE_OPENSSL
1554 ifeq ($(DISABLE_OPENSSL),TRUE)
1556 define gb_LinkTarget__use_gnutls
1557 $(call gb_LinkTarget_set_include,$(1),\
1558 $$(INCLUDE) \
1559 $(GNUTLS_CFLAGS) \
1562 $(call gb_LinkTarget_add_defs,$(1),\
1563 -DDISABLE_OPENSSL \
1566 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1568 endef
1570 define gb_LinkTarget__use_libgcrypt
1571 $(call gb_LinkTarget_set_include,$(1),\
1572 $$(INCLUDE) \
1573 $(LIBGCRYPT_CFLAGS) \
1576 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1578 endef
1580 else # !DISABLE_OPENSSL
1582 gb_LinkTarget__use_gnutls:=
1583 gb_LinkTarget__use_libgcrypt:=
1585 endif # DISABLE_OPENSSL
1588 ifneq ($(SYSTEM_CDR),)
1590 define gb_LinkTarget__use_cdr
1591 $(call gb_LinkTarget_set_include,$(1),\
1592 $$(INCLUDE) \
1593 $(CDR_CFLAGS) \
1595 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1597 endef
1599 else # !SYSTEM_CDR
1601 define gb_LinkTarget__use_cdr
1602 $(call gb_LinkTarget_set_include,$(1),\
1603 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1604 $$(INCLUDE) \
1606 $(call gb_LinkTarget_add_libs,$(1),\
1607 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1609 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1610 endef
1612 endif # SYSTEM_CDR
1615 ifneq ($(SYSTEM_EBOOK),)
1617 define gb_LinkTarget__use_ebook
1618 $(call gb_LinkTarget_set_include,$(1),\
1619 $$(INCLUDE) \
1620 $(EBOOK_CFLAGS) \
1622 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1624 endef
1626 gb_ExternalProject__use_ebook :=
1628 else # !SYSTEM_EBOOK
1630 define gb_LinkTarget__use_ebook
1631 $(call gb_LinkTarget_set_include,$(1),\
1632 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1633 $$(INCLUDE) \
1635 $(call gb_LinkTarget_add_libs,$(1),\
1636 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1638 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1640 endef
1642 define gb_ExternalProject__use_ebook
1643 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1645 endef
1647 endif # SYSTEM_EBOOK
1650 ifneq ($(SYSTEM_ETONYEK),)
1652 define gb_LinkTarget__use_etonyek
1653 $(call gb_LinkTarget_set_include,$(1),\
1654 $$(INCLUDE) \
1655 $(ETONYEK_CFLAGS) \
1657 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1659 endef
1661 gb_ExternalProject__use_etonyek :=
1663 else # !SYSTEM_ETONYEK
1665 ifeq ($(COM),MSC)
1667 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1668 etonyek \
1671 define gb_LinkTarget__use_etonyek
1672 $(call gb_LinkTarget_set_include,$(1),\
1673 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1674 $$(INCLUDE) \
1676 $(call gb_LinkTarget_use_libraries,$(1),\
1677 etonyek \
1680 endef
1682 else # !MSC
1684 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1685 libetonyek \
1688 define gb_LinkTarget__use_etonyek
1689 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1691 $(call gb_LinkTarget_set_include,$(1),\
1692 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1693 -DLIBETONYEK_VISIBILITY \
1694 $$(INCLUDE) \
1696 $(call gb_LinkTarget_add_libs,$(1),\
1697 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1699 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1701 endef
1703 define gb_ExternalProject__use_etonyek
1704 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1706 endef
1708 endif
1710 endif # SYSTEM_ETONYEK
1713 ifneq ($(SYSTEM_FREEHAND),)
1715 define gb_LinkTarget__use_freehand
1716 $(call gb_LinkTarget_set_include,$(1),\
1717 $$(INCLUDE) \
1718 $(FREEHAND_CFLAGS) \
1720 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1722 endef
1724 gb_ExternalProject__use_freehand :=
1726 else # !SYSTEM_FREEHAND
1728 define gb_LinkTarget__use_freehand
1729 $(call gb_LinkTarget_set_include,$(1),\
1730 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1731 $$(INCLUDE) \
1733 $(call gb_LinkTarget_add_libs,$(1),\
1734 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1736 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1738 endef
1740 define gb_ExternalProject__use_freehand
1741 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1743 endef
1745 endif # SYSTEM_FREEHAND
1748 ifneq ($(SYSTEM_ODFGEN),)
1750 define gb_LinkTarget__use_odfgen
1751 $(call gb_LinkTarget_set_include,$(1),\
1752 $$(INCLUDE) \
1753 $(ODFGEN_CFLAGS) \
1755 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1757 endef
1759 else # !SYSTEM_ODFGEN
1761 ifeq ($(COM),MSC)
1763 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1764 odfgen \
1767 define gb_LinkTarget__use_odfgen
1768 $(call gb_LinkTarget_set_include,$(1),\
1769 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1770 $$(INCLUDE) \
1772 $(call gb_LinkTarget_use_libraries,$(1),\
1773 odfgen \
1776 endef
1778 else # !MSC
1780 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1781 libodfgen \
1784 define gb_LinkTarget__use_odfgen
1785 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1787 $(call gb_LinkTarget_set_include,$(1),\
1788 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1789 -DLIBODFGEN_VISIBILITY \
1790 $$(INCLUDE) \
1792 $(call gb_LinkTarget_add_libs,$(1),\
1793 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1796 endef
1798 endif
1800 endif # SYSTEM_ODFGEN
1802 ifneq ($(SYSTEM_EPUBGEN),)
1804 define gb_LinkTarget__use_epubgen
1805 $(call gb_LinkTarget_set_include,$(1),\
1806 $$(INCLUDE) \
1807 $(EPUBGEN_CFLAGS) \
1809 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1811 endef
1812 gb_ExternalProject__use_epubgen :=
1814 else # !SYSTEM_EPUBGEN
1816 define gb_LinkTarget__use_epubgen
1817 $(call gb_LinkTarget_set_include,$(1),\
1818 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1819 $$(INCLUDE) \
1821 $(call gb_LinkTarget_add_libs,$(1),\
1822 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.0$(gb_StaticLibrary_PLAINEXT) \
1824 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1826 endef
1827 define gb_ExternalProject__use_epubgen
1828 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1830 endef
1832 endif # SYSTEM_EPUBGEN
1834 ifneq ($(SYSTEM_REVENGE),)
1836 define gb_LinkTarget__use_revenge
1837 $(call gb_LinkTarget_set_include,$(1),\
1838 $$(INCLUDE) \
1839 $(REVENGE_CFLAGS) \
1841 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1843 endef
1845 gb_ExternalProject__use_revenge :=
1847 else # !SYSTEM_REVENGE
1849 ifeq ($(COM),MSC)
1851 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1852 revenge \
1855 define gb_LinkTarget__use_revenge
1856 $(call gb_LinkTarget_set_include,$(1),\
1857 $(REVENGE_CFLAGS) \
1858 $$(INCLUDE) \
1860 $(call gb_LinkTarget_use_libraries,$(1),\
1861 revenge \
1864 endef
1866 define gb_ExternalProject__use_revenge
1867 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1869 endef
1871 else # !MSC
1873 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1874 librevenge \
1877 define gb_LinkTarget__use_revenge
1878 $(call gb_LinkTarget_use_package,$(1),librevenge)
1880 $(call gb_LinkTarget_set_include,$(1),\
1881 $(REVENGE_CFLAGS) \
1882 -DLIBREVENGE_VISIBILITY \
1883 $$(INCLUDE) \
1885 $(call gb_LinkTarget_add_libs,$(1),\
1886 $(REVENGE_LIBS) \
1888 endef
1890 define gb_ExternalProject__use_revenge
1891 $(call gb_ExternalProject_use_package,$(1),librevenge)
1893 endef
1895 endif # MSC
1897 endif # SYSTEM_REVENGE
1900 ifneq ($(SYSTEM_ABW),)
1902 define gb_LinkTarget__use_abw
1903 $(call gb_LinkTarget_set_include,$(1),\
1904 $$(INCLUDE) \
1905 $(ABW_CFLAGS) \
1907 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1909 endef
1910 gb_ExternalProject__use_abw :=
1912 else # !SYSTEM_ABW
1914 define gb_LinkTarget__use_abw
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1917 $$(INCLUDE) \
1919 $(call gb_LinkTarget_add_libs,$(1),\
1920 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1922 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1924 endef
1925 define gb_ExternalProject__use_abw
1926 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1928 endef
1930 endif # SYSTEM_ABW
1933 ifneq ($(SYSTEM_MSPUB),)
1935 define gb_LinkTarget__use_mspub
1936 $(call gb_LinkTarget_set_include,$(1),\
1937 $$(INCLUDE) \
1938 $(MSPUB_CFLAGS) \
1940 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1942 endef
1944 else # !SYSTEM_MSPUB
1946 define gb_LinkTarget__use_mspub
1947 $(call gb_LinkTarget_set_include,$(1),\
1948 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1949 $$(INCLUDE) \
1951 $(call gb_LinkTarget_add_libs,$(1),\
1952 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1954 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1956 endef
1958 endif # SYSTEM_MSPUB
1961 ifneq ($(SYSTEM_PAGEMAKER),)
1963 define gb_LinkTarget__use_pagemaker
1964 $(call gb_LinkTarget_set_include,$(1),\
1965 $$(INCLUDE) \
1966 $(PAGEMAKER_CFLAGS) \
1968 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1970 endef
1971 gb_ExternalProject__use_pagemaker :=
1973 else # !SYSTEM_PAGEMAKER
1975 define gb_LinkTarget__use_pagemaker
1976 $(call gb_LinkTarget_set_include,$(1),\
1977 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1978 $$(INCLUDE) \
1980 $(call gb_LinkTarget_add_libs,$(1),\
1981 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1983 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1985 endef
1986 define gb_ExternalProject__use_pagemaker
1987 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1989 endef
1991 endif # SYSTEM_PAGEMAKER
1994 ifneq ($(SYSTEM_QXP),)
1996 define gb_LinkTarget__use_qxp
1997 $(call gb_LinkTarget_set_include,$(1),\
1998 $$(INCLUDE) \
1999 $(QXP_CFLAGS) \
2001 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2003 endef
2004 gb_ExternalProject__use_qxp :=
2006 else # !SYSTEM_QXP
2008 define gb_LinkTarget__use_qxp
2009 $(call gb_LinkTarget_set_include,$(1),\
2010 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2011 $$(INCLUDE) \
2013 $(call gb_LinkTarget_add_libs,$(1),\
2014 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2016 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2018 endef
2019 define gb_ExternalProject__use_qxp
2020 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2022 endef
2024 endif # SYSTEM_QXP
2027 ifneq ($(SYSTEM_ZMF),)
2029 define gb_LinkTarget__use_zmf
2030 $(call gb_LinkTarget_set_include,$(1),\
2031 $$(INCLUDE) \
2032 $(ZMF_CFLAGS) \
2034 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2036 endef
2037 gb_ExternalProject__use_zmf :=
2039 else # !SYSTEM_ZMF
2041 define gb_LinkTarget__use_zmf
2042 $(call gb_LinkTarget_set_include,$(1),\
2043 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2044 $$(INCLUDE) \
2046 $(call gb_LinkTarget_add_libs,$(1),\
2047 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2049 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2051 endef
2052 define gb_ExternalProject__use_zmf
2053 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2055 endef
2057 endif # SYSTEM_ZMF
2060 ifneq ($(SYSTEM_VISIO),)
2062 define gb_LinkTarget__use_visio
2063 $(call gb_LinkTarget_set_include,$(1),\
2064 $$(INCLUDE) \
2065 $(VISIO_CFLAGS) \
2067 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2069 endef
2071 else # !SYSTEM_VISIO
2073 define gb_LinkTarget__use_visio
2074 $(call gb_LinkTarget_set_include,$(1),\
2075 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2076 $$(INCLUDE) \
2078 $(call gb_LinkTarget_add_libs,$(1),\
2079 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2081 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2083 endef
2085 endif # SYSTEM_VISIO
2088 ifneq ($(SYSTEM_WPD),)
2090 define gb_LinkTarget__use_wpd
2091 $(call gb_LinkTarget_set_include,$(1),\
2092 $$(INCLUDE) \
2093 $(WPD_CFLAGS) \
2095 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2097 endef
2098 gb_ExternalProject__use_wpd :=
2100 else # !SYSTEM_WPD
2102 ifeq ($(COM),MSC)
2104 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2105 wpd \
2108 define gb_LinkTarget__use_wpd
2109 $(call gb_LinkTarget_set_include,$(1),\
2110 $(WPD_CFLAGS) \
2111 $$(INCLUDE) \
2113 $(call gb_LinkTarget_use_libraries,$(1),\
2114 wpd \
2117 endef
2119 define gb_ExternalProject__use_wpd
2120 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2122 endef
2124 else # !MSC
2126 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2127 libwpd \
2130 define gb_LinkTarget__use_wpd
2131 $(call gb_LinkTarget_use_package,$(1),libwpd)
2133 $(call gb_LinkTarget_set_include,$(1),\
2134 $(WPD_CFLAGS) \
2135 $$(INCLUDE) \
2137 $(call gb_LinkTarget_add_libs,$(1),\
2138 $(WPD_LIBS) \
2141 endef
2143 define gb_ExternalProject__use_wpd
2144 $(call gb_ExternalProject_use_package,$(1),libwpd)
2146 endef
2148 endif # MSC
2150 endif # SYSTEM_WPD
2153 ifneq ($(SYSTEM_WPG),)
2155 define gb_LinkTarget__use_wpg
2156 $(call gb_LinkTarget_set_include,$(1),\
2157 $$(INCLUDE) \
2158 $(WPG_CFLAGS) \
2160 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2162 endef
2163 gb_ExternalProject__use_wpg :=
2165 else # !SYSTEM_WPG
2167 ifeq ($(COM),MSC)
2169 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2170 wpg \
2173 define gb_LinkTarget__use_wpg
2174 $(call gb_LinkTarget_set_include,$(1),\
2175 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2176 $$(INCLUDE) \
2178 $(call gb_LinkTarget_use_libraries,$(1),\
2179 wpg \
2182 endef
2184 else # !MSC
2186 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2187 libwpg \
2190 define gb_LinkTarget__use_wpg
2191 $(call gb_LinkTarget_use_package,$(1),libwpg)
2193 $(call gb_LinkTarget_set_include,$(1),\
2194 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2195 $$(INCLUDE) \
2197 $(call gb_LinkTarget_add_libs,$(1),\
2198 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2201 endef
2203 endif # MSC
2205 endif # SYSTEM_WPG
2208 ifneq ($(SYSTEM_WPS),)
2210 define gb_LinkTarget__use_wps
2211 $(call gb_LinkTarget_set_include,$(1),\
2212 $$(INCLUDE) \
2213 $(WPS_CFLAGS) \
2215 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2217 endef
2218 gb_ExternalProject__use_wps :=
2220 else # !SYSTEM_WPS
2222 ifeq ($(COM),MSC)
2224 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2225 wps \
2228 define gb_LinkTarget__use_wps
2229 $(call gb_LinkTarget_set_include,$(1),\
2230 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2231 $$(INCLUDE) \
2234 $(call gb_LinkTarget_use_libraries,$(1),\
2235 wps \
2238 endef
2240 else # !MSC
2242 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2243 libwps \
2246 define gb_LinkTarget__use_wps
2247 $(call gb_LinkTarget_use_package,$(1),libwps)
2249 $(call gb_LinkTarget_set_include,$(1),\
2250 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2251 $$(INCLUDE) \
2253 $(call gb_LinkTarget_add_libs,$(1),\
2254 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2257 endef
2259 endif # MSC
2261 endif # SYSTEM_WPS
2264 ifneq ($(SYSTEM_MWAW),)
2266 define gb_LinkTarget__use_mwaw
2267 $(call gb_LinkTarget_set_include,$(1),\
2268 $$(INCLUDE) \
2269 $(MWAW_CFLAGS) \
2271 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2273 endef
2275 else # !SYSTEM_MWAW
2277 ifeq ($(COM),MSC)
2279 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2280 mwaw \
2283 define gb_LinkTarget__use_mwaw
2284 $(call gb_LinkTarget_set_include,$(1),\
2285 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2286 $$(INCLUDE) \
2289 $(call gb_LinkTarget_use_libraries,$(1),\
2290 mwaw \
2293 endef
2295 else # !MSC
2297 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2298 libmwaw \
2301 define gb_LinkTarget__use_mwaw
2302 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2304 $(call gb_LinkTarget_set_include,$(1),\
2305 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2306 $$(INCLUDE) \
2308 $(call gb_LinkTarget_add_libs,$(1),\
2309 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2312 endef
2314 endif # MSC
2316 endif # SYSTEM_MWAW
2318 ifneq ($(SYSTEM_STAROFFICE),)
2320 define gb_LinkTarget__use_staroffice
2321 $(call gb_LinkTarget_set_include,$(1),\
2322 $$(INCLUDE) \
2323 $(STAROFFICE_CFLAGS) \
2325 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2327 endef
2329 else # !SYSTEM_STAROFFICE
2331 ifeq ($(COM),MSC)
2333 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2334 staroffice \
2337 define gb_LinkTarget__use_staroffice
2338 $(call gb_LinkTarget_set_include,$(1),\
2339 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2340 $$(INCLUDE) \
2343 $(call gb_LinkTarget_use_libraries,$(1),\
2344 staroffice \
2347 endef
2349 else # !MSC
2351 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2352 libstaroffice \
2355 define gb_LinkTarget__use_staroffice
2356 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2358 $(call gb_LinkTarget_set_include,$(1),\
2359 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2360 $$(INCLUDE) \
2362 $(call gb_LinkTarget_add_libs,$(1),\
2363 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2366 endef
2368 endif # MSC
2370 endif # SYSTEM_STAROFFICE
2373 ifneq ($(SYSTEM_LCMS2),)
2375 define gb_LinkTarget__use_lcms2
2376 $(call gb_LinkTarget_set_include,$(1),\
2377 $$(INCLUDE) \
2378 $(LCMS2_CFLAGS) \
2380 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2382 endef
2384 gb_ExternalProject__use_lcms2 :=
2386 else # !SYSTEM_LCMS2
2388 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2389 lcms2 \
2392 define gb_ExternalProject__use_lcms2
2393 $(call gb_ExternalProject_use_package,$(1),lcms2)
2395 endef
2397 ifeq ($(OS),ANDROID)
2399 define gb_LinkTarget__use_lcms2
2400 $(call gb_LinkTarget_use_package,$(1),lcms2)
2401 $(call gb_LinkTarget_set_include,$(1),\
2402 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2403 $$(INCLUDE) \
2406 endef
2408 else
2410 define gb_LinkTarget__use_lcms2
2411 $(call gb_LinkTarget_use_package,$(1),lcms2)
2412 $(call gb_LinkTarget_set_include,$(1),\
2413 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2414 $$(INCLUDE) \
2416 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2418 endef
2420 endif # ANDROID
2421 endif # SYSTEM_LCMS2
2423 ifneq ($(ENABLE_LPSOLVE),)
2425 ifneq ($(SYSTEM_LPSOLVE),)
2427 define gb_LinkTarget__use_lpsolve
2428 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2429 $(call gb_LinkTarget_add_defs,$(1),\
2430 -DSYSTEM_LPSOLVE \
2433 endef
2435 else # !SYSTEM_LPSOLVE
2437 define gb_LinkTarget__use_lpsolve
2438 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2439 ifeq ($(COM),MSC)
2440 $(call gb_LinkTarget_add_libs,$(1),\
2441 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2443 else
2444 $(call gb_LinkTarget_add_libs,$(1),\
2445 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2447 endif
2448 $(call gb_LinkTarget_set_include,$(1),\
2449 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2450 $$(INCLUDE) \
2453 endef
2455 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2456 lpsolve \
2459 endif # SYSTEM_LPSOLVE
2461 else
2463 gb_LinkTarget__use_lpsolve :=
2465 endif # ENABLE_LPSOLVE
2467 ifneq ($(ENABLE_COINMP),)
2469 ifneq ($(SYSTEM_COINMP),TRUE)
2471 define gb_LinkTarget__use_coinmp
2472 $(call gb_LinkTarget_use_package,$(1),coinmp)
2473 ifeq ($(COM),MSC)
2474 $(call gb_LinkTarget_add_libs,$(1),\
2475 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2477 else
2478 $(call gb_LinkTarget_add_libs,$(1),\
2479 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2480 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2481 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2482 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2483 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2484 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2485 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2487 endif
2488 $(call gb_LinkTarget_set_include,$(1),\
2489 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2490 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2491 $$(INCLUDE) \
2494 endef
2496 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2497 coinmp \
2500 else # SYSTEM_COINMP
2502 define gb_LinkTarget__use_coinmp
2503 $(call gb_LinkTarget_set_include,$(1),\
2504 $$(INCLUDE) \
2505 $(COINMP_CFLAGS) \
2507 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2509 endef
2511 endif
2513 else
2515 gb_LinkTarget__use_coinmp :=
2517 endif # ENABLE_COINMP
2519 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2521 define gb_LinkTarget__use_mDNSResponder
2522 $(call gb_LinkTarget_set_include,$(1),\
2523 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2524 $$(INCLUDE) \
2526 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2527 endef
2529 endif # MDNSRESPONDER
2531 ifeq ($(ENABLE_GIO),TRUE)
2533 define gb_LinkTarget__use_gio
2534 $(call gb_LinkTarget_set_include,$(1),\
2535 $$(INCLUDE) \
2536 $(GIO_CFLAGS) \
2539 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2541 endef
2543 else # ENABLE_GIO
2545 define gb_LinkTarget__use_gio
2547 endef
2549 endif # ENABLE_GIO
2551 ifeq ($(ENABLE_AVAHI),TRUE)
2553 define gb_LinkTarget__use_avahi
2554 $(call gb_LinkTarget_set_include,$(1),\
2555 $$(INCLUDE) \
2556 $(AVAHI_CFLAGS) \
2559 $(call gb_LinkTarget_add_defs,$(1),\
2560 -DENABLE_AVAHI \
2563 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2565 endef
2567 else # ENABLE_AVAHI
2569 gb_LinkTarget__use_avahi :=
2571 endif # ENABLE_AVAHI
2574 define gb_LinkTarget__use_gtk
2575 $(call gb_LinkTarget_set_include,$(1),\
2576 $$(INCLUDE) \
2577 $(GTK_CFLAGS) \
2580 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2582 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2584 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2586 $(call gb_LinkTarget_set_include,$(1),\
2587 $$(INCLUDE) \
2588 $(GTK_PRINT_CFLAGS) \
2591 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2593 endif
2595 endef
2597 define gb_LinkTarget__use_gthread
2598 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2599 endef
2601 ifeq ($(ENABLE_CUPS),TRUE)
2603 define gb_LinkTarget__use_cups
2604 $(call gb_LinkTarget_add_defs,$(1),\
2605 -DENABLE_CUPS \
2608 $(call gb_LinkTarget_add_libs,$(1),\
2609 -lcups \
2612 endef
2614 else # ENABLE_CUPS
2616 define gb_LinkTarget__use_cups
2618 endef
2620 endif # ENABLE_DBUS
2622 ifeq ($(ENABLE_DBUS),TRUE)
2624 define gb_LinkTarget__use_dbus
2625 $(call gb_LinkTarget_set_include,$(1),\
2626 $$(INCLUDE) \
2627 $(DBUS_CFLAGS) \
2630 $(call gb_LinkTarget_add_libs,$(1),\
2631 $(DBUS_LIBS) \
2634 endef
2636 else # ENABLE_DBUS
2638 define gb_LinkTarget__use_dbus
2640 endef
2642 endif # ENABLE_DBUS
2645 ifneq ($(SYSTEM_LIBPNG),)
2647 define gb_LinkTarget__use_libpng
2648 $(call gb_LinkTarget_set_include,$(1),\
2649 $$(INCLUDE) \
2650 $(LIBPNG_CFLAGS) \
2653 $(call gb_LinkTarget_add_libs,$(1),\
2654 $(LIBPNG_LIBS) \
2657 endef
2659 gb_ExternalProject__use_libpng :=
2661 else # !SYSTEM_LIBPNG
2663 define gb_LinkTarget__use_libpng
2664 $(call gb_LinkTarget_set_include,$(1),\
2665 $(LIBPNG_CFLAGS) \
2666 $$(INCLUDE) \
2668 $(call gb_LinkTarget_use_static_libraries,$(1),\
2669 libpng \
2671 $(call gb_LinkTarget__use_zlib,$(1))
2673 endef
2675 define gb_ExternalProject__use_libpng
2676 $(call gb_ExternalProject_use_static_libraries,$(1),\
2677 libpng \
2680 endef
2682 endif # !SYSTEM_LIBPNG
2685 ifneq ($(SYSTEM_CURL),)
2687 define gb_LinkTarget__use_curl
2688 $(call gb_LinkTarget_add_defs,$(1),\
2689 -DSYSTEM_CURL \
2691 $(call gb_LinkTarget_set_include,$(1),\
2692 $$(INCLUDE) \
2693 $(CURL_CFLAGS) \
2695 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2697 endef
2699 else # !SYSTEM_CURL
2701 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2702 curl \
2705 define gb_LinkTarget__use_curl
2706 $(call gb_LinkTarget_use_package,$(1),curl)
2707 $(call gb_LinkTarget_set_include,$(1),\
2708 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2709 $$(INCLUDE) \
2712 ifeq ($(COM),MSC)
2713 $(call gb_LinkTarget_add_libs,$(1),\
2714 $(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 \
2716 else
2717 $(call gb_LinkTarget_add_libs,$(1),\
2718 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2720 endif
2722 endef
2724 endif # SYSTEM_CURL
2726 ifeq ($(ENABLE_VALGRIND),TRUE)
2728 define gb_LinkTarget__use_valgrind
2729 $(call gb_LinkTarget_add_defs,$(1),\
2730 -DHAVE_VALGRIND_HEADERS \
2733 $(call gb_LinkTarget_set_include,$(1),\
2734 $$(INCLUDE) \
2735 $(VALGRIND_CFLAGS) \
2738 endef
2740 else # !ENABLE_VALGRIND
2742 define gb_LinkTarget__use_valgrind
2744 endef
2746 endif # ENABLE_VALGRIND
2748 ifneq ($(SYSTEM_POPPLER),)
2750 define gb_LinkTarget__use_poppler
2751 $(call gb_LinkTarget_set_include,$(1),\
2752 $(POPPLER_CFLAGS) \
2753 $$(INCLUDE) \
2756 $(call gb_LinkTarget_add_libs,$(1),\
2757 $(POPPLER_LIBS) \
2760 endef
2762 else # !SYSTEM_POPPLER
2764 define gb_LinkTarget__use_poppler
2765 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2767 $(call gb_LinkTarget_set_include,$(1),\
2768 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2769 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2770 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2771 $$(INCLUDE) \
2774 $(call gb_LinkTarget_add_libs,$(1),\
2775 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2776 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2777 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2780 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2782 ifeq ($(OS),MACOSX)
2783 $(call gb_LinkTarget_add_libs,$(1),\
2784 -lobjc \
2786 else ifeq ($(OS),LINUX)
2787 $(call gb_LinkTarget_add_libs,$(1),\
2788 -pthread \
2790 else ifeq ($(OS),WNT)
2791 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2792 advapi32 \
2793 gdi32 \
2795 endif
2797 endef
2799 endif # SYSTEM_POPPLER
2802 ifneq ($(SYSTEM_CLUCENE),)
2804 define gb_LinkTarget__use_clucene
2805 $(call gb_LinkTarget_add_defs,$(1),\
2806 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2809 $(call gb_LinkTarget_set_include,$(1),\
2810 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2811 $$(INCLUDE) \
2814 $(call gb_LinkTarget_add_libs,$(1),\
2815 $(CLUCENE_LIBS) \
2818 endef
2820 else # !SYSTEM_CLUCENE
2822 define gb_LinkTarget__use_clucene
2823 $(call gb_LinkTarget_set_include,$(1),\
2824 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2825 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2826 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2827 $$(INCLUDE) \
2830 $(call gb_LinkTarget_use_libraries,$(1),\
2831 clucene \
2834 endef
2836 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2837 clucene \
2840 endif # SYSTEM_CLUCENE
2842 define gb_LinkTarget__use_gobject
2843 $(call gb_LinkTarget_add_libs,$(1),\
2844 $(GOBJECT_LIBS) \
2847 $(call gb_LinkTarget_set_include,$(1),\
2848 $$(INCLUDE) \
2849 $(GOBJECT_CFLAGS) \
2851 endef
2853 ifneq ($(SYSTEM_HSQLDB),)
2855 define gb_LinkTarget__use_hsqldb
2857 $(call gb_LinkTarget_add_defs,$(1),\
2858 -DSYSTEM_HSQLDB \
2859 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2862 endef
2864 else # !SYSTEM_HSQLDB
2866 define gb_LinkTarget__use_hsqldb
2868 endef
2870 endif # SYSTEM_HSQLDB
2873 ifneq ($(SYSTEM_OPENLDAP),)
2875 define gb_LinkTarget__use_openldap
2877 $(call gb_LinkTarget_add_libs,$(1),\
2878 -lldap \
2879 -llber \
2882 endef
2884 gb_ExternalProject__use_openldap :=
2886 else # !SYSTEM_OPENLDAP
2888 define gb_LinkTarget__use_openldap
2889 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2890 $(call gb_LinkTarget_set_include,$(1),\
2891 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2892 $$(INCLUDE) \
2894 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2895 $(call gb_LinkTarget_add_libs,$(1), \
2896 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2897 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2900 endef
2902 define gb_ExternalProject__use_openldap
2903 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2905 endef
2907 endif # SYSTEM_OPENLDAP
2909 ifneq ($(SYSTEM_LIBTOMMATH),)
2911 define gb_LinkTarget__use_libtommath
2912 $(call gb_LinkTarget_set_include,$(1),\
2913 $(LIBTOMMATH_CFLAGS) \
2914 $$(INCLUDE) \
2916 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2918 endef
2920 else # !SYSTEM_LIBTOMMATH
2921 define gb_LinkTarget__use_libtommath
2922 $(call gb_LinkTarget_set_include,$(1),\
2923 -I${WORKDIR}/UnpackedTarball/libtommath \
2924 $$(INCLUDE) \
2926 $(call gb_LinkTarget_add_libs,$(1),\
2927 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2929 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2931 endef
2933 endif # SYSTEM_LIBTOMMATH
2935 define gb_ExternalProject__use_libtommath
2936 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2938 endef
2940 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2942 ifneq ($(SYSTEM_FIREBIRD),)
2944 define gb_LinkTarget__use_libfbembed
2945 $(call gb_LinkTarget_set_include,$(1),\
2946 $(FIREBIRD_CFLAGS) \
2947 $$(INCLUDE) \
2949 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2951 endef
2953 else # !SYSTEM_FIREBIRD
2955 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2956 firebird \
2959 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2960 #$(call gb_LinkTarget__use_libtommath,$(1))
2962 define gb_LinkTarget__use_libfbembed
2963 $(call gb_LinkTarget_use_package,$(1),firebird)
2964 $(call gb_LinkTarget_set_include,$(1),\
2965 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2966 $$(INCLUDE) \
2968 ifeq ($(COM),MSC)
2969 $(call gb_LinkTarget_add_libs,$(1),\
2970 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2972 else
2973 $(call gb_LinkTarget_add_libs,$(1),\
2974 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2976 endif
2978 endef
2981 # endef
2983 endif # SYSTEM_FIREBIRD
2985 else # !ENABLE_FIREBIRD_SDBC
2987 gb_LinkTarget__use_firebird :=
2988 # gb_LinkTarget__use_atomic_ops :=
2989 # gb_LinkTarget__use_libtommath :=
2991 endif # ENABLE_FIREBIRD_SDBC
2994 ifneq ($(SYSTEM_POSTGRESQL),)
2996 define gb_LinkTarget__use_postgresql
2998 $(call gb_LinkTarget_set_include,$(1),\
2999 $(POSTGRESQL_INC) \
3000 $$(INCLUDE) \
3003 $(call gb_LinkTarget_add_libs,$(1),\
3004 -lpq \
3007 $(call gb_LinkTarget_add_ldflags,$(1),\
3008 $(POSTGRESQL_LIB) \
3011 endef
3013 else # !SYSTEM_POSTGRESQL
3015 define gb_LinkTarget__use_postgresql
3017 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3019 $(call gb_LinkTarget_set_include,$(1),\
3020 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3021 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3022 $$(INCLUDE) \
3025 $(call gb_LinkTarget_add_libs,$(1),\
3026 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3029 ifeq ($(OS),WNT)
3030 $(call gb_LinkTarget_use_external,$(1),openssl)
3032 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3033 secur32 \
3034 ws2_32 \
3037 endif
3039 endef
3041 endif # SYSTEM_POSTGRESQL
3043 ifeq ($(ENABLE_KDE4),TRUE)
3045 define gb_LinkTarget__use_kde4
3046 $(call gb_LinkTarget_set_include,$(1),\
3047 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3048 $$(INCLUDE) \
3051 $(call gb_LinkTarget_add_defs,$(1),\
3052 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3055 $(call gb_LinkTarget_add_libs,$(1),\
3056 $(KDE4_LIBS) \
3059 endef
3061 else # !ENABLE_KDE4
3063 define gb_LinkTarget__use_kde4
3065 endef
3067 endif # ENABLE_KDE4
3069 ifeq ($(ENABLE_QT5),TRUE)
3071 define gb_LinkTarget__use_qt5
3072 $(call gb_LinkTarget_set_include,$(1),\
3073 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3074 $$(INCLUDE) \
3077 $(call gb_LinkTarget_add_defs,$(1),\
3078 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3081 $(call gb_LinkTarget_add_libs,$(1),\
3082 $(QT5_LIBS) \
3085 ifeq ($(COM),GCC)
3086 $(call gb_LinkTarget_add_cxxflags,$(1),\
3087 -Wno-shadow \
3089 endif
3091 endef
3093 else # !ENABLE_QT5
3095 define gb_LinkTarget__use_qt5
3097 endef
3099 endif # ENABLE_QT5
3101 # PYTHON
3102 # extra python_headers external because pyuno wrapper must not link python
3103 ifneq ($(SYSTEM_PYTHON),)
3105 define gb_LinkTarget__use_python_headers
3106 $(call gb_LinkTarget_add_defs,$(1),\
3107 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3110 $(call gb_LinkTarget_set_include,$(1),\
3111 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3112 $$(INCLUDE) \
3115 endef
3117 define gb_LinkTarget__use_python
3118 $(call gb_LinkTarget__use_python_headers,$(1))
3120 $(call gb_LinkTarget_add_libs,$(1),\
3121 $(PYTHON_LIBS) \
3124 endef
3126 else # !SYSTEM_PYTHON
3128 $(eval $(call gb_Helper_register_packages_for_install,python,\
3129 python3 \
3132 define gb_LinkTarget__use_python_headers
3133 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3134 $(call gb_LinkTarget_set_include,$(1),\
3135 -I$(call gb_UnpackedTarball_get_dir,python3) \
3136 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3137 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3138 $$(INCLUDE) \
3141 endef
3143 define gb_LinkTarget__use_python
3144 $(call gb_LinkTarget__use_python_headers,$(1))
3145 ifeq ($(OS),MACOSX)
3146 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3147 else
3148 $(call gb_LinkTarget_use_package,$(1),python3)
3149 endif
3151 ifeq ($(OS),WNT)
3152 $(call gb_LinkTarget_add_libs,$(1),\
3153 $(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 \
3155 else ifeq ($(OS),MACOSX)
3156 $(call gb_LinkTarget_add_libs,$(1),\
3157 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3159 else
3160 $(call gb_LinkTarget_add_libs,$(1),\
3161 -L$(call gb_UnpackedTarball_get_dir,python3) \
3162 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3164 endif
3166 endef
3168 endif # SYSTEM_PYTHON
3170 # ORCUS
3171 ifneq ($(SYSTEM_LIBORCUS),)
3173 define gb_LinkTarget__use_orcus
3174 $(call gb_LinkTarget_set_include,$(1),\
3175 $$(INCLUDE) \
3176 $(ORCUS_CFLAGS) \
3178 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3179 endef
3181 define gb_LinkTarget__use_orcus-parser
3183 endef
3185 else # !SYSTEM_LIBORCUS
3187 ifeq ($(COM),MSC)
3189 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3190 orcus \
3191 orcus-parser \
3194 define gb_LinkTarget__use_orcus
3195 $(call gb_LinkTarget_set_include,$(1),\
3196 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3197 $$(INCLUDE) \
3200 $(call gb_LinkTarget_use_libraries,$(1),\
3201 orcus \
3204 endef
3206 define gb_LinkTarget__use_orcus-parser
3207 $(call gb_LinkTarget_set_include,$(1),\
3208 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3209 $$(INCLUDE) \
3212 $(call gb_LinkTarget_use_libraries,$(1),\
3213 orcus-parser \
3216 endef
3218 else # !MSC
3220 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3221 liborcus \
3224 define gb_LinkTarget__use_orcus
3225 $(call gb_LinkTarget_use_package,$(1),liborcus)
3227 $(call gb_LinkTarget_set_include,$(1),\
3228 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3229 $$(INCLUDE) \
3232 $(call gb_LinkTarget_add_libs,$(1),\
3233 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.13 \
3236 $(if $(SYSTEM_BOOST), \
3237 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3238 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3241 endef
3243 define gb_LinkTarget__use_orcus-parser
3244 $(call gb_LinkTarget_use_package,$(1),liborcus)
3246 $(call gb_LinkTarget_set_include,$(1),\
3247 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3248 $$(INCLUDE) \
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.13 \
3255 endef
3257 endif # MSC
3259 endif # SYSTEM_LIBORCUS
3261 ifeq ($(ENABLE_EOT),TRUE)
3263 ifneq ($(SYSTEM_LIBEOT),)
3265 define gb_LinkTarget__use_libeot
3266 $(call gb_LinkTarget_set_include,$(1),\
3267 $$(INCLUDE) \
3268 $(LIBEOT_CFLAGS) \
3270 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3272 endef
3274 gb_ExternalProject__use_libeot :=
3276 else # !SYSTEM_LIBEOT
3278 define gb_LinkTarget__use_libeot
3279 $(call gb_LinkTarget_set_include,$(1),\
3280 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3281 $$(INCLUDE) \
3283 $(call gb_LinkTarget_add_libs,$(1),\
3284 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3286 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3288 endef
3290 define gb_ExternalProject__use_libeot
3291 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3293 endef
3295 endif # SYSTEM_LIBEOT
3297 else # !ENABLE_EOT
3299 gb_LinkTarget__use_libeot :=
3300 gb_ExternalProject__use_libeot :=
3302 endif # ENABLE_EOT
3304 ### X11 stuff ###
3306 ifeq ($(USING_X11), TRUE)
3308 define gb_LinkTarget__use_Xrandr
3309 $(call gb_LinkTarget_set_include,$(1),\
3310 $$(INCLUDE) \
3311 $(XRANDR_CFLAGS) \
3314 $(call gb_LinkTarget_add_libs,$(1),\
3315 $(XRANDR_LIBS) \
3317 endef
3319 define gb_LinkTarget__use_Xrender
3320 $(call gb_LinkTarget_set_include,$(1),\
3321 $$(INCLUDE) \
3322 $(XRENDER_CFLAGS) \
3325 $(call gb_LinkTarget_add_libs,$(1),\
3326 $(XRENDER_LIBS) \
3328 endef
3330 endif # USING_X11
3333 gb_ExternalProject__use_nss3:=
3336 ifneq ($(SYSTEM_NSS),)
3338 define gb_LinkTarget__use_nss3
3339 $(call gb_LinkTarget_add_defs,$(1),\
3340 -DSYSTEM_NSS \
3343 $(call gb_LinkTarget_set_include,$(1),\
3344 $$(INCLUDE) \
3345 $(NSS_CFLAGS) \
3348 $(call gb_LinkTarget_add_libs,$(1),\
3349 $(NSS_LIBS) \
3352 endef
3354 define gb_LinkTarget__use_plc4
3355 $(call gb_LinkTarget__use_nss3,$(1))
3357 endef
3359 define gb_LinkTarget__use_ssl3
3360 $(call gb_LinkTarget__use_nss3,$(1))
3362 endef
3364 else # !SYSTEM_NSS
3366 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3367 nss \
3370 define gb_LinkTarget__use_nss3
3371 $(call gb_LinkTarget_use_package,$(1),nss)
3372 $(call gb_LinkTarget_set_include,$(1),\
3373 $$(INCLUDE) \
3374 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3375 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3378 ifeq ($(COM),MSC)
3379 $(call gb_LinkTarget_add_libs,$(1),\
3380 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3381 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3382 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3384 else
3385 $(call gb_LinkTarget_add_libs,$(1),\
3386 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3387 -lnspr4 \
3388 -lnss3 \
3389 -lsmime3 \
3391 endif
3393 endef
3395 define gb_LinkTarget__use_plc4
3396 $(call gb_LinkTarget_use_package,$(1),nss)
3397 ifeq ($(COM),MSC)
3398 $(call gb_LinkTarget_add_libs,$(1),\
3399 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3401 else
3402 $(call gb_LinkTarget_add_libs,$(1),\
3403 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3405 endif
3407 endef
3409 define gb_LinkTarget__use_ssl3
3410 $(call gb_LinkTarget_use_package,$(1),nss)
3411 ifeq ($(COM),MSC)
3412 $(call gb_LinkTarget_add_libs,$(1),\
3413 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3415 else
3416 $(call gb_LinkTarget_add_libs,$(1),\
3417 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3419 endif
3421 endef
3423 define gb_ExternalProject__use_nss3
3424 $(call gb_ExternalProject_use_package,$(1),nss)
3426 endef
3428 endif # SYSTEM_NSS
3430 ifeq ($(ENABLE_BREAKPAD),TRUE)
3432 define gb_LinkTarget__use_breakpad
3433 $(call gb_LinkTarget_set_include,$(1),\
3434 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3435 $$(INCLUDE) \
3438 ifeq ($(COM),MSC)
3439 $(call gb_LinkTarget_use_static_libraries,$(1),\
3440 breakpad \
3442 else
3443 $(call gb_LinkTarget_add_libs,$(1),\
3444 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3446 endif
3448 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3450 endef
3452 endif # ENABLE_BREAKPAD
3454 ifneq ($(SYSTEM_GPGMEPP),)
3456 gb_ExternalProject__use_gpgmepp:=
3457 gb_ExternalProject__use_libassuan:=
3458 gb_ExternalProject__use_libgpg-error:=
3460 define gb_LinkTarget__use_gpgmepp
3461 $(call gb_LinkTarget_set_include,$(1),\
3462 $$(INCLUDE) \
3463 $$(GPGMEPP_CFLAGS) \
3466 $(call gb_LinkTarget_add_libs,$(1),\
3467 $(GPGMEPP_LIBS) \
3470 endef
3472 else # NON-SYSTEM_GPGME
3474 define gb_ExternalProject__use_gpgmepp
3475 $(call gb_ExternalProject_use_external_project,$(1),gpgme)
3477 endef
3478 define gb_ExternalProject__use_libassuan
3479 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3481 endef
3482 define gb_ExternalProject__use_libgpg-error
3483 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3485 endef
3487 define gb_LinkTarget__use_gpgmepp
3488 $(call gb_LinkTarget_set_include,$(1),\
3489 -I$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src \
3490 -I$(call gb_UnpackedTarball_get_dir,gpgme)/src \
3491 $$(GPG_ERROR_CFLAGS) \
3492 $$(INCLUDE) \
3494 $(call gb_LinkTarget_add_libs,$(1),\
3495 -L$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src/.libs/ -lgpgmepp \
3497 $(call gb_LinkTarget_use_package,$(1),gpgme)
3499 endef
3501 ifneq ($(filter MACOSX LINUX,$(OS)),)
3503 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3504 gpgme \
3505 libassuan \
3506 libgpg-error \
3509 endif
3511 endif
3513 define gb_LinkTarget__use_dconf
3514 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3515 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3516 endef
3518 ### Jars ############################################################
3520 ifneq ($(SYSTEM_HSQLDB),)
3522 define gb_Jar__use_hsqldb
3523 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3524 endef
3525 define gb_JunitTest__use_hsqldb
3526 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3527 endef
3529 else # !SYSTEM_HSQLDB
3531 ifeq ($(ENABLE_JAVA),TRUE)
3532 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3533 hsqldb \
3535 endif
3537 define gb_Jar__use_hsqldb
3538 $(call gb_Jar_use_jar,$(1),hsqldb)
3539 endef
3540 define gb_JunitTest__use_hsqldb
3541 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3542 endef
3544 endif # SYSTEM_HSQLDB
3547 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3549 ifneq ($(SYSTEM_BSH),)
3551 define gb_Jar__use_bsh
3552 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3553 endef
3555 else # !SYSTEM_BSH
3557 ifeq ($(ENABLE_JAVA),TRUE)
3558 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3559 bsh \
3561 endif
3563 define gb_Jar__use_bsh
3564 $(call gb_Jar_use_jar,$(1),bsh)
3565 endef
3567 endif # SYSTEM_BSH
3569 endif
3571 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3573 ifneq ($(SYSTEM_RHINO),)
3575 define gb_Jar__use_rhino
3576 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3577 endef
3579 else # !SYSTEM_RHINO
3581 ifeq ($(ENABLE_JAVA),TRUE)
3582 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3583 js \
3585 endif
3587 define gb_Jar__use_rhino
3588 $(call gb_Jar_use_jar,$(1),js)
3589 endef
3591 endif # SYSTEM_RHINO
3593 endif
3595 ifneq ($(SYSTEM_APACHE_COMMONS),)
3597 define gb_Jar__use_commons-logging
3598 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3599 endef
3600 gb_ExternalProject__use_commons-logging :=
3602 else # !SYSTEM_APACHE_COMMONS
3604 ifeq ($(ENABLE_JAVA),TRUE)
3605 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3606 commons-logging-$(COMMONS_LOGGING_VERSION) \
3608 endif
3610 define gb_Jar__use_commons-logging
3611 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3612 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3613 endef
3614 define gb_ExternalProject__use_commons-logging
3615 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3616 endef
3618 endif # SYSTEM_APACHE_COMMONS
3621 ifneq ($(SYSTEM_JFREEREPORT),)
3623 define gb_Jar__use_flow-engine
3624 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3625 endef
3627 define gb_Jar__use_flute
3628 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3629 endef
3631 define gb_Jar__use_libbase
3632 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3633 endef
3635 define gb_Jar__use_libfonts
3636 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3637 endef
3639 define gb_Jar__use_libformula
3640 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3641 endef
3643 define gb_Jar__use_liblayout
3644 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3645 endef
3647 define gb_Jar__use_libloader
3648 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3649 endef
3651 define gb_Jar__use_librepository
3652 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3653 endef
3655 define gb_Jar__use_libserializer
3656 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3657 endef
3659 define gb_Jar__use_libxml
3660 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3661 endef
3663 define gb_Jar__use_sac
3664 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3665 endef
3667 else # !SYSTEM_JFREEREPORT
3669 ifeq ($(ENABLE_JAVA),TRUE)
3670 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3671 flow-engine \
3672 flute-1.1.6 \
3673 libbase-1.1.6 \
3674 libfonts-1.1.6 \
3675 libformula-1.1.7 \
3676 liblayout \
3677 libloader-1.1.6 \
3678 librepository-1.1.6 \
3679 libserializer-1.1.6 \
3680 libxml-1.1.7 \
3681 sac \
3683 endif
3685 define gb_Jar__use_flow-engine
3686 $(call gb_Jar_use_jar,$(1),flow-engine)
3687 endef
3689 define gb_Jar__use_flute
3690 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3691 endef
3693 define gb_Jar__use_libbase
3694 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3695 endef
3697 define gb_Jar__use_libfonts
3698 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3699 endef
3701 define gb_Jar__use_libformula
3702 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3703 endef
3705 define gb_Jar__use_liblayout
3706 $(call gb_Jar_use_jar,$(1),liblayout)
3707 endef
3709 define gb_Jar__use_libloader
3710 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3711 endef
3713 define gb_Jar__use_librepository
3714 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3715 endef
3717 define gb_Jar__use_libserializer
3718 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3719 endef
3721 define gb_Jar__use_libxml
3722 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3723 endef
3725 define gb_Jar__use_sac
3726 $(call gb_Jar_use_jar,$(1),sac)
3727 endef
3729 endif # SYSTEM_JFREEREPORT
3732 # Executables
3734 # FIXME: the library target should be for build too
3735 define gb_Executable__register_bestreversemap
3736 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3737 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3739 endef
3741 # TODO depending on the whole URE might be overkill, but I do not have a
3742 # Windows machine to debug it...
3743 # FIXME: the library target should be for build too
3744 define gb_Executable__register_climaker
3745 $(call gb_Executable_add_runtime_dependencies,climaker,\
3746 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3747 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3748 $(call gb_UnoApi_get_target,udkapi) \
3749 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3751 endef
3753 define gb_Executable__register_cppumaker
3754 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3755 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3757 endef
3759 # This is used to determine what we need for 'build' platform.
3760 # FIXME: the library target should be for build too
3761 define gb_Executable__register_gengal
3762 $(call gb_Executable_add_runtime_dependencies,gengal,\
3763 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3764 $(call gb_Package_get_target_for_build,postprocess_images) \
3765 $(call gb_Package_get_target_for_build,postprocess_registry) \
3766 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3767 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3768 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3769 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3770 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3771 $(call gb_UnoApi_get_target,offapi) \
3772 $(call gb_UnoApi_get_target,udkapi) \
3774 endef
3776 ifeq ($(SYSTEM_ICU),)
3778 define gb_Executable__register_gendict
3779 $(call gb_Executable_add_runtime_dependencies,gendict,\
3780 $(call gb_Package_get_target_for_build,icu) \
3781 $(call gb_Package_get_target_for_build,icu_ure) \
3783 endef
3785 endif
3787 define gb_Executable__register_idlc
3788 $(call gb_Executable_add_runtime_dependencies,idlc,\
3789 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3791 endef
3793 define gb_Executable__register_localize
3794 $(call gb_Executable_add_runtime_dependencies,localize,\
3795 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3796 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3799 endef
3801 # FIXME ure/services.rdb needs cleanup
3802 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3803 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3804 # FIXME: the library target should be for build too
3805 define gb_Executable__register_saxparser
3806 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3807 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3808 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3809 $(call gb_Rdb_get_target_for_build,saxparser) \
3810 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3811 $(call gb_UnoApi_get_target,udkapi) \
3813 endef
3815 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3816 # required due to the settings for URE_SERVICES and URE_TYPES in
3817 # cppuhelper/source/unorc
3818 # FIXME: the library target should be for build too
3819 define gb_Executable__register_uno
3820 $(call gb_Executable_add_runtime_dependencies,uno,\
3821 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3822 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3823 $(call gb_UnoApi_get_target,udkapi) \
3825 endef
3828 # External executables
3830 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3832 gb_ExternalExecutable__register_xmllint :=
3834 else # ! SYSTEM_LIBXML_FOR_BUILD
3836 define gb_ExternalExecutable__register_xmllint
3837 $(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)
3838 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3839 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3840 $(call gb_Package_get_target,libxml2) \
3843 endef
3845 endif # SYSTEM_LIBXML_FOR_BUILD
3847 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3849 gb_ExternalExecutable__register_xsltproc :=
3851 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3853 define gb_ExternalExecutable__register_xsltproc
3854 $(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)
3855 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3856 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3857 $(call gb_Package_get_target,libxml2) \
3858 $(call gb_Package_get_target,libxslt) \
3861 endef
3863 endif # SYSTEM_LIBXSLT_FOR_BUILD
3865 ifneq (,$(SYSTEM_UCPP))
3867 gb_ExternalExecutable__register_ucpp :=
3869 else # ! SYSTEM_UCPP
3871 define gb_ExternalExecutable__register_ucpp
3872 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3874 endef
3876 endif # SYSTEM_UCPP
3878 ifeq (,$(PYTHON_FOR_BUILD))
3880 define gb_ExternalExecutable__register_python
3881 ifeq ($(OS),MACOSX)
3883 # use set_external, to avoid having the command added as prerequisite for the
3884 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3885 # matching rule to build that specific file)
3886 $(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))
3887 # the Zip ensures that internal python has been built (cannot use the Package
3888 # target, as that is not used on Mac)
3889 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3891 else
3893 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3894 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3895 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3897 endif
3899 endef
3901 else
3903 define gb_ExternalExecutable__register_python
3904 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3906 endef
3908 endif # PYTHON_FOR_BUILD
3910 ifneq ($(SYSTEM_GENBRK),)
3912 define gb_ExternalExecutable__register_genbrk
3913 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3915 endef
3917 else # ! SYSTEM_GENBRK
3919 define gb_ExternalExecutable__register_genbrk
3920 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3921 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3922 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3923 $(call gb_Package_get_target_for_build,icu) \
3924 $(call gb_Package_get_target_for_build,icu_ure) \
3927 endef
3929 endif
3931 ifneq ($(SYSTEM_GENCCODE),)
3933 define gb_ExternalExecutable__register_genccode
3934 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3936 endef
3938 else # ! SYSTEM_GENCCODE
3940 define gb_ExternalExecutable__register_genccode
3941 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3942 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3943 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3944 $(call gb_Package_get_target_for_build,icu) \
3945 $(call gb_Package_get_target_for_build,icu_ure) \
3948 endef
3950 endif
3952 ifneq ($(SYSTEM_GENCMN),)
3954 define gb_ExternalExecutable__register_gencmn
3955 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3957 endef
3959 else # ! SYSTEM_GENCMN
3961 define gb_ExternalExecutable__register_gencmn
3962 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3963 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3964 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3965 $(call gb_Package_get_target_for_build,icu) \
3966 $(call gb_Package_get_target_for_build,icu_ure) \
3969 endef
3971 endif
3973 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3975 $(eval $(call gb_Helper_register_jars,OXT,\
3976 owncloud-android-library \
3979 define gb_Jar__use_owncloud_android_lib
3980 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
3981 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
3982 endef
3983 define gb_ExternalProject__use_owncloud_android_lib
3984 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
3985 endef
3987 endif
3989 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
3990 ifneq ($(SYSTEM_BZIP2),)
3992 define gb_LinkTarget__use_bzip2
3993 $(call gb_LinkTarget_set_include,$(1),\
3994 $(BZIP2_CFLAGS) \
3995 $$(INCLUDE) \
3997 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
3999 endef
4001 gb_ExternalProject__use_bzip2 :=
4003 else # !SYSTEM_BZIP2
4005 define gb_LinkTarget__use_bzip2
4006 $(call gb_LinkTarget_set_include,$(1),\
4007 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4008 $$(INCLUDE) \
4011 ifeq ($(COM),MSC)
4012 $(call gb_LinkTarget_add_libs,$(1),\
4013 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4015 else
4016 $(call gb_LinkTarget_add_libs,$(1),\
4017 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4019 endif
4021 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4022 endef
4024 define gb_ExternalProject__use_bzip2
4025 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4026 endef
4028 endif
4029 endif
4031 define gb_LinkTarget__use_clew
4032 $(call gb_LinkTarget_set_include,$(1), \
4033 -I$(SRCDIR)/external/clew/source/include \
4034 $$(INCLUDE) \
4036 $(call gb_LinkTarget_use_libraries,$(1),clew)
4037 endef
4039 ifneq ($(ENABLE_PDFIUM),)
4040 define gb_LinkTarget__use_pdfium
4041 $(call gb_LinkTarget_set_include,$(1),\
4042 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4043 $$(INCLUDE) \
4045 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4046 endef
4047 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4048 pdfium \
4050 endif
4052 # vim: set noet sw=4 ts=4: