tdf#100151: Dispose of window if DX device creation failed
[LibreOffice.git] / RepositoryExternal.mk
blob02392ae9af8c28390a410d6c33118926bd794dfd
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),)
231 define gb_LinkTarget__use_mariadb
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 :=
241 else # !SYSTEM_MARIADB
243 define gb_LinkTarget__use_mariadb
244 $(call gb_LinkTarget_set_include,$(1),\
245 $$(INCLUDE) \
246 $(MARIADB_CFLAGS) \
248 $(call gb_LinkTarget_use_static_libraries,$(1),\
249 mariadblib \
252 endef
253 define gb_ExternalProject__use_mariadb
254 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
256 endef
258 endif # SYSTEM_MARIADB
261 ifneq ($(SYSTEM_MARIADB),)
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_CPPCONN),)
293 define gb_LinkTarget__use_mysqlcppconn
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_mysqlcppconn
312 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
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,mysqlcppconn) \
320 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/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_JPEG),)
381 define gb_LinkTarget__use_jpeg
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_jpeg :=
391 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
393 define gb_LinkTarget__use_jpeg
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),jpeg-turbo,full)
401 endef
403 define gb_ExternalProject__use_jpeg
404 $(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
406 endef
408 else # !SYSTEM_JPEG
410 define gb_LinkTarget__use_jpeg
411 $(call gb_LinkTarget_set_include,$(1),\
412 $(LIBJPEG_CFLAGS) \
413 $$(INCLUDE) \
416 $(call gb_LinkTarget_use_static_libraries,$(1),\
417 jpeg \
420 endef
422 define gb_ExternalProject__use_jpeg
423 $(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
425 endef
427 endif # SYSTEM_JPEG
429 ifneq ($(SYSTEM_MYTHES),)
431 define gb_LinkTarget__use_mythes
432 $(call gb_LinkTarget_set_include,$(1),\
433 $$(INCLUDE) \
434 $(MYTHES_CFLAGS) \
436 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
438 endef
440 else # !SYSTEM_MYTHES
442 define gb_LinkTarget__use_mythes
443 $(call gb_LinkTarget_set_include,$(1),\
444 -I$(call gb_UnpackedTarball_get_dir,mythes) \
445 $$(INCLUDE) \
448 ifeq ($(COM),MSC)
449 $(call gb_LinkTarget_use_static_libraries,$(1),\
450 mythes \
452 else
453 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
454 $(call gb_LinkTarget_use_external_project,$(1),mythes)
455 endif
457 endef
459 endif # SYSTEM_MYTHES
462 ifneq ($(SYSTEM_EXPAT),)
464 define gb_LinkTarget__use_expat_impl
465 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
467 $(call gb_LinkTarget_add_defs,$(1),\
468 -DSYSTEM_EXPAT \
471 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
473 endef
475 gb_ExternalProject__use_expat :=
477 else # !SYSTEM_EXPAT
479 define gb_LinkTarget__use_expat_impl
480 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
482 $(call gb_LinkTarget_set_include,$(1),\
483 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
484 $$(INCLUDE) \
487 $(call gb_LinkTarget_use_static_libraries,$(1),\
488 $(2) \
491 endef
493 define gb_ExternalProject__use_expat
494 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
496 endef
498 endif # SYSTEM_EXPAT
500 define gb_LinkTarget__use_expat
501 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
503 endef
505 define gb_LinkTarget__use_expat_x64
506 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
508 endef
510 ifneq ($(SYSTEM_HYPH),)
512 define gb_LinkTarget__use_hyphen
513 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
515 endef
517 else # !SYSTEM_HYPH
519 define gb_LinkTarget__use_hyphen
520 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
521 $(call gb_LinkTarget_set_include,$(1),\
522 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
523 $$(INCLUDE) \
526 ifeq ($(COM),MSC)
527 $(call gb_LinkTarget_use_static_libraries,$(1),\
528 hyphen \
530 else
531 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
532 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
533 endif
535 endef
537 endif # SYSTEM_HYPH
539 ifneq ($(SYSTEM_HUNSPELL),)
541 define gb_LinkTarget__use_hunspell
542 $(call gb_LinkTarget_set_include,$(1),\
543 $$(INCLUDE) \
544 $(HUNSPELL_CFLAGS) \
546 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
548 endef
550 gb_ExternalProject__use_hunspell :=
552 else # !SYSTEM_HUNSPELL
554 define gb_LinkTarget__use_hunspell
555 $(call gb_LinkTarget_add_defs,$(1),\
556 -DHUNSPELL_STATIC \
558 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
559 $(call gb_LinkTarget_set_include,$(1),\
560 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
561 $$(INCLUDE) \
564 ifeq ($(COM),MSC)
565 $(call gb_LinkTarget_use_static_libraries,$(1),\
566 hunspell \
568 else
569 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
570 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
571 endif
573 endef
575 define gb_ExternalProject__use_hunspell
576 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
578 endef
580 endif # SYSTEM_HUNSPELL
583 ifneq ($(SYSTEM_BOOST),)
585 define gb_LinkTarget__use_boost_lib
586 $(call gb_LinkTarget_set_include,$(1),\
587 $$(INCLUDE) \
588 $(BOOST_CPPFLAGS) \
591 $(call gb_LinkTarget_add_ldflags,$(1),\
592 $(BOOST_LDFLAGS) \
595 $(call gb_LinkTarget_add_libs,$(1),$(2))
597 endef
599 define gb_LinkTarget__use_boost_date_time
600 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
602 endef
604 define gb_LinkTarget__use_boost_filesystem
605 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
607 endef
609 gb_ExternalProject__use_boost_filesystem :=
611 define gb_LinkTarget__use_boost_iostreams
612 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
614 endef
616 gb_ExternalProject__use_boost_iostreams :=
618 define gb_LinkTarget__use_boost_system
619 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
621 endef
623 gb_ExternalProject__use_boost_system :=
625 define gb_LinkTarget__use_boost_headers
626 $(call gb_LinkTarget_set_include,$(1),\
627 $$(INCLUDE) \
628 $(BOOST_CPPFLAGS) \
631 endef
633 gb_ExternalProject__use_boost_headers:=
635 else # !SYSTEM_BOOST
637 define gb_LinkTarget__use_boost_lib
638 $(call gb_LinkTarget_add_defs,$(1),\
639 -DBOOST_ALL_NO_LIB \
642 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
644 endef
646 define gb_LinkTarget__use_boost_date_time
647 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
649 endef
651 define gb_LinkTarget__use_boost_filesystem
652 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
654 endef
656 define gb_ExternalProject__use_boost_filesystem
657 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
658 endef
660 define gb_LinkTarget__use_boost_iostreams
661 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
663 endef
665 define gb_ExternalProject__use_boost_iostreams
666 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
667 endef
669 define gb_LinkTarget__use_boost_system
670 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
672 endef
674 define gb_ExternalProject__use_boost_system
675 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
676 endef
678 define gb_LinkTarget__use_boost_headers
679 $(call gb_LinkTarget_use_unpacked,$(1),boost)
680 $(call gb_LinkTarget_set_include,$(1),\
681 $(BOOST_CPPFLAGS) \
682 $$(INCLUDE) \
685 endef
687 define gb_ExternalProject__use_boost_headers
688 $(call gb_ExternalProject_use_unpacked,$(1),boost)
690 endef
692 endif # SYSTEM_BOOST
695 ifneq ($(SYSTEM_CMIS),)
697 define gb_LinkTarget__use_cmis
698 $(call gb_LinkTarget_set_include,$(1),\
699 $$(INCLUDE) \
700 $(CMIS_CFLAGS) \
702 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
704 endef
706 else # !SYSTEM_CMIS
708 define gb_LinkTarget__use_cmis
709 $(call gb_LinkTarget_set_include,$(1),\
710 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
711 $$(INCLUDE) \
713 $(call gb_LinkTarget_use_static_libraries,$(1),\
714 cmislib \
717 endef
719 endif # SYSTEM_CMIS
721 ifeq ($(ENABLE_JAVA),TRUE)
723 ifeq ($(OS)$(COM),WNTGCC)
725 define gb_LinkTarget__use_jawt
726 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
728 $(call gb_LinkTarget_add_ldflags,$(1),\
729 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
732 $(call gb_LinkTarget_add_libs,$(1),\
733 $(JAWTLIB) \
736 endef
738 else # $(OS)$(COM) != WNTGCC
740 define gb_LinkTarget__use_jawt
741 $(call gb_LinkTarget_add_libs,$(1),\
742 $(JAWTLIB) \
745 endef
747 endif # $(OS)$(COM) = WNTGCC
749 else # !ENABLE_JAVA
751 gb_LinkTarget__use_jawt :=
753 endif # ENABLE_JAVA
755 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
757 define gb_LinkTarget__use_libatomic_ops
758 $(call gb_LinkTarget_set_include,$(1),\
759 $$(INCLUDE) \
760 $(LIBATOMIC_OPS_CFLAGS) \
762 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
764 endef
765 gb_ExternalProject__use_libatomic_ops :=
767 else # !SYSTEM_LIBATOMIC_OPS
769 define gb_LinkTarget__use_libatomic_ops
770 $(call gb_LinkTarget_set_include,$(1),\
771 $(LIBATOMIC_OPS_CFLAGS) \
772 $$(INCLUDE) \
773 $(LIBATOMIC_OPS_CFLAGS) \
775 $(call gb_LinkTarget_use_external_project,$(1),\
776 libatomic_ops \
779 $(call gb_LinkTarget_add_libs,$(1),\
780 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
783 endef
785 define gb_ExternalProject__use_libatomic_ops
786 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
788 endef
790 endif # SYSTEM_LIBATOMIC_OPS
793 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
795 define gb_LinkTarget__use_libexttextcat
796 $(call gb_LinkTarget_set_include,$(1),\
797 $$(INCLUDE) \
798 $(LIBEXTTEXTCAT_CFLAGS) \
800 $(call gb_LinkTarget_add_defs,$(1),\
801 -DSYSTEM_LIBEXTTEXTCAT \
803 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
805 endef
807 else # !SYSTEM_LIBEXTTEXTCAT
809 define gb_LinkTarget__use_libexttextcat
810 $(call gb_LinkTarget_set_include,$(1),\
811 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
812 $$(INCLUDE) \
815 ifeq ($(COM),MSC)
816 $(call gb_LinkTarget_use_static_libraries,$(1),\
817 exttextcat \
819 else
820 $(call gb_LinkTarget_add_libs,$(1),\
821 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
823 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
824 endif
827 endef
829 endif # SYSTEM_LIBEXTTEXTCAT
832 ifneq ($(SYSTEM_LIBXML),)
834 define gb_LinkTarget__use_libxml2
835 $(call gb_LinkTarget_add_defs,$(1),\
836 -DSYSTEM_LIBXML \
838 $(call gb_LinkTarget_set_include,$(1),\
839 $$(INCLUDE) \
840 $(LIBXML_CFLAGS) \
842 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
844 endef
845 gb_ExternalProject__use_libxml2:=
847 else # !SYSTEM_LIBXML
849 $(eval $(call gb_Helper_register_packages_for_install,ure,\
850 xml2 \
853 define gb_LinkTarget__use_libxml2
854 $(call gb_LinkTarget_use_package,$(1),xml2)
855 $(call gb_LinkTarget_set_include,$(1),\
856 $$(INCLUDE) \
857 $(LIBXML_CFLAGS) \
860 $(call gb_LinkTarget_add_libs,$(1),\
861 $(LIBXML_LIBS) \
864 ifeq ($(COM),MSC)
865 $(call gb_LinkTarget_use_external,$(1),icu_headers)
866 endif
868 endef
869 define gb_ExternalProject__use_libxml2
870 $(call gb_ExternalProject_use_package,$(1),xml2)
872 ifeq ($(COM),MSC)
873 $(call gb_ExternalProject_use_external_project,$(1),icu)
874 endif
876 endef
878 endif # SYSTEM_LIBXML
881 ifneq ($(SYSTEM_LIBXSLT),)
883 define gb_LinkTarget__use_libxslt
884 $(call gb_LinkTarget_set_include,$(1),\
885 $$(INCLUDE) \
886 $(LIBXSLT_CFLAGS) \
888 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
890 endef
892 define gb_LinkTarget__use_libexslt
893 $(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
895 $(LIBEXSLT_CFLAGS) \
898 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
900 endef
902 else # !SYSTEM_LIBXSLT
904 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
905 xslt \
908 define gb_LinkTarget__use_libxslt
909 $(call gb_LinkTarget_use_package,$(1),xslt)
910 $(call gb_LinkTarget_set_include,$(1),\
911 $$(INCLUDE) \
912 -I$(call gb_UnpackedTarball_get_dir,xslt) \
915 ifeq ($(COM),MSC)
916 $(call gb_LinkTarget_add_libs,$(1),\
917 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
919 else
920 $(call gb_LinkTarget_add_libs,$(1),\
921 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
923 endif
925 endef
927 define gb_LinkTarget__use_libexslt
928 $(call gb_LinkTarget_use_package,$(1),xslt)
929 $(call gb_LinkTarget_set_include,$(1),\
930 $$(INCLUDE) \
931 -I$(call gb_UnpackedTarball_get_dir,xslt) \
934 ifeq ($(COM),MSC)
935 $(call gb_LinkTarget_add_libs,$(1),\
936 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
938 else
939 $(call gb_LinkTarget_add_libs,$(1),\
940 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
942 endif
944 endef
946 endif # SYSTEM_LIBXSLT
948 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
950 ifneq ($(SYSTEM_LIBLANGTAG),)
952 define gb_LinkTarget__use_liblangtag
953 $(call gb_LinkTarget_set_include,$(1),\
954 $$(INCLUDE) \
955 $(LIBLANGTAG_CFLAGS) \
958 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
960 endef
962 gb_ExternalProject__use_liblangtag :=
964 else # !SYSTEM_LIBLANGTAG
966 $(eval $(call gb_Helper_register_packages_for_install,ure,\
967 liblangtag_data \
970 ifeq ($(COM),MSC)
972 define gb_LinkTarget__use_liblangtag
973 $(call gb_LinkTarget_set_include,$(1),\
974 $(LIBLANGTAG_CFLAGS) \
975 $$(INCLUDE) \
977 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
978 $(call gb_LinkTarget_use_external_project,$(1),langtag)
980 endef
982 else
984 $(eval $(call gb_Helper_register_packages_for_install,ure,\
985 liblangtag \
988 define gb_LinkTarget__use_liblangtag
989 $(call gb_LinkTarget_set_include,$(1),\
990 $(LIBLANGTAG_CFLAGS) \
991 $$(INCLUDE) \
993 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
994 $(call gb_LinkTarget_use_package,$(1),liblangtag)
996 endef
998 endif # MSC
1000 define gb_ExternalProject__use_liblangtag
1001 $(call gb_ExternalProject_use_external_project,$(1),langtag)
1003 endef
1005 endif # SYSTEM_LIBLANGTAG
1007 else
1009 gb_LinkTarget__use_liblangtag :=
1010 gb_ExternalProject__use_liblangtag :=
1012 endif # ENABLE_LIBLANGTAG
1014 gb_ExternalProject__use_apr :=
1016 ifeq ($(WITH_WEBDAV),serf)
1018 define gb_LinkTarget__use_apr
1019 $(call gb_LinkTarget_set_include,$(1),\
1020 $$(INCLUDE) \
1021 $(APR_CFLAGS) \
1023 $(call gb_LinkTarget_add_libs,$(1),\
1024 $(APR_LIBS) \
1025 $(if $(filter $(OS),LINUX),-lpthread) \
1026 $(if $(filter $(OS),MACOSX),-liconv) \
1029 ifeq ($(SYSTEM_APR),)
1030 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1031 mswsock \
1032 rpcrt4 \
1033 shell32 \
1035 $(call gb_LinkTarget_add_defs,$(1),\
1036 -DAPR_DECLARE_STATIC \
1037 -DAPU_DECLARE_STATIC \
1039 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1040 endif
1042 endef
1044 define gb_ExternalProject__use_apr
1045 ifeq ($(SYSTEM_APR),)
1046 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1047 endif
1049 endef
1051 define gb_LinkTarget__use_serf
1052 $(call gb_LinkTarget_set_include,$(1),\
1053 $(SERF_CFLAGS) \
1054 $$(INCLUDE) \
1056 $(call gb_LinkTarget_add_libs,$(1),\
1057 $(SERF_LIBS) \
1060 ifeq ($(SYSTEM_SERF),)
1061 $(call gb_LinkTarget_use_external_project,$(1),serf)
1062 endif
1064 endef
1066 else ifeq ($(WITH_WEBDAV),neon)
1068 ifneq ($(SYSTEM_NEON),)
1070 define gb_LinkTarget__use_neon
1071 $(call gb_LinkTarget_add_defs,$(1),\
1072 -DNEON_VERSION=0x$(NEON_VERSION) \
1073 -DSYSTEM_NEON \
1075 $(call gb_LinkTarget_set_include,$(1),\
1076 $$(INCLUDE) \
1077 $(NEON_CFLAGS) \
1080 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1082 endef
1084 else # !SYSTEM_NEON
1086 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1087 neon \
1090 define gb_LinkTarget__use_neon
1091 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1092 $(call gb_LinkTarget_set_include,$(1),\
1093 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1094 $$(INCLUDE) \
1096 $(call gb_LinkTarget_use_libraries,$(1),\
1097 neon \
1100 endef
1102 endif # SYSTEM_NEON
1104 endif # WITH_WEBDAV
1106 ifneq ($(SYSTEM_REDLAND),)
1108 define gb_LinkTarget__use_librdf
1109 $(call gb_LinkTarget_add_defs,$(1),\
1110 -DSYSTEM_REDLAND \
1112 $(call gb_LinkTarget_set_include,$(1),\
1113 $$(INCLUDE) \
1114 $(REDLAND_CFLAGS) \
1116 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1118 endef
1120 gb_LinkTarget__use_redland_headers:=
1122 gb_LinkTarget__use_raptor_headers:=
1124 gb_LinkTarget__use_rasqal_headers:=
1126 else # !SYSTEM_REDLAND
1128 define gb_LinkTarget__use_redland_headers
1129 $(call gb_LinkTarget_set_include,$(1),\
1130 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1131 $$(INCLUDE) \
1134 endef
1136 define gb_LinkTarget__use_raptor_headers
1137 $(call gb_LinkTarget_set_include,$(1),\
1138 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1139 $$(INCLUDE) \
1142 endef
1144 define gb_LinkTarget__use_rasqal_headers
1145 $(call gb_LinkTarget_set_include,$(1),\
1146 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1147 $$(INCLUDE) \
1150 endef
1152 ifneq ($(OS),ANDROID)
1154 ifeq ($(COM),MSC)
1155 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1156 raptor2 \
1157 rasqal \
1158 rdf \
1160 else
1161 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1162 raptor \
1163 rasqal \
1164 redland \
1166 endif
1168 define gb_LinkTarget__use_librdf
1169 ifeq ($(COM),MSC)
1170 $(call gb_LinkTarget_use_libraries,$(1),\
1171 raptor2 \
1172 rdf \
1174 else
1175 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1177 $(call gb_LinkTarget_add_libs,$(1),\
1178 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1179 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1180 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1182 endif
1184 endef
1186 else # ANDROID
1188 define gb_LinkTarget__use_librdf
1189 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1191 endef
1193 endif # ANDROID
1195 endif # SYSTEM_REDLAND
1198 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1200 ifneq ($(SYSTEM_CAIRO),)
1202 define gb_LinkTarget__use_cairo
1203 $(call gb_LinkTarget_set_include,$(1),\
1204 $$(INCLUDE) \
1205 $(CAIRO_CFLAGS) \
1207 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1208 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1210 endef
1212 else # !SYSTEM_CAIRO
1214 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1215 cairo \
1216 $(if $(filter $(OS),WNT),,pixman) \
1219 define gb_LinkTarget__use_cairo
1220 $(call gb_LinkTarget_use_package,$(1),cairo)
1221 $(call gb_LinkTarget_use_package,$(1),pixman)
1222 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1223 $(call gb_LinkTarget_set_include,$(1),\
1224 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1225 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1226 $$(INCLUDE) \
1228 $(call gb_LinkTarget_add_libs,$(1),\
1229 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1230 $(if $(filter-out MACOSX WNT,$(OS)), \
1231 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1235 endef
1237 endif # SYSTEM_CAIRO
1239 else ifeq ($(OS),ANDROID)
1241 define gb_LinkTarget__use_cairo
1242 $(call gb_LinkTarget_use_package,$(1),cairo)
1243 $(call gb_LinkTarget_use_package,$(1),pixman)
1244 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1245 $(call gb_LinkTarget_set_include,$(1),\
1246 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1247 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1248 $$(INCLUDE) \
1250 $(call gb_LinkTarget_add_libs,$(1),\
1251 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1252 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1255 endef
1257 endif # CAIRO
1259 ifneq ($(SYSTEM_FREETYPE),)
1261 define gb_LinkTarget__use_freetype_headers
1262 $(call gb_LinkTarget_set_include,$(1),\
1263 $$(INCLUDE) \
1264 $(FREETYPE_CFLAGS) \
1267 endef
1269 define gb_LinkTarget__use_freetype
1270 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1271 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1273 endef
1275 gb_ExternalProject__use_freetype :=
1277 else
1279 define gb_LinkTarget__use_freetype_headers
1280 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1281 $(call gb_LinkTarget_set_include,$(1),\
1282 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1283 $$(INCLUDE) \
1286 endef
1288 define gb_LinkTarget__use_freetype
1289 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1291 $(call gb_LinkTarget_add_libs,$(1),\
1292 -L$(call gb_UnpackedTarball_get_dir,freetype)/instdir/lib -lfreetype \
1295 endef
1297 define gb_ExternalProject__use_freetype
1298 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1300 endef
1302 endif # SYSTEM_FREETYPE
1304 ifneq ($(SYSTEM_FONTCONFIG),)
1306 define gb_LinkTarget__use_fontconfig
1307 $(call gb_LinkTarget_set_include,$(1),\
1308 $$(INCLUDE) \
1309 $(FONTCONFIG_CFLAGS) \
1312 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1314 endef
1316 else
1318 define gb_LinkTarget__use_fontconfig
1319 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1320 $(call gb_LinkTarget_set_include,$(1),\
1321 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1322 $$(INCLUDE) \
1325 $(call gb_LinkTarget_add_libs,$(1),\
1326 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1329 endef
1331 endif # SYSTEM_FONTCONFIG
1333 ifneq ($(SYSTEM_GRAPHITE),)
1335 define gb_LinkTarget__use_graphite
1336 $(call gb_LinkTarget_set_include,$(1),\
1337 $$(INCLUDE) \
1338 $(GRAPHITE_CFLAGS) \
1340 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1342 endef
1344 gb_ExternalProject__use_graphite:=
1346 else # !SYSTEM_GRAPHITE
1348 define gb_LinkTarget__use_graphite
1349 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1350 $(call gb_LinkTarget_set_include,$(1),\
1351 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1352 $$(INCLUDE) \
1354 $(call gb_LinkTarget_use_static_libraries,$(1),\
1355 graphite \
1358 endef
1360 define gb_ExternalProject__use_graphite
1361 $(call gb_ExternalProject_use_static_libraries,$(1),\
1362 graphite \
1365 endef
1366 endif # SYSTEM_GRAPHITE
1368 ifneq ($(SYSTEM_ICU),)
1370 gb_LinkTarget__use_icu_headers:=
1371 gb_ExternalProject__use_icu:=
1373 define gb_LinkTarget__use_icudata
1374 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1376 endef
1377 define gb_LinkTarget__use_icui18n
1378 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1380 endef
1381 define gb_LinkTarget__use_icuuc
1382 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1384 endef
1386 else # !SYSTEM_ICU
1388 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1389 icu_ure \
1392 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1393 icu \
1396 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1397 gb_ICU_suffix:=lo
1398 else
1399 gb_ICU_suffix:=
1400 endif
1402 define gb_LinkTarget__use_icu_headers
1403 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1404 $(call gb_LinkTarget_set_include,$(1),\
1405 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1406 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1407 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1408 $$(INCLUDE) \
1411 endef
1413 define gb_ExternalProject__use_icu
1414 $(call gb_ExternalProject_use_package,$(1),icu)
1416 endef
1418 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1419 define gb_LinkTarget__use_icudata
1420 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1422 ifeq ($(OS),WNT)
1423 $(call gb_LinkTarget_add_libs,$(1),\
1424 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1426 else
1427 $(call gb_LinkTarget_add_libs,$(1),\
1428 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1430 endif
1432 endef
1434 define gb_LinkTarget__use_icui18n
1435 $(call gb_LinkTarget_use_package,$(1),icu)
1437 ifeq ($(OS),WNT)
1438 $(call gb_LinkTarget_add_libs,$(1),\
1439 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1441 else
1442 $(call gb_LinkTarget_add_libs,$(1),\
1443 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1445 endif
1447 endef
1449 define gb_LinkTarget__use_icuuc
1450 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1452 ifeq ($(OS),WNT)
1453 $(call gb_LinkTarget_add_libs,$(1),\
1454 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1456 else
1457 $(call gb_LinkTarget_add_libs,$(1),\
1458 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1460 endif
1462 endef
1464 endif # SYSTEM_ICU
1466 ifneq ($(SYSTEM_HARFBUZZ),)
1468 define gb_LinkTarget__use_harfbuzz
1469 $(call gb_LinkTarget_set_include,$(1),\
1470 $$(INCLUDE) \
1471 $(HARFBUZZ_CFLAGS) \
1473 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1475 endef
1477 else # SYSTEM_HARFBUZZ != TRUE
1479 define gb_LinkTarget__use_harfbuzz
1480 $(call gb_LinkTarget_set_include,$(1),\
1481 $(HARFBUZZ_CFLAGS) \
1482 $$(INCLUDE) \
1484 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1485 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1487 endef
1489 endif # SYSTEM_HARFBUZZ
1491 ifeq ($(DISABLE_OPENSSL),TRUE)
1493 gb_ExternalProject__use_openssl:=
1494 gb_LinkTarget__use_openssl_headers:=
1495 gb_LinkTarget__use_openssl:=
1497 else # !DISABLE_OPENSSL
1499 ifneq ($(SYSTEM_OPENSSL),)
1501 gb_LinkTarget__use_openssl_headers:=
1502 gb_ExternalProject__use_openssl:=
1504 define gb_LinkTarget__use_openssl
1505 $(call gb_LinkTarget_set_include,$(1),\
1506 $$(INCLUDE) \
1507 $(OPENSSL_CFLAGS) \
1509 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1511 endef
1513 else # !SYSTEM_OPENSSL
1515 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1516 openssl \
1519 define gb_ExternalProject__use_openssl
1520 $(call gb_ExternalProject_use_package,$(1),openssl)
1522 endef
1524 define gb_LinkTarget__use_openssl_headers
1525 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1526 $(call gb_LinkTarget_set_include,$(1),\
1527 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1528 $$(INCLUDE) \
1531 endef
1533 define gb_LinkTarget__use_openssl
1534 $(call gb_LinkTarget_use_package,$(1),openssl)
1535 ifeq ($(OS),WNT)
1536 $(call gb_LinkTarget_add_libs,$(1),\
1537 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1538 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1540 else
1541 $(call gb_LinkTarget_add_libs,$(1),\
1542 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1543 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1545 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1546 ifeq ($(OS),SOLARIS)
1547 $(call gb_LinkTarget_add_libs,$(1),\
1548 -lnsl \
1549 -lsocket \
1551 endif
1552 endif
1554 endef
1556 endif # SYSTEM_OPENSSL
1557 endif # DISABLE_OPENSSL
1560 ifeq ($(DISABLE_OPENSSL),TRUE)
1562 define gb_LinkTarget__use_gnutls
1563 $(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(GNUTLS_CFLAGS) \
1568 $(call gb_LinkTarget_add_defs,$(1),\
1569 -DDISABLE_OPENSSL \
1572 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1574 endef
1576 define gb_LinkTarget__use_libgcrypt
1577 $(call gb_LinkTarget_set_include,$(1),\
1578 $$(INCLUDE) \
1579 $(LIBGCRYPT_CFLAGS) \
1582 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1584 endef
1586 else # !DISABLE_OPENSSL
1588 gb_LinkTarget__use_gnutls:=
1589 gb_LinkTarget__use_libgcrypt:=
1591 endif # DISABLE_OPENSSL
1594 ifneq ($(SYSTEM_CDR),)
1596 define gb_LinkTarget__use_cdr
1597 $(call gb_LinkTarget_set_include,$(1),\
1598 $$(INCLUDE) \
1599 $(CDR_CFLAGS) \
1601 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1603 endef
1605 else # !SYSTEM_CDR
1607 define gb_LinkTarget__use_cdr
1608 $(call gb_LinkTarget_set_include,$(1),\
1609 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1610 $$(INCLUDE) \
1612 $(call gb_LinkTarget_add_libs,$(1),\
1613 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1615 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1616 endef
1618 endif # SYSTEM_CDR
1621 ifneq ($(SYSTEM_EBOOK),)
1623 define gb_LinkTarget__use_ebook
1624 $(call gb_LinkTarget_set_include,$(1),\
1625 $$(INCLUDE) \
1626 $(EBOOK_CFLAGS) \
1628 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1630 endef
1632 gb_ExternalProject__use_ebook :=
1634 else # !SYSTEM_EBOOK
1636 define gb_LinkTarget__use_ebook
1637 $(call gb_LinkTarget_set_include,$(1),\
1638 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1639 $$(INCLUDE) \
1641 $(call gb_LinkTarget_add_libs,$(1),\
1642 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1644 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1646 endef
1648 define gb_ExternalProject__use_ebook
1649 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1651 endef
1653 endif # SYSTEM_EBOOK
1656 ifneq ($(SYSTEM_ETONYEK),)
1658 define gb_LinkTarget__use_etonyek
1659 $(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(ETONYEK_CFLAGS) \
1663 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1665 endef
1667 gb_ExternalProject__use_etonyek :=
1669 else # !SYSTEM_ETONYEK
1671 ifeq ($(COM),MSC)
1673 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1674 etonyek \
1677 define gb_LinkTarget__use_etonyek
1678 $(call gb_LinkTarget_set_include,$(1),\
1679 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1680 $$(INCLUDE) \
1682 $(call gb_LinkTarget_use_libraries,$(1),\
1683 etonyek \
1686 endef
1688 else # !MSC
1690 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1691 libetonyek \
1694 define gb_LinkTarget__use_etonyek
1695 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1697 $(call gb_LinkTarget_set_include,$(1),\
1698 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1699 -DLIBETONYEK_VISIBILITY \
1700 $$(INCLUDE) \
1702 $(call gb_LinkTarget_add_libs,$(1),\
1703 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1705 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1707 endef
1709 define gb_ExternalProject__use_etonyek
1710 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1712 endef
1714 endif
1716 endif # SYSTEM_ETONYEK
1719 ifneq ($(SYSTEM_FREEHAND),)
1721 define gb_LinkTarget__use_freehand
1722 $(call gb_LinkTarget_set_include,$(1),\
1723 $$(INCLUDE) \
1724 $(FREEHAND_CFLAGS) \
1726 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1728 endef
1730 gb_ExternalProject__use_freehand :=
1732 else # !SYSTEM_FREEHAND
1734 define gb_LinkTarget__use_freehand
1735 $(call gb_LinkTarget_set_include,$(1),\
1736 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1737 $$(INCLUDE) \
1739 $(call gb_LinkTarget_add_libs,$(1),\
1740 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1742 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1744 endef
1746 define gb_ExternalProject__use_freehand
1747 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1749 endef
1751 endif # SYSTEM_FREEHAND
1754 ifneq ($(SYSTEM_ODFGEN),)
1756 define gb_LinkTarget__use_odfgen
1757 $(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
1759 $(ODFGEN_CFLAGS) \
1761 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1763 endef
1765 else # !SYSTEM_ODFGEN
1767 ifeq ($(COM),MSC)
1769 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1770 odfgen \
1773 define gb_LinkTarget__use_odfgen
1774 $(call gb_LinkTarget_set_include,$(1),\
1775 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1776 $$(INCLUDE) \
1778 $(call gb_LinkTarget_use_libraries,$(1),\
1779 odfgen \
1782 endef
1784 else # !MSC
1786 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1787 libodfgen \
1790 define gb_LinkTarget__use_odfgen
1791 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1793 $(call gb_LinkTarget_set_include,$(1),\
1794 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1795 -DLIBODFGEN_VISIBILITY \
1796 $$(INCLUDE) \
1798 $(call gb_LinkTarget_add_libs,$(1),\
1799 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1802 endef
1804 endif
1806 endif # SYSTEM_ODFGEN
1809 ifneq ($(SYSTEM_REVENGE),)
1811 define gb_LinkTarget__use_revenge
1812 $(call gb_LinkTarget_set_include,$(1),\
1813 $$(INCLUDE) \
1814 $(REVENGE_CFLAGS) \
1816 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1818 endef
1820 gb_ExternalProject__use_revenge :=
1822 else # !SYSTEM_REVENGE
1824 ifeq ($(COM),MSC)
1826 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1827 revenge \
1830 define gb_LinkTarget__use_revenge
1831 $(call gb_LinkTarget_set_include,$(1),\
1832 $(REVENGE_CFLAGS) \
1833 $$(INCLUDE) \
1835 $(call gb_LinkTarget_use_libraries,$(1),\
1836 revenge \
1839 endef
1841 define gb_ExternalProject__use_revenge
1842 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1844 endef
1846 else # !MSC
1848 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1849 librevenge \
1852 define gb_LinkTarget__use_revenge
1853 $(call gb_LinkTarget_use_package,$(1),librevenge)
1855 $(call gb_LinkTarget_set_include,$(1),\
1856 $(REVENGE_CFLAGS) \
1857 -DLIBREVENGE_VISIBILITY \
1858 $$(INCLUDE) \
1860 $(call gb_LinkTarget_add_libs,$(1),\
1861 $(REVENGE_LIBS) \
1863 endef
1865 define gb_ExternalProject__use_revenge
1866 $(call gb_ExternalProject_use_package,$(1),librevenge)
1868 endef
1870 endif # MSC
1872 endif # SYSTEM_REVENGE
1875 ifneq ($(SYSTEM_ABW),)
1877 define gb_LinkTarget__use_abw
1878 $(call gb_LinkTarget_set_include,$(1),\
1879 $$(INCLUDE) \
1880 $(ABW_CFLAGS) \
1882 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1884 endef
1885 gb_ExternalProject__use_abw :=
1887 else # !SYSTEM_ABW
1889 define gb_LinkTarget__use_abw
1890 $(call gb_LinkTarget_set_include,$(1),\
1891 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1892 $$(INCLUDE) \
1894 $(call gb_LinkTarget_add_libs,$(1),\
1895 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1897 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1899 endef
1900 define gb_ExternalProject__use_abw
1901 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1903 endef
1905 endif # SYSTEM_ABW
1908 ifneq ($(SYSTEM_MSPUB),)
1910 define gb_LinkTarget__use_mspub
1911 $(call gb_LinkTarget_set_include,$(1),\
1912 $$(INCLUDE) \
1913 $(MSPUB_CFLAGS) \
1915 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1917 endef
1919 else # !SYSTEM_MSPUB
1921 define gb_LinkTarget__use_mspub
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1924 $$(INCLUDE) \
1926 $(call gb_LinkTarget_add_libs,$(1),\
1927 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1929 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1931 endef
1933 endif # SYSTEM_MSPUB
1936 ifneq ($(SYSTEM_PAGEMAKER),)
1938 define gb_LinkTarget__use_pagemaker
1939 $(call gb_LinkTarget_set_include,$(1),\
1940 $$(INCLUDE) \
1941 $(PAGEMAKER_CFLAGS) \
1943 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1945 endef
1946 gb_ExternalProject__use_pagemaker :=
1948 else # !SYSTEM_PAGEMAKER
1950 define gb_LinkTarget__use_pagemaker
1951 $(call gb_LinkTarget_set_include,$(1),\
1952 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1953 $$(INCLUDE) \
1955 $(call gb_LinkTarget_add_libs,$(1),\
1956 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1958 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1960 endef
1961 define gb_ExternalProject__use_pagemaker
1962 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1964 endef
1966 endif # SYSTEM_PAGEMAKER
1969 ifneq ($(SYSTEM_ZMF),)
1971 define gb_LinkTarget__use_zmf
1972 $(call gb_LinkTarget_set_include,$(1),\
1973 $$(INCLUDE) \
1974 $(ZMF_CFLAGS) \
1976 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1978 endef
1979 gb_ExternalProject__use_zmf :=
1981 else # !SYSTEM_ZMF
1983 define gb_LinkTarget__use_zmf
1984 $(call gb_LinkTarget_set_include,$(1),\
1985 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
1986 $$(INCLUDE) \
1988 $(call gb_LinkTarget_add_libs,$(1),\
1989 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
1991 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
1993 endef
1994 define gb_ExternalProject__use_zmf
1995 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
1997 endef
1999 endif # SYSTEM_ZMF
2002 ifneq ($(SYSTEM_VISIO),)
2004 define gb_LinkTarget__use_visio
2005 $(call gb_LinkTarget_set_include,$(1),\
2006 $$(INCLUDE) \
2007 $(VISIO_CFLAGS) \
2009 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2011 endef
2013 else # !SYSTEM_VISIO
2015 define gb_LinkTarget__use_visio
2016 $(call gb_LinkTarget_set_include,$(1),\
2017 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2018 $$(INCLUDE) \
2020 $(call gb_LinkTarget_add_libs,$(1),\
2021 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2023 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2025 endef
2027 endif # SYSTEM_VISIO
2030 ifneq ($(SYSTEM_WPD),)
2032 define gb_LinkTarget__use_wpd
2033 $(call gb_LinkTarget_set_include,$(1),\
2034 $$(INCLUDE) \
2035 $(WPD_CFLAGS) \
2037 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2039 endef
2040 gb_ExternalProject__use_wpd :=
2042 else # !SYSTEM_WPD
2044 ifeq ($(COM),MSC)
2046 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2047 wpd \
2050 define gb_LinkTarget__use_wpd
2051 $(call gb_LinkTarget_set_include,$(1),\
2052 $(WPD_CFLAGS) \
2053 $$(INCLUDE) \
2055 $(call gb_LinkTarget_use_libraries,$(1),\
2056 wpd \
2059 endef
2061 define gb_ExternalProject__use_wpd
2062 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2064 endef
2066 else # !MSC
2068 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2069 libwpd \
2072 define gb_LinkTarget__use_wpd
2073 $(call gb_LinkTarget_use_package,$(1),libwpd)
2075 $(call gb_LinkTarget_set_include,$(1),\
2076 $(WPD_CFLAGS) \
2077 $$(INCLUDE) \
2079 $(call gb_LinkTarget_add_libs,$(1),\
2080 $(WPD_LIBS) \
2083 endef
2085 define gb_ExternalProject__use_wpd
2086 $(call gb_ExternalProject_use_package,$(1),libwpd)
2088 endef
2090 endif # MSC
2092 endif # SYSTEM_WPD
2095 ifneq ($(SYSTEM_WPG),)
2097 define gb_LinkTarget__use_wpg
2098 $(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
2100 $(WPG_CFLAGS) \
2102 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2104 endef
2105 gb_ExternalProject__use_wpg :=
2107 else # !SYSTEM_WPG
2109 ifeq ($(COM),MSC)
2111 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2112 wpg \
2115 define gb_LinkTarget__use_wpg
2116 $(call gb_LinkTarget_set_include,$(1),\
2117 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2118 $$(INCLUDE) \
2120 $(call gb_LinkTarget_use_libraries,$(1),\
2121 wpg \
2124 endef
2126 else # !MSC
2128 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2129 libwpg \
2132 define gb_LinkTarget__use_wpg
2133 $(call gb_LinkTarget_use_package,$(1),libwpg)
2135 $(call gb_LinkTarget_set_include,$(1),\
2136 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2137 $$(INCLUDE) \
2139 $(call gb_LinkTarget_add_libs,$(1),\
2140 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2143 endef
2145 endif # MSC
2147 endif # SYSTEM_WPG
2150 ifneq ($(SYSTEM_WPS),)
2152 define gb_LinkTarget__use_wps
2153 $(call gb_LinkTarget_set_include,$(1),\
2154 $$(INCLUDE) \
2155 $(WPS_CFLAGS) \
2157 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2159 endef
2160 gb_ExternalProject__use_wps :=
2162 else # !SYSTEM_WPS
2164 ifeq ($(COM),MSC)
2166 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2167 wps \
2170 define gb_LinkTarget__use_wps
2171 $(call gb_LinkTarget_set_include,$(1),\
2172 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2173 $$(INCLUDE) \
2176 $(call gb_LinkTarget_use_libraries,$(1),\
2177 wps \
2180 endef
2182 else # !MSC
2184 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2185 libwps \
2188 define gb_LinkTarget__use_wps
2189 $(call gb_LinkTarget_use_package,$(1),libwps)
2191 $(call gb_LinkTarget_set_include,$(1),\
2192 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2193 $$(INCLUDE) \
2195 $(call gb_LinkTarget_add_libs,$(1),\
2196 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2199 endef
2201 endif # MSC
2203 endif # SYSTEM_WPS
2206 ifneq ($(SYSTEM_MWAW),)
2208 define gb_LinkTarget__use_mwaw
2209 $(call gb_LinkTarget_set_include,$(1),\
2210 $$(INCLUDE) \
2211 $(MWAW_CFLAGS) \
2213 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2215 endef
2217 else # !SYSTEM_MWAW
2219 ifeq ($(COM),MSC)
2221 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2222 mwaw \
2225 define gb_LinkTarget__use_mwaw
2226 $(call gb_LinkTarget_set_include,$(1),\
2227 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2228 $$(INCLUDE) \
2231 $(call gb_LinkTarget_use_libraries,$(1),\
2232 mwaw \
2235 endef
2237 else # !MSC
2239 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2240 libmwaw \
2243 define gb_LinkTarget__use_mwaw
2244 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2246 $(call gb_LinkTarget_set_include,$(1),\
2247 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2248 $$(INCLUDE) \
2250 $(call gb_LinkTarget_add_libs,$(1),\
2251 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2254 endef
2256 endif # MSC
2258 endif # SYSTEM_MWAW
2260 ifneq ($(SYSTEM_STAROFFICE),)
2262 define gb_LinkTarget__use_staroffice
2263 $(call gb_LinkTarget_set_include,$(1),\
2264 $$(INCLUDE) \
2265 $(STAROFFICE_CFLAGS) \
2267 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2269 endef
2271 else # !SYSTEM_STAROFFICE
2273 ifeq ($(COM),MSC)
2275 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2276 staroffice \
2279 define gb_LinkTarget__use_staroffice
2280 $(call gb_LinkTarget_set_include,$(1),\
2281 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2282 $$(INCLUDE) \
2285 $(call gb_LinkTarget_use_libraries,$(1),\
2286 staroffice \
2289 endef
2291 else # !MSC
2293 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2294 libstaroffice \
2297 define gb_LinkTarget__use_staroffice
2298 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2300 $(call gb_LinkTarget_set_include,$(1),\
2301 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2302 $$(INCLUDE) \
2304 $(call gb_LinkTarget_add_libs,$(1),\
2305 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2308 endef
2310 endif # MSC
2312 endif # SYSTEM_STAROFFICE
2315 ifneq ($(SYSTEM_LCMS2),)
2317 define gb_LinkTarget__use_lcms2
2318 $(call gb_LinkTarget_set_include,$(1),\
2319 $$(INCLUDE) \
2320 $(LCMS2_CFLAGS) \
2322 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2324 endef
2326 gb_ExternalProject__use_lcms2 :=
2328 else # !SYSTEM_LCMS2
2330 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2331 lcms2 \
2334 define gb_ExternalProject__use_lcms2
2335 $(call gb_ExternalProject_use_package,$(1),lcms2)
2337 endef
2339 ifeq ($(OS),ANDROID)
2341 define gb_LinkTarget__use_lcms2
2342 $(call gb_LinkTarget_use_package,$(1),lcms2)
2343 $(call gb_LinkTarget_set_include,$(1),\
2344 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2345 $$(INCLUDE) \
2348 endef
2350 else
2352 define gb_LinkTarget__use_lcms2
2353 $(call gb_LinkTarget_use_package,$(1),lcms2)
2354 $(call gb_LinkTarget_set_include,$(1),\
2355 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2356 $$(INCLUDE) \
2358 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2360 endef
2362 endif # ANDROID
2363 endif # SYSTEM_LCMS2
2365 ifneq ($(ENABLE_LPSOLVE),)
2367 ifneq ($(SYSTEM_LPSOLVE),)
2369 define gb_LinkTarget__use_lpsolve
2370 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2371 $(call gb_LinkTarget_add_defs,$(1),\
2372 -DSYSTEM_LPSOLVE \
2375 endef
2377 else # !SYSTEM_LPSOLVE
2379 define gb_LinkTarget__use_lpsolve
2380 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2381 ifeq ($(COM),MSC)
2382 $(call gb_LinkTarget_add_libs,$(1),\
2383 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2385 else
2386 $(call gb_LinkTarget_add_libs,$(1),\
2387 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2389 endif
2390 $(call gb_LinkTarget_set_include,$(1),\
2391 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2392 $$(INCLUDE) \
2395 endef
2397 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2398 lpsolve \
2401 endif # SYSTEM_LPSOLVE
2403 else
2405 gb_LinkTarget__use_lpsolve :=
2407 endif # ENABLE_LPSOLVE
2409 ifneq ($(ENABLE_COINMP),)
2411 ifneq ($(SYSTEM_COINMP),TRUE)
2413 define gb_LinkTarget__use_coinmp
2414 $(call gb_LinkTarget_use_package,$(1),coinmp)
2415 ifeq ($(COM),MSC)
2416 $(call gb_LinkTarget_add_libs,$(1),\
2417 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2419 else
2420 $(call gb_LinkTarget_add_libs,$(1),\
2421 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2422 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2423 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2424 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2425 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2426 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2427 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2429 endif
2430 $(call gb_LinkTarget_set_include,$(1),\
2431 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2432 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2433 $$(INCLUDE) \
2436 endef
2438 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2439 coinmp \
2442 else # SYSTEM_COINMP
2444 define gb_LinkTarget__use_coinmp
2445 $(call gb_LinkTarget_set_include,$(1),\
2446 $$(INCLUDE) \
2447 $(COINMP_CFLAGS) \
2449 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2451 endef
2453 endif
2455 else
2457 gb_LinkTarget__use_coinmp :=
2459 endif # ENABLE_COINMP
2461 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2463 define gb_LinkTarget__use_mDNSResponder
2464 $(call gb_LinkTarget_set_include,$(1),\
2465 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2466 $$(INCLUDE) \
2468 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2469 endef
2471 endif # MDNSRESPONDER
2473 ifeq ($(ENABLE_GIO),TRUE)
2475 define gb_LinkTarget__use_gio
2476 $(call gb_LinkTarget_set_include,$(1),\
2477 $$(INCLUDE) \
2478 $(GIO_CFLAGS) \
2481 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2483 endef
2485 else # ENABLE_GIO
2487 define gb_LinkTarget__use_gio
2489 endef
2491 endif # ENABLE_GIO
2493 ifeq ($(ENABLE_AVAHI),TRUE)
2495 define gb_LinkTarget__use_avahi
2496 $(call gb_LinkTarget_set_include,$(1),\
2497 $$(INCLUDE) \
2498 $(AVAHI_CFLAGS) \
2501 $(call gb_LinkTarget_add_defs,$(1),\
2502 -DENABLE_AVAHI \
2505 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2507 endef
2509 else # ENABLE_AVAHI
2511 gb_LinkTarget__use_avahi :=
2513 endif # ENABLE_AVAHI
2516 define gb_LinkTarget__use_gtk
2517 $(call gb_LinkTarget_set_include,$(1),\
2518 $$(INCLUDE) \
2519 $(GTK_CFLAGS) \
2522 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2524 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2526 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2528 $(call gb_LinkTarget_set_include,$(1),\
2529 $$(INCLUDE) \
2530 $(GTK_PRINT_CFLAGS) \
2533 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2535 endif
2537 endef
2539 define gb_LinkTarget__use_gthread
2540 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2541 endef
2543 ifeq ($(ENABLE_CUPS),TRUE)
2545 define gb_LinkTarget__use_cups
2546 $(call gb_LinkTarget_add_defs,$(1),\
2547 -DENABLE_CUPS \
2550 $(call gb_LinkTarget_add_libs,$(1),\
2551 -lcups \
2554 endef
2556 else # ENABLE_CUPS
2558 define gb_LinkTarget__use_cups
2560 endef
2562 endif # ENABLE_DBUS
2564 ifeq ($(ENABLE_DBUS),TRUE)
2566 define gb_LinkTarget__use_dbus
2567 $(call gb_LinkTarget_set_include,$(1),\
2568 $$(INCLUDE) \
2569 $(DBUS_CFLAGS) \
2572 $(call gb_LinkTarget_add_libs,$(1),\
2573 $(DBUS_LIBS) \
2576 endef
2578 else # ENABLE_DBUS
2580 define gb_LinkTarget__use_dbus
2582 endef
2584 endif # ENABLE_DBUS
2587 define gb_LinkTarget__use_dbusmenugtk
2588 $(call gb_LinkTarget_set_include,$(1),\
2589 $$(INCLUDE) \
2590 $(DBUSMENUGTK_CFLAGS) \
2593 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2595 endef
2598 ifeq ($(ENABLE_TELEPATHY),TRUE)
2600 define gb_LinkTarget__use_telepathy
2601 $(call gb_LinkTarget_set_include,$(1),\
2602 $$(INCLUDE) \
2603 $(TELEPATHY_CFLAGS) \
2606 $(call gb_LinkTarget_add_libs,$(1),\
2607 $(TELEPATHY_LIBS) \
2610 endef
2612 else # !ENABLE_TELEPATHY
2614 gb_LinkTarget__use_telepathy :=
2616 endif # ENABLE_TELEPATHY
2618 ifneq ($(SYSTEM_LIBPNG),)
2620 define gb_LinkTarget__use_png
2621 $(call gb_LinkTarget_set_include,$(1),\
2622 $$(INCLUDE) \
2623 $(LIBPNG_CFLAGS) \
2626 $(call gb_LinkTarget_add_libs,$(1),\
2627 $(LIBPNG_LIBS) \
2630 endef
2632 gb_ExternalProject__use_png :=
2634 else # !SYSTEM_LIBPNG
2636 define gb_LinkTarget__use_png
2637 $(call gb_LinkTarget_set_include,$(1),\
2638 $(LIBPNG_CFLAGS) \
2639 $$(INCLUDE) \
2641 $(call gb_LinkTarget_use_static_libraries,$(1),\
2642 png \
2644 $(call gb_LinkTarget__use_zlib,$(1))
2646 endef
2648 define gb_ExternalProject__use_png
2649 $(call gb_ExternalProject_use_static_libraries,$(1),\
2650 png \
2653 endef
2655 endif # !SYSTEM_LIBPNG
2658 ifneq ($(SYSTEM_CURL),)
2660 define gb_LinkTarget__use_curl
2661 $(call gb_LinkTarget_add_defs,$(1),\
2662 -DSYSTEM_CURL \
2664 $(call gb_LinkTarget_set_include,$(1),\
2665 $$(INCLUDE) \
2666 $(CURL_CFLAGS) \
2668 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2670 endef
2672 else # !SYSTEM_CURL
2674 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2675 curl \
2678 define gb_LinkTarget__use_curl
2679 $(call gb_LinkTarget_use_package,$(1),curl)
2680 $(call gb_LinkTarget_set_include,$(1),\
2681 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2682 $$(INCLUDE) \
2685 ifeq ($(COM),MSC)
2686 $(call gb_LinkTarget_add_libs,$(1),\
2687 $(call gb_UnpackedTarball_get_dir,curl)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
2689 else
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2693 endif
2695 endef
2697 endif # SYSTEM_CURL
2699 ifeq ($(ENABLE_VALGRIND),TRUE)
2701 define gb_LinkTarget__use_valgrind
2702 $(call gb_LinkTarget_add_defs,$(1),\
2703 -DHAVE_VALGRIND_HEADERS \
2706 $(call gb_LinkTarget_set_include,$(1),\
2707 $$(INCLUDE) \
2708 $(VALGRIND_CFLAGS) \
2711 endef
2713 else # !ENABLE_VALGRIND
2715 define gb_LinkTarget__use_valgrind
2717 endef
2719 endif # ENABLE_VALGRIND
2721 ifneq ($(SYSTEM_POPPLER),)
2723 define gb_LinkTarget__use_poppler
2724 $(call gb_LinkTarget_set_include,$(1),\
2725 $(POPPLER_CFLAGS) \
2726 $$(INCLUDE) \
2729 $(call gb_LinkTarget_add_libs,$(1),\
2730 $(POPPLER_LIBS) \
2733 endef
2735 else # !SYSTEM_POPPLER
2737 define gb_LinkTarget__use_poppler
2738 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2740 $(call gb_LinkTarget_set_include,$(1),\
2741 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2742 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2743 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2744 $$(INCLUDE) \
2747 $(call gb_LinkTarget_add_libs,$(1),\
2748 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2749 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2750 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2753 $(call gb_LinkTarget_use_external,$(1),jpeg)
2755 ifeq ($(OS),MACOSX)
2756 $(call gb_LinkTarget_add_libs,$(1),\
2757 -lobjc \
2759 else ifeq ($(OS),LINUX)
2760 $(call gb_LinkTarget_add_libs,$(1),\
2761 -pthread \
2763 else ifeq ($(OS),WNT)
2764 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2765 advapi32 \
2766 gdi32 \
2768 endif
2770 endef
2772 endif # SYSTEM_POPPLER
2775 ifneq ($(SYSTEM_CLUCENE),)
2777 define gb_LinkTarget__use_clucene
2778 $(call gb_LinkTarget_add_defs,$(1),\
2779 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2782 $(call gb_LinkTarget_set_include,$(1),\
2783 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2784 $$(INCLUDE) \
2787 $(call gb_LinkTarget_add_libs,$(1),\
2788 $(CLUCENE_LIBS) \
2791 endef
2793 else # !SYSTEM_CLUCENE
2795 define gb_LinkTarget__use_clucene
2796 $(call gb_LinkTarget_set_include,$(1),\
2797 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2798 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2799 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2800 $$(INCLUDE) \
2803 $(call gb_LinkTarget_use_libraries,$(1),\
2804 clucene \
2807 endef
2809 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2810 clucene \
2813 endif # SYSTEM_CLUCENE
2815 define gb_LinkTarget__use_gobject
2816 $(call gb_LinkTarget_add_libs,$(1),\
2817 $(GOBJECT_LIBS) \
2820 $(call gb_LinkTarget_set_include,$(1),\
2821 $$(INCLUDE) \
2822 $(GOBJECT_CFLAGS) \
2824 endef
2826 ifneq ($(SYSTEM_HSQLDB),)
2828 define gb_LinkTarget__use_hsqldb
2830 $(call gb_LinkTarget_add_defs,$(1),\
2831 -DSYSTEM_HSQLDB \
2832 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2835 endef
2837 else # !SYSTEM_HSQLDB
2839 define gb_LinkTarget__use_hsqldb
2841 endef
2843 endif # SYSTEM_HSQLDB
2846 ifneq ($(SYSTEM_OPENLDAP),)
2848 define gb_LinkTarget__use_openldap
2850 $(call gb_LinkTarget_add_libs,$(1),\
2851 -lldap \
2852 -llber \
2855 endef
2857 gb_ExternalProject__use_openldap :=
2859 else # !SYSTEM_OPENLDAP
2861 define gb_LinkTarget__use_openldap
2862 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2863 $(call gb_LinkTarget_set_include,$(1),\
2864 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2865 $$(INCLUDE) \
2867 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2868 $(call gb_LinkTarget_add_libs,$(1), \
2869 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2870 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2873 endef
2875 define gb_ExternalProject__use_openldap
2876 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2878 endef
2880 endif # SYSTEM_OPENLDAP
2882 ifneq ($(SYSTEM_LIBTOMMATH),)
2884 define gb_LinkTarget__use_libtommath
2885 $(call gb_LinkTarget_set_include,$(1),\
2886 $(LIBTOMMATH_CFLAGS) \
2887 $$(INCLUDE) \
2889 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2891 endef
2893 else # !SYSTEM_LIBTOMMATH
2894 define gb_LinkTarget__use_libtommath
2895 $(call gb_LinkTarget_set_include,$(1),\
2896 -I${WORKDIR}/UnpackedTarball/libtommath \
2897 $$(INCLUDE) \
2899 $(call gb_LinkTarget_add_libs,$(1),\
2900 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2902 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2904 endef
2906 endif # SYSTEM_LIBTOMMATH
2908 define gb_ExternalProject__use_libtommath
2909 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2911 endef
2913 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2915 ifneq ($(SYSTEM_FIREBIRD),)
2917 define gb_LinkTarget__use_libfbembed
2918 $(call gb_LinkTarget_set_include,$(1),\
2919 $(FIREBIRD_CFLAGS) \
2920 $$(INCLUDE) \
2922 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2924 endef
2926 else # !SYSTEM_FIREBIRD
2928 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2929 firebird \
2932 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2933 #$(call gb_LinkTarget__use_libtommath,$(1))
2935 define gb_LinkTarget__use_libfbembed
2936 $(call gb_LinkTarget_use_package,$(1),firebird)
2937 $(call gb_LinkTarget_set_include,$(1),\
2938 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2939 $$(INCLUDE) \
2941 ifeq ($(COM),MSC)
2942 $(call gb_LinkTarget_add_libs,$(1),\
2943 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2945 else
2946 $(call gb_LinkTarget_add_libs,$(1),\
2947 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2949 endif
2951 endef
2954 # endef
2956 endif # SYSTEM_FIREBIRD
2958 else # !ENABLE_FIREBIRD_SDBC
2960 gb_LinkTarget__use_firebird :=
2961 # gb_LinkTarget__use_atomic_ops :=
2962 # gb_LinkTarget__use_libtommath :=
2964 endif # ENABLE_FIREBIRD_SDBC
2967 ifneq ($(SYSTEM_POSTGRESQL),)
2969 define gb_LinkTarget__use_postgresql
2971 $(call gb_LinkTarget_set_include,$(1),\
2972 $(POSTGRESQL_INC) \
2973 $$(INCLUDE) \
2976 $(call gb_LinkTarget_add_libs,$(1),\
2977 -lpq \
2980 $(call gb_LinkTarget_add_ldflags,$(1),\
2981 $(POSTGRESQL_LIB) \
2984 endef
2986 else # !SYSTEM_POSTGRESQL
2988 define gb_LinkTarget__use_postgresql
2990 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2992 $(call gb_LinkTarget_set_include,$(1),\
2993 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2994 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2995 $$(INCLUDE) \
2998 $(call gb_LinkTarget_add_libs,$(1),\
2999 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3002 ifeq ($(OS)$(COM),WNTMSC)
3003 $(call gb_LinkTarget_use_external,$(1),openssl)
3005 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3006 secur32 \
3007 ws2_32 \
3010 endif
3012 endef
3014 endif # SYSTEM_POSTGRESQL
3016 ifeq ($(ENABLE_KDE4),TRUE)
3018 define gb_LinkTarget__use_kde4
3019 $(call gb_LinkTarget_set_include,$(1),\
3020 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3021 $$(INCLUDE) \
3024 $(call gb_LinkTarget_add_defs,$(1),\
3025 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3028 $(call gb_LinkTarget_add_libs,$(1),\
3029 $(KDE4_LIBS) \
3032 endef
3034 else # !ENABLE_KDE4
3036 define gb_LinkTarget__use_kde4
3038 endef
3040 endif # ENABLE_KDE4
3043 ifeq ($(ENABLE_TDE),TRUE)
3045 define gb_LinkTarget__use_tde
3046 $(call gb_LinkTarget_add_libs,$(1),\
3047 $(TDE_LIBS) \
3050 $(call gb_LinkTarget_set_include,$(1),\
3051 $$(INCLUDE) \
3052 $(TDE_CFLAGS) \
3054 endef
3056 else # ! ENABLE_TDE
3058 define gb_LinkTarget__use_tde
3060 endef
3062 endif # ENABLE_TDE
3065 # PYTHON
3066 # extra python_headers external because pyuno wrapper must not link python
3067 ifneq ($(SYSTEM_PYTHON),)
3069 define gb_LinkTarget__use_python_headers
3070 $(call gb_LinkTarget_add_defs,$(1),\
3071 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3074 $(call gb_LinkTarget_set_include,$(1),\
3075 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3076 $$(INCLUDE) \
3079 endef
3081 define gb_LinkTarget__use_python
3082 $(call gb_LinkTarget__use_python_headers,$(1))
3084 $(call gb_LinkTarget_add_libs,$(1),\
3085 $(PYTHON_LIBS) \
3088 endef
3090 else # !SYSTEM_PYTHON
3092 $(eval $(call gb_Helper_register_packages_for_install,python,\
3093 python3 \
3096 define gb_LinkTarget__use_python_headers
3097 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3098 $(call gb_LinkTarget_set_include,$(1),\
3099 -I$(call gb_UnpackedTarball_get_dir,python3) \
3100 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3101 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3102 $$(INCLUDE) \
3105 endef
3107 define gb_LinkTarget__use_python
3108 $(call gb_LinkTarget__use_python_headers,$(1))
3109 ifeq ($(OS),MACOSX)
3110 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3111 else
3112 $(call gb_LinkTarget_use_package,$(1),python3)
3113 endif
3115 ifeq ($(OS),WNT)
3116 $(call gb_LinkTarget_add_libs,$(1),\
3117 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)$(if $(filter 140-INTEL,$(VCVER)-$(CPUNAME)),/win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3119 else ifeq ($(OS),MACOSX)
3120 $(call gb_LinkTarget_add_libs,$(1),\
3121 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3123 else
3124 $(call gb_LinkTarget_add_libs,$(1),\
3125 -L$(call gb_UnpackedTarball_get_dir,python3) \
3126 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3128 endif
3130 endef
3132 endif # SYSTEM_PYTHON
3134 # ORCUS
3135 ifneq ($(SYSTEM_LIBORCUS),)
3137 define gb_LinkTarget__use_orcus
3138 $(call gb_LinkTarget_set_include,$(1),\
3139 $$(INCLUDE) \
3140 $(ORCUS_CFLAGS) \
3142 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3143 endef
3145 define gb_LinkTarget__use_orcus-parser
3147 endef
3149 else # !SYSTEM_LIBORCUS
3151 ifeq ($(COM),MSC)
3153 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3154 orcus \
3155 orcus-parser \
3158 define gb_LinkTarget__use_orcus
3159 $(call gb_LinkTarget_set_include,$(1),\
3160 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3161 $$(INCLUDE) \
3164 $(call gb_LinkTarget_use_libraries,$(1),\
3165 orcus \
3168 endef
3170 define gb_LinkTarget__use_orcus-parser
3171 $(call gb_LinkTarget_set_include,$(1),\
3172 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3173 $$(INCLUDE) \
3176 $(call gb_LinkTarget_use_libraries,$(1),\
3177 orcus-parser \
3180 endef
3182 else # !MSC
3184 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3185 liborcus \
3188 define gb_LinkTarget__use_orcus
3189 $(call gb_LinkTarget_use_package,$(1),liborcus)
3191 $(call gb_LinkTarget_set_include,$(1),\
3192 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3193 $$(INCLUDE) \
3196 $(call gb_LinkTarget_add_libs,$(1),\
3197 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.12 \
3200 $(if $(SYSTEM_BOOST), \
3201 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3202 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3205 endef
3207 define gb_LinkTarget__use_orcus-parser
3208 $(call gb_LinkTarget_use_package,$(1),liborcus)
3210 $(call gb_LinkTarget_set_include,$(1),\
3211 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3212 $$(INCLUDE) \
3215 $(call gb_LinkTarget_add_libs,$(1),\
3216 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.12 \
3219 endef
3221 endif # MSC
3223 endif # SYSTEM_LIBORCUS
3225 ifeq ($(ENABLE_EOT),TRUE)
3227 ifneq ($(SYSTEM_LIBEOT),)
3229 define gb_LinkTarget__use_libeot
3230 $(call gb_LinkTarget_set_include,$(1),\
3231 $$(INCLUDE) \
3232 $(LIBEOT_CFLAGS) \
3234 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3236 endef
3238 gb_ExternalProject__use_libeot :=
3240 else # !SYSTEM_LIBEOT
3242 define gb_LinkTarget__use_libeot
3243 $(call gb_LinkTarget_set_include,$(1),\
3244 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3245 $$(INCLUDE) \
3247 $(call gb_LinkTarget_add_libs,$(1),\
3248 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3250 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3252 endef
3254 define gb_ExternalProject__use_libeot
3255 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3257 endef
3259 endif # SYSTEM_LIBEOT
3261 else # !ENABLE_EOT
3263 gb_LinkTarget__use_libeot :=
3264 gb_ExternalProject__use_libeot :=
3266 endif # ENABLE_EOT
3268 ### X11 stuff ###
3270 ifeq ($(USING_X11), TRUE)
3272 define gb_LinkTarget__use_Xrandr
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 $$(INCLUDE) \
3275 $(XRANDR_CFLAGS) \
3278 $(call gb_LinkTarget_add_libs,$(1),\
3279 $(XRANDR_LIBS) \
3281 endef
3283 define gb_LinkTarget__use_Xrender
3284 $(call gb_LinkTarget_set_include,$(1),\
3285 $$(INCLUDE) \
3286 $(XRENDER_CFLAGS) \
3289 $(call gb_LinkTarget_add_libs,$(1),\
3290 $(XRENDER_LIBS) \
3292 endef
3294 endif # USING_X11
3297 gb_ExternalProject__use_nss3:=
3299 ifeq ($(OS),ANDROID)
3301 gb_LinkTarget__use_nss3:=
3302 gb_LinkTarget__use_plc4:=
3304 else
3306 ifneq ($(SYSTEM_NSS),)
3308 define gb_LinkTarget__use_nss3
3309 $(call gb_LinkTarget_add_defs,$(1),\
3310 -DSYSTEM_NSS \
3313 $(call gb_LinkTarget_set_include,$(1),\
3314 $$(INCLUDE) \
3315 $(NSS_CFLAGS) \
3318 $(call gb_LinkTarget_add_libs,$(1),\
3319 $(NSS_LIBS) \
3322 endef
3324 define gb_LinkTarget__use_plc4
3325 $(call gb_LinkTarget__use_nss3,$(1))
3327 endef
3329 define gb_LinkTarget__use_ssl3
3330 $(call gb_LinkTarget__use_nss3,$(1))
3332 endef
3334 else # !SYSTEM_NSS
3336 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3337 nss \
3340 define gb_LinkTarget__use_nss3
3341 $(call gb_LinkTarget_use_package,$(1),nss)
3342 $(call gb_LinkTarget_set_include,$(1),\
3343 $$(INCLUDE) \
3344 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3345 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3348 ifeq ($(COM),MSC)
3349 $(call gb_LinkTarget_add_libs,$(1),\
3350 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3351 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3352 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3354 else
3355 $(call gb_LinkTarget_add_libs,$(1),\
3356 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3357 -lnspr4 \
3358 -lnss3 \
3359 -lsmime3 \
3361 endif
3363 endef
3365 define gb_LinkTarget__use_plc4
3366 $(call gb_LinkTarget_use_package,$(1),nss)
3367 ifeq ($(COM),MSC)
3368 $(call gb_LinkTarget_add_libs,$(1),\
3369 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3371 else
3372 $(call gb_LinkTarget_add_libs,$(1),\
3373 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3375 endif
3377 endef
3379 define gb_LinkTarget__use_ssl3
3380 $(call gb_LinkTarget_use_package,$(1),nss)
3381 ifeq ($(COM),MSC)
3382 $(call gb_LinkTarget_add_libs,$(1),\
3383 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3385 else
3386 $(call gb_LinkTarget_add_libs,$(1),\
3387 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3389 endif
3391 endef
3393 define gb_ExternalProject__use_nss3
3394 $(call gb_ExternalProject_use_package,$(1),nss)
3396 endef
3398 endif # SYSTEM_NSS
3400 endif # DESKTOP
3402 ifeq ($(ENABLE_BREAKPAD),TRUE)
3404 define gb_LinkTarget__use_breakpad
3405 $(call gb_LinkTarget_set_include,$(1),\
3406 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3407 $$(INCLUDE) \
3410 ifeq ($(COM),MSC)
3411 $(call gb_LinkTarget_use_static_libraries,$(1),\
3412 breakpad \
3414 else
3415 $(call gb_LinkTarget_add_libs,$(1),\
3416 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3418 endif
3420 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3422 endef
3424 endif # ENABLE_BREAKPAD
3426 ifeq ($(ENABLE_GLTF),TRUE)
3428 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3430 define gb_LinkTarget__use_libgltf
3431 $(call gb_LinkTarget_set_include,$(1),\
3432 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3433 $$(INCLUDE) \
3436 ifeq ($(COM),MSC)
3437 $(call gb_LinkTarget_add_libs,$(1),\
3438 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3440 else
3441 $(call gb_LinkTarget_add_libs,$(1),\
3442 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.1$(gb_StaticLibrary_PLAINEXT) \
3444 endif
3446 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3448 endef
3450 else # SYSTEM_LIBGLTF
3452 define gb_LinkTarget__use_libgltf
3453 $(call gb_LinkTarget_set_include,$(1),\
3454 $$(INCLUDE) \
3455 $(LIBGLTF_CFLAGS) \
3457 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3459 endef
3461 endif # SYSTEM_LIBGLTF
3463 ifeq ($(ENABLE_COLLADA),TRUE)
3465 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3467 define gb_LinkTarget__use_opencollada_parser
3468 $(call gb_LinkTarget_set_include,$(1),\
3469 $$(INCLUDE) \
3470 $(OPENCOLLADA_CFLAGS) \
3473 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3475 endef
3477 else # !SYSTEM_OPENCOLLADA
3479 define gb_LinkTarget__use_opencollada_parser
3480 $(call gb_LinkTarget_set_include,$(1),\
3481 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3482 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3483 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3484 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3485 $$(INCLUDE) \
3488 $(call gb_LinkTarget_use_static_libraries,$(1),\
3489 opencollada_parser \
3491 endef
3493 endif # SYSTEM_OPENCOLLADA
3495 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3497 define gb_LinkTarget__use_collada2gltf
3498 $(call gb_LinkTarget_set_include,$(1),\
3499 $$(INCLUDE) \
3500 $(COLLADA2GLTF_CFLAGS) \
3503 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3505 endef
3507 else # !SYSTEM_COLLADA2GLTF
3509 define gb_LinkTarget__use_collada2gltf
3510 $(call gb_LinkTarget_set_include,$(1),\
3511 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3512 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3513 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3514 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3515 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3516 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3517 $$(INCLUDE) \
3520 $(call gb_LinkTarget_use_static_libraries,$(1),\
3521 collada2gltf \
3523 endef
3525 endif # SYSTEM_COLLADA2GLTF
3527 endif # ENABLE_COLLADA
3529 endif # ENABLE_GLTF
3531 define gb_LinkTarget__use_dconf
3532 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3533 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3534 endef
3536 ### Jars ############################################################
3538 ifneq ($(SYSTEM_HSQLDB),)
3540 define gb_Jar__use_hsqldb
3541 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3542 endef
3543 define gb_JunitTest__use_hsqldb
3544 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3545 endef
3547 else # !SYSTEM_HSQLDB
3549 ifeq ($(ENABLE_JAVA),TRUE)
3550 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3551 hsqldb \
3553 endif
3555 define gb_Jar__use_hsqldb
3556 $(call gb_Jar_use_jar,$(1),hsqldb)
3557 endef
3558 define gb_JunitTest__use_hsqldb
3559 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3560 endef
3562 endif # SYSTEM_HSQLDB
3565 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3567 ifneq ($(SYSTEM_BSH),)
3569 define gb_Jar__use_bsh
3570 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3571 endef
3573 else # !SYSTEM_BSH
3575 ifeq ($(ENABLE_JAVA),TRUE)
3576 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3577 bsh \
3579 endif
3581 define gb_Jar__use_bsh
3582 $(call gb_Jar_use_jar,$(1),bsh)
3583 endef
3585 endif # SYSTEM_BSH
3587 endif
3589 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3591 ifneq ($(SYSTEM_RHINO),)
3593 define gb_Jar__use_rhino
3594 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3595 endef
3597 else # !SYSTEM_RHINO
3599 ifeq ($(ENABLE_JAVA),TRUE)
3600 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3601 js \
3603 endif
3605 define gb_Jar__use_rhino
3606 $(call gb_Jar_use_jar,$(1),js)
3607 endef
3609 endif # SYSTEM_RHINO
3611 endif
3613 ifneq ($(SYSTEM_APACHE_COMMONS),)
3615 define gb_Jar__use_commons-logging
3616 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3617 endef
3618 gb_ExternalProject__use_commons-logging :=
3620 else # !SYSTEM_APACHE_COMMONS
3622 ifeq ($(ENABLE_JAVA),TRUE)
3623 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3624 commons-logging-$(COMMONS_LOGGING_VERSION) \
3626 endif
3628 define gb_Jar__use_commons-logging
3629 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3630 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3631 endef
3632 define gb_ExternalProject__use_commons-logging
3633 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3634 endef
3636 endif # SYSTEM_APACHE_COMMONS
3639 ifneq ($(SYSTEM_JFREEREPORT),)
3641 define gb_Jar__use_flow-engine
3642 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3643 endef
3645 define gb_Jar__use_flute
3646 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3647 endef
3649 define gb_Jar__use_libbase
3650 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3651 endef
3653 define gb_Jar__use_libfonts
3654 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3655 endef
3657 define gb_Jar__use_libformula
3658 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3659 endef
3661 define gb_Jar__use_liblayout
3662 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3663 endef
3665 define gb_Jar__use_libloader
3666 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3667 endef
3669 define gb_Jar__use_librepository
3670 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3671 endef
3673 define gb_Jar__use_libserializer
3674 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3675 endef
3677 define gb_Jar__use_libxml
3678 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3679 endef
3681 define gb_Jar__use_sac
3682 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3683 endef
3685 else # !SYSTEM_JFREEREPORT
3687 ifeq ($(ENABLE_JAVA),TRUE)
3688 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3689 flow-engine \
3690 flute-1.1.6 \
3691 libbase-1.1.6 \
3692 libfonts-1.1.6 \
3693 libformula-1.1.7 \
3694 liblayout \
3695 libloader-1.1.6 \
3696 librepository-1.1.6 \
3697 libserializer-1.1.6 \
3698 libxml-1.1.7 \
3699 sac \
3701 endif
3703 define gb_Jar__use_flow-engine
3704 $(call gb_Jar_use_jar,$(1),flow-engine)
3705 endef
3707 define gb_Jar__use_flute
3708 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3709 endef
3711 define gb_Jar__use_libbase
3712 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3713 endef
3715 define gb_Jar__use_libfonts
3716 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3717 endef
3719 define gb_Jar__use_libformula
3720 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3721 endef
3723 define gb_Jar__use_liblayout
3724 $(call gb_Jar_use_jar,$(1),liblayout)
3725 endef
3727 define gb_Jar__use_libloader
3728 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3729 endef
3731 define gb_Jar__use_librepository
3732 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3733 endef
3735 define gb_Jar__use_libserializer
3736 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3737 endef
3739 define gb_Jar__use_libxml
3740 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3741 endef
3743 define gb_Jar__use_sac
3744 $(call gb_Jar_use_jar,$(1),sac)
3745 endef
3747 endif # SYSTEM_JFREEREPORT
3750 # Executables
3752 # FIXME: the library target should be for build too
3753 define gb_Executable__register_bestreversemap
3754 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3755 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3757 endef
3759 # TODO depending on the whole URE might be overkill, but I do not have a
3760 # Windows machine to debug it...
3761 # FIXME: the library target should be for build too
3762 define gb_Executable__register_climaker
3763 $(call gb_Executable_add_runtime_dependencies,climaker,\
3764 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3765 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3766 $(call gb_UnoApi_get_target,udkapi) \
3767 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3769 endef
3771 define gb_Executable__register_cppumaker
3772 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3773 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3775 endef
3777 # This is used to determine what we need for 'build' platform.
3778 # FIXME: the library target should be for build too
3779 define gb_Executable__register_gengal
3780 $(call gb_Executable_add_runtime_dependencies,gengal,\
3781 $(call gb_AllLangResTarget_get_target,ofa) \
3782 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3783 $(call gb_Package_get_target_for_build,postprocess_images) \
3784 $(call gb_Package_get_target_for_build,postprocess_registry) \
3785 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3786 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3787 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3788 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3789 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3790 $(call gb_UnoApi_get_target,offapi) \
3791 $(call gb_UnoApi_get_target,udkapi) \
3793 endef
3795 ifeq ($(SYSTEM_ICU),)
3797 define gb_Executable__register_gendict
3798 $(call gb_Executable_add_runtime_dependencies,gendict,\
3799 $(call gb_Package_get_target_for_build,icu) \
3800 $(call gb_Package_get_target_for_build,icu_ure) \
3802 endef
3804 endif
3806 define gb_Executable__register_idlc
3807 $(call gb_Executable_add_runtime_dependencies,idlc,\
3808 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3810 endef
3812 define gb_Executable__register_localize
3813 $(call gb_Executable_add_runtime_dependencies,localize,\
3814 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3815 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3818 endef
3820 # FIXME ure/services.rdb needs cleanup
3821 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3822 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3823 # FIXME: the library target should be for build too
3824 define gb_Executable__register_saxparser
3825 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3826 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3827 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3828 $(call gb_Rdb_get_target_for_build,saxparser) \
3829 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3830 $(call gb_UnoApi_get_target,udkapi) \
3832 endef
3834 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3835 # required due to the settings for URE_SERVICES and URE_TYPES in
3836 # cppuhelper/source/unorc
3837 # FIXME: the library target should be for build too
3838 define gb_Executable__register_uno
3839 $(call gb_Executable_add_runtime_dependencies,uno,\
3840 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3841 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3842 $(call gb_UnoApi_get_target,udkapi) \
3844 endef
3847 # External executables
3849 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3851 gb_ExternalExecutable__register_xmllint :=
3853 else # ! SYSTEM_LIBXML_FOR_BUILD
3855 define gb_ExternalExecutable__register_xmllint
3856 $(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),xml2)
3857 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3858 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3859 $(call gb_Package_get_target,xml2) \
3862 endef
3864 endif # SYSTEM_LIBXML_FOR_BUILD
3866 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3868 gb_ExternalExecutable__register_xsltproc :=
3870 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3872 define gb_ExternalExecutable__register_xsltproc
3873 $(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt)
3874 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3875 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3876 $(call gb_Package_get_target,xml2) \
3877 $(call gb_Package_get_target,xslt) \
3880 endef
3882 endif # SYSTEM_LIBXSLT_FOR_BUILD
3884 ifneq (,$(SYSTEM_UCPP))
3886 gb_ExternalExecutable__register_ucpp :=
3888 else # ! SYSTEM_UCPP
3890 define gb_ExternalExecutable__register_ucpp
3891 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3893 endef
3895 endif # SYSTEM_UCPP
3897 ifeq (,$(PYTHON_FOR_BUILD))
3899 define gb_ExternalExecutable__register_python
3900 ifeq ($(OS),MACOSX)
3902 # use set_external, to avoid having the command added as prerequisite for the
3903 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3904 # matching rule to build that specific file)
3905 $(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))
3906 # the Zip ensures that internal python has been built (cannot use the Package
3907 # target, as that is not used on Mac)
3908 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3910 else
3912 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3913 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3914 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3916 endif
3918 endef
3920 else
3922 define gb_ExternalExecutable__register_python
3923 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3925 endef
3927 endif # PYTHON_FOR_BUILD
3929 ifneq ($(SYSTEM_GENBRK),)
3931 define gb_ExternalExecutable__register_genbrk
3932 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3934 endef
3936 else # ! SYSTEM_GENBRK
3938 define gb_ExternalExecutable__register_genbrk
3939 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3940 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3941 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3942 $(call gb_Package_get_target_for_build,icu) \
3943 $(call gb_Package_get_target_for_build,icu_ure) \
3946 endef
3948 endif
3950 ifneq ($(SYSTEM_GENCCODE),)
3952 define gb_ExternalExecutable__register_genccode
3953 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3955 endef
3957 else # ! SYSTEM_GENCCODE
3959 define gb_ExternalExecutable__register_genccode
3960 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3961 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3962 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3963 $(call gb_Package_get_target_for_build,icu) \
3964 $(call gb_Package_get_target_for_build,icu_ure) \
3967 endef
3969 endif
3971 ifneq ($(SYSTEM_GENCMN),)
3973 define gb_ExternalExecutable__register_gencmn
3974 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3976 endef
3978 else # ! SYSTEM_GENCMN
3980 define gb_ExternalExecutable__register_gencmn
3981 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3982 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3983 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3984 $(call gb_Package_get_target_for_build,icu) \
3985 $(call gb_Package_get_target_for_build,icu_ure) \
3988 endef
3990 endif
3992 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3994 $(eval $(call gb_Helper_register_jars,OXT,\
3995 owncloud-android-library \
3998 define gb_Jar__use_owncloud_android_lib
3999 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4000 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4001 endef
4002 define gb_ExternalProject__use_owncloud_android_lib
4003 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4004 endef
4006 endif
4008 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4009 ifneq ($(SYSTEM_BZIP2),)
4011 define gb_LinkTarget__use_bzip2
4012 $(call gb_LinkTarget_set_include,$(1),\
4013 $(BZIP2_CFLAGS) \
4014 $$(INCLUDE) \
4016 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4018 endef
4020 gb_ExternalProject__use_bzip2 :=
4022 else # !SYSTEM_BZIP2
4024 define gb_LinkTarget__use_bzip2
4025 $(call gb_LinkTarget_set_include,$(1),\
4026 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4027 $$(INCLUDE) \
4030 ifeq ($(COM),MSC)
4031 $(call gb_LinkTarget_add_libs,$(1),\
4032 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4034 else
4035 $(call gb_LinkTarget_add_libs,$(1),\
4036 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4038 endif
4040 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4041 endef
4043 define gb_ExternalProject__use_bzip2
4044 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4045 endef
4047 endif
4048 endif
4050 define gb_LinkTarget__use_clew
4051 $(call gb_LinkTarget_set_include,$(1), \
4052 -I$(SRCDIR)/external/clew/source/include \
4053 $$(INCLUDE) \
4055 $(call gb_LinkTarget_use_libraries,$(1),clew)
4056 endef
4058 # vim: set noet sw=4 ts=4: