Bump version to 4.3-4
[LibreOffice.git] / RepositoryExternal.mk
blobf194fcbe95103fbc437e3e82ddfce4245fb47b62
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.
30 # External headers
32 ifneq ($(SYSTEM_MESA_HEADERS),)
34 gb_LinkTarget__use_mesa_headers :=
36 else # !SYSTEM_MESA_HEADERS
38 define gb_LinkTarget__use_mesa_headers
39 $(call gb_LinkTarget_set_include,$(1),\
40 -I$(SRCDIR)/external/Mesa/inc \
41 $$(INCLUDE) \
44 endef
46 endif # SYSTEM_MESA_HEADERS
48 ifneq ($(SYSTEM_NPAPI_HEADERS),)
50 # yes this uses internal headers too...
51 # they are split across 2 dirs for this reason
52 define gb_LinkTarget__use_npapi_headers
53 $(call gb_LinkTarget_set_include,$(1),\
54 $(NPAPI_HEADERS_CFLAGS) \
55 -I$(SRCDIR)/external/np_sdk \
56 $$(INCLUDE) \
59 endef
61 else #!SYSTEM_NPAPI_HEADERS
63 define gb_LinkTarget__use_npapi_headers
64 $(call gb_LinkTarget_set_include,$(1),\
65 -I$(SRCDIR)/external/np_sdk/inc \
66 -I$(SRCDIR)/external/np_sdk \
67 $$(INCLUDE) \
70 endef
72 endif #SYSTEM_NPAPI_HEADERS
74 ifneq ($(SYSTEM_ODBC_HEADERS),)
76 define gb_LinkTarget__use_odbc_headers
77 $(call gb_LinkTarget_add_defs,$(1),\
78 -DSYSTEM_ODBC_HEADERS \
81 endef
83 else # !SYSTEM_ODBC_HEADERS
85 define gb_LinkTarget__use_odbc_headers
86 $(call gb_LinkTarget_set_include,$(1),\
87 -I$(SRCDIR)/external/unixODBC/inc \
88 $$(INCLUDE) \
91 endef
93 endif # SYSTEM_ODBC_HEADERS
95 ifneq ($(SYSTEM_VIGRA),)
97 gb_LinkTarget__use_vigra_headers :=
99 else
101 define gb_LinkTarget__use_vigra_headers
102 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
103 $(call gb_LinkTarget_set_include,$(1),\
104 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
105 $$(INCLUDE) \
108 endef
110 endif
112 ifneq ($(SYSTEM_MDDS),)
114 gb_ExternalProject__use_mdds_headers :=
116 define gb_LinkTarget__use_mdds_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(MDDS_CFLAGS) \
119 $$(INCLUDE) \
122 endef
124 else # !SYSTEM_MDDS
126 define gb_ExternalProject__use_mdds_headers
127 $(call gb_ExternalProject_use_external_project,$(1),mdds)
129 endef
131 define gb_LinkTarget__use_mdds_headers
132 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
133 $(call gb_LinkTarget_set_include,$(1),\
134 $(MDDS_CFLAGS) \
135 $$(INCLUDE) \
138 endef
140 endif # SYSTEM_MDDS
142 ifneq ($(SYSTEM_GLM),)
144 gb_LinkTarget__use_glm_headers :=
145 gb_ExternalProject__use_glm_headers :=
147 else
149 define gb_LinkTarget__use_glm_headers
150 $(call gb_LinkTarget_use_unpacked,$(1),glm)
151 $(call gb_LinkTarget_set_include,$(1),\
152 -I$(call gb_UnpackedTarball_get_dir,glm) \
153 $$(INCLUDE) \
156 endef
158 define gb_ExternalProject__use_glm_headers
159 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
161 endef
163 endif
165 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
167 define gb_LinkTarget__use_sane_headers
168 $(call gb_LinkTarget_set_include,$(1),\
169 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
170 $$(INCLUDE) \
173 endef
175 else
177 gb_LinkTarget__use_sane_headers :=
179 endif
181 ifneq ($(SYSTEM_BLUEZ),)
183 gb_LinkTarget__use_bluez_bluetooth_headers :=
185 else # !SYSTEM_BLUEZ
187 define gb_LinkTarget__use_bluez_bluetooth_headers
188 $(call gb_LinkTarget_set_include,$(1),\
189 -I$(SRCDIR)/external/bluez_bluetooth/inc \
190 $$(INCLUDE) \
193 endef
195 endif # SYSTEM_BLUEZ
197 # External libraries
199 ifneq ($(SYSTEM_CPPUNIT),)
201 define gb_LinkTarget__use_cppunit
202 $(call gb_LinkTarget_set_include,$(1),\
203 $$(INCLUDE) \
204 $(CPPUNIT_CFLAGS) \
207 $(call gb_LinkTarget_add_libs,$(1),\
208 $(CPPUNIT_LIBS) \
211 endef
213 else # !SYSTEM_CPPUNIT
215 define gb_LinkTarget__use_cppunit
216 $(call gb_LinkTarget_use_external_project,$(1),cppunit)
218 $(call gb_LinkTarget_set_include,$(1),\
219 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
220 $$(INCLUDE) \
223 ifeq ($(COM),MSC)
224 $(call gb_LinkTarget_add_libs,$(1),\
225 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
227 else
228 $(call gb_LinkTarget_add_libs,$(1),\
229 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
231 endif
233 endef
235 endif # SYSTEM_CPPUNIT
237 ifneq ($(SYSTEM_GLEW),)
239 define gb_LinkTarget__use_glew
240 $(call gb_LinkTarget_set_include,$(1),\
241 $$(INCLUDE) \
242 $(GLEW_CFLAGS) \
244 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
246 endef
248 gb_ExternalProject__use_glew :=
250 else # !SYSTEM_GLEW
252 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
253 glew \
256 define gb_LinkTarget__use_glew
257 $(call gb_LinkTarget_use_package,$(1),glew)
258 $(call gb_LinkTarget_set_include,$(1),\
259 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
260 $$(INCLUDE) \
263 ifeq ($(COM),MSC)
264 $(call gb_LinkTarget_add_libs,$(1),\
265 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/Win32/glew32d.lib,Release/Win32/glew32.lib) \
267 else
268 $(call gb_LinkTarget_add_libs,$(1),\
269 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
271 endif
273 endef
275 define gb_ExternalProject__use_glew
276 $(call gb_ExternalProject_use_external_project,$(1),glew)
278 endef
280 endif # SYSTEM_GLEW
282 define gb_LinkTarget__use_iconv
283 $(call gb_LinkTarget_add_libs,$(1),-liconv)
285 endef
287 ifneq ($(SYSTEM_MARIADB),)
289 define gb_LinkTarget__use_mariadb
290 $(call gb_LinkTarget_set_include,$(1),\
291 $$(INCLUDE) \
292 $(MARIADB_CFLAGS) \
294 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
296 endef
297 gb_ExternalProject__use_mariadb :=
299 else # !SYSTEM_MARIADB
301 define gb_LinkTarget__use_mariadb
302 $(call gb_LinkTarget_set_include,$(1),\
303 $$(INCLUDE) \
304 $(MARIADB_CFLAGS) \
306 $(call gb_LinkTarget_use_static_libraries,$(1),\
307 mariadblib \
310 endef
311 define gb_ExternalProject__use_mariadb
312 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
314 endef
316 endif # SYSTEM_MARIADB
319 ifneq ($(SYSTEM_MARIADB),)
321 define gb_LinkTarget__use_mysql
323 $(call gb_LinkTarget_add_defs,$(1),\
324 -DSYSTEM_MARIADB \
327 $(call gb_LinkTarget_add_libs,$(1),\
328 $(MARIADB_LIBS) \
331 $(call gb_LinkTarget_set_include,$(1),\
332 $(MARIADB_CFLAGS) \
333 $$(INCLUDE) \
335 endef
337 else
339 define gb_LinkTarget__use_mysql
341 $(call gb_LinkTarget_set_include,$(1),\
342 $$(INCLUDE) \
345 endef
347 endif
349 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
351 define gb_LinkTarget__use_mysqlcppconn
352 $(call gb_LinkTarget_add_libs,$(1),\
353 -lmysqlcppconn \
356 $(call gb_LinkTarget_add_defs,$(1),\
357 -DSYSTEM_MYSQL_CPPCONN \
359 endef
361 else
363 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
364 mysqlcppconn \
367 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
368 define gb_LinkTarget__use_mysqlcppconn
370 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
372 $(call gb_LinkTarget_add_defs,$(1),\
373 -DCPPCONN_LIB_BUILD \
376 $(call gb_LinkTarget_set_include,$(1),\
377 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
378 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
379 $$(INCLUDE) \
382 endef
384 endif
386 ifneq ($(SYSTEM_ZLIB),)
388 define gb_LinkTarget__use_zlib
389 $(call gb_LinkTarget_add_defs,$(1),\
390 -DSYSTEM_ZLIB \
392 $(call gb_LinkTarget_add_libs,$(1),-lz)
394 endef
396 # nothing on system
397 define gb_LinkTarget__use_zlib_x64
399 endef
401 gb_ExternalProject__use_zlib :=
403 else # !SYSTEM_ZLIB
405 define gb_LinkTarget__use_zlib_multiarch
406 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
408 $(call gb_LinkTarget_set_include,$(1),\
409 $(ZLIB_CFLAGS) \
410 $$(INCLUDE) \
413 $(call gb_LinkTarget_use_static_libraries,$(1),\
414 $(2) \
417 endef
419 define gb_LinkTarget__use_zlib
420 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
422 endef
424 define gb_LinkTarget__use_zlib_x64
425 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
427 endef
429 define gb_ExternalProject__use_zlib
430 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
432 endef
434 endif # SYSTEM_ZLIB
437 ifneq ($(SYSTEM_JPEG),)
439 define gb_LinkTarget__use_jpeg
440 $(call gb_LinkTarget_add_libs,$(1),-ljpeg)
441 $(call gb_LinkTarget_set_ldflags,$(1),\
442 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
445 endef
447 else # !SYSTEM_JPEG
449 define gb_LinkTarget__use_jpeg
450 $(call gb_LinkTarget_set_include,$(1),\
451 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
452 $$(INCLUDE) \
455 $(call gb_LinkTarget_use_static_libraries,$(1),\
456 jpeg \
459 endef
461 endif # SYSTEM_JPEG
463 ifneq ($(SYSTEM_MYTHES),)
465 define gb_LinkTarget__use_mythes
466 $(call gb_LinkTarget_set_include,$(1),\
467 $$(INCLUDE) \
468 $(MYTHES_CFLAGS) \
470 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
472 endef
474 else # !SYSTEM_MYTHES
476 define gb_LinkTarget__use_mythes
477 $(call gb_LinkTarget_set_include,$(1),\
478 -I$(call gb_UnpackedTarball_get_dir,mythes) \
479 $$(INCLUDE) \
482 ifeq ($(COM),MSC)
483 $(call gb_LinkTarget_use_static_libraries,$(1),\
484 mythes \
486 else
487 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
488 $(call gb_LinkTarget_use_external_project,$(1),mythes)
489 endif
491 endef
493 endif # SYSTEM_MYTHES
496 ifneq ($(SYSTEM_EXPAT),)
498 define gb_LinkTarget__use_expat_impl
499 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
501 $(call gb_LinkTarget_add_defs,$(1),\
502 -DSYSTEM_EXPAT \
505 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
507 endef
509 gb_ExternalProject__use_expat :=
511 else # !SYSTEM_EXPAT
513 define gb_LinkTarget__use_expat_impl
514 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
516 $(call gb_LinkTarget_set_include,$(1),\
517 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
518 $$(INCLUDE) \
521 $(call gb_LinkTarget_use_static_libraries,$(1),\
522 $(2) \
525 endef
527 define gb_ExternalProject__use_expat
528 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
530 endef
532 endif # SYSTEM_EXPAT
534 define gb_LinkTarget__use_expat
535 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
537 endef
539 define gb_LinkTarget__use_expat_x64
540 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
542 endef
544 ifneq ($(SYSTEM_HYPH),)
546 define gb_LinkTarget__use_hyphen
547 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
549 endef
551 else # !SYSTEM_HYPH
553 define gb_LinkTarget__use_hyphen
554 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
555 $(call gb_LinkTarget_set_include,$(1),\
556 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
557 $$(INCLUDE) \
560 ifeq ($(COM),MSC)
561 $(call gb_LinkTarget_use_static_libraries,$(1),\
562 hyphen \
564 else
565 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
566 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
567 endif
569 endef
571 endif # SYSTEM_HYPH
573 ifneq ($(SYSTEM_HUNSPELL),)
575 define gb_LinkTarget__use_hunspell
576 $(call gb_LinkTarget_set_include,$(1),\
577 $$(INCLUDE) \
578 $(HUNSPELL_CFLAGS) \
580 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
582 endef
584 gb_ExternalProject__use_hunspell :=
586 else # !SYSTEM_HUNSPELL
588 define gb_LinkTarget__use_hunspell
589 $(call gb_LinkTarget_add_defs,$(1),\
590 -DHUNSPELL_STATIC \
592 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
593 $(call gb_LinkTarget_set_include,$(1),\
594 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
595 $$(INCLUDE) \
598 ifeq ($(COM),MSC)
599 $(call gb_LinkTarget_use_static_libraries,$(1),\
600 hunspell \
602 else
603 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
604 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
605 endif
607 endef
609 define gb_ExternalProject__use_hunspell
610 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
612 endef
614 endif # SYSTEM_HUNSPELL
617 ifneq ($(SYSTEM_BOOST),)
619 define gb_LinkTarget__use_boostdatetime
620 $(call gb_LinkTarget_set_include,$(1),\
621 $$(INCLUDE) \
622 $(BOOST_CPPFLAGS) \
625 $(call gb_LinkTarget_add_ldflags,$(1),\
626 $(BOOST_LDFLAGS) \
629 $(call gb_LinkTarget_add_libs,$(1),\
630 $(BOOST_DATE_TIME_LIB) \
633 endef
635 define gb_LinkTarget__use_boost_iostreams
636 $(call gb_LinkTarget_set_include,$(1),\
637 $$(INCLUDE) \
638 $(BOOST_CPPFLAGS) \
641 $(call gb_LinkTarget_add_ldflags,$(1),\
642 $(BOOST_LDFLAGS) \
645 $(call gb_LinkTarget_add_libs,$(1),\
646 $(BOOST_IOSTREAMS_LIB) \
649 endef
651 gb_ExternalProject__use_boost_iostreams :=
653 define gb_LinkTarget__use_boost_system
654 $(call gb_LinkTarget_set_include,$(1),\
655 $$(INCLUDE) \
656 $(BOOST_CPPFLAGS) \
659 $(call gb_LinkTarget_add_ldflags,$(1),\
660 $(BOOST_LDFLAGS) \
663 $(call gb_LinkTarget_add_libs,$(1),\
664 $(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 ifeq ($(OS),WNT)
684 define gb_LinkTarget__use_boostthread
685 $(call gb_LinkTarget_add_defs,$(1),\
686 -DBOOST_ALL_NO_LIB \
689 $(call gb_LinkTarget_use_static_libraries,$(1),\
690 boostthread \
692 endef
693 endif
695 define gb_LinkTarget__use_boostdatetime
696 $(call gb_LinkTarget_add_defs,$(1),\
697 -DBOOST_ALL_NO_LIB \
700 $(call gb_LinkTarget_use_static_libraries,$(1),\
701 boostdatetime \
704 endef
706 define gb_LinkTarget__use_boost_iostreams
707 $(call gb_LinkTarget_add_defs,$(1),\
708 -DBOOST_ALL_NO_LIB \
711 $(call gb_LinkTarget_use_static_libraries,$(1),\
712 boost_iostreams \
715 endef
717 define gb_ExternalProject__use_boost_iostreams
718 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
719 endef
721 define gb_LinkTarget__use_boost_system
722 $(call gb_LinkTarget_add_defs,$(1),\
723 -DBOOST_ALL_NO_LIB \
726 $(call gb_LinkTarget_use_static_libraries,$(1),\
727 boost_system \
730 endef
732 define gb_ExternalProject__use_boost_system
733 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
734 endef
736 define gb_LinkTarget__use_boost_headers
737 $(call gb_LinkTarget_use_unpacked,$(1),boost)
738 $(call gb_LinkTarget_set_include,$(1),\
739 -I$(call gb_UnpackedTarball_get_dir,boost) \
740 $$(INCLUDE) \
743 endef
745 define gb_ExternalProject__use_boost_headers
746 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
748 endef
749 endif # SYSTEM_BOOST
752 ifneq ($(SYSTEM_CMIS),)
754 define gb_LinkTarget__use_cmis
755 $(call gb_LinkTarget_set_include,$(1),\
756 $$(INCLUDE) \
757 $(CMIS_CFLAGS) \
759 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
761 endef
763 else # !SYSTEM_CMIS
765 define gb_LinkTarget__use_cmis
766 $(call gb_LinkTarget_set_include,$(1),\
767 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
768 $$(INCLUDE) \
770 $(call gb_LinkTarget_use_static_libraries,$(1),\
771 cmislib \
774 endef
776 endif # SYSTEM_CMIS
778 ifeq ($(ENABLE_JAVA),TRUE)
780 ifeq ($(OS)$(COM),WNTGCC)
782 define gb_LinkTarget__use_jawt
783 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
785 $(call gb_LinkTarget_add_ldflags,$(1),\
786 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
789 $(call gb_LinkTarget_add_libs,$(1),\
790 $(JAWTLIB) \
793 endef
795 else # $(OS)$(COM) != WNTGCC
797 define gb_LinkTarget__use_jawt
798 $(call gb_LinkTarget_add_libs,$(1),\
799 $(JAWTLIB) \
802 endef
804 endif # $(OS)$(COM) = WNTGCC
806 else # !ENABLE_JAVA
808 gb_LinkTarget__use_jawt :=
810 endif # ENABLE_JAVA
812 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
814 define gb_LinkTarget__use_libatomic_ops
815 $(call gb_LinkTarget_set_include,$(1),\
816 $$(INCLUDE) \
817 $(LIBATOMIC_OPS_CFLAGS) \
819 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
821 endef
822 gb_ExternalProject__use_libatomic_ops :=
824 else # !SYSTEM_LIBATOMIC_OPS
826 define gb_LinkTarget__use_libatomic_ops
827 $(call gb_LinkTarget_set_include,$(1),\
828 $(LIBATOMIC_OPS_CFLAGS) \
829 $$(INCLUDE) \
830 $(LIBATOMIC_OPS_CFLAGS) \
832 $(call gb_LinkTarget_use_external_project,$(1),\
833 libatomic_ops \
836 $(call gb_LinkTarget_add_libs,$(1),\
837 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
840 endef
842 define gb_ExternalProject__use_libatomic_ops
843 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
845 endef
847 endif # SYSTEM_LIBATOMIC_OPS
850 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
852 define gb_LinkTarget__use_libexttextcat
853 $(call gb_LinkTarget_set_include,$(1),\
854 $$(INCLUDE) \
855 $(LIBEXTTEXTCAT_CFLAGS) \
857 $(call gb_LinkTarget_add_defs,$(1),\
858 -DSYSTEM_LIBEXTTEXTCAT \
860 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
862 endef
864 else # !SYSTEM_LIBEXTTEXTCAT
866 define gb_LinkTarget__use_libexttextcat
867 $(call gb_LinkTarget_set_include,$(1),\
868 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
869 $$(INCLUDE) \
872 ifeq ($(COM),MSC)
873 $(call gb_LinkTarget_use_static_libraries,$(1),\
874 exttextcat \
876 else
877 $(call gb_LinkTarget_add_libs,$(1),\
878 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
880 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
881 endif
884 endef
886 endif # SYSTEM_LIBEXTTEXTCAT
889 ifneq ($(SYSTEM_LIBXML),)
891 define gb_LinkTarget__use_libxml2
892 $(call gb_LinkTarget_add_defs,$(1),\
893 -DSYSTEM_LIBXML \
895 $(call gb_LinkTarget_set_include,$(1),\
896 $$(INCLUDE) \
897 $(LIBXML_CFLAGS) \
899 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
901 endef
902 gb_ExternalProject__use_libxml2:=
904 else # !SYSTEM_LIBXML
906 $(eval $(call gb_Helper_register_packages_for_install,ure,\
907 xml2 \
910 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
911 xml2_win32 \
914 define gb_LinkTarget__use_libxml2
915 $(call gb_LinkTarget_use_package,$(1),xml2)
916 $(call gb_LinkTarget_set_include,$(1),\
917 $$(INCLUDE) \
918 $(LIBXML_CFLAGS) \
921 $(call gb_LinkTarget_add_libs,$(1),\
922 $(LIBXML_LIBS) \
925 ifeq ($(COM),MSC)
926 $(call gb_LinkTarget_use_external,$(1),icu_headers)
927 endif
929 endef
930 define gb_ExternalProject__use_libxml2
931 $(call gb_ExternalProject_use_package,$(1),xml2)
933 ifeq ($(COM),MSC)
934 $(call gb_ExternalProject_use_external_project,$(1),icu)
935 endif
937 endef
939 endif # SYSTEM_LIBXML
942 ifneq ($(SYSTEM_LIBXSLT),)
944 define gb_LinkTarget__use_libxslt
945 $(call gb_LinkTarget_set_include,$(1),\
946 $$(INCLUDE) \
947 $(LIBXSLT_CFLAGS) \
949 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
951 endef
953 define gb_LinkTarget__use_libexslt
954 $(call gb_LinkTarget_set_include,$(1),\
955 $$(INCLUDE) \
956 $(LIBEXSLT_CFLAGS) \
959 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
961 endef
963 else # !SYSTEM_LIBXSLT
965 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
966 xslt \
969 define gb_LinkTarget__use_libxslt
970 $(call gb_LinkTarget_use_package,$(1),xslt)
971 $(call gb_LinkTarget_set_include,$(1),\
972 $$(INCLUDE) \
973 -I$(call gb_UnpackedTarball_get_dir,xslt) \
976 ifeq ($(COM),MSC)
977 $(call gb_LinkTarget_add_libs,$(1),\
978 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
980 else
981 $(call gb_LinkTarget_add_libs,$(1),\
982 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
984 endif
986 endef
988 define gb_LinkTarget__use_libexslt
989 $(call gb_LinkTarget_use_package,$(1),xslt)
990 $(call gb_LinkTarget_set_include,$(1),\
991 $$(INCLUDE) \
992 -I$(call gb_UnpackedTarball_get_dir,xslt) \
995 ifeq ($(COM),MSC)
996 $(call gb_LinkTarget_add_libs,$(1),\
997 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
999 else
1000 $(call gb_LinkTarget_add_libs,$(1),\
1001 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
1003 endif
1005 endef
1007 endif # SYSTEM_LIBXSLT
1009 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
1011 ifneq ($(SYSTEM_LIBLANGTAG),)
1013 define gb_LinkTarget__use_liblangtag
1014 $(call gb_LinkTarget_set_include,$(1),\
1015 $$(INCLUDE) \
1016 $(LIBLANGTAG_CFLAGS) \
1019 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1021 endef
1023 else # !SYSTEM_LIBLANGTAG
1025 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1026 liblangtag_data \
1029 define gb_LinkTarget__use_liblangtag
1030 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
1031 $(call gb_LinkTarget_set_include,$(1),\
1032 -I$(call gb_UnpackedTarball_get_dir,langtag) \
1033 $$(INCLUDE) \
1035 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1036 $(call gb_LinkTarget_use_external_project,$(1),langtag)
1038 endef
1040 endif # SYSTEM_LIBLANGTAG
1042 else
1044 gb_LinkTarget__use_liblangtag :=
1046 endif # ENABLE_LIBLANGTAG
1048 gb_ExternalProject__use_apr :=
1050 ifeq ($(WITH_WEBDAV),serf)
1052 define gb_LinkTarget__use_apr
1053 $(call gb_LinkTarget_set_include,$(1),\
1054 $$(INCLUDE) \
1055 $(APR_CFLAGS) \
1057 $(call gb_LinkTarget_add_libs,$(1),\
1058 $(APR_LIBS) \
1059 $(if $(filter $(OS),LINUX),-lpthread) \
1060 $(if $(filter $(OS),MACOSX),-liconv) \
1063 ifeq ($(SYSTEM_APR),)
1064 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1065 mswsock \
1066 rpcrt4 \
1067 shell32 \
1069 $(call gb_LinkTarget_add_defs,$(1),\
1070 -DAPR_DECLARE_STATIC \
1071 -DAPU_DECLARE_STATIC \
1073 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1074 endif
1076 endef
1078 define gb_ExternalProject__use_apr
1079 ifeq ($(SYSTEM_APR),)
1080 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1081 endif
1083 endef
1085 define gb_LinkTarget__use_serf
1086 $(call gb_LinkTarget_set_include,$(1),\
1087 $(SERF_CFLAGS) \
1088 $$(INCLUDE) \
1090 $(call gb_LinkTarget_add_libs,$(1),\
1091 $(SERF_LIBS) \
1094 ifeq ($(SYSTEM_SERF),)
1095 $(call gb_LinkTarget_use_external_project,$(1),serf)
1096 endif
1098 endef
1100 else ifeq ($(WITH_WEBDAV),neon)
1102 ifneq ($(SYSTEM_NEON),)
1104 define gb_LinkTarget__use_neon
1105 $(call gb_LinkTarget_add_defs,$(1),\
1106 -DNEON_VERSION=0x$(NEON_VERSION) \
1107 -DSYSTEM_NEON \
1109 $(call gb_LinkTarget_set_include,$(1),\
1110 $$(INCLUDE) \
1111 $(NEON_CFLAGS) \
1114 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1116 endef
1118 else # !SYSTEM_NEON
1120 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1121 neon \
1124 define gb_LinkTarget__use_neon
1125 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1126 $(call gb_LinkTarget_set_include,$(1),\
1127 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1128 $$(INCLUDE) \
1130 $(call gb_LinkTarget_use_libraries,$(1),\
1131 neon \
1134 endef
1136 endif # SYSTEM_NEON
1138 endif # WITH_WEBDAV
1140 ifneq ($(SYSTEM_REDLAND),)
1142 define gb_LinkTarget__use_librdf
1143 $(call gb_LinkTarget_add_defs,$(1),\
1144 -DSYSTEM_REDLAND \
1146 $(call gb_LinkTarget_set_include,$(1),\
1147 $$(INCLUDE) \
1148 $(REDLAND_CFLAGS) \
1150 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1152 endef
1154 gb_LinkTarget__use_redland_headers:=
1156 gb_LinkTarget__use_raptor_headers:=
1158 gb_LinkTarget__use_rasqal_headers:=
1160 else # !SYSTEM_REDLAND
1162 define gb_LinkTarget__use_redland_headers
1163 $(call gb_LinkTarget_set_include,$(1),\
1164 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1165 $$(INCLUDE) \
1168 endef
1170 define gb_LinkTarget__use_raptor_headers
1171 $(call gb_LinkTarget_set_include,$(1),\
1172 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1173 $$(INCLUDE) \
1176 endef
1178 define gb_LinkTarget__use_rasqal_headers
1179 $(call gb_LinkTarget_set_include,$(1),\
1180 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1181 $$(INCLUDE) \
1184 endef
1186 ifneq ($(OS),ANDROID)
1188 ifeq ($(COM),MSC)
1189 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1190 raptor2 \
1191 rasqal \
1192 rdf \
1194 else
1195 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1196 raptor \
1197 rasqal \
1198 redland \
1200 endif
1202 define gb_LinkTarget__use_librdf
1203 ifeq ($(COM),MSC)
1204 $(call gb_LinkTarget_use_libraries,$(1),\
1205 raptor2 \
1206 rdf \
1208 else
1209 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1211 $(call gb_LinkTarget_add_libs,$(1),\
1212 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1213 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1215 endif
1217 endef
1219 else # ANDROID
1221 define gb_LinkTarget__use_librdf
1222 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1224 endef
1226 endif # ANDROID
1228 endif # SYSTEM_REDLAND
1231 ifneq ($(filter unx,$(GUIBASE))$(ENABLE_CAIRO_CANVAS),) # or
1233 ifneq ($(SYSTEM_CAIRO),)
1235 define gb_LinkTarget__use_cairo
1236 $(call gb_LinkTarget_set_include,$(1),\
1237 $$(INCLUDE) \
1238 $(CAIRO_CFLAGS) \
1240 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1241 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1243 endef
1245 else # !SYSTEM_CAIRO
1247 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1248 cairo \
1249 $(if $(filter $(OS),WNT),,pixman) \
1252 define gb_LinkTarget__use_cairo
1253 $(call gb_LinkTarget_use_package,$(1),cairo)
1254 $(call gb_LinkTarget_use_package,$(1),pixman)
1255 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1256 $(call gb_LinkTarget_set_include,$(1),\
1257 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1258 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1259 $$(INCLUDE) \
1261 $(call gb_LinkTarget_add_libs,$(1),\
1262 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1263 $(if $(filter-out MACOSX WNT,$(OS)), \
1264 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1268 endef
1270 endif # SYSTEM_CAIRO
1272 endif # CAIRO
1274 ifneq ($(SYSTEM_FREETYPE),)
1276 define gb_LinkTarget__use_freetype_headers
1277 $(call gb_LinkTarget_set_include,$(1),\
1278 $$(INCLUDE) \
1279 $(FREETYPE_CFLAGS) \
1282 endef
1284 define gb_LinkTarget__use_freetype
1285 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1286 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1288 endef
1290 gb_ExternalProject__use_freetype :=
1292 else ifeq ($(OS),ANDROID)
1294 define gb_LinkTarget__use_freetype_headers
1295 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1296 $(call gb_LinkTarget_set_include,$(1),\
1297 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1298 $$(INCLUDE) \
1301 endef
1303 define gb_LinkTarget__use_freetype
1304 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1305 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1307 endef
1309 define gb_ExternalProject__use_freetype
1310 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1312 endef
1314 endif # SYSTEM_FREETYPE
1316 ifneq ($(SYSTEM_FONTCONFIG),)
1318 define gb_LinkTarget__use_fontconfig
1319 $(call gb_LinkTarget_set_include,$(1),\
1320 $$(INCLUDE) \
1321 $(FONTCONFIG_CFLAGS) \
1324 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1326 endef
1328 else ifeq ($(OS),ANDROID)
1330 define gb_LinkTarget__use_fontconfig
1331 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1332 $(call gb_LinkTarget_set_include,$(1),\
1333 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1334 $$(INCLUDE) \
1337 endef
1339 endif # SYSTEM_FONTCONFIG
1341 ifeq ($(ENABLE_GRAPHITE),TRUE)
1343 ifneq ($(SYSTEM_GRAPHITE),)
1345 define gb_LinkTarget__use_graphite
1346 $(call gb_LinkTarget_set_include,$(1),\
1347 $$(INCLUDE) \
1348 $(GRAPHITE_CFLAGS) \
1350 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1352 endef
1354 else # !SYSTEM_GRAPHITE
1356 define gb_LinkTarget__use_graphite
1357 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1358 $(call gb_LinkTarget_set_include,$(1),\
1359 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1360 $$(INCLUDE) \
1362 $(call gb_LinkTarget_use_static_libraries,$(1),\
1363 graphite \
1366 endef
1368 endif # SYSTEM_GRAPHITE
1370 else # !ENABLE_GRAPHITE
1372 gb_LinkTarget__use_graphite :=
1374 endif # ENABLE_GRAPHITE
1376 ifneq ($(SYSTEM_ICU),)
1378 gb_LinkTarget__use_icu_headers:=
1379 gb_ExternalProject__use_icu:=
1381 define gb_LinkTarget__use_icudata
1382 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1384 endef
1385 define gb_LinkTarget__use_icui18n
1386 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1388 endef
1389 define gb_LinkTarget__use_icuuc
1390 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1392 endef
1394 else # !SYSTEM_ICU
1396 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1397 icu_ure \
1400 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1401 icu \
1404 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1405 gb_ICU_suffix:=lo
1406 else
1407 gb_ICU_suffix:=
1408 endif
1410 define gb_LinkTarget__use_icu_headers
1411 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1412 $(call gb_LinkTarget_set_include,$(1),\
1413 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1414 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1415 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1416 $$(INCLUDE) \
1419 endef
1421 define gb_ExternalProject__use_icu
1422 $(call gb_ExternalProject_use_package,$(1),icu)
1424 endef
1426 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1427 define gb_LinkTarget__use_icudata
1428 $(call gb_LinkTarget_use_package,$(1),icu)
1430 ifeq ($(OS),WNT)
1431 $(call gb_LinkTarget_add_libs,$(1),\
1432 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1434 else
1435 $(call gb_LinkTarget_add_libs,$(1),\
1436 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1438 endif
1440 endef
1442 define gb_LinkTarget__use_icui18n
1443 $(call gb_LinkTarget_use_package,$(1),icu)
1445 ifeq ($(OS),WNT)
1446 $(call gb_LinkTarget_add_libs,$(1),\
1447 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1449 else
1450 $(call gb_LinkTarget_add_libs,$(1),\
1451 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1453 endif
1455 endef
1457 define gb_LinkTarget__use_icuuc
1458 $(call gb_LinkTarget_use_package,$(1),icu)
1460 ifeq ($(OS),WNT)
1461 $(call gb_LinkTarget_add_libs,$(1),\
1462 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(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 -licuuc$(gb_ICU_suffix) \
1468 endif
1470 endef
1472 endif # SYSTEM_ICU
1474 ifeq ($(ENABLE_HARFBUZZ),TRUE)
1475 ifneq ($(SYSTEM_HARFBUZZ),)
1477 define gb_LinkTarget__use_harfbuzz
1478 $(call gb_LinkTarget_set_include,$(1),\
1479 $$(INCLUDE) \
1480 $(HARFBUZZ_CFLAGS) \
1482 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1484 endef
1486 else # SYSTEM_HARFBUZZ != TRUE
1488 define gb_LinkTarget__use_harfbuzz
1489 $(call gb_LinkTarget_set_include,$(1),\
1490 $(HARFBUZZ_CFLAGS) \
1491 $$(INCLUDE) \
1493 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1494 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1496 endef
1498 endif # SYSTEM_HARFBUZZ
1499 else # ENABLE_HARFBUZZ != YES
1501 gb_LinkTarget__use_harfbuzz :=
1503 endif # ENABLE_HARFBUZZ
1505 ifeq ($(DISABLE_OPENSSL),TRUE)
1507 gb_ExternalProject__use_openssl:=
1508 gb_LinkTarget__use_openssl_headers:=
1509 gb_LinkTarget__use_openssl:=
1511 else # !DISABLE_OPENSSL
1513 ifneq ($(SYSTEM_OPENSSL),)
1515 gb_LinkTarget__use_openssl_headers:=
1516 gb_ExternalProject__use_openssl:=
1518 define gb_LinkTarget__use_openssl
1519 $(call gb_LinkTarget_set_include,$(1),\
1520 $$(INCLUDE) \
1521 $(OPENSSL_CFLAGS) \
1523 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1525 endef
1527 else # !SYSTEM_OPENSSL
1529 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1530 openssl \
1533 define gb_ExternalProject__use_openssl
1534 $(call gb_ExternalProject_use_package,$(1),openssl)
1536 endef
1538 define gb_LinkTarget__use_openssl_headers
1539 $(call gb_LinkTarget_set_include,$(1),\
1540 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1541 $$(INCLUDE) \
1544 endef
1546 define gb_LinkTarget__use_openssl
1547 $(call gb_LinkTarget_use_package,$(1),openssl)
1548 ifeq ($(OS),WNT)
1549 $(call gb_LinkTarget_add_libs,$(1),\
1550 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1551 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1553 else
1554 $(call gb_LinkTarget_add_libs,$(1),\
1555 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1556 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1558 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1559 ifeq ($(OS),SOLARIS)
1560 $(call gb_LinkTarget_add_libs,$(1),\
1561 -lnsl \
1562 -lsocket \
1564 endif
1565 endif
1567 endef
1569 endif # SYSTEM_OPENSSL
1570 endif # DISABLE_OPENSSL
1573 ifeq ($(DISABLE_OPENSSL),TRUE)
1575 define gb_LinkTarget__use_gnutls
1576 $(call gb_LinkTarget_set_include,$(1),\
1577 $$(INCLUDE) \
1578 $(GNUTLS_CFLAGS) \
1581 $(call gb_LinkTarget_add_defs,$(1),\
1582 -DDISABLE_OPENSSL \
1585 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1587 endef
1589 define gb_LinkTarget__use_libgcrypt
1590 $(call gb_LinkTarget_set_include,$(1),\
1591 $$(INCLUDE) \
1592 $(LIBGCRYPT_CFLAGS) \
1595 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1597 endef
1599 else # !DISABLE_OPENSSL
1601 gb_LinkTarget__use_gnutls:=
1602 gb_LinkTarget__use_libgcrypt:=
1604 endif # DISABLE_OPENSSL
1607 ifneq ($(SYSTEM_CDR),)
1609 define gb_LinkTarget__use_cdr
1610 $(call gb_LinkTarget_set_include,$(1),\
1611 $$(INCLUDE) \
1612 $(CDR_CFLAGS) \
1614 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1616 endef
1618 else # !SYSTEM_CDR
1620 define gb_LinkTarget__use_cdr
1621 $(call gb_LinkTarget_set_include,$(1),\
1622 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1623 $$(INCLUDE) \
1625 $(call gb_LinkTarget_add_libs,$(1),\
1626 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1628 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1629 endef
1631 endif # SYSTEM_CDR
1634 ifneq ($(SYSTEM_EBOOK),)
1636 define gb_LinkTarget__use_ebook
1637 $(call gb_LinkTarget_set_include,$(1),\
1638 $$(INCLUDE) \
1639 $(EBOOK_CFLAGS) \
1641 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1643 endef
1645 gb_ExternalProject__use_ebook :=
1647 else # !SYSTEM_EBOOK
1649 define gb_LinkTarget__use_ebook
1650 $(call gb_LinkTarget_set_include,$(1),\
1651 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1652 $$(INCLUDE) \
1654 $(call gb_LinkTarget_add_libs,$(1),\
1655 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1657 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1659 endef
1661 define gb_ExternalProject__use_ebook
1662 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1664 endef
1666 endif # SYSTEM_EBOOK
1669 ifneq ($(SYSTEM_ETONYEK),)
1671 define gb_LinkTarget__use_etonyek
1672 $(call gb_LinkTarget_set_include,$(1),\
1673 $$(INCLUDE) \
1674 $(ETONYEK_CFLAGS) \
1676 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1678 endef
1680 gb_ExternalProject__use_etonyek :=
1682 else # !SYSTEM_ETONYEK
1684 define gb_LinkTarget__use_etonyek
1685 $(call gb_LinkTarget_set_include,$(1),\
1686 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1687 $$(INCLUDE) \
1689 $(call gb_LinkTarget_add_libs,$(1),\
1690 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \
1692 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1694 endef
1696 define gb_ExternalProject__use_etonyek
1697 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1699 endef
1701 endif # SYSTEM_ETONYEK
1704 ifneq ($(SYSTEM_FREEHAND),)
1706 define gb_LinkTarget__use_freehand
1707 $(call gb_LinkTarget_set_include,$(1),\
1708 $$(INCLUDE) \
1709 $(FREEHAND_CFLAGS) \
1711 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1713 endef
1715 gb_ExternalProject__use_freehand :=
1717 else # !SYSTEM_FREEHAND
1719 define gb_LinkTarget__use_freehand
1720 $(call gb_LinkTarget_set_include,$(1),\
1721 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1722 $$(INCLUDE) \
1724 $(call gb_LinkTarget_add_libs,$(1),\
1725 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1727 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1729 endef
1731 define gb_ExternalProject__use_freehand
1732 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1734 endef
1736 endif # SYSTEM_FREEHAND
1739 ifneq ($(SYSTEM_ODFGEN),)
1741 define gb_LinkTarget__use_odfgen
1742 $(call gb_LinkTarget_set_include,$(1),\
1743 $$(INCLUDE) \
1744 $(ODFGEN_CFLAGS) \
1746 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1748 endef
1750 else # !SYSTEM_ODFGEN
1752 ifeq ($(COM),MSC)
1754 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1755 odfgen \
1758 define gb_LinkTarget__use_odfgen
1759 $(call gb_LinkTarget_set_include,$(1),\
1760 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1761 $$(INCLUDE) \
1763 $(call gb_LinkTarget_use_libraries,$(1),\
1764 odfgen \
1767 endef
1769 else # !MSC
1771 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1772 libodfgen \
1775 define gb_LinkTarget__use_odfgen
1776 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1778 $(call gb_LinkTarget_set_include,$(1),\
1779 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1780 $$(INCLUDE) \
1782 $(call gb_LinkTarget_add_libs,$(1),\
1783 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1786 endef
1788 endif
1790 endif # SYSTEM_ODFGEN
1793 ifneq ($(SYSTEM_REVENGE),)
1795 define gb_LinkTarget__use_revenge
1796 $(call gb_LinkTarget_set_include,$(1),\
1797 $$(INCLUDE) \
1798 $(REVENGE_CFLAGS) \
1800 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1802 endef
1804 gb_ExternalProject__use_revenge :=
1806 else # !SYSTEM_REVENGE
1808 ifeq ($(COM),MSC)
1810 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1811 revenge \
1814 define gb_LinkTarget__use_revenge
1815 $(call gb_LinkTarget_set_include,$(1),\
1816 $(REVENGE_CFLAGS) \
1817 $$(INCLUDE) \
1819 $(call gb_LinkTarget_use_libraries,$(1),\
1820 revenge \
1823 endef
1825 define gb_ExternalProject__use_revenge
1826 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1828 endef
1830 else # !MSC
1832 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1833 librevenge \
1836 define gb_LinkTarget__use_revenge
1837 $(call gb_LinkTarget_use_package,$(1),librevenge)
1839 $(call gb_LinkTarget_set_include,$(1),\
1840 $(REVENGE_CFLAGS) \
1841 $$(INCLUDE) \
1843 $(call gb_LinkTarget_add_libs,$(1),\
1844 $(REVENGE_LIBS) \
1846 endef
1848 define gb_ExternalProject__use_revenge
1849 $(call gb_ExternalProject_use_package,$(1),librevenge)
1851 endef
1853 endif # MSC
1855 endif # SYSTEM_REVENGE
1858 ifneq ($(SYSTEM_ABW),)
1860 define gb_LinkTarget__use_abw
1861 $(call gb_LinkTarget_set_include,$(1),\
1862 $$(INCLUDE) \
1863 $(ABW_CFLAGS) \
1865 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1867 endef
1868 gb_ExternalProject__use_abw :=
1870 else # !SYSTEM_ABW
1872 define gb_LinkTarget__use_abw
1873 $(call gb_LinkTarget_set_include,$(1),\
1874 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1875 $$(INCLUDE) \
1877 $(call gb_LinkTarget_add_libs,$(1),\
1878 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1880 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1882 endef
1883 define gb_ExternalProject__use_abw
1884 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1886 endef
1888 endif # SYSTEM_ABW
1891 ifneq ($(SYSTEM_MSPUB),)
1893 define gb_LinkTarget__use_mspub
1894 $(call gb_LinkTarget_set_include,$(1),\
1895 $$(INCLUDE) \
1896 $(MSPUB_CFLAGS) \
1898 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1900 endef
1902 else # !SYSTEM_MSPUB
1904 define gb_LinkTarget__use_mspub
1905 $(call gb_LinkTarget_set_include,$(1),\
1906 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1907 $$(INCLUDE) \
1909 $(call gb_LinkTarget_add_libs,$(1),\
1910 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1912 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1914 endef
1916 endif # SYSTEM_MSPUB
1919 ifneq ($(SYSTEM_VISIO),)
1921 define gb_LinkTarget__use_visio
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 $$(INCLUDE) \
1924 $(VISIO_CFLAGS) \
1926 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
1928 endef
1930 else # !SYSTEM_VISIO
1932 define gb_LinkTarget__use_visio
1933 $(call gb_LinkTarget_set_include,$(1),\
1934 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1935 $$(INCLUDE) \
1937 $(call gb_LinkTarget_add_libs,$(1),\
1938 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
1940 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
1942 endef
1944 endif # SYSTEM_VISIO
1947 ifneq ($(SYSTEM_WPD),)
1949 define gb_LinkTarget__use_wpd
1950 $(call gb_LinkTarget_set_include,$(1),\
1951 $$(INCLUDE) \
1952 $(WPD_CFLAGS) \
1954 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
1956 endef
1957 gb_ExternalProject__use_wpd :=
1959 else # !SYSTEM_WPD
1961 define gb_LinkTarget__use_wpd
1962 $(call gb_LinkTarget_set_include,$(1),\
1963 $(WPD_CFLAGS) \
1964 $$(INCLUDE) \
1966 $(call gb_LinkTarget_add_libs,$(1),\
1967 $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.10$(gb_StaticLibrary_PLAINEXT) \
1969 $(call gb_LinkTarget_use_external_project,$(1),libwpd)
1971 endef
1972 define gb_ExternalProject__use_wpd
1973 $(call gb_ExternalProject_use_external_project,$(1),libwpd)
1975 endef
1977 endif # SYSTEM_WPD
1980 ifneq ($(SYSTEM_WPG),)
1982 define gb_LinkTarget__use_wpg
1983 $(call gb_LinkTarget_set_include,$(1),\
1984 $$(INCLUDE) \
1985 $(WPG_CFLAGS) \
1987 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
1989 endef
1990 gb_ExternalProject__use_wpg :=
1992 else # !SYSTEM_WPG
1994 define gb_LinkTarget__use_wpg
1995 $(call gb_LinkTarget_set_include,$(1),\
1996 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
1997 $$(INCLUDE) \
1999 $(call gb_LinkTarget_add_libs,$(1),\
2000 $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.3$(gb_StaticLibrary_PLAINEXT) \
2002 $(call gb_LinkTarget_use_external_project,$(1),libwpg)
2004 endef
2005 define gb_ExternalProject__use_wpg
2006 $(call gb_ExternalProject_use_external_project,$(1),libwpg)
2008 endef
2010 endif # SYSTEM_WPG
2013 ifneq ($(SYSTEM_WPS),)
2015 define gb_LinkTarget__use_wps
2016 $(call gb_LinkTarget_set_include,$(1),\
2017 $$(INCLUDE) \
2018 $(WPS_CFLAGS) \
2020 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2022 endef
2023 gb_ExternalProject__use_wps :=
2025 else # !SYSTEM_WPS
2027 ifeq ($(COM),MSC)
2029 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2030 wps \
2033 define gb_LinkTarget__use_wps
2034 $(call gb_LinkTarget_set_include,$(1),\
2035 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2036 $$(INCLUDE) \
2039 $(call gb_LinkTarget_use_libraries,$(1),\
2040 wps \
2043 endef
2045 else # !MSC
2047 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2048 libwps \
2051 define gb_LinkTarget__use_wps
2052 $(call gb_LinkTarget_use_package,$(1),libwps)
2054 $(call gb_LinkTarget_set_include,$(1),\
2055 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2056 $$(INCLUDE) \
2058 $(call gb_LinkTarget_add_libs,$(1),\
2059 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
2062 endef
2064 endif # MSC
2066 endif # SYSTEM_WPS
2069 ifneq ($(SYSTEM_MWAW),)
2071 define gb_LinkTarget__use_mwaw
2072 $(call gb_LinkTarget_set_include,$(1),\
2073 $$(INCLUDE) \
2074 $(MWAW_CFLAGS) \
2076 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2078 endef
2080 else # !SYSTEM_MWAW
2082 ifeq ($(COM),MSC)
2084 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2085 mwaw \
2088 define gb_LinkTarget__use_mwaw
2089 $(call gb_LinkTarget_set_include,$(1),\
2090 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2091 $$(INCLUDE) \
2094 $(call gb_LinkTarget_use_libraries,$(1),\
2095 mwaw \
2098 endef
2100 else # !MSC
2102 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2103 libmwaw \
2106 define gb_LinkTarget__use_mwaw
2107 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2109 $(call gb_LinkTarget_set_include,$(1),\
2110 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2111 $$(INCLUDE) \
2113 $(call gb_LinkTarget_add_libs,$(1),\
2114 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2117 endef
2119 endif # MSC
2121 endif # SYSTEM_MWAW
2124 ifneq ($(SYSTEM_LCMS2),)
2126 define gb_LinkTarget__use_lcms2
2127 $(call gb_LinkTarget_set_include,$(1),\
2128 $$(INCLUDE) \
2129 $(LCMS2_CFLAGS) \
2131 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2133 endef
2135 gb_ExternalProject__use_lcms2 :=
2137 else # !SYSTEM_LCMS2
2139 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2140 lcms2 \
2143 define gb_ExternalProject__use_lcms2
2144 $(call gb_ExternalProject_use_package,$(1),lcms2)
2146 endef
2148 ifeq ($(OS),ANDROID)
2150 define gb_LinkTarget__use_lcms2
2151 $(call gb_LinkTarget_use_package,$(1),lcms2)
2152 $(call gb_LinkTarget_set_include,$(1),\
2153 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2154 $$(INCLUDE) \
2157 endef
2159 else
2161 define gb_LinkTarget__use_lcms2
2162 $(call gb_LinkTarget_use_package,$(1),lcms2)
2163 $(call gb_LinkTarget_set_include,$(1),\
2164 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2165 $$(INCLUDE) \
2167 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2169 endef
2171 endif # ANDROID
2172 endif # SYSTEM_LCMS2
2174 ifneq ($(ENABLE_LPSOLVE),)
2176 ifneq ($(SYSTEM_LPSOLVE),)
2178 define gb_LinkTarget__use_lpsolve
2179 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2180 $(call gb_LinkTarget_add_defs,$(1),\
2181 -DSYSTEM_LPSOLVE \
2184 endef
2186 else # !SYSTEM_LPSOLVE
2188 define gb_LinkTarget__use_lpsolve
2189 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2190 ifeq ($(COM),MSC)
2191 $(call gb_LinkTarget_add_libs,$(1),\
2192 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2194 else
2195 $(call gb_LinkTarget_add_libs,$(1),\
2196 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2198 endif
2199 $(call gb_LinkTarget_set_include,$(1),\
2200 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2201 $$(INCLUDE) \
2204 endef
2206 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2207 lpsolve \
2210 endif # SYSTEM_LPSOLVE
2212 else
2214 gb_LinkTarget__use_lpsolve :=
2216 endif # ENABLE_LPSOLVE
2218 ifneq ($(ENABLE_COINMP),)
2220 define gb_LinkTarget__use_coinmp
2221 $(call gb_LinkTarget_use_package,$(1),coinmp)
2222 ifeq ($(COM),MSC)
2223 $(call gb_LinkTarget_add_libs,$(1),\
2224 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2226 else
2227 $(call gb_LinkTarget_add_libs,$(1),\
2228 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2229 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2230 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2231 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2232 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2233 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2234 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2236 endif
2237 $(call gb_LinkTarget_set_include,$(1),\
2238 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2239 $$(INCLUDE) \
2242 endef
2244 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2245 coinmp \
2248 else
2250 gb_LinkTarget__use_coinmp :=
2252 endif # ENABLE_COINMP
2254 ifeq ($(ENABLE_GIO),TRUE)
2256 define gb_LinkTarget__use_gio
2257 $(call gb_LinkTarget_set_include,$(1),\
2258 $$(INCLUDE) \
2259 $(GIO_CFLAGS) \
2262 $(call gb_LinkTarget_add_defs,$(1),\
2263 -DENABLE_GIO \
2266 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2268 endef
2270 else # ENABLE_GIO
2272 define gb_LinkTarget__use_gio
2274 endef
2276 endif # ENABLE_GIO
2278 ifeq ($(ENABLE_AVAHI),TRUE)
2280 define gb_LinkTarget__use_avahi
2281 $(call gb_LinkTarget_set_include,$(1),\
2282 $$(INCLUDE) \
2283 $(AVAHI_CFLAGS) \
2286 $(call gb_LinkTarget_add_defs,$(1),\
2287 -DENABLE_AVAHI \
2290 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2292 endef
2294 else # ENABLE_AVAHI
2296 gb_LinkTarget__use_avahi :=
2298 endif # ENABLE_AVAHI
2301 define gb_LinkTarget__use_gtk
2302 $(call gb_LinkTarget_set_include,$(1),\
2303 $$(INCLUDE) \
2304 $(GTK_CFLAGS) \
2307 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2309 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2311 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2313 $(call gb_LinkTarget_set_include,$(1),\
2314 $$(INCLUDE) \
2315 $(GTK_PRINT_CFLAGS) \
2318 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2320 endif
2322 endef
2324 define gb_LinkTarget__use_gthread
2325 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2326 endef
2328 ifeq ($(ENABLE_CUPS),TRUE)
2330 define gb_LinkTarget__use_cups
2331 $(call gb_LinkTarget_add_defs,$(1),\
2332 -DENABLE_CUPS \
2335 $(call gb_LinkTarget_add_libs,$(1),\
2336 -lcups \
2339 endef
2341 else # ENABLE_CUPS
2343 define gb_LinkTarget__use_cups
2345 endef
2347 endif # ENABLE_DBUS
2349 ifeq ($(ENABLE_DBUS),TRUE)
2351 define gb_LinkTarget__use_dbus
2352 $(call gb_LinkTarget_set_include,$(1),\
2353 $$(INCLUDE) \
2354 $(DBUS_CFLAGS) \
2357 $(call gb_LinkTarget_add_defs,$(1),\
2358 -DENABLE_DBUS \
2361 ifeq ($(ENABLE_PACKAGEKIT),TRUE)
2362 $(call gb_LinkTarget_add_defs,$(1),\
2363 -DENABLE_PACKAGEKIT \
2365 endif # ENABLE_PACKAGEKIT
2367 $(call gb_LinkTarget_add_libs,$(1),\
2368 $(DBUS_LIBS) \
2371 endef
2373 else # ENABLE_DBUS
2375 define gb_LinkTarget__use_dbus
2377 endef
2379 endif # ENABLE_DBUS
2382 define gb_LinkTarget__use_dbusmenugtk
2383 $(call gb_LinkTarget_set_include,$(1),\
2384 $$(INCLUDE) \
2385 $(DBUSMENUGTK_CFLAGS) \
2388 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2390 endef
2393 ifeq ($(ENABLE_TELEPATHY),TRUE)
2395 define gb_LinkTarget__use_telepathy
2396 $(call gb_LinkTarget_set_include,$(1),\
2397 $$(INCLUDE) \
2398 $(TELEPATHY_CFLAGS) \
2401 $(call gb_LinkTarget_add_libs,$(1),\
2402 $(TELEPATHY_LIBS) \
2405 endef
2407 else # !ENABLE_TELEPATHY
2409 gb_LinkTarget__use_telepathy :=
2411 endif # ENABLE_TELEPATHY
2413 ifneq ($(SYSTEM_LIBPNG),)
2415 define gb_LinkTarget__use_png
2416 $(call gb_LinkTarget_set_include,$(1),\
2417 $$(INCLUDE) \
2418 $(LIBPNG_CFLAGS) \
2421 $(call gb_LinkTarget_add_libs,$(1),\
2422 $(LIBPNG_LIBS) \
2425 endef
2427 else # !SYSTEM_LIBPNG
2429 define gb_LinkTarget__use_png
2430 $(call gb_LinkTarget_set_include,$(1),\
2431 $(LIBPNG_CFLAGS) \
2432 $$(INCLUDE) \
2434 $(call gb_LinkTarget_use_static_libraries,$(1),\
2435 png \
2437 $(call gb_LinkTarget__use_zlib,$(1))
2439 endef
2441 endif # !SYSTEM_LIBPNG
2444 ifneq ($(SYSTEM_CURL),)
2446 define gb_LinkTarget__use_curl
2447 $(call gb_LinkTarget_add_defs,$(1),\
2448 -DSYSTEM_CURL \
2450 $(call gb_LinkTarget_set_include,$(1),\
2451 $$(INCLUDE) \
2452 $(CURL_CFLAGS) \
2454 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2456 endef
2458 else # !SYSTEM_CURL
2460 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2461 curl \
2464 define gb_LinkTarget__use_curl
2465 $(call gb_LinkTarget_use_package,$(1),curl)
2466 $(call gb_LinkTarget_set_include,$(1),\
2467 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2468 $$(INCLUDE) \
2471 ifeq ($(COM),MSC)
2472 $(call gb_LinkTarget_add_libs,$(1),\
2473 $(call gb_UnpackedTarball_get_dir,curl)/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d)_imp.lib \
2475 else
2476 $(call gb_LinkTarget_add_libs,$(1),\
2477 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2479 endif
2481 endef
2483 endif # SYSTEM_CURL
2485 ifeq ($(ENABLE_VALGRIND),TRUE)
2487 define gb_LinkTarget__use_valgrind
2488 $(call gb_LinkTarget_add_defs,$(1),\
2489 -DHAVE_VALGRIND_HEADERS \
2492 $(call gb_LinkTarget_set_include,$(1),\
2493 $$(INCLUDE) \
2494 $(VALGRIND_CFLAGS) \
2497 endef
2499 else # !ENABLE_VALGRIND
2501 define gb_LinkTarget__use_valgrind
2503 endef
2505 endif # ENABLE_VALGRIND
2507 ifneq ($(SYSTEM_POPPLER),)
2509 define gb_LinkTarget__use_poppler
2510 $(call gb_LinkTarget_set_include,$(1),\
2511 $(POPPLER_CFLAGS) \
2512 $$(INCLUDE) \
2515 $(call gb_LinkTarget_add_libs,$(1),\
2516 $(POPPLER_LIBS) \
2519 endef
2521 else # !SYSTEM_POPPLER
2523 define gb_LinkTarget__use_poppler
2524 $(call gb_LinkTarget_use_external_project,$(1),poppler)
2526 $(call gb_LinkTarget_set_include,$(1),\
2527 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2528 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2529 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2530 $$(INCLUDE) \
2533 $(call gb_LinkTarget_add_libs,$(1),\
2534 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2535 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2536 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2539 ifeq ($(OS),MACOSX)
2540 $(call gb_LinkTarget_add_libs,$(1),\
2541 -lobjc \
2543 else ifeq ($(OS),WNT)
2544 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2545 advapi32 \
2546 gdi32 \
2548 endif
2550 endef
2552 endif # SYSTEM_POPPLER
2555 ifneq ($(SYSTEM_CLUCENE),)
2557 define gb_LinkTarget__use_clucene
2558 $(call gb_LinkTarget_add_defs,$(1),\
2559 $(filter-out -I%,$(CLUCENE_CFLAGS)) \
2562 $(call gb_LinkTarget_set_include,$(1),\
2563 $(filter -I%,$(CLUCENE_CFLAGS)) \
2564 $$(INCLUDE) \
2567 $(call gb_LinkTarget_add_libs,$(1),\
2568 $(CLUCENE_LIBS) \
2571 endef
2573 else # !SYSTEM_CLUCENE
2575 define gb_LinkTarget__use_clucene
2576 $(call gb_LinkTarget_set_include,$(1),\
2577 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2578 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2579 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2580 $$(INCLUDE) \
2583 $(call gb_LinkTarget_use_libraries,$(1),\
2584 clucene \
2587 endef
2589 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2590 clucene \
2593 endif # SYSTEM_CLUCENE
2595 define gb_LinkTarget__use_gobject
2596 $(call gb_LinkTarget_add_libs,$(1),\
2597 $(GOBJECT_LIBS) \
2600 $(call gb_LinkTarget_set_include,$(1),\
2601 $$(INCLUDE) \
2602 $(GOBJECT_CFLAGS) \
2604 endef
2606 ifneq ($(SYSTEM_HSQLDB),)
2608 define gb_LinkTarget__use_hsqldb
2610 $(call gb_LinkTarget_add_defs,$(1),\
2611 -DSYSTEM_HSQLDB \
2612 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2615 endef
2617 else # !SYSTEM_HSQLDB
2619 define gb_LinkTarget__use_hsqldb
2621 endef
2623 endif # SYSTEM_HSQLDB
2626 ifneq ($(SYSTEM_OPENLDAP),)
2628 define gb_LinkTarget__use_openldap
2630 $(call gb_LinkTarget_add_libs,$(1),\
2631 -lldap \
2632 -llber \
2635 endef
2637 gb_ExternalProject__use_openldap :=
2639 else # !SYSTEM_OPENLDAP
2641 define gb_LinkTarget__use_openldap
2642 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2643 $(call gb_LinkTarget_set_include,$(1),\
2644 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2645 $$(INCLUDE) \
2647 $(call gb_LinkTarget_use_external_project,$(1),openldap)
2648 $(call gb_LinkTarget_add_libs,$(1), \
2649 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2650 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2653 endef
2655 define gb_ExternalProject__use_openldap
2656 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2658 endef
2660 endif # SYSTEM_OPENLDAP
2663 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2665 ifneq ($(SYSTEM_FIREBIRD),)
2667 define gb_LinkTarget__use_libfbembed
2668 $(call gb_LinkTarget_set_include,$(1),\
2669 $(FIREBIRD_CFLAGS) \
2670 $$(INCLUDE) \
2672 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2674 endef
2676 # gb_LinkTarget__use_atomic_ops :=
2677 # gb_LinkTarget__use_tommath :=
2679 else # !SYSTEM_FIREBIRD
2681 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2683 define gb_LinkTarget__use_libfbembed
2684 $(call gb_LinkTarget_use_package,$(1),firebird)
2685 $(call gb_LinkTarget_set_include,$(1),\
2686 $$(INCLUDE) \
2687 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
2689 ifeq ($(COM),MSC)
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
2693 else
2694 $(call gb_LinkTarget_add_libs,$(1),\
2695 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2697 endif
2699 endef
2701 # define gb_LinkTarget__use_tommath
2702 # $(call gb_LinkTarget_set_include,$(1),\
2703 # $(TOMMATH_CFLAGS) \
2704 # $$(INCLUDE) \
2707 # $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2709 # endef
2711 endif # SYSTEM_FIREBIRD
2713 else # !ENABLE_FIREBIRD_SDBC
2715 gb_LinkTarget__use_firebird :=
2716 # gb_LinkTarget__use_atomic_ops :=
2717 # gb_LinkTarget__use_tommath :=
2719 endif # ENABLE_FIREBIRD_SDBC
2722 ifneq ($(SYSTEM_POSTGRESQL),)
2724 define gb_LinkTarget__use_postgresql
2726 $(call gb_LinkTarget_set_include,$(1),\
2727 $(POSTGRESQL_INC) \
2728 $$(INCLUDE) \
2731 $(call gb_LinkTarget_add_libs,$(1),\
2732 -lpq \
2735 $(call gb_LinkTarget_add_ldflags,$(1),\
2736 $(POSTGRESQL_LIB) \
2739 endef
2741 else # !SYSTEM_POSTGRESQL
2743 define gb_LinkTarget__use_postgresql
2745 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2747 $(call gb_LinkTarget_set_include,$(1),\
2748 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2749 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2750 $$(INCLUDE) \
2753 $(call gb_LinkTarget_add_libs,$(1),\
2754 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2757 ifeq ($(OS)$(COM),WNTMSC)
2758 $(call gb_LinkTarget_use_external,$(1),openssl)
2760 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2761 secur32 \
2762 ws2_32 \
2765 endif
2767 endef
2769 endif # SYSTEM_POSTGRESQL
2771 ifneq ($(WITH_MOZAB4WIN),)
2773 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2774 moz_runtime \
2777 define gb_LinkTarget__use_mozilla
2779 $(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2780 $(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2782 $(call gb_LinkTarget_add_defs,$(1),\
2783 -DMOZILLA_INTERNAL_API \
2786 $(call gb_LinkTarget_set_include,$(1),\
2787 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2788 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2789 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2790 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2791 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2792 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2793 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2794 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2795 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2796 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2797 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2798 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2799 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2800 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2801 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2802 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
2803 $$(INCLUDE) \
2806 $(call gb_LinkTarget_add_libs,$(1),\
2807 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
2808 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2809 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
2812 $(call gb_LinkTarget_add_defs,$(1),\
2813 -DMOZILLA_CLIENT \
2814 -DMOZ_REFLOW_PERF \
2815 -DMOZ_REFLOW_PERF_DSP \
2816 -DMOZ_XUL \
2817 -DOJI \
2818 -DWIN32 \
2819 -DXP_PC \
2820 -DXP_WIN \
2821 -DXP_WIN32 \
2822 -D_WINDOWS \
2825 ifeq ($(COM),GCC)
2827 $(call gb_LinkTarget_add_cxxflags,$(1),\
2828 -Wall \
2829 -Wcast-align \
2830 -Wconversion \
2831 -Wno-long-long \
2832 -Woverloaded-virtual \
2833 -Wpointer-arith \
2834 -Wsynth \
2835 -fno-rtti \
2838 else
2840 ifneq ($(DBG_LEVEL),0)
2841 $(call gb_LinkTarget_add_defs,$(1),\
2842 -D_STL_NOFORCE_MANIFEST \
2844 endif
2846 $(call gb_LinkTarget_add_libs,$(1),\
2847 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2848 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
2851 endif # !GCC
2853 endef
2855 endif # WITH_MOZAB4WIN
2857 ifeq ($(ENABLE_KDE),TRUE)
2859 define gb_LinkTarget__use_kde
2860 $(call gb_LinkTarget_set_include,$(1),\
2861 $(filter -I%,$(KDE_CFLAGS)) \
2862 $$(INCLUDE) \
2865 $(call gb_LinkTarget_add_defs,$(1),\
2866 $(filter-out -I%,$(KDE_CFLAGS)) \
2869 $(call gb_LinkTarget_add_libs,$(1),\
2870 $(KDE_LIBS) \
2873 ifeq ($(COM),GCC)
2874 $(call gb_LinkTarget_add_cxxflags,$(1),\
2875 -Wno-shadow \
2877 endif
2879 endef
2881 else # !ENABLE_KDE
2883 define gb_LinkTarget__use_kde
2885 endef
2887 endif # ENABLE_KDE
2890 ifeq ($(ENABLE_KDE4),TRUE)
2892 define gb_LinkTarget__use_kde4
2893 $(call gb_LinkTarget_set_include,$(1),\
2894 $(filter -I%,$(KDE4_CFLAGS)) \
2895 $$(INCLUDE) \
2898 $(call gb_LinkTarget_add_defs,$(1),\
2899 $(filter-out -I%,$(KDE4_CFLAGS)) \
2902 $(call gb_LinkTarget_add_libs,$(1),\
2903 $(KDE4_LIBS) \
2906 ifeq ($(COM),GCC)
2907 $(call gb_LinkTarget_add_cxxflags,$(1),\
2908 -Wno-shadow \
2910 endif
2912 endef
2914 else # !ENABLE_KDE4
2916 define gb_LinkTarget__use_kde4
2918 endef
2920 endif # ENABLE_KDE4
2923 ifeq ($(ENABLE_TDE),TRUE)
2925 define gb_LinkTarget__use_tde
2926 $(call gb_LinkTarget_add_libs,$(1),\
2927 $(TDE_LIBS) \
2930 $(call gb_LinkTarget_set_include,$(1),\
2931 $$(INCLUDE) \
2932 $(TDE_CFLAGS) \
2934 endef
2936 else # ! ENABLE_TDE
2938 define gb_LinkTarget__use_tde
2940 endef
2942 endif # ENABLE_TDE
2945 ifeq ($(ENABLE_GCONF),TRUE)
2947 define gb_LinkTarget__use_gconf
2948 $(call gb_LinkTarget_set_include,$(1),\
2949 $(filter -I%,$(GCONF_CFLAGS)) \
2950 $$(INCLUDE) \
2953 $(call gb_LinkTarget_add_defs,$(1),\
2954 $(filter-out -I%,$(GCONF_CFLAGS)) \
2957 $(call gb_LinkTarget_add_libs,$(1),\
2958 $(GCONF_LIBS) \
2961 endef
2963 else # !ENABLE_GCONF
2965 define gb_LinkTarget__use_gconf
2967 endef
2969 endif # ENABLE_GCONF
2972 # PYTHON
2973 # extra python_headers external because pyuno wrapper must not link python
2974 ifneq ($(SYSTEM_PYTHON),)
2976 define gb_LinkTarget__use_python_headers
2977 $(call gb_LinkTarget_add_defs,$(1),\
2978 $(filter-out -I%,$(PYTHON_CFLAGS)) \
2981 $(call gb_LinkTarget_set_include,$(1),\
2982 $(filter -I%,$(PYTHON_CFLAGS)) \
2983 $$(INCLUDE) \
2986 endef
2988 define gb_LinkTarget__use_python
2989 $(call gb_LinkTarget__use_python_headers,$(1))
2991 $(call gb_LinkTarget_add_libs,$(1),\
2992 $(PYTHON_LIBS) \
2995 endef
2997 else # !SYSTEM_PYTHON
2999 $(eval $(call gb_Helper_register_packages_for_install,python,\
3000 python3 \
3003 # depend on external project because on MACOSX the Package is disabled...
3004 define gb_LinkTarget__use_python_headers
3005 $(call gb_LinkTarget_use_external_project,$(1),python3)
3006 $(call gb_LinkTarget_set_include,$(1),\
3007 -I$(call gb_UnpackedTarball_get_dir,python3) \
3008 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3009 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3010 $$(INCLUDE) \
3013 endef
3015 define gb_LinkTarget__use_python
3016 $(call gb_LinkTarget__use_python_headers,$(1))
3018 ifeq ($(OS),WNT)
3019 $(call gb_LinkTarget_add_libs,$(1),\
3020 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3022 else ifeq ($(OS),MACOSX)
3023 $(call gb_LinkTarget_add_libs,$(1),\
3024 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3026 else
3027 $(call gb_LinkTarget_add_libs,$(1),\
3028 -L$(call gb_UnpackedTarball_get_dir,python3) \
3029 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3031 endif
3033 endef
3035 endif # SYSTEM_PYTHON
3037 # ORCUS
3038 ifeq ($(ENABLE_ORCUS),TRUE)
3040 ifneq ($(SYSTEM_LIBORCUS),)
3042 define gb_LinkTarget__use_orcus
3043 $(call gb_LinkTarget_set_include,$(1),\
3044 $$(INCLUDE) \
3045 $(ORCUS_CFLAGS) \
3047 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3048 endef
3050 define gb_LinkTarget__use_orcus-parser
3052 endef
3054 else # !SYSTEM_LIBORCUS
3056 define gb_LinkTarget__use_orcus
3057 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3058 $(call gb_LinkTarget_set_include,$(1),\
3059 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3060 $$(INCLUDE) \
3062 $(call gb_LinkTarget_add_libs,$(1),\
3063 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
3066 $(if $(SYSTEM_BOOST), \
3067 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3068 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3071 endef
3073 define gb_LinkTarget__use_orcus-parser
3074 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3075 $(call gb_LinkTarget_set_include,$(1),\
3076 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3077 $$(INCLUDE) \
3079 $(call gb_LinkTarget_add_libs,$(1),\
3080 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
3083 endef
3085 endif # SYSTEM_LIBORCUS
3087 else # ENABLE_ORCUS != TRUE
3089 gb_LinkTarget__use_orcus :=
3090 gb_LinkTarget__use_orcus-parser :=
3092 endif
3094 ifeq ($(ENABLE_EOT),TRUE)
3096 ifneq ($(SYSTEM_LIBEOT),)
3098 define gb_LinkTarget__use_libeot
3099 $(call gb_LinkTarget_set_include,$(1),\
3100 $$(INCLUDE) \
3101 $(LIBEOT_CFLAGS) \
3103 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3105 endef
3107 gb_ExternalProject__use_libeot :=
3109 else # !SYSTEM_LIBEOT
3111 define gb_LinkTarget__use_libeot
3112 $(call gb_LinkTarget_set_include,$(1),\
3113 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3114 $$(INCLUDE) \
3116 $(call gb_LinkTarget_add_libs,$(1),\
3117 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3119 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3121 endef
3123 define gb_ExternalProject__use_libeot
3124 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3126 endef
3128 endif # SYSTEM_LIBEOT
3130 else # !ENABLE_EOT
3132 gb_LinkTarget__use_libeot :=
3133 gb_ExternalProject__use_libeot :=
3135 endif # ENABLE_EOT
3137 ### X11 stuff ###
3139 ifeq ($(GUIBASE),unx)
3141 ifeq ($(XRANDR_DLOPEN),FALSE)
3143 define gb_LinkTarget__use_Xrandr
3144 $(call gb_LinkTarget_set_include,$(1),\
3145 $$(INCLUDE) \
3146 $(XRANDR_CFLAGS) \
3149 $(call gb_LinkTarget_add_libs,$(1),\
3150 $(XRANDR_LIBS) \
3152 endef
3154 else # XRANDR_DLOPEN
3156 define gb_LinkTarget__use_Xrandr
3157 $(call gb_LinkTarget_add_defs,$(1),\
3158 -DXRANDR_DLOPEN \
3160 endef
3162 endif # XRANDR_DLOPEN
3164 define gb_LinkTarget__use_Xrender
3165 $(call gb_LinkTarget_set_include,$(1),\
3166 $$(INCLUDE) \
3167 $(XRENDER_CFLAGS) \
3170 $(call gb_LinkTarget_add_libs,$(1),\
3171 $(XRENDER_LIBS) \
3173 endef
3175 endif # GUIBASE=unx
3178 gb_ExternalProject__use_nss3:=
3180 ifeq (,$(filter DESKTOP,$(BUILD_TYPE)))
3182 gb_LinkTarget__use_nss3:=
3184 else
3186 ifneq ($(SYSTEM_NSS),)
3188 define gb_LinkTarget__use_nss3
3189 $(call gb_LinkTarget_add_defs,$(1),\
3190 -DSYSTEM_NSS \
3193 $(call gb_LinkTarget_set_include,$(1),\
3194 $$(INCLUDE) \
3195 $(NSS_CFLAGS) \
3198 $(call gb_LinkTarget_add_libs,$(1),\
3199 $(NSS_LIBS) \
3202 endef
3204 define gb_LinkTarget__use_plc4
3205 $(call gb_LinkTarget__use_nss3,$(1))
3207 endef
3209 define gb_LinkTarget__use_ssl3
3210 $(call gb_LinkTarget__use_nss3,$(1))
3212 endef
3214 else # !SYSTEM_NSS
3216 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3217 nss \
3220 define gb_LinkTarget__use_nss3
3221 $(call gb_LinkTarget_use_package,$(1),nss)
3222 $(call gb_LinkTarget_set_include,$(1),\
3223 $$(INCLUDE) \
3224 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3225 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3228 ifeq ($(COM),MSC)
3229 $(call gb_LinkTarget_add_libs,$(1),\
3230 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3231 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3232 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3234 else
3235 $(call gb_LinkTarget_add_libs,$(1),\
3236 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3237 -lnspr4 \
3238 -lnss3 \
3239 -lsmime3 \
3241 endif
3243 endef
3245 define gb_LinkTarget__use_plc4
3246 $(call gb_LinkTarget_use_package,$(1),nss)
3247 ifeq ($(COM),MSC)
3248 $(call gb_LinkTarget_add_libs,$(1),\
3249 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3251 else
3252 $(call gb_LinkTarget_add_libs,$(1),\
3253 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3255 endif
3257 endef
3259 define gb_LinkTarget__use_ssl3
3260 $(call gb_LinkTarget_use_package,$(1),nss)
3261 ifeq ($(COM),MSC)
3262 $(call gb_LinkTarget_add_libs,$(1),\
3263 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3265 else
3266 $(call gb_LinkTarget_add_libs,$(1),\
3267 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3269 endif
3271 endef
3273 define gb_ExternalProject__use_nss3
3274 $(call gb_ExternalProject_use_package,$(1),nss)
3276 endef
3278 endif # SYSTEM_NSS
3280 endif # DESKTOP
3282 ifeq ($(ENABLE_GLTF),TRUE)
3284 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3286 define gb_LinkTarget__use_libgltf
3287 $(call gb_LinkTarget_set_include,$(1),\
3288 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3289 $$(INCLUDE) \
3292 ifeq ($(COM),MSC)
3293 $(call gb_LinkTarget_add_libs,$(1),\
3294 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3296 else
3297 $(call gb_LinkTarget_add_libs,$(1),\
3298 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3300 endif
3302 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3304 endef
3306 else # SYSTEM_LIBGLTF
3308 define gb_LinkTarget__use_libgltf
3309 $(call gb_LinkTarget_set_include,$(1),\
3310 $$(INCLUDE) \
3311 $(LIBGLTF_CFLAGS) \
3313 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3315 endef
3317 endif # SYSTEN_LIBGLTF
3319 ifeq ($(ENABLE_COLLADA),TRUE)
3321 define gb_LinkTarget__use_opencollada_parser
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3324 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3325 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3326 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3327 $$(INCLUDE) \
3330 $(call gb_LinkTarget_use_static_libraries,$(1),\
3331 opencollada_parser \
3333 endef
3335 define gb_LinkTarget__use_collada2gltf
3336 $(call gb_LinkTarget_set_include,$(1),\
3337 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3338 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3339 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3340 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3341 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3342 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3343 $$(INCLUDE) \
3346 $(call gb_LinkTarget_use_static_libraries,$(1),\
3347 collada2gltf \
3349 endef
3351 endif # ENABLE_COLLADA
3353 endif # ENABLE_GLTF
3355 ### Jars ############################################################
3357 ifneq ($(SYSTEM_HSQLDB),)
3359 define gb_Jar__use_hsqldb
3360 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3361 endef
3362 define gb_JunitTest__use_hsqldb
3363 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3364 endef
3366 else # !SYSTEM_HSQLDB
3368 ifeq ($(ENABLE_JAVA),TRUE)
3369 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3370 hsqldb \
3372 endif
3374 define gb_Jar__use_hsqldb
3375 $(call gb_Jar_use_jar,$(1),hsqldb)
3376 endef
3377 define gb_JunitTest__use_hsqldb
3378 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3379 endef
3381 endif # SYSTEM_HSQLDB
3384 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3386 ifneq ($(SYSTEM_BSH),)
3388 define gb_Jar__use_bsh
3389 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3390 endef
3392 else # !SYSTEM_BSH
3394 ifeq ($(ENABLE_JAVA),TRUE)
3395 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3396 bsh \
3398 endif
3400 define gb_Jar__use_bsh
3401 $(call gb_Jar_use_jar,$(1),bsh)
3402 endef
3404 endif # SYSTEM_BSH
3406 endif
3408 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3410 ifneq ($(SYSTEM_RHINO),)
3412 define gb_Jar__use_rhino
3413 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3414 endef
3416 else # !SYSTEM_RHINO
3418 ifeq ($(ENABLE_JAVA),TRUE)
3419 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3420 js \
3422 endif
3424 define gb_Jar__use_rhino
3425 $(call gb_Jar_use_jar,$(1),js)
3426 endef
3428 endif # SYSTEM_RHINO
3430 endif
3432 ifneq ($(SYSTEM_APACHE_COMMONS),)
3434 define gb_Jar__use_commons-codec
3435 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
3436 endef
3437 gb_ExternalProject__use_commons-codec :=
3439 define gb_Jar__use_commons-httpclient
3440 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
3441 endef
3442 gb_ExternalProject__use_commons-httpclient :=
3444 define gb_Jar__use_commons-lang
3445 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
3446 endef
3447 gb_ExternalProject__use_commons-lang :=
3449 define gb_Jar__use_commons-logging
3450 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3451 endef
3452 gb_ExternalProject__use_commons-logging :=
3454 else # !SYSTEM_APACHE_COMMONS
3456 ifeq ($(ENABLE_JAVA),TRUE)
3457 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3458 commons-logging-1.1.3 \
3460 endif
3461 $(eval $(call gb_Helper_register_jars,OXT,\
3462 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
3463 commons-httpclient-3.1 \
3464 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
3467 define gb_Jar__use_commons-codec
3468 $(call gb_Jar_use_external_project,$(1),apache_commons_codec)
3469 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3470 $(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3471 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3473 endef
3474 define gb_ExternalProject__use_commons-codec
3475 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3476 endef
3478 define gb_Jar__use_commons-httpclient
3479 $(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3480 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
3481 endef
3482 define gb_ExternalProject__use_commons-httpclient
3483 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3484 endef
3486 define gb_Jar__use_commons-lang
3487 $(call gb_Jar_use_external_project,$(1),apache_commons_lang)
3488 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3489 $(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3490 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3492 endef
3493 define gb_ExternalProject__use_commons-lang
3494 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3495 endef
3497 define gb_Jar__use_commons-logging
3498 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3499 $(call gb_Jar_use_jar,$(1),commons-logging-1.1.3)
3500 endef
3501 define gb_ExternalProject__use_commons-logging
3502 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3503 endef
3505 endif # SYSTEM_APACHE_COMMONS
3508 ifneq ($(SYSTEM_JFREEREPORT),)
3510 define gb_Jar__use_flow-engine
3511 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3512 endef
3514 define gb_Jar__use_flute
3515 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3516 endef
3518 define gb_Jar__use_libbase
3519 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3520 endef
3522 define gb_Jar__use_libfonts
3523 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3524 endef
3526 define gb_Jar__use_libformula
3527 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3528 endef
3530 define gb_Jar__use_liblayout
3531 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3532 endef
3534 define gb_Jar__use_libloader
3535 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3536 endef
3538 define gb_Jar__use_librepository
3539 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3540 endef
3542 define gb_Jar__use_libserializer
3543 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3544 endef
3546 define gb_Jar__use_libxml
3547 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3548 endef
3550 define gb_Jar__use_sac
3551 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3552 endef
3554 else # !SYSTEM_JFREEREPORT
3556 ifeq ($(ENABLE_JAVA),TRUE)
3557 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3558 flow-engine \
3559 flute-1.1.6 \
3560 libbase-1.1.6 \
3561 libfonts-1.1.6 \
3562 libformula-1.1.7 \
3563 liblayout \
3564 libloader-1.1.6 \
3565 librepository-1.1.6 \
3566 libserializer-1.1.6 \
3567 libxml-1.1.7 \
3568 sac \
3570 endif
3572 define gb_Jar__use_flow-engine
3573 $(call gb_Jar_use_jar,$(1),flow-engine)
3574 endef
3576 define gb_Jar__use_flute
3577 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3578 endef
3580 define gb_Jar__use_libbase
3581 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3582 endef
3584 define gb_Jar__use_libfonts
3585 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3586 endef
3588 define gb_Jar__use_libformula
3589 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3590 endef
3592 define gb_Jar__use_liblayout
3593 $(call gb_Jar_use_jar,$(1),liblayout)
3594 endef
3596 define gb_Jar__use_libloader
3597 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3598 endef
3600 define gb_Jar__use_librepository
3601 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3602 endef
3604 define gb_Jar__use_libserializer
3605 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3606 endef
3608 define gb_Jar__use_libxml
3609 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3610 endef
3612 define gb_Jar__use_sac
3613 $(call gb_Jar_use_jar,$(1),sac)
3614 endef
3616 endif # SYSTEM_JFREEREPORT
3619 # Executables
3621 # FIXME: the library target should be for build too
3622 define gb_Executable__register_bestreversemap
3623 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3624 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3626 endef
3628 # TODO depending on the whole URE might be overkill, but I do not have a
3629 # Windows machine to debug it...
3630 # FIXME: the library target should be for build too
3631 define gb_Executable__register_climaker
3632 $(call gb_Executable_add_runtime_dependencies,climaker,\
3633 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3634 $(call gb_Rdb_get_target_for_build,ure/services) \
3635 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
3636 $(call gb_UnoApi_get_target,udkapi) \
3638 endef
3640 define gb_Executable__register_cppumaker
3641 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3642 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3644 endef
3646 gb_Gallery__UNO_COMPONENTS := \
3647 comphelper/util/comphelp \
3648 configmgr/source/configmgr \
3649 drawinglayer/drawinglayer \
3650 framework/util/fwk \
3651 i18npool/util/i18npool \
3652 package/source/xstor/xstor \
3653 package/util/package2 \
3654 sax/source/expatwrap/expwrap \
3655 sfx2/util/sfx \
3656 svgio/svgio \
3657 svx/util/svx \
3658 svx/util/svxcore \
3659 ucb/source/core/ucb1 \
3660 ucb/source/ucp/file/ucpfile1 \
3661 unoxml/source/service/unoxml
3663 # This is used to determine what we need for 'build' platform.
3664 define gb_Executable__register_gengal
3665 $(call gb_Executable_add_runtime_dependencies,gengal,\
3666 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
3667 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
3668 $(call gb_AllLangResTarget_get_target,ofa) \
3669 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3670 $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
3671 $(call gb_Library_get_target,vclplug_svp) \
3672 )) \
3673 $(call gb_Package_get_target_for_build,postprocess_registry) \
3674 $(call gb_Rdb_get_target_for_build,ure/services) \
3675 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
3676 $(call gb_UnoApi_get_target,offapi) \
3677 $(call gb_UnoApi_get_target,udkapi) \
3679 endef
3681 ifeq ($(SYSTEM_ICU),)
3683 define gb_Executable__register_gendict
3684 $(call gb_Executable_add_runtime_dependencies,gendict,\
3685 $(call gb_Package_get_target_for_build,icu) \
3687 endef
3689 endif
3691 define gb_Executable__register_idlc
3692 $(call gb_Executable_add_runtime_dependencies,idlc,\
3693 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3695 endef
3697 define gb_Executable__register_localize
3698 $(call gb_Executable_add_runtime_dependencies,localize,\
3699 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3700 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3703 endef
3705 # FIXME ure/services.rdb needs cleanup
3706 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3707 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3708 # FIXME: the library target should be for build too
3709 define gb_Executable__register_saxparser
3710 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3711 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3712 $(call gb_Rdb_get_target_for_build,saxparser) \
3713 $(call gb_Rdb_get_target_for_build,ure/services) \
3714 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
3715 $(call gb_UnoApi_get_target,udkapi) \
3717 endef
3719 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3720 # required due to the settings for URE_SERVICES and URE_TYPES in
3721 # cppuhelper/source/unorc
3722 # FIXME: the library target should be for build too
3723 define gb_Executable__register_uno
3724 $(call gb_Executable_add_runtime_dependencies,uno,\
3725 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3726 $(call gb_Rdb_get_target_for_build,ure/services) \
3727 $(INSTROOT)/$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb \
3728 $(call gb_UnoApi_get_target,udkapi) \
3730 endef
3733 # External executables
3735 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3737 gb_ExternalExecutable__register_xmllint :=
3739 else # ! SYSTEM_LIBXML_FOR_BUILD
3741 define gb_ExternalExecutable__register_xmllint
3742 $(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)
3743 $(call gb_ExternalExecutable_add_dependencies,xmllint,$(call gb_Package_get_target,xml2))
3745 endef
3747 endif # SYSTEM_LIBXML_FOR_BUILD
3749 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3751 gb_ExternalExecutable__register_xsltproc :=
3753 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3755 define gb_ExternalExecutable__register_xsltproc
3756 $(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)
3757 $(call gb_ExternalExecutable_add_dependencies,xsltproc,$(call gb_Package_get_target,xslt))
3759 endef
3761 endif # SYSTEM_LIBXSLT_FOR_BUILD
3763 ifneq (,$(SYSTEM_UCPP))
3765 gb_ExternalExecutable__register_ucpp :=
3767 else # ! SYSTEM_UCPP
3769 define gb_ExternalExecutable__register_ucpp
3770 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3772 endef
3774 endif # SYSTEM_UCPP
3776 ifeq (,$(PYTHON_FOR_BUILD))
3778 define gb_ExternalExecutable__register_python
3779 ifeq ($(OS),MACOSX)
3781 # use set_external, to avoid having the command added as prerequisite for the
3782 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3783 # matching rule to build that specific file)
3784 $(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))
3785 # the Zip ensures that internal python has been built (cannot use the Package
3786 # target, as that is not used on Mac)
3787 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3789 else
3791 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3792 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3793 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3795 endif
3797 endef
3799 else
3801 define gb_ExternalExecutable__register_python
3802 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3804 endef
3806 endif # PYTHON_FOR_BUILD
3808 ifneq ($(SYSTEM_GENBRK),)
3810 define gb_ExternalExecutable__register_genbrk
3811 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3813 endef
3815 else # ! SYSTEM_GENBRK
3817 define gb_ExternalExecutable__register_genbrk
3818 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3819 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3820 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3821 $(call gb_Package_get_target_for_build,icu) \
3824 endef
3826 endif
3828 ifneq ($(SYSTEM_GENCCODE),)
3830 define gb_ExternalExecutable__register_genccode
3831 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3833 endef
3835 else # ! SYSTEM_GENCCODE
3837 define gb_ExternalExecutable__register_genccode
3838 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3839 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3840 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3841 $(call gb_Package_get_target_for_build,icu) \
3844 endef
3846 endif
3848 ifneq ($(SYSTEM_GENCMN),)
3850 define gb_ExternalExecutable__register_gencmn
3851 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3853 endef
3855 else # ! SYSTEM_GENCMN
3857 define gb_ExternalExecutable__register_gencmn
3858 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3859 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3860 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3861 $(call gb_Package_get_target_for_build,icu) \
3864 endef
3866 endif
3868 # vim: set noet sw=4 ts=4: