bump gradle/gradle-plugin to instant-run compatible versions
[LibreOffice.git] / RepositoryExternal.mk
blobb52927a10a6dc6fccc8445735c895cdd3364fff3
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_GLEW),)
188 define gb_LinkTarget__use_glew
189 $(call gb_LinkTarget_set_include,$(1),\
190 $$(INCLUDE) \
191 $(GLEW_CFLAGS) \
193 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
195 endef
197 gb_ExternalProject__use_glew :=
199 else # !SYSTEM_GLEW
201 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
202 glew \
205 define gb_LinkTarget__use_glew
206 $(call gb_LinkTarget_use_package,$(1),glew)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
209 -DGLEW_NO_GLU \
210 $$(INCLUDE) \
213 ifeq ($(COM),MSC)
214 $(call gb_LinkTarget_add_libs,$(1),\
215 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/$(wnt_arch_subdir_mandatory)/glew32d.lib,Release/$(wnt_arch_subdir_mandatory)/glew32.lib) \
217 else
218 $(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
221 endif
223 endef
225 define gb_ExternalProject__use_glew
226 $(call gb_ExternalProject_use_external_project,$(1),glew)
228 endef
230 endif # SYSTEM_GLEW
232 ifneq ($(SYSTEM_GLYPHY),)
234 define gb_LinkTarget__use_glyphy
235 $(call gb_LinkTarget_set_include,$(1),\
236 $$(INCLUDE) \
237 $(GLYPHY_CFLAGS) \
239 $(call gb_LinkTarget_add_libs,$(1),$(GLYPHY_LIBS))
241 endef
242 else # !SYSTEM_GLYPHY
244 $(eval $(call gb_Helper_optional,GLYPHY,$(call gb_Helper_register_packages_for_install,ooo,\
245 glyphy \
248 define gb_LinkTarget__use_glyphy
249 $(call gb_LinkTarget_use_package,$(1),glyphy)
251 $(call gb_LinkTarget_set_include,$(1),\
252 -I$(call gb_UnpackedTarball_get_dir,glyphy/src) \
253 $$(INCLUDE) \
256 ifeq ($(COM),MSC)
257 $(call gb_LinkTarget_add_libs,$(1),\
258 $(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs/libglyphy.lib \
260 else
261 $(call gb_LinkTarget_add_libs,$(1),\
262 -L$(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs -lglyphy \
264 endif
266 endef
268 endif # SYSTEM_GLYPHY
270 define gb_LinkTarget__use_iconv
271 $(call gb_LinkTarget_add_libs,$(1),-liconv)
273 endef
275 ifneq ($(SYSTEM_MARIADB),)
277 define gb_LinkTarget__use_mariadb
278 $(call gb_LinkTarget_set_include,$(1),\
279 $$(INCLUDE) \
280 $(MARIADB_CFLAGS) \
282 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
284 endef
285 gb_ExternalProject__use_mariadb :=
287 else # !SYSTEM_MARIADB
289 define gb_LinkTarget__use_mariadb
290 $(call gb_LinkTarget_set_include,$(1),\
291 $$(INCLUDE) \
292 $(MARIADB_CFLAGS) \
294 $(call gb_LinkTarget_use_static_libraries,$(1),\
295 mariadblib \
298 endef
299 define gb_ExternalProject__use_mariadb
300 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
302 endef
304 endif # SYSTEM_MARIADB
307 ifneq ($(SYSTEM_MARIADB),)
309 define gb_LinkTarget__use_mysql
311 $(call gb_LinkTarget_add_defs,$(1),\
312 -DSYSTEM_MARIADB \
315 $(call gb_LinkTarget_add_libs,$(1),\
316 $(MARIADB_LIBS) \
319 $(call gb_LinkTarget_set_include,$(1),\
320 $(MARIADB_CFLAGS) \
321 $$(INCLUDE) \
323 endef
325 else
327 define gb_LinkTarget__use_mysql
329 $(call gb_LinkTarget_set_include,$(1),\
330 $$(INCLUDE) \
333 endef
335 endif
337 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
339 define gb_LinkTarget__use_mysqlcppconn
340 $(call gb_LinkTarget_add_libs,$(1),\
341 -lmysqlcppconn \
344 $(call gb_LinkTarget_add_defs,$(1),\
345 -DSYSTEM_MYSQL_CPPCONN \
347 endef
349 else
351 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
352 mysqlcppconn \
355 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
356 define gb_LinkTarget__use_mysqlcppconn
358 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
360 $(call gb_LinkTarget_add_defs,$(1),\
361 -DCPPCONN_LIB_BUILD \
364 $(call gb_LinkTarget_set_include,$(1),\
365 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
366 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
367 $$(INCLUDE) \
370 endef
372 endif
374 ifneq ($(SYSTEM_ZLIB),)
376 define gb_LinkTarget__use_zlib
377 $(call gb_LinkTarget_add_defs,$(1),\
378 -DSYSTEM_ZLIB \
380 $(call gb_LinkTarget_add_libs,$(1),-lz)
382 endef
384 # nothing on system
385 define gb_LinkTarget__use_zlib_x64
387 endef
389 gb_ExternalProject__use_zlib :=
391 else # !SYSTEM_ZLIB
393 define gb_LinkTarget__use_zlib_multiarch
394 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
396 $(call gb_LinkTarget_set_include,$(1),\
397 $(ZLIB_CFLAGS) \
398 $$(INCLUDE) \
401 $(call gb_LinkTarget_use_static_libraries,$(1),\
402 $(2) \
405 endef
407 define gb_LinkTarget__use_zlib
408 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
410 endef
412 define gb_LinkTarget__use_zlib_x64
413 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
415 endef
417 define gb_ExternalProject__use_zlib
418 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
420 endef
422 endif # SYSTEM_ZLIB
425 ifneq ($(SYSTEM_JPEG),)
427 define gb_LinkTarget__use_jpeg
428 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
429 $(call gb_LinkTarget_set_ldflags,$(1),\
430 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
433 endef
435 gb_ExternalProject__use_jpeg :=
437 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
439 define gb_LinkTarget__use_jpeg
440 $(call gb_LinkTarget_set_include,$(1),\
441 $(LIBJPEG_CFLAGS) \
442 $$(INCLUDE) \
444 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
445 $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
447 endef
449 define gb_ExternalProject__use_jpeg
450 $(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
452 endef
454 else # !SYSTEM_JPEG
456 define gb_LinkTarget__use_jpeg
457 $(call gb_LinkTarget_set_include,$(1),\
458 $(LIBJPEG_CFLAGS) \
459 $$(INCLUDE) \
462 $(call gb_LinkTarget_use_static_libraries,$(1),\
463 jpeg \
466 endef
468 define gb_ExternalProject__use_jpeg
469 $(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
471 endef
473 endif # SYSTEM_JPEG
475 ifneq ($(SYSTEM_MYTHES),)
477 define gb_LinkTarget__use_mythes
478 $(call gb_LinkTarget_set_include,$(1),\
479 $$(INCLUDE) \
480 $(MYTHES_CFLAGS) \
482 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
484 endef
486 else # !SYSTEM_MYTHES
488 define gb_LinkTarget__use_mythes
489 $(call gb_LinkTarget_set_include,$(1),\
490 -I$(call gb_UnpackedTarball_get_dir,mythes) \
491 $$(INCLUDE) \
494 ifeq ($(COM),MSC)
495 $(call gb_LinkTarget_use_static_libraries,$(1),\
496 mythes \
498 else
499 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
500 $(call gb_LinkTarget_use_external_project,$(1),mythes)
501 endif
503 endef
505 endif # SYSTEM_MYTHES
508 ifneq ($(SYSTEM_EXPAT),)
510 define gb_LinkTarget__use_expat_impl
511 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
513 $(call gb_LinkTarget_add_defs,$(1),\
514 -DSYSTEM_EXPAT \
517 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
519 endef
521 gb_ExternalProject__use_expat :=
523 else # !SYSTEM_EXPAT
525 define gb_LinkTarget__use_expat_impl
526 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
528 $(call gb_LinkTarget_set_include,$(1),\
529 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
530 $$(INCLUDE) \
533 $(call gb_LinkTarget_use_static_libraries,$(1),\
534 $(2) \
537 endef
539 define gb_ExternalProject__use_expat
540 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
542 endef
544 endif # SYSTEM_EXPAT
546 define gb_LinkTarget__use_expat
547 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
549 endef
551 define gb_LinkTarget__use_expat_x64
552 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
554 endef
556 ifneq ($(SYSTEM_HYPH),)
558 define gb_LinkTarget__use_hyphen
559 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
561 endef
563 else # !SYSTEM_HYPH
565 define gb_LinkTarget__use_hyphen
566 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
567 $(call gb_LinkTarget_set_include,$(1),\
568 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
569 $$(INCLUDE) \
572 ifeq ($(COM),MSC)
573 $(call gb_LinkTarget_use_static_libraries,$(1),\
574 hyphen \
576 else
577 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
578 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
579 endif
581 endef
583 endif # SYSTEM_HYPH
585 ifneq ($(SYSTEM_HUNSPELL),)
587 define gb_LinkTarget__use_hunspell
588 $(call gb_LinkTarget_set_include,$(1),\
589 $$(INCLUDE) \
590 $(HUNSPELL_CFLAGS) \
592 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
594 endef
596 gb_ExternalProject__use_hunspell :=
598 else # !SYSTEM_HUNSPELL
600 define gb_LinkTarget__use_hunspell
601 $(call gb_LinkTarget_add_defs,$(1),\
602 -DHUNSPELL_STATIC \
604 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
605 $(call gb_LinkTarget_set_include,$(1),\
606 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
607 $$(INCLUDE) \
610 ifeq ($(COM),MSC)
611 $(call gb_LinkTarget_use_static_libraries,$(1),\
612 hunspell \
614 else
615 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
616 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
617 endif
619 endef
621 define gb_ExternalProject__use_hunspell
622 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
624 endef
626 endif # SYSTEM_HUNSPELL
629 ifneq ($(SYSTEM_BOOST),)
631 define gb_LinkTarget__use_boost_lib
632 $(call gb_LinkTarget_set_include,$(1),\
633 $$(INCLUDE) \
634 $(BOOST_CPPFLAGS) \
637 $(call gb_LinkTarget_add_ldflags,$(1),\
638 $(BOOST_LDFLAGS) \
641 $(call gb_LinkTarget_add_libs,$(1),$(2))
643 endef
645 define gb_LinkTarget__use_boost_date_time
646 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
648 endef
650 define gb_LinkTarget__use_boost_filesystem
651 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
653 endef
655 gb_ExternalProject__use_boost_filesystem :=
657 define gb_LinkTarget__use_boost_iostreams
658 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
660 endef
662 gb_ExternalProject__use_boost_iostreams :=
664 define gb_LinkTarget__use_boost_system
665 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
667 endef
669 gb_ExternalProject__use_boost_system :=
671 define gb_LinkTarget__use_boost_headers
672 $(call gb_LinkTarget_set_include,$(1),\
673 $$(INCLUDE) \
674 $(BOOST_CPPFLAGS) \
677 endef
679 gb_ExternalProject__use_boost_headers:=
681 else # !SYSTEM_BOOST
683 define gb_LinkTarget__use_boost_lib
684 $(call gb_LinkTarget_add_defs,$(1),\
685 -DBOOST_ALL_NO_LIB \
688 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
690 endef
692 define gb_LinkTarget__use_boost_date_time
693 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
695 endef
697 define gb_LinkTarget__use_boost_filesystem
698 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
700 endef
702 define gb_ExternalProject__use_boost_filesystem
703 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
704 endef
706 define gb_LinkTarget__use_boost_iostreams
707 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
709 endef
711 define gb_ExternalProject__use_boost_iostreams
712 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
713 endef
715 define gb_LinkTarget__use_boost_system
716 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
718 endef
720 define gb_ExternalProject__use_boost_system
721 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
722 endef
724 define gb_LinkTarget__use_boost_headers
725 $(call gb_LinkTarget_use_unpacked,$(1),boost)
726 $(call gb_LinkTarget_set_include,$(1),\
727 $(BOOST_CPPFLAGS) \
728 $$(INCLUDE) \
731 endef
733 define gb_ExternalProject__use_boost_headers
734 $(call gb_ExternalProject_use_unpacked,$(1),boost)
736 endef
738 endif # SYSTEM_BOOST
741 ifneq ($(SYSTEM_CMIS),)
743 define gb_LinkTarget__use_cmis
744 $(call gb_LinkTarget_set_include,$(1),\
745 $$(INCLUDE) \
746 $(CMIS_CFLAGS) \
748 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
750 endef
752 else # !SYSTEM_CMIS
754 define gb_LinkTarget__use_cmis
755 $(call gb_LinkTarget_set_include,$(1),\
756 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
757 $$(INCLUDE) \
759 $(call gb_LinkTarget_use_static_libraries,$(1),\
760 cmislib \
763 endef
765 endif # SYSTEM_CMIS
767 ifeq ($(ENABLE_JAVA),TRUE)
769 ifeq ($(OS)$(COM),WNTGCC)
771 define gb_LinkTarget__use_jawt
772 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
774 $(call gb_LinkTarget_add_ldflags,$(1),\
775 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
778 $(call gb_LinkTarget_add_libs,$(1),\
779 $(JAWTLIB) \
782 endef
784 else # $(OS)$(COM) != WNTGCC
786 define gb_LinkTarget__use_jawt
787 $(call gb_LinkTarget_add_libs,$(1),\
788 $(JAWTLIB) \
791 endef
793 endif # $(OS)$(COM) = WNTGCC
795 else # !ENABLE_JAVA
797 gb_LinkTarget__use_jawt :=
799 endif # ENABLE_JAVA
801 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
803 define gb_LinkTarget__use_libatomic_ops
804 $(call gb_LinkTarget_set_include,$(1),\
805 $$(INCLUDE) \
806 $(LIBATOMIC_OPS_CFLAGS) \
808 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
810 endef
811 gb_ExternalProject__use_libatomic_ops :=
813 else # !SYSTEM_LIBATOMIC_OPS
815 define gb_LinkTarget__use_libatomic_ops
816 $(call gb_LinkTarget_set_include,$(1),\
817 $(LIBATOMIC_OPS_CFLAGS) \
818 $$(INCLUDE) \
819 $(LIBATOMIC_OPS_CFLAGS) \
821 $(call gb_LinkTarget_use_external_project,$(1),\
822 libatomic_ops \
825 $(call gb_LinkTarget_add_libs,$(1),\
826 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
829 endef
831 define gb_ExternalProject__use_libatomic_ops
832 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
834 endef
836 endif # SYSTEM_LIBATOMIC_OPS
839 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
841 define gb_LinkTarget__use_libexttextcat
842 $(call gb_LinkTarget_set_include,$(1),\
843 $$(INCLUDE) \
844 $(LIBEXTTEXTCAT_CFLAGS) \
846 $(call gb_LinkTarget_add_defs,$(1),\
847 -DSYSTEM_LIBEXTTEXTCAT \
849 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
851 endef
853 else # !SYSTEM_LIBEXTTEXTCAT
855 define gb_LinkTarget__use_libexttextcat
856 $(call gb_LinkTarget_set_include,$(1),\
857 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
858 $$(INCLUDE) \
861 ifeq ($(COM),MSC)
862 $(call gb_LinkTarget_use_static_libraries,$(1),\
863 exttextcat \
865 else
866 $(call gb_LinkTarget_add_libs,$(1),\
867 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
869 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
870 endif
873 endef
875 endif # SYSTEM_LIBEXTTEXTCAT
878 ifneq ($(SYSTEM_LIBXML),)
880 define gb_LinkTarget__use_libxml2
881 $(call gb_LinkTarget_add_defs,$(1),\
882 -DSYSTEM_LIBXML \
884 $(call gb_LinkTarget_set_include,$(1),\
885 $$(INCLUDE) \
886 $(LIBXML_CFLAGS) \
888 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
890 endef
891 gb_ExternalProject__use_libxml2:=
893 else # !SYSTEM_LIBXML
895 $(eval $(call gb_Helper_register_packages_for_install,ure,\
896 xml2 \
899 define gb_LinkTarget__use_libxml2
900 $(call gb_LinkTarget_use_package,$(1),xml2)
901 $(call gb_LinkTarget_set_include,$(1),\
902 $$(INCLUDE) \
903 $(LIBXML_CFLAGS) \
906 $(call gb_LinkTarget_add_libs,$(1),\
907 $(LIBXML_LIBS) \
910 ifeq ($(COM),MSC)
911 $(call gb_LinkTarget_use_external,$(1),icu_headers)
912 endif
914 endef
915 define gb_ExternalProject__use_libxml2
916 $(call gb_ExternalProject_use_package,$(1),xml2)
918 ifeq ($(COM),MSC)
919 $(call gb_ExternalProject_use_external_project,$(1),icu)
920 endif
922 endef
924 endif # SYSTEM_LIBXML
927 ifneq ($(SYSTEM_LIBXSLT),)
929 define gb_LinkTarget__use_libxslt
930 $(call gb_LinkTarget_set_include,$(1),\
931 $$(INCLUDE) \
932 $(LIBXSLT_CFLAGS) \
934 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
936 endef
938 define gb_LinkTarget__use_libexslt
939 $(call gb_LinkTarget_set_include,$(1),\
940 $$(INCLUDE) \
941 $(LIBEXSLT_CFLAGS) \
944 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
946 endef
948 else # !SYSTEM_LIBXSLT
950 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
951 xslt \
954 define gb_LinkTarget__use_libxslt
955 $(call gb_LinkTarget_use_package,$(1),xslt)
956 $(call gb_LinkTarget_set_include,$(1),\
957 $$(INCLUDE) \
958 -I$(call gb_UnpackedTarball_get_dir,xslt) \
961 ifeq ($(COM),MSC)
962 $(call gb_LinkTarget_add_libs,$(1),\
963 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
965 else
966 $(call gb_LinkTarget_add_libs,$(1),\
967 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
969 endif
971 endef
973 define gb_LinkTarget__use_libexslt
974 $(call gb_LinkTarget_use_package,$(1),xslt)
975 $(call gb_LinkTarget_set_include,$(1),\
976 $$(INCLUDE) \
977 -I$(call gb_UnpackedTarball_get_dir,xslt) \
980 ifeq ($(COM),MSC)
981 $(call gb_LinkTarget_add_libs,$(1),\
982 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
984 else
985 $(call gb_LinkTarget_add_libs,$(1),\
986 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
988 endif
990 endef
992 endif # SYSTEM_LIBXSLT
994 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
996 ifneq ($(SYSTEM_LIBLANGTAG),)
998 define gb_LinkTarget__use_liblangtag
999 $(call gb_LinkTarget_set_include,$(1),\
1000 $$(INCLUDE) \
1001 $(LIBLANGTAG_CFLAGS) \
1004 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1006 endef
1008 gb_ExternalProject__use_liblangtag :=
1010 else # !SYSTEM_LIBLANGTAG
1012 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1013 liblangtag_data \
1016 ifeq ($(COM),MSC)
1018 define gb_LinkTarget__use_liblangtag
1019 $(call gb_LinkTarget_set_include,$(1),\
1020 $(LIBLANGTAG_CFLAGS) \
1021 $$(INCLUDE) \
1023 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1024 $(call gb_LinkTarget_use_external_project,$(1),langtag)
1026 endef
1028 else
1030 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1031 liblangtag \
1034 define gb_LinkTarget__use_liblangtag
1035 $(call gb_LinkTarget_set_include,$(1),\
1036 $(LIBLANGTAG_CFLAGS) \
1037 $$(INCLUDE) \
1039 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1040 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1042 endef
1044 endif # MSC
1046 define gb_ExternalProject__use_liblangtag
1047 $(call gb_ExternalProject_use_external_project,$(1),langtag)
1049 endef
1051 endif # SYSTEM_LIBLANGTAG
1053 else
1055 gb_LinkTarget__use_liblangtag :=
1056 gb_ExternalProject__use_liblangtag :=
1058 endif # ENABLE_LIBLANGTAG
1060 gb_ExternalProject__use_apr :=
1062 ifeq ($(WITH_WEBDAV),serf)
1064 define gb_LinkTarget__use_apr
1065 $(call gb_LinkTarget_set_include,$(1),\
1066 $$(INCLUDE) \
1067 $(APR_CFLAGS) \
1069 $(call gb_LinkTarget_add_libs,$(1),\
1070 $(APR_LIBS) \
1071 $(if $(filter $(OS),LINUX),-lpthread) \
1072 $(if $(filter $(OS),MACOSX),-liconv) \
1075 ifeq ($(SYSTEM_APR),)
1076 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1077 mswsock \
1078 rpcrt4 \
1079 shell32 \
1081 $(call gb_LinkTarget_add_defs,$(1),\
1082 -DAPR_DECLARE_STATIC \
1083 -DAPU_DECLARE_STATIC \
1085 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1086 endif
1088 endef
1090 define gb_ExternalProject__use_apr
1091 ifeq ($(SYSTEM_APR),)
1092 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1093 endif
1095 endef
1097 define gb_LinkTarget__use_serf
1098 $(call gb_LinkTarget_set_include,$(1),\
1099 $(SERF_CFLAGS) \
1100 $$(INCLUDE) \
1102 $(call gb_LinkTarget_add_libs,$(1),\
1103 $(SERF_LIBS) \
1106 ifeq ($(SYSTEM_SERF),)
1107 $(call gb_LinkTarget_use_external_project,$(1),serf)
1108 endif
1110 endef
1112 else ifeq ($(WITH_WEBDAV),neon)
1114 ifneq ($(SYSTEM_NEON),)
1116 define gb_LinkTarget__use_neon
1117 $(call gb_LinkTarget_add_defs,$(1),\
1118 -DNEON_VERSION=0x$(NEON_VERSION) \
1119 -DSYSTEM_NEON \
1121 $(call gb_LinkTarget_set_include,$(1),\
1122 $$(INCLUDE) \
1123 $(NEON_CFLAGS) \
1126 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1128 endef
1130 else # !SYSTEM_NEON
1132 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1133 neon \
1136 define gb_LinkTarget__use_neon
1137 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1138 $(call gb_LinkTarget_set_include,$(1),\
1139 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1140 $$(INCLUDE) \
1142 $(call gb_LinkTarget_use_libraries,$(1),\
1143 neon \
1146 endef
1148 endif # SYSTEM_NEON
1150 endif # WITH_WEBDAV
1152 ifneq ($(SYSTEM_REDLAND),)
1154 define gb_LinkTarget__use_librdf
1155 $(call gb_LinkTarget_add_defs,$(1),\
1156 -DSYSTEM_REDLAND \
1158 $(call gb_LinkTarget_set_include,$(1),\
1159 $$(INCLUDE) \
1160 $(REDLAND_CFLAGS) \
1162 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1164 endef
1166 gb_LinkTarget__use_redland_headers:=
1168 gb_LinkTarget__use_raptor_headers:=
1170 gb_LinkTarget__use_rasqal_headers:=
1172 else # !SYSTEM_REDLAND
1174 define gb_LinkTarget__use_redland_headers
1175 $(call gb_LinkTarget_set_include,$(1),\
1176 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1177 $$(INCLUDE) \
1180 endef
1182 define gb_LinkTarget__use_raptor_headers
1183 $(call gb_LinkTarget_set_include,$(1),\
1184 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1185 $$(INCLUDE) \
1188 endef
1190 define gb_LinkTarget__use_rasqal_headers
1191 $(call gb_LinkTarget_set_include,$(1),\
1192 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1193 $$(INCLUDE) \
1196 endef
1198 ifneq ($(OS),ANDROID)
1200 ifeq ($(COM),MSC)
1201 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1202 raptor2 \
1203 rasqal \
1204 rdf \
1206 else
1207 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1208 raptor \
1209 rasqal \
1210 redland \
1212 endif
1214 define gb_LinkTarget__use_librdf
1215 ifeq ($(COM),MSC)
1216 $(call gb_LinkTarget_use_libraries,$(1),\
1217 raptor2 \
1218 rdf \
1220 else
1221 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1223 $(call gb_LinkTarget_add_libs,$(1),\
1224 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1225 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1227 endif
1229 endef
1231 else # ANDROID
1233 define gb_LinkTarget__use_librdf
1234 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1236 endef
1238 endif # ANDROID
1240 endif # SYSTEM_REDLAND
1243 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1245 ifneq ($(SYSTEM_CAIRO),)
1247 define gb_LinkTarget__use_cairo
1248 $(call gb_LinkTarget_set_include,$(1),\
1249 $$(INCLUDE) \
1250 $(CAIRO_CFLAGS) \
1252 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1253 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1255 endef
1257 else # !SYSTEM_CAIRO
1259 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1260 cairo \
1261 $(if $(filter $(OS),WNT),,pixman) \
1264 define gb_LinkTarget__use_cairo
1265 $(call gb_LinkTarget_use_package,$(1),cairo)
1266 $(call gb_LinkTarget_use_package,$(1),pixman)
1267 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1268 $(call gb_LinkTarget_set_include,$(1),\
1269 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1270 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1271 $$(INCLUDE) \
1273 $(call gb_LinkTarget_add_libs,$(1),\
1274 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1275 $(if $(filter-out MACOSX WNT,$(OS)), \
1276 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1280 endef
1282 endif # SYSTEM_CAIRO
1284 else ifeq ($(OS),ANDROID)
1286 define gb_LinkTarget__use_cairo
1287 $(call gb_LinkTarget_use_package,$(1),cairo)
1288 $(call gb_LinkTarget_use_package,$(1),pixman)
1289 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1290 $(call gb_LinkTarget_set_include,$(1),\
1291 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1292 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1293 $$(INCLUDE) \
1295 $(call gb_LinkTarget_add_libs,$(1),\
1296 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1297 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1300 endef
1302 endif # CAIRO
1304 ifneq ($(SYSTEM_FREETYPE),)
1306 define gb_LinkTarget__use_freetype_headers
1307 $(call gb_LinkTarget_set_include,$(1),\
1308 $$(INCLUDE) \
1309 $(FREETYPE_CFLAGS) \
1312 endef
1314 define gb_LinkTarget__use_freetype
1315 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1316 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1318 endef
1320 gb_ExternalProject__use_freetype :=
1322 else ifeq ($(OS),ANDROID)
1324 define gb_LinkTarget__use_freetype_headers
1325 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1326 $(call gb_LinkTarget_set_include,$(1),\
1327 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1328 $$(INCLUDE) \
1331 endef
1333 define gb_LinkTarget__use_freetype
1334 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1335 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1337 endef
1339 define gb_ExternalProject__use_freetype
1340 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1342 endef
1344 endif # SYSTEM_FREETYPE
1346 ifneq ($(SYSTEM_FONTCONFIG),)
1348 define gb_LinkTarget__use_fontconfig
1349 $(call gb_LinkTarget_set_include,$(1),\
1350 $$(INCLUDE) \
1351 $(FONTCONFIG_CFLAGS) \
1354 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1356 endef
1358 else ifeq ($(OS),ANDROID)
1360 define gb_LinkTarget__use_fontconfig
1361 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1362 $(call gb_LinkTarget_set_include,$(1),\
1363 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1364 $$(INCLUDE) \
1367 endef
1369 endif # SYSTEM_FONTCONFIG
1371 ifneq ($(SYSTEM_GRAPHITE),)
1373 define gb_LinkTarget__use_graphite
1374 $(call gb_LinkTarget_set_include,$(1),\
1375 $$(INCLUDE) \
1376 $(GRAPHITE_CFLAGS) \
1378 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1380 endef
1382 gb_ExternalProject__use_graphite:=
1384 else # !SYSTEM_GRAPHITE
1386 define gb_LinkTarget__use_graphite
1387 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1388 $(call gb_LinkTarget_set_include,$(1),\
1389 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1390 $$(INCLUDE) \
1392 $(call gb_LinkTarget_use_static_libraries,$(1),\
1393 graphite \
1396 endef
1398 define gb_ExternalProject__use_graphite
1399 $(call gb_ExternalProject_use_static_libraries,$(1),\
1400 graphite \
1403 endef
1404 endif # SYSTEM_GRAPHITE
1406 ifneq ($(SYSTEM_ICU),)
1408 gb_LinkTarget__use_icu_headers:=
1409 gb_ExternalProject__use_icu:=
1411 define gb_LinkTarget__use_icudata
1412 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1414 endef
1415 define gb_LinkTarget__use_icui18n
1416 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1418 endef
1419 define gb_LinkTarget__use_icuuc
1420 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1422 endef
1424 else # !SYSTEM_ICU
1426 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1427 icu_ure \
1430 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1431 icu \
1434 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1435 gb_ICU_suffix:=lo
1436 else
1437 gb_ICU_suffix:=
1438 endif
1440 define gb_LinkTarget__use_icu_headers
1441 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1442 $(call gb_LinkTarget_set_include,$(1),\
1443 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1444 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1445 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1446 $$(INCLUDE) \
1449 endef
1451 define gb_ExternalProject__use_icu
1452 $(call gb_ExternalProject_use_package,$(1),icu)
1454 endef
1456 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1457 define gb_LinkTarget__use_icudata
1458 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1460 ifeq ($(OS),WNT)
1461 $(call gb_LinkTarget_add_libs,$(1),\
1462 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1464 else
1465 $(call gb_LinkTarget_add_libs,$(1),\
1466 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1468 endif
1470 endef
1472 define gb_LinkTarget__use_icui18n
1473 $(call gb_LinkTarget_use_package,$(1),icu)
1475 ifeq ($(OS),WNT)
1476 $(call gb_LinkTarget_add_libs,$(1),\
1477 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1479 else
1480 $(call gb_LinkTarget_add_libs,$(1),\
1481 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1483 endif
1485 endef
1487 define gb_LinkTarget__use_icuuc
1488 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1490 ifeq ($(OS),WNT)
1491 $(call gb_LinkTarget_add_libs,$(1),\
1492 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1494 else
1495 $(call gb_LinkTarget_add_libs,$(1),\
1496 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1498 endif
1500 endef
1502 endif # SYSTEM_ICU
1504 ifneq ($(SYSTEM_HARFBUZZ),)
1506 define gb_LinkTarget__use_harfbuzz
1507 $(call gb_LinkTarget_set_include,$(1),\
1508 $$(INCLUDE) \
1509 $(HARFBUZZ_CFLAGS) \
1511 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1513 endef
1515 else # SYSTEM_HARFBUZZ != TRUE
1517 define gb_LinkTarget__use_harfbuzz
1518 $(call gb_LinkTarget_set_include,$(1),\
1519 $(HARFBUZZ_CFLAGS) \
1520 $$(INCLUDE) \
1522 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1523 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1525 endef
1527 endif # SYSTEM_HARFBUZZ
1529 ifeq ($(DISABLE_OPENSSL),TRUE)
1531 gb_ExternalProject__use_openssl:=
1532 gb_LinkTarget__use_openssl_headers:=
1533 gb_LinkTarget__use_openssl:=
1535 else # !DISABLE_OPENSSL
1537 ifneq ($(SYSTEM_OPENSSL),)
1539 gb_LinkTarget__use_openssl_headers:=
1540 gb_ExternalProject__use_openssl:=
1542 define gb_LinkTarget__use_openssl
1543 $(call gb_LinkTarget_set_include,$(1),\
1544 $$(INCLUDE) \
1545 $(OPENSSL_CFLAGS) \
1547 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1549 endef
1551 else # !SYSTEM_OPENSSL
1553 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1554 openssl \
1557 define gb_ExternalProject__use_openssl
1558 $(call gb_ExternalProject_use_package,$(1),openssl)
1560 endef
1562 define gb_LinkTarget__use_openssl_headers
1563 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1564 $(call gb_LinkTarget_set_include,$(1),\
1565 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1566 $$(INCLUDE) \
1569 endef
1571 define gb_LinkTarget__use_openssl
1572 $(call gb_LinkTarget_use_package,$(1),openssl)
1573 ifeq ($(OS),WNT)
1574 $(call gb_LinkTarget_add_libs,$(1),\
1575 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1576 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1578 else
1579 $(call gb_LinkTarget_add_libs,$(1),\
1580 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1581 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1583 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1584 ifeq ($(OS),SOLARIS)
1585 $(call gb_LinkTarget_add_libs,$(1),\
1586 -lnsl \
1587 -lsocket \
1589 endif
1590 endif
1592 endef
1594 endif # SYSTEM_OPENSSL
1595 endif # DISABLE_OPENSSL
1598 ifeq ($(DISABLE_OPENSSL),TRUE)
1600 define gb_LinkTarget__use_gnutls
1601 $(call gb_LinkTarget_set_include,$(1),\
1602 $$(INCLUDE) \
1603 $(GNUTLS_CFLAGS) \
1606 $(call gb_LinkTarget_add_defs,$(1),\
1607 -DDISABLE_OPENSSL \
1610 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1612 endef
1614 define gb_LinkTarget__use_libgcrypt
1615 $(call gb_LinkTarget_set_include,$(1),\
1616 $$(INCLUDE) \
1617 $(LIBGCRYPT_CFLAGS) \
1620 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1622 endef
1624 else # !DISABLE_OPENSSL
1626 gb_LinkTarget__use_gnutls:=
1627 gb_LinkTarget__use_libgcrypt:=
1629 endif # DISABLE_OPENSSL
1632 ifneq ($(SYSTEM_CDR),)
1634 define gb_LinkTarget__use_cdr
1635 $(call gb_LinkTarget_set_include,$(1),\
1636 $$(INCLUDE) \
1637 $(CDR_CFLAGS) \
1639 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1641 endef
1643 else # !SYSTEM_CDR
1645 define gb_LinkTarget__use_cdr
1646 $(call gb_LinkTarget_set_include,$(1),\
1647 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1648 $$(INCLUDE) \
1650 $(call gb_LinkTarget_add_libs,$(1),\
1651 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1653 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1654 endef
1656 endif # SYSTEM_CDR
1659 ifneq ($(SYSTEM_EBOOK),)
1661 define gb_LinkTarget__use_ebook
1662 $(call gb_LinkTarget_set_include,$(1),\
1663 $$(INCLUDE) \
1664 $(EBOOK_CFLAGS) \
1666 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1668 endef
1670 gb_ExternalProject__use_ebook :=
1672 else # !SYSTEM_EBOOK
1674 define gb_LinkTarget__use_ebook
1675 $(call gb_LinkTarget_set_include,$(1),\
1676 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1677 $$(INCLUDE) \
1679 $(call gb_LinkTarget_add_libs,$(1),\
1680 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1682 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1684 endef
1686 define gb_ExternalProject__use_ebook
1687 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1689 endef
1691 endif # SYSTEM_EBOOK
1694 ifneq ($(SYSTEM_ETONYEK),)
1696 define gb_LinkTarget__use_etonyek
1697 $(call gb_LinkTarget_set_include,$(1),\
1698 $$(INCLUDE) \
1699 $(ETONYEK_CFLAGS) \
1701 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1703 endef
1705 gb_ExternalProject__use_etonyek :=
1707 else # !SYSTEM_ETONYEK
1709 ifeq ($(COM),MSC)
1711 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1712 etonyek \
1715 define gb_LinkTarget__use_etonyek
1716 $(call gb_LinkTarget_set_include,$(1),\
1717 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1718 $$(INCLUDE) \
1720 $(call gb_LinkTarget_use_libraries,$(1),\
1721 etonyek \
1724 endef
1726 else # !MSC
1728 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1729 libetonyek \
1732 define gb_LinkTarget__use_etonyek
1733 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1735 $(call gb_LinkTarget_set_include,$(1),\
1736 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1737 -DLIBETONYEK_VISIBILITY \
1738 $$(INCLUDE) \
1740 $(call gb_LinkTarget_add_libs,$(1),\
1741 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1743 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1745 endef
1747 define gb_ExternalProject__use_etonyek
1748 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1750 endef
1752 endif
1754 endif # SYSTEM_ETONYEK
1757 ifneq ($(SYSTEM_FREEHAND),)
1759 define gb_LinkTarget__use_freehand
1760 $(call gb_LinkTarget_set_include,$(1),\
1761 $$(INCLUDE) \
1762 $(FREEHAND_CFLAGS) \
1764 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1766 endef
1768 gb_ExternalProject__use_freehand :=
1770 else # !SYSTEM_FREEHAND
1772 define gb_LinkTarget__use_freehand
1773 $(call gb_LinkTarget_set_include,$(1),\
1774 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1775 $$(INCLUDE) \
1777 $(call gb_LinkTarget_add_libs,$(1),\
1778 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1780 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1782 endef
1784 define gb_ExternalProject__use_freehand
1785 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1787 endef
1789 endif # SYSTEM_FREEHAND
1792 ifneq ($(SYSTEM_ODFGEN),)
1794 define gb_LinkTarget__use_odfgen
1795 $(call gb_LinkTarget_set_include,$(1),\
1796 $$(INCLUDE) \
1797 $(ODFGEN_CFLAGS) \
1799 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1801 endef
1803 else # !SYSTEM_ODFGEN
1805 ifeq ($(COM),MSC)
1807 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1808 odfgen \
1811 define gb_LinkTarget__use_odfgen
1812 $(call gb_LinkTarget_set_include,$(1),\
1813 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1814 $$(INCLUDE) \
1816 $(call gb_LinkTarget_use_libraries,$(1),\
1817 odfgen \
1820 endef
1822 else # !MSC
1824 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1825 libodfgen \
1828 define gb_LinkTarget__use_odfgen
1829 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1831 $(call gb_LinkTarget_set_include,$(1),\
1832 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1833 -DLIBODFGEN_VISIBILITY \
1834 $$(INCLUDE) \
1836 $(call gb_LinkTarget_add_libs,$(1),\
1837 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1840 endef
1842 endif
1844 endif # SYSTEM_ODFGEN
1847 ifneq ($(SYSTEM_REVENGE),)
1849 define gb_LinkTarget__use_revenge
1850 $(call gb_LinkTarget_set_include,$(1),\
1851 $$(INCLUDE) \
1852 $(REVENGE_CFLAGS) \
1854 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1856 endef
1858 gb_ExternalProject__use_revenge :=
1860 else # !SYSTEM_REVENGE
1862 ifeq ($(COM),MSC)
1864 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1865 revenge \
1868 define gb_LinkTarget__use_revenge
1869 $(call gb_LinkTarget_set_include,$(1),\
1870 $(REVENGE_CFLAGS) \
1871 $$(INCLUDE) \
1873 $(call gb_LinkTarget_use_libraries,$(1),\
1874 revenge \
1877 endef
1879 define gb_ExternalProject__use_revenge
1880 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1882 endef
1884 else # !MSC
1886 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1887 librevenge \
1890 define gb_LinkTarget__use_revenge
1891 $(call gb_LinkTarget_use_package,$(1),librevenge)
1893 $(call gb_LinkTarget_set_include,$(1),\
1894 $(REVENGE_CFLAGS) \
1895 -DLIBREVENGE_VISIBILITY \
1896 $$(INCLUDE) \
1898 $(call gb_LinkTarget_add_libs,$(1),\
1899 $(REVENGE_LIBS) \
1901 endef
1903 define gb_ExternalProject__use_revenge
1904 $(call gb_ExternalProject_use_package,$(1),librevenge)
1906 endef
1908 endif # MSC
1910 endif # SYSTEM_REVENGE
1913 ifneq ($(SYSTEM_ABW),)
1915 define gb_LinkTarget__use_abw
1916 $(call gb_LinkTarget_set_include,$(1),\
1917 $$(INCLUDE) \
1918 $(ABW_CFLAGS) \
1920 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1922 endef
1923 gb_ExternalProject__use_abw :=
1925 else # !SYSTEM_ABW
1927 define gb_LinkTarget__use_abw
1928 $(call gb_LinkTarget_set_include,$(1),\
1929 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1930 $$(INCLUDE) \
1932 $(call gb_LinkTarget_add_libs,$(1),\
1933 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1935 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1937 endef
1938 define gb_ExternalProject__use_abw
1939 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1941 endef
1943 endif # SYSTEM_ABW
1946 ifneq ($(SYSTEM_MSPUB),)
1948 define gb_LinkTarget__use_mspub
1949 $(call gb_LinkTarget_set_include,$(1),\
1950 $$(INCLUDE) \
1951 $(MSPUB_CFLAGS) \
1953 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1955 endef
1957 else # !SYSTEM_MSPUB
1959 define gb_LinkTarget__use_mspub
1960 $(call gb_LinkTarget_set_include,$(1),\
1961 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1962 $$(INCLUDE) \
1964 $(call gb_LinkTarget_add_libs,$(1),\
1965 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1967 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1969 endef
1971 endif # SYSTEM_MSPUB
1974 ifneq ($(SYSTEM_PAGEMAKER),)
1976 define gb_LinkTarget__use_pagemaker
1977 $(call gb_LinkTarget_set_include,$(1),\
1978 $$(INCLUDE) \
1979 $(PAGEMAKER_CFLAGS) \
1981 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1983 endef
1984 gb_ExternalProject__use_pagemaker :=
1986 else # !SYSTEM_PAGEMAKER
1988 define gb_LinkTarget__use_pagemaker
1989 $(call gb_LinkTarget_set_include,$(1),\
1990 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1991 $$(INCLUDE) \
1993 $(call gb_LinkTarget_add_libs,$(1),\
1994 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1996 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1998 endef
1999 define gb_ExternalProject__use_pagemaker
2000 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2002 endef
2004 endif # SYSTEM_PAGEMAKER
2007 ifneq ($(SYSTEM_ZMF),)
2009 define gb_LinkTarget__use_zmf
2010 $(call gb_LinkTarget_set_include,$(1),\
2011 $$(INCLUDE) \
2012 $(ZMF_CFLAGS) \
2014 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2016 endef
2017 gb_ExternalProject__use_zmf :=
2019 else # !SYSTEM_ZMF
2021 define gb_LinkTarget__use_zmf
2022 $(call gb_LinkTarget_set_include,$(1),\
2023 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2024 $$(INCLUDE) \
2026 $(call gb_LinkTarget_add_libs,$(1),\
2027 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2029 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2031 endef
2032 define gb_ExternalProject__use_zmf
2033 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2035 endef
2037 endif # SYSTEM_ZMF
2040 ifneq ($(SYSTEM_VISIO),)
2042 define gb_LinkTarget__use_visio
2043 $(call gb_LinkTarget_set_include,$(1),\
2044 $$(INCLUDE) \
2045 $(VISIO_CFLAGS) \
2047 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2049 endef
2051 else # !SYSTEM_VISIO
2053 define gb_LinkTarget__use_visio
2054 $(call gb_LinkTarget_set_include,$(1),\
2055 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2056 $$(INCLUDE) \
2058 $(call gb_LinkTarget_add_libs,$(1),\
2059 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2061 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2063 endef
2065 endif # SYSTEM_VISIO
2068 ifneq ($(SYSTEM_WPD),)
2070 define gb_LinkTarget__use_wpd
2071 $(call gb_LinkTarget_set_include,$(1),\
2072 $$(INCLUDE) \
2073 $(WPD_CFLAGS) \
2075 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2077 endef
2078 gb_ExternalProject__use_wpd :=
2080 else # !SYSTEM_WPD
2082 ifeq ($(COM),MSC)
2084 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2085 wpd \
2088 define gb_LinkTarget__use_wpd
2089 $(call gb_LinkTarget_set_include,$(1),\
2090 $(WPD_CFLAGS) \
2091 $$(INCLUDE) \
2093 $(call gb_LinkTarget_use_libraries,$(1),\
2094 wpd \
2097 endef
2099 define gb_ExternalProject__use_wpd
2100 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2102 endef
2104 else # !MSC
2106 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2107 libwpd \
2110 define gb_LinkTarget__use_wpd
2111 $(call gb_LinkTarget_use_package,$(1),libwpd)
2113 $(call gb_LinkTarget_set_include,$(1),\
2114 $(WPD_CFLAGS) \
2115 $$(INCLUDE) \
2117 $(call gb_LinkTarget_add_libs,$(1),\
2118 $(WPD_LIBS) \
2121 endef
2123 define gb_ExternalProject__use_wpd
2124 $(call gb_ExternalProject_use_package,$(1),libwpd)
2126 endef
2128 endif # MSC
2130 endif # SYSTEM_WPD
2133 ifneq ($(SYSTEM_WPG),)
2135 define gb_LinkTarget__use_wpg
2136 $(call gb_LinkTarget_set_include,$(1),\
2137 $$(INCLUDE) \
2138 $(WPG_CFLAGS) \
2140 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2142 endef
2143 gb_ExternalProject__use_wpg :=
2145 else # !SYSTEM_WPG
2147 ifeq ($(COM),MSC)
2149 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2150 wpg \
2153 define gb_LinkTarget__use_wpg
2154 $(call gb_LinkTarget_set_include,$(1),\
2155 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2156 $$(INCLUDE) \
2158 $(call gb_LinkTarget_use_libraries,$(1),\
2159 wpg \
2162 endef
2164 else # !MSC
2166 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2167 libwpg \
2170 define gb_LinkTarget__use_wpg
2171 $(call gb_LinkTarget_use_package,$(1),libwpg)
2173 $(call gb_LinkTarget_set_include,$(1),\
2174 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2175 $$(INCLUDE) \
2177 $(call gb_LinkTarget_add_libs,$(1),\
2178 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2181 endef
2183 endif # MSC
2185 endif # SYSTEM_WPG
2188 ifneq ($(SYSTEM_WPS),)
2190 define gb_LinkTarget__use_wps
2191 $(call gb_LinkTarget_set_include,$(1),\
2192 $$(INCLUDE) \
2193 $(WPS_CFLAGS) \
2195 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2197 endef
2198 gb_ExternalProject__use_wps :=
2200 else # !SYSTEM_WPS
2202 ifeq ($(COM),MSC)
2204 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2205 wps \
2208 define gb_LinkTarget__use_wps
2209 $(call gb_LinkTarget_set_include,$(1),\
2210 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2211 $$(INCLUDE) \
2214 $(call gb_LinkTarget_use_libraries,$(1),\
2215 wps \
2218 endef
2220 else # !MSC
2222 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2223 libwps \
2226 define gb_LinkTarget__use_wps
2227 $(call gb_LinkTarget_use_package,$(1),libwps)
2229 $(call gb_LinkTarget_set_include,$(1),\
2230 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2231 $$(INCLUDE) \
2233 $(call gb_LinkTarget_add_libs,$(1),\
2234 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2237 endef
2239 endif # MSC
2241 endif # SYSTEM_WPS
2244 ifneq ($(SYSTEM_MWAW),)
2246 define gb_LinkTarget__use_mwaw
2247 $(call gb_LinkTarget_set_include,$(1),\
2248 $$(INCLUDE) \
2249 $(MWAW_CFLAGS) \
2251 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2253 endef
2255 else # !SYSTEM_MWAW
2257 ifeq ($(COM),MSC)
2259 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2260 mwaw \
2263 define gb_LinkTarget__use_mwaw
2264 $(call gb_LinkTarget_set_include,$(1),\
2265 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2266 $$(INCLUDE) \
2269 $(call gb_LinkTarget_use_libraries,$(1),\
2270 mwaw \
2273 endef
2275 else # !MSC
2277 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2278 libmwaw \
2281 define gb_LinkTarget__use_mwaw
2282 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2284 $(call gb_LinkTarget_set_include,$(1),\
2285 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2286 $$(INCLUDE) \
2288 $(call gb_LinkTarget_add_libs,$(1),\
2289 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2292 endef
2294 endif # MSC
2296 endif # SYSTEM_MWAW
2298 ifneq ($(SYSTEM_STAROFFICE),)
2300 define gb_LinkTarget__use_staroffice
2301 $(call gb_LinkTarget_set_include,$(1),\
2302 $$(INCLUDE) \
2303 $(STAROFFICE_CFLAGS) \
2305 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2307 endef
2309 else # !SYSTEM_STAROFFICE
2311 ifeq ($(COM),MSC)
2313 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2314 staroffice \
2317 define gb_LinkTarget__use_staroffice
2318 $(call gb_LinkTarget_set_include,$(1),\
2319 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2320 $$(INCLUDE) \
2323 $(call gb_LinkTarget_use_libraries,$(1),\
2324 staroffice \
2327 endef
2329 else # !MSC
2331 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2332 libstaroffice \
2335 define gb_LinkTarget__use_staroffice
2336 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2338 $(call gb_LinkTarget_set_include,$(1),\
2339 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2340 $$(INCLUDE) \
2342 $(call gb_LinkTarget_add_libs,$(1),\
2343 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2346 endef
2348 endif # MSC
2350 endif # SYSTEM_STAROFFICE
2353 ifneq ($(SYSTEM_LCMS2),)
2355 define gb_LinkTarget__use_lcms2
2356 $(call gb_LinkTarget_set_include,$(1),\
2357 $$(INCLUDE) \
2358 $(LCMS2_CFLAGS) \
2360 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2362 endef
2364 gb_ExternalProject__use_lcms2 :=
2366 else # !SYSTEM_LCMS2
2368 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2369 lcms2 \
2372 define gb_ExternalProject__use_lcms2
2373 $(call gb_ExternalProject_use_package,$(1),lcms2)
2375 endef
2377 ifeq ($(OS),ANDROID)
2379 define gb_LinkTarget__use_lcms2
2380 $(call gb_LinkTarget_use_package,$(1),lcms2)
2381 $(call gb_LinkTarget_set_include,$(1),\
2382 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2383 $$(INCLUDE) \
2386 endef
2388 else
2390 define gb_LinkTarget__use_lcms2
2391 $(call gb_LinkTarget_use_package,$(1),lcms2)
2392 $(call gb_LinkTarget_set_include,$(1),\
2393 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2394 $$(INCLUDE) \
2396 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2398 endef
2400 endif # ANDROID
2401 endif # SYSTEM_LCMS2
2403 ifneq ($(ENABLE_LPSOLVE),)
2405 ifneq ($(SYSTEM_LPSOLVE),)
2407 define gb_LinkTarget__use_lpsolve
2408 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2409 $(call gb_LinkTarget_add_defs,$(1),\
2410 -DSYSTEM_LPSOLVE \
2413 endef
2415 else # !SYSTEM_LPSOLVE
2417 define gb_LinkTarget__use_lpsolve
2418 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2419 ifeq ($(COM),MSC)
2420 $(call gb_LinkTarget_add_libs,$(1),\
2421 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2423 else
2424 $(call gb_LinkTarget_add_libs,$(1),\
2425 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2427 endif
2428 $(call gb_LinkTarget_set_include,$(1),\
2429 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2430 $$(INCLUDE) \
2433 endef
2435 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2436 lpsolve \
2439 endif # SYSTEM_LPSOLVE
2441 else
2443 gb_LinkTarget__use_lpsolve :=
2445 endif # ENABLE_LPSOLVE
2447 ifneq ($(ENABLE_COINMP),)
2449 ifneq ($(SYSTEM_COINMP),TRUE)
2451 define gb_LinkTarget__use_coinmp
2452 $(call gb_LinkTarget_use_package,$(1),coinmp)
2453 ifeq ($(COM),MSC)
2454 $(call gb_LinkTarget_add_libs,$(1),\
2455 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2457 else
2458 $(call gb_LinkTarget_add_libs,$(1),\
2459 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2460 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2461 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2462 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2463 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2464 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2465 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2467 endif
2468 $(call gb_LinkTarget_set_include,$(1),\
2469 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2470 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2471 $$(INCLUDE) \
2474 endef
2476 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2477 coinmp \
2480 else # SYSTEM_COINMP
2482 define gb_LinkTarget__use_coinmp
2483 $(call gb_LinkTarget_set_include,$(1),\
2484 $$(INCLUDE) \
2485 $(COINMP_CFLAGS) \
2487 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2489 endef
2491 endif
2493 else
2495 gb_LinkTarget__use_coinmp :=
2497 endif # ENABLE_COINMP
2499 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2501 define gb_LinkTarget__use_mDNSResponder
2502 $(call gb_LinkTarget_set_include,$(1),\
2503 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2504 $$(INCLUDE) \
2506 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2507 endef
2509 endif # MDNSRESPONDER
2511 ifeq ($(ENABLE_GIO),TRUE)
2513 define gb_LinkTarget__use_gio
2514 $(call gb_LinkTarget_set_include,$(1),\
2515 $$(INCLUDE) \
2516 $(GIO_CFLAGS) \
2519 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2521 endef
2523 else # ENABLE_GIO
2525 define gb_LinkTarget__use_gio
2527 endef
2529 endif # ENABLE_GIO
2531 ifeq ($(ENABLE_AVAHI),TRUE)
2533 define gb_LinkTarget__use_avahi
2534 $(call gb_LinkTarget_set_include,$(1),\
2535 $$(INCLUDE) \
2536 $(AVAHI_CFLAGS) \
2539 $(call gb_LinkTarget_add_defs,$(1),\
2540 -DENABLE_AVAHI \
2543 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2545 endef
2547 else # ENABLE_AVAHI
2549 gb_LinkTarget__use_avahi :=
2551 endif # ENABLE_AVAHI
2554 define gb_LinkTarget__use_gtk
2555 $(call gb_LinkTarget_set_include,$(1),\
2556 $$(INCLUDE) \
2557 $(GTK_CFLAGS) \
2560 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2562 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2564 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2566 $(call gb_LinkTarget_set_include,$(1),\
2567 $$(INCLUDE) \
2568 $(GTK_PRINT_CFLAGS) \
2571 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2573 endif
2575 endef
2577 define gb_LinkTarget__use_gthread
2578 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2579 endef
2581 ifeq ($(ENABLE_CUPS),TRUE)
2583 define gb_LinkTarget__use_cups
2584 $(call gb_LinkTarget_add_defs,$(1),\
2585 -DENABLE_CUPS \
2588 $(call gb_LinkTarget_add_libs,$(1),\
2589 -lcups \
2592 endef
2594 else # ENABLE_CUPS
2596 define gb_LinkTarget__use_cups
2598 endef
2600 endif # ENABLE_DBUS
2602 ifeq ($(ENABLE_DBUS),TRUE)
2604 define gb_LinkTarget__use_dbus
2605 $(call gb_LinkTarget_set_include,$(1),\
2606 $$(INCLUDE) \
2607 $(DBUS_CFLAGS) \
2610 $(call gb_LinkTarget_add_libs,$(1),\
2611 $(DBUS_LIBS) \
2614 endef
2616 else # ENABLE_DBUS
2618 define gb_LinkTarget__use_dbus
2620 endef
2622 endif # ENABLE_DBUS
2625 define gb_LinkTarget__use_dbusmenugtk
2626 $(call gb_LinkTarget_set_include,$(1),\
2627 $$(INCLUDE) \
2628 $(DBUSMENUGTK_CFLAGS) \
2631 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2633 endef
2636 ifeq ($(ENABLE_TELEPATHY),TRUE)
2638 define gb_LinkTarget__use_telepathy
2639 $(call gb_LinkTarget_set_include,$(1),\
2640 $$(INCLUDE) \
2641 $(TELEPATHY_CFLAGS) \
2644 $(call gb_LinkTarget_add_libs,$(1),\
2645 $(TELEPATHY_LIBS) \
2648 endef
2650 else # !ENABLE_TELEPATHY
2652 gb_LinkTarget__use_telepathy :=
2654 endif # ENABLE_TELEPATHY
2656 ifneq ($(SYSTEM_LIBPNG),)
2658 define gb_LinkTarget__use_png
2659 $(call gb_LinkTarget_set_include,$(1),\
2660 $$(INCLUDE) \
2661 $(LIBPNG_CFLAGS) \
2664 $(call gb_LinkTarget_add_libs,$(1),\
2665 $(LIBPNG_LIBS) \
2668 endef
2670 gb_ExternalProject__use_png :=
2672 else # !SYSTEM_LIBPNG
2674 define gb_LinkTarget__use_png
2675 $(call gb_LinkTarget_set_include,$(1),\
2676 $(LIBPNG_CFLAGS) \
2677 $$(INCLUDE) \
2679 $(call gb_LinkTarget_use_static_libraries,$(1),\
2680 png \
2682 $(call gb_LinkTarget__use_zlib,$(1))
2684 endef
2686 define gb_ExternalProject__use_png
2687 $(call gb_ExternalProject_use_static_libraries,$(1),\
2688 png \
2691 endef
2693 endif # !SYSTEM_LIBPNG
2696 ifneq ($(SYSTEM_CURL),)
2698 define gb_LinkTarget__use_curl
2699 $(call gb_LinkTarget_add_defs,$(1),\
2700 -DSYSTEM_CURL \
2702 $(call gb_LinkTarget_set_include,$(1),\
2703 $$(INCLUDE) \
2704 $(CURL_CFLAGS) \
2706 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2708 endef
2710 else # !SYSTEM_CURL
2712 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2713 curl \
2716 define gb_LinkTarget__use_curl
2717 $(call gb_LinkTarget_use_package,$(1),curl)
2718 $(call gb_LinkTarget_set_include,$(1),\
2719 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2720 $$(INCLUDE) \
2723 ifeq ($(COM),MSC)
2724 $(call gb_LinkTarget_add_libs,$(1),\
2725 $(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 \
2727 else
2728 $(call gb_LinkTarget_add_libs,$(1),\
2729 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2731 endif
2733 endef
2735 endif # SYSTEM_CURL
2737 ifeq ($(ENABLE_VALGRIND),TRUE)
2739 define gb_LinkTarget__use_valgrind
2740 $(call gb_LinkTarget_add_defs,$(1),\
2741 -DHAVE_VALGRIND_HEADERS \
2744 $(call gb_LinkTarget_set_include,$(1),\
2745 $$(INCLUDE) \
2746 $(VALGRIND_CFLAGS) \
2749 endef
2751 else # !ENABLE_VALGRIND
2753 define gb_LinkTarget__use_valgrind
2755 endef
2757 endif # ENABLE_VALGRIND
2759 ifneq ($(SYSTEM_POPPLER),)
2761 define gb_LinkTarget__use_poppler
2762 $(call gb_LinkTarget_set_include,$(1),\
2763 $(POPPLER_CFLAGS) \
2764 $$(INCLUDE) \
2767 $(call gb_LinkTarget_add_libs,$(1),\
2768 $(POPPLER_LIBS) \
2771 endef
2773 else # !SYSTEM_POPPLER
2775 define gb_LinkTarget__use_poppler
2776 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2778 $(call gb_LinkTarget_set_include,$(1),\
2779 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2780 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2781 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2782 $$(INCLUDE) \
2785 $(call gb_LinkTarget_add_libs,$(1),\
2786 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2787 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2788 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2791 $(call gb_LinkTarget_use_external,$(1),jpeg)
2793 ifeq ($(OS),MACOSX)
2794 $(call gb_LinkTarget_add_libs,$(1),\
2795 -lobjc \
2797 else ifeq ($(OS),LINUX)
2798 $(call gb_LinkTarget_add_libs,$(1),\
2799 -pthread \
2801 else ifeq ($(OS),WNT)
2802 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2803 advapi32 \
2804 gdi32 \
2806 endif
2808 endef
2810 endif # SYSTEM_POPPLER
2813 ifneq ($(SYSTEM_CLUCENE),)
2815 define gb_LinkTarget__use_clucene
2816 $(call gb_LinkTarget_add_defs,$(1),\
2817 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2820 $(call gb_LinkTarget_set_include,$(1),\
2821 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2822 $$(INCLUDE) \
2825 $(call gb_LinkTarget_add_libs,$(1),\
2826 $(CLUCENE_LIBS) \
2829 endef
2831 else # !SYSTEM_CLUCENE
2833 define gb_LinkTarget__use_clucene
2834 $(call gb_LinkTarget_set_include,$(1),\
2835 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2836 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2837 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2838 $$(INCLUDE) \
2841 $(call gb_LinkTarget_use_libraries,$(1),\
2842 clucene \
2845 endef
2847 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2848 clucene \
2851 endif # SYSTEM_CLUCENE
2853 define gb_LinkTarget__use_gobject
2854 $(call gb_LinkTarget_add_libs,$(1),\
2855 $(GOBJECT_LIBS) \
2858 $(call gb_LinkTarget_set_include,$(1),\
2859 $$(INCLUDE) \
2860 $(GOBJECT_CFLAGS) \
2862 endef
2864 ifneq ($(SYSTEM_HSQLDB),)
2866 define gb_LinkTarget__use_hsqldb
2868 $(call gb_LinkTarget_add_defs,$(1),\
2869 -DSYSTEM_HSQLDB \
2870 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2873 endef
2875 else # !SYSTEM_HSQLDB
2877 define gb_LinkTarget__use_hsqldb
2879 endef
2881 endif # SYSTEM_HSQLDB
2884 ifneq ($(SYSTEM_OPENLDAP),)
2886 define gb_LinkTarget__use_openldap
2888 $(call gb_LinkTarget_add_libs,$(1),\
2889 -lldap \
2890 -llber \
2893 endef
2895 gb_ExternalProject__use_openldap :=
2897 else # !SYSTEM_OPENLDAP
2899 define gb_LinkTarget__use_openldap
2900 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2901 $(call gb_LinkTarget_set_include,$(1),\
2902 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2903 $$(INCLUDE) \
2905 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2906 $(call gb_LinkTarget_add_libs,$(1), \
2907 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2908 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2911 endef
2913 define gb_ExternalProject__use_openldap
2914 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2916 endef
2918 endif # SYSTEM_OPENLDAP
2920 ifneq ($(SYSTEM_LIBTOMMATH),)
2922 define gb_LinkTarget__use_libtommath
2923 $(call gb_LinkTarget_set_include,$(1),\
2924 $(LIBTOMMATH_CFLAGS) \
2925 $$(INCLUDE) \
2927 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2929 endef
2931 else # !SYSTEM_LIBTOMMATH
2932 define gb_LinkTarget__use_libtommath
2933 $(call gb_LinkTarget_set_include,$(1),\
2934 -I${WORKDIR}/UnpackedTarball/libtommath \
2935 $$(INCLUDE) \
2937 $(call gb_LinkTarget_add_libs,$(1),\
2938 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2940 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2942 endef
2944 endif # SYSTEM_LIBTOMMATH
2946 define gb_ExternalProject__use_libtommath
2947 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2949 endef
2951 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2953 ifneq ($(SYSTEM_FIREBIRD),)
2955 define gb_LinkTarget__use_libfbembed
2956 $(call gb_LinkTarget_set_include,$(1),\
2957 $(FIREBIRD_CFLAGS) \
2958 $$(INCLUDE) \
2960 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2962 endef
2964 else # !SYSTEM_FIREBIRD
2966 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2967 #$(call gb_LinkTarget__use_libtommath,$(1))
2969 define gb_LinkTarget__use_libfbembed
2970 $(call gb_LinkTarget_use_package,$(1),firebird)
2971 $(call gb_LinkTarget_set_include,$(1),\
2972 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2973 $$(INCLUDE) \
2975 ifeq ($(COM),MSC)
2976 $(call gb_LinkTarget_add_libs,$(1),\
2977 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2979 else
2980 $(call gb_LinkTarget_add_libs,$(1),\
2981 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2983 endif
2985 endef
2988 # endef
2990 endif # SYSTEM_FIREBIRD
2992 else # !ENABLE_FIREBIRD_SDBC
2994 gb_LinkTarget__use_firebird :=
2995 # gb_LinkTarget__use_atomic_ops :=
2996 # gb_LinkTarget__use_libtommath :=
2998 endif # ENABLE_FIREBIRD_SDBC
3001 ifneq ($(SYSTEM_POSTGRESQL),)
3003 define gb_LinkTarget__use_postgresql
3005 $(call gb_LinkTarget_set_include,$(1),\
3006 $(POSTGRESQL_INC) \
3007 $$(INCLUDE) \
3010 $(call gb_LinkTarget_add_libs,$(1),\
3011 -lpq \
3014 $(call gb_LinkTarget_add_ldflags,$(1),\
3015 $(POSTGRESQL_LIB) \
3018 endef
3020 else # !SYSTEM_POSTGRESQL
3022 define gb_LinkTarget__use_postgresql
3024 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3026 $(call gb_LinkTarget_set_include,$(1),\
3027 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3028 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3029 $$(INCLUDE) \
3032 $(call gb_LinkTarget_add_libs,$(1),\
3033 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3036 ifeq ($(OS)$(COM),WNTMSC)
3037 $(call gb_LinkTarget_use_external,$(1),openssl)
3039 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3040 secur32 \
3041 ws2_32 \
3044 endif
3046 endef
3048 endif # SYSTEM_POSTGRESQL
3050 ifeq ($(ENABLE_KDE4),TRUE)
3052 define gb_LinkTarget__use_kde4
3053 $(call gb_LinkTarget_set_include,$(1),\
3054 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3055 $$(INCLUDE) \
3058 $(call gb_LinkTarget_add_defs,$(1),\
3059 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3062 $(call gb_LinkTarget_add_libs,$(1),\
3063 $(KDE4_LIBS) \
3066 endef
3068 else # !ENABLE_KDE4
3070 define gb_LinkTarget__use_kde4
3072 endef
3074 endif # ENABLE_KDE4
3077 ifeq ($(ENABLE_TDE),TRUE)
3079 define gb_LinkTarget__use_tde
3080 $(call gb_LinkTarget_add_libs,$(1),\
3081 $(TDE_LIBS) \
3084 $(call gb_LinkTarget_set_include,$(1),\
3085 $$(INCLUDE) \
3086 $(TDE_CFLAGS) \
3088 endef
3090 else # ! ENABLE_TDE
3092 define gb_LinkTarget__use_tde
3094 endef
3096 endif # ENABLE_TDE
3099 # PYTHON
3100 # extra python_headers external because pyuno wrapper must not link python
3101 ifneq ($(SYSTEM_PYTHON),)
3103 define gb_LinkTarget__use_python_headers
3104 $(call gb_LinkTarget_add_defs,$(1),\
3105 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3108 $(call gb_LinkTarget_set_include,$(1),\
3109 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3110 $$(INCLUDE) \
3113 endef
3115 define gb_LinkTarget__use_python
3116 $(call gb_LinkTarget__use_python_headers,$(1))
3118 $(call gb_LinkTarget_add_libs,$(1),\
3119 $(PYTHON_LIBS) \
3122 endef
3124 else # !SYSTEM_PYTHON
3126 $(eval $(call gb_Helper_register_packages_for_install,python,\
3127 python3 \
3130 define gb_LinkTarget__use_python_headers
3131 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3132 $(call gb_LinkTarget_set_include,$(1),\
3133 -I$(call gb_UnpackedTarball_get_dir,python3) \
3134 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3135 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3136 $$(INCLUDE) \
3139 endef
3141 define gb_LinkTarget__use_python
3142 $(call gb_LinkTarget__use_python_headers,$(1))
3143 ifeq ($(OS),MACOSX)
3144 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3145 else
3146 $(call gb_LinkTarget_use_package,$(1),python3)
3147 endif
3149 ifeq ($(OS),WNT)
3150 $(call gb_LinkTarget_add_libs,$(1),\
3151 $(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 \
3153 else ifeq ($(OS),MACOSX)
3154 $(call gb_LinkTarget_add_libs,$(1),\
3155 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3157 else
3158 $(call gb_LinkTarget_add_libs,$(1),\
3159 -L$(call gb_UnpackedTarball_get_dir,python3) \
3160 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3162 endif
3164 endef
3166 endif # SYSTEM_PYTHON
3168 # ORCUS
3169 ifeq ($(ENABLE_ORCUS),TRUE)
3171 ifneq ($(SYSTEM_LIBORCUS),)
3173 define gb_LinkTarget__use_orcus
3174 $(call gb_LinkTarget_set_include,$(1),\
3175 $$(INCLUDE) \
3176 $(ORCUS_CFLAGS) \
3178 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3179 endef
3181 define gb_LinkTarget__use_orcus-parser
3183 endef
3185 else # !SYSTEM_LIBORCUS
3187 ifeq ($(COM),MSC)
3189 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3190 orcus \
3191 orcus-parser \
3194 define gb_LinkTarget__use_orcus
3195 $(call gb_LinkTarget_set_include,$(1),\
3196 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3197 $$(INCLUDE) \
3200 $(call gb_LinkTarget_use_libraries,$(1),\
3201 orcus \
3204 endef
3206 define gb_LinkTarget__use_orcus-parser
3207 $(call gb_LinkTarget_set_include,$(1),\
3208 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3209 $$(INCLUDE) \
3212 $(call gb_LinkTarget_use_libraries,$(1),\
3213 orcus-parser \
3216 endef
3218 else # !MSC
3220 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3221 liborcus \
3224 define gb_LinkTarget__use_orcus
3225 $(call gb_LinkTarget_use_package,$(1),liborcus)
3227 $(call gb_LinkTarget_set_include,$(1),\
3228 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3229 $$(INCLUDE) \
3232 $(call gb_LinkTarget_add_libs,$(1),\
3233 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.12 \
3236 $(if $(SYSTEM_BOOST), \
3237 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3238 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3241 endef
3243 define gb_LinkTarget__use_orcus-parser
3244 $(call gb_LinkTarget_use_package,$(1),liborcus)
3246 $(call gb_LinkTarget_set_include,$(1),\
3247 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3248 $$(INCLUDE) \
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.12 \
3255 endef
3257 endif # MSC
3259 endif # SYSTEM_LIBORCUS
3261 else # ENABLE_ORCUS != TRUE
3263 gb_LinkTarget__use_orcus :=
3264 gb_LinkTarget__use_orcus-parser :=
3266 endif
3268 ifeq ($(ENABLE_EOT),TRUE)
3270 ifneq ($(SYSTEM_LIBEOT),)
3272 define gb_LinkTarget__use_libeot
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 $$(INCLUDE) \
3275 $(LIBEOT_CFLAGS) \
3277 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3279 endef
3281 gb_ExternalProject__use_libeot :=
3283 else # !SYSTEM_LIBEOT
3285 define gb_LinkTarget__use_libeot
3286 $(call gb_LinkTarget_set_include,$(1),\
3287 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3288 $$(INCLUDE) \
3290 $(call gb_LinkTarget_add_libs,$(1),\
3291 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3293 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3295 endef
3297 define gb_ExternalProject__use_libeot
3298 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3300 endef
3302 endif # SYSTEM_LIBEOT
3304 else # !ENABLE_EOT
3306 gb_LinkTarget__use_libeot :=
3307 gb_ExternalProject__use_libeot :=
3309 endif # ENABLE_EOT
3311 ### X11 stuff ###
3313 ifeq ($(USING_X11), TRUE)
3315 define gb_LinkTarget__use_Xrandr
3316 $(call gb_LinkTarget_set_include,$(1),\
3317 $$(INCLUDE) \
3318 $(XRANDR_CFLAGS) \
3321 $(call gb_LinkTarget_add_libs,$(1),\
3322 $(XRANDR_LIBS) \
3324 endef
3326 define gb_LinkTarget__use_Xrender
3327 $(call gb_LinkTarget_set_include,$(1),\
3328 $$(INCLUDE) \
3329 $(XRENDER_CFLAGS) \
3332 $(call gb_LinkTarget_add_libs,$(1),\
3333 $(XRENDER_LIBS) \
3335 endef
3337 endif # USING_X11
3340 gb_ExternalProject__use_nss3:=
3342 ifeq ($(OS),ANDROID)
3344 gb_LinkTarget__use_nss3:=
3345 gb_LinkTarget__use_plc4:=
3347 else
3349 ifneq ($(SYSTEM_NSS),)
3351 define gb_LinkTarget__use_nss3
3352 $(call gb_LinkTarget_add_defs,$(1),\
3353 -DSYSTEM_NSS \
3356 $(call gb_LinkTarget_set_include,$(1),\
3357 $$(INCLUDE) \
3358 $(NSS_CFLAGS) \
3361 $(call gb_LinkTarget_add_libs,$(1),\
3362 $(NSS_LIBS) \
3365 endef
3367 define gb_LinkTarget__use_plc4
3368 $(call gb_LinkTarget__use_nss3,$(1))
3370 endef
3372 define gb_LinkTarget__use_ssl3
3373 $(call gb_LinkTarget__use_nss3,$(1))
3375 endef
3377 else # !SYSTEM_NSS
3379 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3380 nss \
3383 define gb_LinkTarget__use_nss3
3384 $(call gb_LinkTarget_use_package,$(1),nss)
3385 $(call gb_LinkTarget_set_include,$(1),\
3386 $$(INCLUDE) \
3387 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3388 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3391 ifeq ($(COM),MSC)
3392 $(call gb_LinkTarget_add_libs,$(1),\
3393 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3394 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3395 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3397 else
3398 $(call gb_LinkTarget_add_libs,$(1),\
3399 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3400 -lnspr4 \
3401 -lnss3 \
3402 -lsmime3 \
3404 endif
3406 endef
3408 define gb_LinkTarget__use_plc4
3409 $(call gb_LinkTarget_use_package,$(1),nss)
3410 ifeq ($(COM),MSC)
3411 $(call gb_LinkTarget_add_libs,$(1),\
3412 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3414 else
3415 $(call gb_LinkTarget_add_libs,$(1),\
3416 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3418 endif
3420 endef
3422 define gb_LinkTarget__use_ssl3
3423 $(call gb_LinkTarget_use_package,$(1),nss)
3424 ifeq ($(COM),MSC)
3425 $(call gb_LinkTarget_add_libs,$(1),\
3426 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3428 else
3429 $(call gb_LinkTarget_add_libs,$(1),\
3430 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3432 endif
3434 endef
3436 define gb_ExternalProject__use_nss3
3437 $(call gb_ExternalProject_use_package,$(1),nss)
3439 endef
3441 endif # SYSTEM_NSS
3443 endif # DESKTOP
3445 ifeq ($(ENABLE_BREAKPAD),TRUE)
3447 define gb_LinkTarget__use_breakpad
3448 $(call gb_LinkTarget_set_include,$(1),\
3449 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3450 $$(INCLUDE) \
3453 ifeq ($(COM),MSC)
3454 $(call gb_LinkTarget_use_static_libraries,$(1),\
3455 breakpad \
3457 else
3458 $(call gb_LinkTarget_add_libs,$(1),\
3459 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3461 endif
3463 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3465 endef
3467 endif # ENABLE_BREAKPAD
3469 ifeq ($(ENABLE_GLTF),TRUE)
3471 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3473 define gb_LinkTarget__use_libgltf
3474 $(call gb_LinkTarget_set_include,$(1),\
3475 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3476 $$(INCLUDE) \
3479 ifeq ($(COM),MSC)
3480 $(call gb_LinkTarget_add_libs,$(1),\
3481 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3483 else
3484 $(call gb_LinkTarget_add_libs,$(1),\
3485 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3487 endif
3489 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3491 endef
3493 else # SYSTEM_LIBGLTF
3495 define gb_LinkTarget__use_libgltf
3496 $(call gb_LinkTarget_set_include,$(1),\
3497 $$(INCLUDE) \
3498 $(LIBGLTF_CFLAGS) \
3500 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3502 endef
3504 endif # SYSTEM_LIBGLTF
3506 ifeq ($(ENABLE_COLLADA),TRUE)
3508 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3510 define gb_LinkTarget__use_opencollada_parser
3511 $(call gb_LinkTarget_set_include,$(1),\
3512 $$(INCLUDE) \
3513 $(OPENCOLLADA_CFLAGS) \
3516 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3518 endef
3520 else # !SYSTEM_OPENCOLLADA
3522 define gb_LinkTarget__use_opencollada_parser
3523 $(call gb_LinkTarget_set_include,$(1),\
3524 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3525 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3526 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3527 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3528 $$(INCLUDE) \
3531 $(call gb_LinkTarget_use_static_libraries,$(1),\
3532 opencollada_parser \
3534 endef
3536 endif # SYSTEM_OPENCOLLADA
3538 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3540 define gb_LinkTarget__use_collada2gltf
3541 $(call gb_LinkTarget_set_include,$(1),\
3542 $$(INCLUDE) \
3543 $(COLLADA2GLTF_CFLAGS) \
3546 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3548 endef
3550 else # !SYSTEM_COLLADA2GLTF
3552 define gb_LinkTarget__use_collada2gltf
3553 $(call gb_LinkTarget_set_include,$(1),\
3554 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3555 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3556 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3557 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3558 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3559 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3560 $$(INCLUDE) \
3563 $(call gb_LinkTarget_use_static_libraries,$(1),\
3564 collada2gltf \
3566 endef
3568 endif # SYSTEM_COLLADA2GLTF
3570 endif # ENABLE_COLLADA
3572 endif # ENABLE_GLTF
3574 define gb_LinkTarget__use_dconf
3575 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3576 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3577 endef
3579 ### Jars ############################################################
3581 ifneq ($(SYSTEM_HSQLDB),)
3583 define gb_Jar__use_hsqldb
3584 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3585 endef
3586 define gb_JunitTest__use_hsqldb
3587 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3588 endef
3590 else # !SYSTEM_HSQLDB
3592 ifeq ($(ENABLE_JAVA),TRUE)
3593 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3594 hsqldb \
3596 endif
3598 define gb_Jar__use_hsqldb
3599 $(call gb_Jar_use_jar,$(1),hsqldb)
3600 endef
3601 define gb_JunitTest__use_hsqldb
3602 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3603 endef
3605 endif # SYSTEM_HSQLDB
3608 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3610 ifneq ($(SYSTEM_BSH),)
3612 define gb_Jar__use_bsh
3613 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3614 endef
3616 else # !SYSTEM_BSH
3618 ifeq ($(ENABLE_JAVA),TRUE)
3619 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3620 bsh \
3622 endif
3624 define gb_Jar__use_bsh
3625 $(call gb_Jar_use_jar,$(1),bsh)
3626 endef
3628 endif # SYSTEM_BSH
3630 endif
3632 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3634 ifneq ($(SYSTEM_RHINO),)
3636 define gb_Jar__use_rhino
3637 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3638 endef
3640 else # !SYSTEM_RHINO
3642 ifeq ($(ENABLE_JAVA),TRUE)
3643 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3644 js \
3646 endif
3648 define gb_Jar__use_rhino
3649 $(call gb_Jar_use_jar,$(1),js)
3650 endef
3652 endif # SYSTEM_RHINO
3654 endif
3656 ifneq ($(SYSTEM_APACHE_COMMONS),)
3658 define gb_Jar__use_commons-logging
3659 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3660 endef
3661 gb_ExternalProject__use_commons-logging :=
3663 else # !SYSTEM_APACHE_COMMONS
3665 ifeq ($(ENABLE_JAVA),TRUE)
3666 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3667 commons-logging-$(COMMONS_LOGGING_VERSION) \
3669 endif
3671 define gb_Jar__use_commons-logging
3672 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3673 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3674 endef
3675 define gb_ExternalProject__use_commons-logging
3676 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3677 endef
3679 endif # SYSTEM_APACHE_COMMONS
3682 ifneq ($(SYSTEM_JFREEREPORT),)
3684 define gb_Jar__use_flow-engine
3685 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3686 endef
3688 define gb_Jar__use_flute
3689 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3690 endef
3692 define gb_Jar__use_libbase
3693 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3694 endef
3696 define gb_Jar__use_libfonts
3697 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3698 endef
3700 define gb_Jar__use_libformula
3701 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3702 endef
3704 define gb_Jar__use_liblayout
3705 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3706 endef
3708 define gb_Jar__use_libloader
3709 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3710 endef
3712 define gb_Jar__use_librepository
3713 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3714 endef
3716 define gb_Jar__use_libserializer
3717 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3718 endef
3720 define gb_Jar__use_libxml
3721 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3722 endef
3724 define gb_Jar__use_sac
3725 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3726 endef
3728 else # !SYSTEM_JFREEREPORT
3730 ifeq ($(ENABLE_JAVA),TRUE)
3731 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3732 flow-engine \
3733 flute-1.1.6 \
3734 libbase-1.1.6 \
3735 libfonts-1.1.6 \
3736 libformula-1.1.7 \
3737 liblayout \
3738 libloader-1.1.6 \
3739 librepository-1.1.6 \
3740 libserializer-1.1.6 \
3741 libxml-1.1.7 \
3742 sac \
3744 endif
3746 define gb_Jar__use_flow-engine
3747 $(call gb_Jar_use_jar,$(1),flow-engine)
3748 endef
3750 define gb_Jar__use_flute
3751 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3752 endef
3754 define gb_Jar__use_libbase
3755 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3756 endef
3758 define gb_Jar__use_libfonts
3759 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3760 endef
3762 define gb_Jar__use_libformula
3763 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3764 endef
3766 define gb_Jar__use_liblayout
3767 $(call gb_Jar_use_jar,$(1),liblayout)
3768 endef
3770 define gb_Jar__use_libloader
3771 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3772 endef
3774 define gb_Jar__use_librepository
3775 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3776 endef
3778 define gb_Jar__use_libserializer
3779 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3780 endef
3782 define gb_Jar__use_libxml
3783 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3784 endef
3786 define gb_Jar__use_sac
3787 $(call gb_Jar_use_jar,$(1),sac)
3788 endef
3790 endif # SYSTEM_JFREEREPORT
3793 # Executables
3795 # FIXME: the library target should be for build too
3796 define gb_Executable__register_bestreversemap
3797 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3798 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3800 endef
3802 # TODO depending on the whole URE might be overkill, but I do not have a
3803 # Windows machine to debug it...
3804 # FIXME: the library target should be for build too
3805 define gb_Executable__register_climaker
3806 $(call gb_Executable_add_runtime_dependencies,climaker,\
3807 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3808 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3809 $(call gb_UnoApi_get_target,udkapi) \
3810 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3812 endef
3814 define gb_Executable__register_cppumaker
3815 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3816 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3818 endef
3820 # This is used to determine what we need for 'build' platform.
3821 # FIXME: the library target should be for build too
3822 define gb_Executable__register_gengal
3823 $(call gb_Executable_add_runtime_dependencies,gengal,\
3824 $(call gb_AllLangResTarget_get_target,ofa) \
3825 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3826 $(call gb_Package_get_target_for_build,postprocess_images) \
3827 $(call gb_Package_get_target_for_build,postprocess_registry) \
3828 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3829 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3830 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3831 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3832 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3833 $(call gb_UnoApi_get_target,offapi) \
3834 $(call gb_UnoApi_get_target,udkapi) \
3836 endef
3838 ifeq ($(SYSTEM_ICU),)
3840 define gb_Executable__register_gendict
3841 $(call gb_Executable_add_runtime_dependencies,gendict,\
3842 $(call gb_Package_get_target_for_build,icu) \
3843 $(call gb_Package_get_target_for_build,icu_ure) \
3845 endef
3847 endif
3849 define gb_Executable__register_idlc
3850 $(call gb_Executable_add_runtime_dependencies,idlc,\
3851 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3853 endef
3855 define gb_Executable__register_localize
3856 $(call gb_Executable_add_runtime_dependencies,localize,\
3857 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3858 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3861 endef
3863 # FIXME ure/services.rdb needs cleanup
3864 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3865 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3866 # FIXME: the library target should be for build too
3867 define gb_Executable__register_saxparser
3868 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3869 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3870 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3871 $(call gb_Rdb_get_target_for_build,saxparser) \
3872 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3873 $(call gb_UnoApi_get_target,udkapi) \
3875 endef
3877 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3878 # required due to the settings for URE_SERVICES and URE_TYPES in
3879 # cppuhelper/source/unorc
3880 # FIXME: the library target should be for build too
3881 define gb_Executable__register_uno
3882 $(call gb_Executable_add_runtime_dependencies,uno,\
3883 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3884 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3885 $(call gb_UnoApi_get_target,udkapi) \
3887 endef
3890 # External executables
3892 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3894 gb_ExternalExecutable__register_xmllint :=
3896 else # ! SYSTEM_LIBXML_FOR_BUILD
3898 define gb_ExternalExecutable__register_xmllint
3899 $(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)
3900 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3901 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3902 $(call gb_Package_get_target,xml2) \
3905 endef
3907 endif # SYSTEM_LIBXML_FOR_BUILD
3909 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3911 gb_ExternalExecutable__register_xsltproc :=
3913 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3915 define gb_ExternalExecutable__register_xsltproc
3916 $(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)
3917 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3918 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3919 $(call gb_Package_get_target,xml2) \
3920 $(call gb_Package_get_target,xslt) \
3923 endef
3925 endif # SYSTEM_LIBXSLT_FOR_BUILD
3927 ifneq (,$(SYSTEM_UCPP))
3929 gb_ExternalExecutable__register_ucpp :=
3931 else # ! SYSTEM_UCPP
3933 define gb_ExternalExecutable__register_ucpp
3934 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3936 endef
3938 endif # SYSTEM_UCPP
3940 ifeq (,$(PYTHON_FOR_BUILD))
3942 define gb_ExternalExecutable__register_python
3943 ifeq ($(OS),MACOSX)
3945 # use set_external, to avoid having the command added as prerequisite for the
3946 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3947 # matching rule to build that specific file)
3948 $(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))
3949 # the Zip ensures that internal python has been built (cannot use the Package
3950 # target, as that is not used on Mac)
3951 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3953 else
3955 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3956 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3957 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3959 endif
3961 endef
3963 else
3965 define gb_ExternalExecutable__register_python
3966 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3968 endef
3970 endif # PYTHON_FOR_BUILD
3972 ifneq ($(SYSTEM_GENBRK),)
3974 define gb_ExternalExecutable__register_genbrk
3975 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3977 endef
3979 else # ! SYSTEM_GENBRK
3981 define gb_ExternalExecutable__register_genbrk
3982 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3983 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3984 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3985 $(call gb_Package_get_target_for_build,icu) \
3986 $(call gb_Package_get_target_for_build,icu_ure) \
3989 endef
3991 endif
3993 ifneq ($(SYSTEM_GENCCODE),)
3995 define gb_ExternalExecutable__register_genccode
3996 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3998 endef
4000 else # ! SYSTEM_GENCCODE
4002 define gb_ExternalExecutable__register_genccode
4003 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4004 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4005 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4006 $(call gb_Package_get_target_for_build,icu) \
4007 $(call gb_Package_get_target_for_build,icu_ure) \
4010 endef
4012 endif
4014 ifneq ($(SYSTEM_GENCMN),)
4016 define gb_ExternalExecutable__register_gencmn
4017 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4019 endef
4021 else # ! SYSTEM_GENCMN
4023 define gb_ExternalExecutable__register_gencmn
4024 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4025 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4026 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4027 $(call gb_Package_get_target_for_build,icu) \
4028 $(call gb_Package_get_target_for_build,icu_ure) \
4031 endef
4033 endif
4035 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4037 $(eval $(call gb_Helper_register_jars,OXT,\
4038 owncloud-android-library \
4041 define gb_Jar__use_owncloud_android_lib
4042 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4043 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4044 endef
4045 define gb_ExternalProject__use_owncloud_android_lib
4046 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4047 endef
4049 endif
4051 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4052 ifneq ($(SYSTEM_BZIP2),)
4054 define gb_LinkTarget__use_bzip2
4055 $(call gb_LinkTarget_set_include,$(1),\
4056 $(BZIP2_CFLAGS) \
4057 $$(INCLUDE) \
4059 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4061 endef
4063 gb_ExternalProject__use_bzip2 :=
4065 else # !SYSTEM_BZIP2
4067 define gb_LinkTarget__use_bzip2
4068 $(call gb_LinkTarget_set_include,$(1),\
4069 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4070 $$(INCLUDE) \
4073 ifeq ($(COM),MSC)
4074 $(call gb_LinkTarget_add_libs,$(1),\
4075 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4077 else
4078 $(call gb_LinkTarget_add_libs,$(1),\
4079 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4081 endif
4083 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4084 endef
4086 define gb_ExternalProject__use_bzip2
4087 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4088 endef
4090 endif
4091 endif
4093 define gb_LinkTarget__use_clew
4094 $(call gb_LinkTarget_set_include,$(1), \
4095 -I$(SRCDIR)/external/clew/source/include \
4096 $$(INCLUDE) \
4098 $(call gb_LinkTarget_use_libraries,$(1),clew)
4099 endef
4101 # vim: set noet sw=4 ts=4: