Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / RepositoryExternal.mk
blob24bbab79fc2722d983c917377e34fcdea1802117
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 ($(ENABLE_OPENGL)$(ENABLE_OPENGL_CANVAS)$(if $(filter ANDROID,$(OS)),TRUE),)
187 ifneq ($(SYSTEM_GLEW),)
189 define gb_LinkTarget__use_glew
190 $(call gb_LinkTarget_set_include,$(1),\
191 $$(INCLUDE) \
192 $(GLEW_CFLAGS) \
194 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
196 endef
198 gb_ExternalProject__use_glew :=
200 else # !SYSTEM_GLEW
202 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
203 glew \
206 define gb_LinkTarget__use_glew
207 $(call gb_LinkTarget_use_package,$(1),glew)
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
210 -DGLEW_NO_GLU \
211 $$(INCLUDE) \
214 ifeq ($(COM),MSC)
215 $(call gb_LinkTarget_add_libs,$(1),\
216 $(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) \
218 else
219 $(call gb_LinkTarget_add_libs,$(1),\
220 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
222 endif
224 endef
226 define gb_ExternalProject__use_glew
227 $(call gb_ExternalProject_use_external_project,$(1),glew)
229 endef
231 endif # SYSTEM_GLEW
232 endif # ENABLE_OPENGL
234 ifneq ($(SYSTEM_GLYPHY),)
236 define gb_LinkTarget__use_glyphy
237 $(call gb_LinkTarget_set_include,$(1),\
238 $$(INCLUDE) \
239 $(GLYPHY_CFLAGS) \
241 $(call gb_LinkTarget_add_libs,$(1),$(GLYPHY_LIBS))
243 endef
244 else # !SYSTEM_GLYPHY
246 $(eval $(call gb_Helper_optional,GLYPHY,$(call gb_Helper_register_packages_for_install,ooo,\
247 glyphy \
250 define gb_LinkTarget__use_glyphy
251 $(call gb_LinkTarget_use_package,$(1),glyphy)
253 $(call gb_LinkTarget_set_include,$(1),\
254 -I$(call gb_UnpackedTarball_get_dir,glyphy/src) \
255 $$(INCLUDE) \
258 ifeq ($(COM),MSC)
259 $(call gb_LinkTarget_add_libs,$(1),\
260 $(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs/libglyphy.lib \
262 else
263 $(call gb_LinkTarget_add_libs,$(1),\
264 -L$(call gb_UnpackedTarball_get_dir,glyphy)/src/.libs -lglyphy \
266 endif
267 endef
269 endif # SYSTEM_GLYPHY
271 define gb_LinkTarget__use_iconv
272 $(call gb_LinkTarget_add_libs,$(1),-liconv)
274 endef
276 ifneq ($(SYSTEM_MARIADB),)
278 define gb_LinkTarget__use_mariadb
279 $(call gb_LinkTarget_set_include,$(1),\
280 $$(INCLUDE) \
281 $(MARIADB_CFLAGS) \
283 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
285 endef
286 gb_ExternalProject__use_mariadb :=
288 else # !SYSTEM_MARIADB
290 define gb_LinkTarget__use_mariadb
291 $(call gb_LinkTarget_set_include,$(1),\
292 $$(INCLUDE) \
293 $(MARIADB_CFLAGS) \
295 $(call gb_LinkTarget_use_static_libraries,$(1),\
296 mariadblib \
299 endef
300 define gb_ExternalProject__use_mariadb
301 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
303 endef
305 endif # SYSTEM_MARIADB
308 ifneq ($(SYSTEM_MARIADB),)
310 define gb_LinkTarget__use_mysql
312 $(call gb_LinkTarget_add_defs,$(1),\
313 -DSYSTEM_MARIADB \
316 $(call gb_LinkTarget_add_libs,$(1),\
317 $(MARIADB_LIBS) \
320 $(call gb_LinkTarget_set_include,$(1),\
321 $(MARIADB_CFLAGS) \
322 $$(INCLUDE) \
324 endef
326 else
328 define gb_LinkTarget__use_mysql
330 $(call gb_LinkTarget_set_include,$(1),\
331 $$(INCLUDE) \
334 endef
336 endif
338 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
340 define gb_LinkTarget__use_mysqlcppconn
341 $(call gb_LinkTarget_add_libs,$(1),\
342 -lmysqlcppconn \
345 $(call gb_LinkTarget_add_defs,$(1),\
346 -DSYSTEM_MYSQL_CPPCONN \
348 endef
350 else
352 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
353 mysqlcppconn \
356 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
357 define gb_LinkTarget__use_mysqlcppconn
359 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
361 $(call gb_LinkTarget_add_defs,$(1),\
362 -DCPPCONN_LIB_BUILD \
365 $(call gb_LinkTarget_set_include,$(1),\
366 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
367 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
368 $$(INCLUDE) \
371 endef
373 endif
375 ifneq ($(SYSTEM_ZLIB),)
377 define gb_LinkTarget__use_zlib
378 $(call gb_LinkTarget_add_defs,$(1),\
379 -DSYSTEM_ZLIB \
381 $(call gb_LinkTarget_add_libs,$(1),-lz)
383 endef
385 # nothing on system
386 define gb_LinkTarget__use_zlib_x64
388 endef
390 gb_ExternalProject__use_zlib :=
392 else # !SYSTEM_ZLIB
394 define gb_LinkTarget__use_zlib_multiarch
395 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
397 $(call gb_LinkTarget_set_include,$(1),\
398 $(ZLIB_CFLAGS) \
399 $$(INCLUDE) \
402 $(call gb_LinkTarget_use_static_libraries,$(1),\
403 $(2) \
406 endef
408 define gb_LinkTarget__use_zlib
409 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
411 endef
413 define gb_LinkTarget__use_zlib_x64
414 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
416 endef
418 define gb_ExternalProject__use_zlib
419 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
421 endef
423 endif # SYSTEM_ZLIB
426 ifneq ($(SYSTEM_JPEG),)
428 define gb_LinkTarget__use_jpeg
429 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
430 $(call gb_LinkTarget_set_ldflags,$(1),\
431 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
434 endef
436 gb_ExternalProject__use_jpeg :=
438 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
440 define gb_LinkTarget__use_jpeg
441 $(call gb_LinkTarget_set_include,$(1),\
442 $(LIBJPEG_CFLAGS) \
443 $$(INCLUDE) \
445 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
446 $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
448 endef
450 define gb_ExternalProject__use_jpeg
451 $(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
453 endef
455 else # !SYSTEM_JPEG
457 define gb_LinkTarget__use_jpeg
458 $(call gb_LinkTarget_set_include,$(1),\
459 $(LIBJPEG_CFLAGS) \
460 $$(INCLUDE) \
463 $(call gb_LinkTarget_use_static_libraries,$(1),\
464 jpeg \
467 endef
469 define gb_ExternalProject__use_jpeg
470 $(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
472 endef
474 endif # SYSTEM_JPEG
476 ifneq ($(SYSTEM_MYTHES),)
478 define gb_LinkTarget__use_mythes
479 $(call gb_LinkTarget_set_include,$(1),\
480 $$(INCLUDE) \
481 $(MYTHES_CFLAGS) \
483 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
485 endef
487 else # !SYSTEM_MYTHES
489 define gb_LinkTarget__use_mythes
490 $(call gb_LinkTarget_set_include,$(1),\
491 -I$(call gb_UnpackedTarball_get_dir,mythes) \
492 $$(INCLUDE) \
495 ifeq ($(COM),MSC)
496 $(call gb_LinkTarget_use_static_libraries,$(1),\
497 mythes \
499 else
500 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
501 $(call gb_LinkTarget_use_external_project,$(1),mythes)
502 endif
504 endef
506 endif # SYSTEM_MYTHES
509 ifneq ($(SYSTEM_EXPAT),)
511 define gb_LinkTarget__use_expat_impl
512 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
514 $(call gb_LinkTarget_add_defs,$(1),\
515 -DSYSTEM_EXPAT \
518 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
520 endef
522 gb_ExternalProject__use_expat :=
524 else # !SYSTEM_EXPAT
526 define gb_LinkTarget__use_expat_impl
527 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
529 $(call gb_LinkTarget_set_include,$(1),\
530 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
531 $$(INCLUDE) \
534 $(call gb_LinkTarget_use_static_libraries,$(1),\
535 $(2) \
538 endef
540 define gb_ExternalProject__use_expat
541 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
543 endef
545 endif # SYSTEM_EXPAT
547 define gb_LinkTarget__use_expat
548 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
550 endef
552 define gb_LinkTarget__use_expat_x64
553 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
555 endef
557 ifneq ($(SYSTEM_HYPH),)
559 define gb_LinkTarget__use_hyphen
560 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
562 endef
564 else # !SYSTEM_HYPH
566 define gb_LinkTarget__use_hyphen
567 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
568 $(call gb_LinkTarget_set_include,$(1),\
569 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
570 $$(INCLUDE) \
573 ifeq ($(COM),MSC)
574 $(call gb_LinkTarget_use_static_libraries,$(1),\
575 hyphen \
577 else
578 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
579 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
580 endif
582 endef
584 endif # SYSTEM_HYPH
586 ifneq ($(SYSTEM_HUNSPELL),)
588 define gb_LinkTarget__use_hunspell
589 $(call gb_LinkTarget_set_include,$(1),\
590 $$(INCLUDE) \
591 $(HUNSPELL_CFLAGS) \
593 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
595 endef
597 gb_ExternalProject__use_hunspell :=
599 else # !SYSTEM_HUNSPELL
601 define gb_LinkTarget__use_hunspell
602 $(call gb_LinkTarget_add_defs,$(1),\
603 -DHUNSPELL_STATIC \
605 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
606 $(call gb_LinkTarget_set_include,$(1),\
607 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
608 $$(INCLUDE) \
611 ifeq ($(COM),MSC)
612 $(call gb_LinkTarget_use_static_libraries,$(1),\
613 hunspell \
615 else
616 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
617 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
618 endif
620 endef
622 define gb_ExternalProject__use_hunspell
623 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
625 endef
627 endif # SYSTEM_HUNSPELL
630 ifneq ($(SYSTEM_BOOST),)
632 define gb_LinkTarget__use_boost_lib
633 $(call gb_LinkTarget_set_include,$(1),\
634 $$(INCLUDE) \
635 $(BOOST_CPPFLAGS) \
638 $(call gb_LinkTarget_add_ldflags,$(1),\
639 $(BOOST_LDFLAGS) \
642 $(call gb_LinkTarget_add_libs,$(1),$(2))
644 endef
646 define gb_LinkTarget__use_boost_date_time
647 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
649 endef
651 define gb_LinkTarget__use_boost_filesystem
652 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
654 endef
656 gb_ExternalProject__use_boost_filesystem :=
658 define gb_LinkTarget__use_boost_iostreams
659 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
661 endef
663 gb_ExternalProject__use_boost_iostreams :=
665 define gb_LinkTarget__use_boost_system
666 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
668 endef
670 gb_ExternalProject__use_boost_system :=
672 define gb_LinkTarget__use_boost_headers
673 $(call gb_LinkTarget_set_include,$(1),\
674 $$(INCLUDE) \
675 $(BOOST_CPPFLAGS) \
678 endef
680 gb_ExternalProject__use_boost_headers:=
682 else # !SYSTEM_BOOST
684 define gb_LinkTarget__use_boost_lib
685 $(call gb_LinkTarget_add_defs,$(1),\
686 -DBOOST_ALL_NO_LIB \
689 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
691 endef
693 define gb_LinkTarget__use_boost_date_time
694 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
696 endef
698 define gb_LinkTarget__use_boost_filesystem
699 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
701 endef
703 define gb_ExternalProject__use_boost_filesystem
704 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
705 endef
707 define gb_LinkTarget__use_boost_iostreams
708 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
710 endef
712 define gb_ExternalProject__use_boost_iostreams
713 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
714 endef
716 define gb_LinkTarget__use_boost_system
717 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
719 endef
721 define gb_ExternalProject__use_boost_system
722 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
723 endef
725 define gb_LinkTarget__use_boost_headers
726 $(call gb_LinkTarget_use_unpacked,$(1),boost)
727 $(call gb_LinkTarget_set_include,$(1),\
728 -I$(call gb_UnpackedTarball_get_dir,boost) \
729 $$(INCLUDE) \
732 endef
734 define gb_ExternalProject__use_boost_headers
735 $(call gb_ExternalProject_use_unpacked,$(1),boost)
737 endef
739 endif # SYSTEM_BOOST
742 ifneq ($(SYSTEM_CMIS),)
744 define gb_LinkTarget__use_cmis
745 $(call gb_LinkTarget_set_include,$(1),\
746 $$(INCLUDE) \
747 $(CMIS_CFLAGS) \
749 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
751 endef
753 else # !SYSTEM_CMIS
755 define gb_LinkTarget__use_cmis
756 $(call gb_LinkTarget_set_include,$(1),\
757 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
758 $$(INCLUDE) \
760 $(call gb_LinkTarget_use_static_libraries,$(1),\
761 cmislib \
764 endef
766 endif # SYSTEM_CMIS
768 ifeq ($(ENABLE_JAVA),TRUE)
770 ifeq ($(OS)$(COM),WNTGCC)
772 define gb_LinkTarget__use_jawt
773 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
775 $(call gb_LinkTarget_add_ldflags,$(1),\
776 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
779 $(call gb_LinkTarget_add_libs,$(1),\
780 $(JAWTLIB) \
783 endef
785 else # $(OS)$(COM) != WNTGCC
787 define gb_LinkTarget__use_jawt
788 $(call gb_LinkTarget_add_libs,$(1),\
789 $(JAWTLIB) \
792 endef
794 endif # $(OS)$(COM) = WNTGCC
796 else # !ENABLE_JAVA
798 gb_LinkTarget__use_jawt :=
800 endif # ENABLE_JAVA
802 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
804 define gb_LinkTarget__use_libatomic_ops
805 $(call gb_LinkTarget_set_include,$(1),\
806 $$(INCLUDE) \
807 $(LIBATOMIC_OPS_CFLAGS) \
809 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
811 endef
812 gb_ExternalProject__use_libatomic_ops :=
814 else # !SYSTEM_LIBATOMIC_OPS
816 define gb_LinkTarget__use_libatomic_ops
817 $(call gb_LinkTarget_set_include,$(1),\
818 $(LIBATOMIC_OPS_CFLAGS) \
819 $$(INCLUDE) \
820 $(LIBATOMIC_OPS_CFLAGS) \
822 $(call gb_LinkTarget_use_external_project,$(1),\
823 libatomic_ops \
826 $(call gb_LinkTarget_add_libs,$(1),\
827 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
830 endef
832 define gb_ExternalProject__use_libatomic_ops
833 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
835 endef
837 endif # SYSTEM_LIBATOMIC_OPS
840 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
842 define gb_LinkTarget__use_libexttextcat
843 $(call gb_LinkTarget_set_include,$(1),\
844 $$(INCLUDE) \
845 $(LIBEXTTEXTCAT_CFLAGS) \
847 $(call gb_LinkTarget_add_defs,$(1),\
848 -DSYSTEM_LIBEXTTEXTCAT \
850 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
852 endef
854 else # !SYSTEM_LIBEXTTEXTCAT
856 define gb_LinkTarget__use_libexttextcat
857 $(call gb_LinkTarget_set_include,$(1),\
858 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
859 $$(INCLUDE) \
862 ifeq ($(COM),MSC)
863 $(call gb_LinkTarget_use_static_libraries,$(1),\
864 exttextcat \
866 else
867 $(call gb_LinkTarget_add_libs,$(1),\
868 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
870 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
871 endif
874 endef
876 endif # SYSTEM_LIBEXTTEXTCAT
879 ifneq ($(SYSTEM_LIBXML),)
881 define gb_LinkTarget__use_libxml2
882 $(call gb_LinkTarget_add_defs,$(1),\
883 -DSYSTEM_LIBXML \
885 $(call gb_LinkTarget_set_include,$(1),\
886 $$(INCLUDE) \
887 $(LIBXML_CFLAGS) \
889 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
891 endef
892 gb_ExternalProject__use_libxml2:=
894 else # !SYSTEM_LIBXML
896 $(eval $(call gb_Helper_register_packages_for_install,ure,\
897 xml2 \
900 define gb_LinkTarget__use_libxml2
901 $(call gb_LinkTarget_use_package,$(1),xml2)
902 $(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(LIBXML_CFLAGS) \
907 $(call gb_LinkTarget_add_libs,$(1),\
908 $(LIBXML_LIBS) \
911 ifeq ($(COM),MSC)
912 $(call gb_LinkTarget_use_external,$(1),icu_headers)
913 endif
915 endef
916 define gb_ExternalProject__use_libxml2
917 $(call gb_ExternalProject_use_package,$(1),xml2)
919 ifeq ($(COM),MSC)
920 $(call gb_ExternalProject_use_external_project,$(1),icu)
921 endif
923 endef
925 endif # SYSTEM_LIBXML
928 ifneq ($(SYSTEM_LIBXSLT),)
930 define gb_LinkTarget__use_libxslt
931 $(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBXSLT_CFLAGS) \
935 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
937 endef
939 define gb_LinkTarget__use_libexslt
940 $(call gb_LinkTarget_set_include,$(1),\
941 $$(INCLUDE) \
942 $(LIBEXSLT_CFLAGS) \
945 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
947 endef
949 else # !SYSTEM_LIBXSLT
951 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
952 xslt \
955 define gb_LinkTarget__use_libxslt
956 $(call gb_LinkTarget_use_package,$(1),xslt)
957 $(call gb_LinkTarget_set_include,$(1),\
958 $$(INCLUDE) \
959 -I$(call gb_UnpackedTarball_get_dir,xslt) \
962 ifeq ($(COM),MSC)
963 $(call gb_LinkTarget_add_libs,$(1),\
964 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
966 else
967 $(call gb_LinkTarget_add_libs,$(1),\
968 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
970 endif
972 endef
974 define gb_LinkTarget__use_libexslt
975 $(call gb_LinkTarget_use_package,$(1),xslt)
976 $(call gb_LinkTarget_set_include,$(1),\
977 $$(INCLUDE) \
978 -I$(call gb_UnpackedTarball_get_dir,xslt) \
981 ifeq ($(COM),MSC)
982 $(call gb_LinkTarget_add_libs,$(1),\
983 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
985 else
986 $(call gb_LinkTarget_add_libs,$(1),\
987 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
989 endif
991 endef
993 endif # SYSTEM_LIBXSLT
995 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
997 ifneq ($(SYSTEM_LIBLANGTAG),)
999 define gb_LinkTarget__use_liblangtag
1000 $(call gb_LinkTarget_set_include,$(1),\
1001 $$(INCLUDE) \
1002 $(LIBLANGTAG_CFLAGS) \
1005 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1007 endef
1009 gb_ExternalProject__use_liblangtag :=
1011 else # !SYSTEM_LIBLANGTAG
1013 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1014 liblangtag_data \
1017 ifeq ($(COM),MSC)
1019 define gb_LinkTarget__use_liblangtag
1020 $(call gb_LinkTarget_set_include,$(1),\
1021 $(LIBLANGTAG_CFLAGS) \
1022 $$(INCLUDE) \
1024 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1025 $(call gb_LinkTarget_use_external_project,$(1),langtag)
1027 endef
1029 else
1031 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1032 liblangtag \
1035 define gb_LinkTarget__use_liblangtag
1036 $(call gb_LinkTarget_set_include,$(1),\
1037 $(LIBLANGTAG_CFLAGS) \
1038 $$(INCLUDE) \
1040 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1041 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1043 endef
1045 endif # MSC
1047 define gb_ExternalProject__use_liblangtag
1048 $(call gb_ExternalProject_use_external_project,$(1),langtag)
1050 endef
1052 endif # SYSTEM_LIBLANGTAG
1054 else
1056 gb_LinkTarget__use_liblangtag :=
1057 gb_ExternalProject__use_liblangtag :=
1059 endif # ENABLE_LIBLANGTAG
1061 gb_ExternalProject__use_apr :=
1063 ifeq ($(WITH_WEBDAV),serf)
1065 define gb_LinkTarget__use_apr
1066 $(call gb_LinkTarget_set_include,$(1),\
1067 $$(INCLUDE) \
1068 $(APR_CFLAGS) \
1070 $(call gb_LinkTarget_add_libs,$(1),\
1071 $(APR_LIBS) \
1072 $(if $(filter $(OS),LINUX),-lpthread) \
1073 $(if $(filter $(OS),MACOSX),-liconv) \
1076 ifeq ($(SYSTEM_APR),)
1077 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1078 mswsock \
1079 rpcrt4 \
1080 shell32 \
1082 $(call gb_LinkTarget_add_defs,$(1),\
1083 -DAPR_DECLARE_STATIC \
1084 -DAPU_DECLARE_STATIC \
1086 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1087 endif
1089 endef
1091 define gb_ExternalProject__use_apr
1092 ifeq ($(SYSTEM_APR),)
1093 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1094 endif
1096 endef
1098 define gb_LinkTarget__use_serf
1099 $(call gb_LinkTarget_set_include,$(1),\
1100 $(SERF_CFLAGS) \
1101 $$(INCLUDE) \
1103 $(call gb_LinkTarget_add_libs,$(1),\
1104 $(SERF_LIBS) \
1107 ifeq ($(SYSTEM_SERF),)
1108 $(call gb_LinkTarget_use_external_project,$(1),serf)
1109 endif
1111 endef
1113 else ifeq ($(WITH_WEBDAV),neon)
1115 ifneq ($(SYSTEM_NEON),)
1117 define gb_LinkTarget__use_neon
1118 $(call gb_LinkTarget_add_defs,$(1),\
1119 -DNEON_VERSION=0x$(NEON_VERSION) \
1120 -DSYSTEM_NEON \
1122 $(call gb_LinkTarget_set_include,$(1),\
1123 $$(INCLUDE) \
1124 $(NEON_CFLAGS) \
1127 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1129 endef
1131 else # !SYSTEM_NEON
1133 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1134 neon \
1137 define gb_LinkTarget__use_neon
1138 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1139 $(call gb_LinkTarget_set_include,$(1),\
1140 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1141 $$(INCLUDE) \
1143 $(call gb_LinkTarget_use_libraries,$(1),\
1144 neon \
1147 endef
1149 endif # SYSTEM_NEON
1151 endif # WITH_WEBDAV
1153 ifneq ($(SYSTEM_REDLAND),)
1155 define gb_LinkTarget__use_librdf
1156 $(call gb_LinkTarget_add_defs,$(1),\
1157 -DSYSTEM_REDLAND \
1159 $(call gb_LinkTarget_set_include,$(1),\
1160 $$(INCLUDE) \
1161 $(REDLAND_CFLAGS) \
1163 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1165 endef
1167 gb_LinkTarget__use_redland_headers:=
1169 gb_LinkTarget__use_raptor_headers:=
1171 gb_LinkTarget__use_rasqal_headers:=
1173 else # !SYSTEM_REDLAND
1175 define gb_LinkTarget__use_redland_headers
1176 $(call gb_LinkTarget_set_include,$(1),\
1177 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1178 $$(INCLUDE) \
1181 endef
1183 define gb_LinkTarget__use_raptor_headers
1184 $(call gb_LinkTarget_set_include,$(1),\
1185 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1186 $$(INCLUDE) \
1189 endef
1191 define gb_LinkTarget__use_rasqal_headers
1192 $(call gb_LinkTarget_set_include,$(1),\
1193 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1194 $$(INCLUDE) \
1197 endef
1199 ifneq ($(OS),ANDROID)
1201 ifeq ($(COM),MSC)
1202 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1203 raptor2 \
1204 rasqal \
1205 rdf \
1207 else
1208 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1209 raptor \
1210 rasqal \
1211 redland \
1213 endif
1215 define gb_LinkTarget__use_librdf
1216 ifeq ($(COM),MSC)
1217 $(call gb_LinkTarget_use_libraries,$(1),\
1218 raptor2 \
1219 rdf \
1221 else
1222 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1224 $(call gb_LinkTarget_add_libs,$(1),\
1225 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1226 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1228 endif
1230 endef
1232 else # ANDROID
1234 define gb_LinkTarget__use_librdf
1235 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1237 endef
1239 endif # ANDROID
1241 endif # SYSTEM_REDLAND
1244 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1246 ifneq ($(SYSTEM_CAIRO),)
1248 define gb_LinkTarget__use_cairo
1249 $(call gb_LinkTarget_set_include,$(1),\
1250 $$(INCLUDE) \
1251 $(CAIRO_CFLAGS) \
1253 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1254 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1256 endef
1258 else # !SYSTEM_CAIRO
1260 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1261 cairo \
1262 $(if $(filter $(OS),WNT),,pixman) \
1265 define gb_LinkTarget__use_cairo
1266 $(call gb_LinkTarget_use_package,$(1),cairo)
1267 $(call gb_LinkTarget_use_package,$(1),pixman)
1268 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1269 $(call gb_LinkTarget_set_include,$(1),\
1270 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1271 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1272 $$(INCLUDE) \
1274 $(call gb_LinkTarget_add_libs,$(1),\
1275 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1276 $(if $(filter-out MACOSX WNT,$(OS)), \
1277 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1281 endef
1283 endif # SYSTEM_CAIRO
1285 else ifeq ($(OS),ANDROID)
1287 define gb_LinkTarget__use_cairo
1288 $(call gb_LinkTarget_use_package,$(1),cairo)
1289 $(call gb_LinkTarget_use_package,$(1),pixman)
1290 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1291 $(call gb_LinkTarget_set_include,$(1),\
1292 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1293 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1294 $$(INCLUDE) \
1296 $(call gb_LinkTarget_add_libs,$(1),\
1297 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1298 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1301 endef
1303 endif # CAIRO
1305 ifneq ($(SYSTEM_FREETYPE),)
1307 define gb_LinkTarget__use_freetype_headers
1308 $(call gb_LinkTarget_set_include,$(1),\
1309 $$(INCLUDE) \
1310 $(FREETYPE_CFLAGS) \
1313 endef
1315 define gb_LinkTarget__use_freetype
1316 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1317 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1319 endef
1321 gb_ExternalProject__use_freetype :=
1323 else ifeq ($(OS),ANDROID)
1325 define gb_LinkTarget__use_freetype_headers
1326 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1327 $(call gb_LinkTarget_set_include,$(1),\
1328 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1329 $$(INCLUDE) \
1332 endef
1334 define gb_LinkTarget__use_freetype
1335 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1336 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1338 endef
1340 define gb_ExternalProject__use_freetype
1341 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1343 endef
1345 endif # SYSTEM_FREETYPE
1347 ifneq ($(SYSTEM_FONTCONFIG),)
1349 define gb_LinkTarget__use_fontconfig
1350 $(call gb_LinkTarget_set_include,$(1),\
1351 $$(INCLUDE) \
1352 $(FONTCONFIG_CFLAGS) \
1355 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1357 endef
1359 else ifeq ($(OS),ANDROID)
1361 define gb_LinkTarget__use_fontconfig
1362 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1363 $(call gb_LinkTarget_set_include,$(1),\
1364 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1365 $$(INCLUDE) \
1368 endef
1370 endif # SYSTEM_FONTCONFIG
1372 ifeq ($(ENABLE_GRAPHITE),TRUE)
1374 ifneq ($(SYSTEM_GRAPHITE),)
1376 define gb_LinkTarget__use_graphite
1377 $(call gb_LinkTarget_set_include,$(1),\
1378 $$(INCLUDE) \
1379 $(GRAPHITE_CFLAGS) \
1381 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1383 endef
1385 else # !SYSTEM_GRAPHITE
1387 define gb_LinkTarget__use_graphite
1388 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1389 $(call gb_LinkTarget_set_include,$(1),\
1390 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1391 $$(INCLUDE) \
1393 $(call gb_LinkTarget_use_static_libraries,$(1),\
1394 graphite \
1397 endef
1399 endif # SYSTEM_GRAPHITE
1401 else # !ENABLE_GRAPHITE
1403 gb_LinkTarget__use_graphite :=
1405 endif # ENABLE_GRAPHITE
1407 ifneq ($(SYSTEM_ICU),)
1409 gb_LinkTarget__use_icu_headers:=
1410 gb_ExternalProject__use_icu:=
1412 define gb_LinkTarget__use_icudata
1413 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1415 endef
1416 define gb_LinkTarget__use_icui18n
1417 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1419 endef
1420 define gb_LinkTarget__use_icuuc
1421 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1423 endef
1425 else # !SYSTEM_ICU
1427 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1428 icu_ure \
1431 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1432 icu \
1435 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1436 gb_ICU_suffix:=lo
1437 else
1438 gb_ICU_suffix:=
1439 endif
1441 define gb_LinkTarget__use_icu_headers
1442 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1443 $(call gb_LinkTarget_set_include,$(1),\
1444 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1445 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1446 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1447 $$(INCLUDE) \
1450 endef
1452 define gb_ExternalProject__use_icu
1453 $(call gb_ExternalProject_use_package,$(1),icu)
1455 endef
1457 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1458 define gb_LinkTarget__use_icudata
1459 $(call gb_LinkTarget_use_package,$(1),icu)
1461 ifeq ($(OS),WNT)
1462 $(call gb_LinkTarget_add_libs,$(1),\
1463 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1465 else
1466 $(call gb_LinkTarget_add_libs,$(1),\
1467 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1469 endif
1471 endef
1473 define gb_LinkTarget__use_icui18n
1474 $(call gb_LinkTarget_use_package,$(1),icu)
1476 ifeq ($(OS),WNT)
1477 $(call gb_LinkTarget_add_libs,$(1),\
1478 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1480 else
1481 $(call gb_LinkTarget_add_libs,$(1),\
1482 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1484 endif
1486 endef
1488 define gb_LinkTarget__use_icuuc
1489 $(call gb_LinkTarget_use_package,$(1),icu)
1491 ifeq ($(OS),WNT)
1492 $(call gb_LinkTarget_add_libs,$(1),\
1493 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1495 else
1496 $(call gb_LinkTarget_add_libs,$(1),\
1497 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1499 endif
1501 endef
1503 endif # SYSTEM_ICU
1505 ifeq ($(ENABLE_HARFBUZZ),TRUE)
1506 ifneq ($(SYSTEM_HARFBUZZ),)
1508 define gb_LinkTarget__use_harfbuzz
1509 $(call gb_LinkTarget_set_include,$(1),\
1510 $$(INCLUDE) \
1511 $(HARFBUZZ_CFLAGS) \
1513 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1515 endef
1517 else # SYSTEM_HARFBUZZ != TRUE
1519 define gb_LinkTarget__use_harfbuzz
1520 $(call gb_LinkTarget_set_include,$(1),\
1521 $(HARFBUZZ_CFLAGS) \
1522 $$(INCLUDE) \
1524 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1525 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1527 endef
1529 endif # SYSTEM_HARFBUZZ
1530 else # ENABLE_HARFBUZZ != YES
1532 gb_LinkTarget__use_harfbuzz :=
1534 endif # ENABLE_HARFBUZZ
1536 ifeq ($(DISABLE_OPENSSL),TRUE)
1538 gb_ExternalProject__use_openssl:=
1539 gb_LinkTarget__use_openssl_headers:=
1540 gb_LinkTarget__use_openssl:=
1542 else # !DISABLE_OPENSSL
1544 ifneq ($(SYSTEM_OPENSSL),)
1546 gb_LinkTarget__use_openssl_headers:=
1547 gb_ExternalProject__use_openssl:=
1549 define gb_LinkTarget__use_openssl
1550 $(call gb_LinkTarget_set_include,$(1),\
1551 $$(INCLUDE) \
1552 $(OPENSSL_CFLAGS) \
1554 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1556 endef
1558 else # !SYSTEM_OPENSSL
1560 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1561 openssl \
1564 define gb_ExternalProject__use_openssl
1565 $(call gb_ExternalProject_use_package,$(1),openssl)
1567 endef
1569 define gb_LinkTarget__use_openssl_headers
1570 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1571 $(call gb_LinkTarget_set_include,$(1),\
1572 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1573 $$(INCLUDE) \
1576 endef
1578 define gb_LinkTarget__use_openssl
1579 $(call gb_LinkTarget_use_package,$(1),openssl)
1580 ifeq ($(OS),WNT)
1581 $(call gb_LinkTarget_add_libs,$(1),\
1582 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1583 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1585 else
1586 $(call gb_LinkTarget_add_libs,$(1),\
1587 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1588 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1590 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1591 ifeq ($(OS),SOLARIS)
1592 $(call gb_LinkTarget_add_libs,$(1),\
1593 -lnsl \
1594 -lsocket \
1596 endif
1597 endif
1599 endef
1601 endif # SYSTEM_OPENSSL
1602 endif # DISABLE_OPENSSL
1605 ifeq ($(DISABLE_OPENSSL),TRUE)
1607 define gb_LinkTarget__use_gnutls
1608 $(call gb_LinkTarget_set_include,$(1),\
1609 $$(INCLUDE) \
1610 $(GNUTLS_CFLAGS) \
1613 $(call gb_LinkTarget_add_defs,$(1),\
1614 -DDISABLE_OPENSSL \
1617 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1619 endef
1621 define gb_LinkTarget__use_libgcrypt
1622 $(call gb_LinkTarget_set_include,$(1),\
1623 $$(INCLUDE) \
1624 $(LIBGCRYPT_CFLAGS) \
1627 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1629 endef
1631 else # !DISABLE_OPENSSL
1633 gb_LinkTarget__use_gnutls:=
1634 gb_LinkTarget__use_libgcrypt:=
1636 endif # DISABLE_OPENSSL
1639 ifneq ($(SYSTEM_CDR),)
1641 define gb_LinkTarget__use_cdr
1642 $(call gb_LinkTarget_set_include,$(1),\
1643 $$(INCLUDE) \
1644 $(CDR_CFLAGS) \
1646 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1648 endef
1650 else # !SYSTEM_CDR
1652 define gb_LinkTarget__use_cdr
1653 $(call gb_LinkTarget_set_include,$(1),\
1654 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1655 $$(INCLUDE) \
1657 $(call gb_LinkTarget_add_libs,$(1),\
1658 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1660 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1661 endef
1663 endif # SYSTEM_CDR
1666 ifneq ($(SYSTEM_EBOOK),)
1668 define gb_LinkTarget__use_ebook
1669 $(call gb_LinkTarget_set_include,$(1),\
1670 $$(INCLUDE) \
1671 $(EBOOK_CFLAGS) \
1673 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1675 endef
1677 gb_ExternalProject__use_ebook :=
1679 else # !SYSTEM_EBOOK
1681 define gb_LinkTarget__use_ebook
1682 $(call gb_LinkTarget_set_include,$(1),\
1683 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1684 $$(INCLUDE) \
1686 $(call gb_LinkTarget_add_libs,$(1),\
1687 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1689 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1691 endef
1693 define gb_ExternalProject__use_ebook
1694 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1696 endef
1698 endif # SYSTEM_EBOOK
1701 ifneq ($(SYSTEM_ETONYEK),)
1703 define gb_LinkTarget__use_etonyek
1704 $(call gb_LinkTarget_set_include,$(1),\
1705 $$(INCLUDE) \
1706 $(ETONYEK_CFLAGS) \
1708 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1710 endef
1712 gb_ExternalProject__use_etonyek :=
1714 else # !SYSTEM_ETONYEK
1716 ifeq ($(COM),MSC)
1718 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1719 etonyek \
1722 define gb_LinkTarget__use_etonyek
1723 $(call gb_LinkTarget_set_include,$(1),\
1724 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1725 $$(INCLUDE) \
1727 $(call gb_LinkTarget_use_libraries,$(1),\
1728 etonyek \
1731 endef
1733 else # !MSC
1735 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1736 libetonyek \
1739 define gb_LinkTarget__use_etonyek
1740 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1742 $(call gb_LinkTarget_set_include,$(1),\
1743 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1744 -DLIBETONYEK_VISIBILITY \
1745 $$(INCLUDE) \
1747 $(call gb_LinkTarget_add_libs,$(1),\
1748 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1750 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1752 endef
1754 define gb_ExternalProject__use_etonyek
1755 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1757 endef
1759 endif
1761 endif # SYSTEM_ETONYEK
1764 ifneq ($(SYSTEM_FREEHAND),)
1766 define gb_LinkTarget__use_freehand
1767 $(call gb_LinkTarget_set_include,$(1),\
1768 $$(INCLUDE) \
1769 $(FREEHAND_CFLAGS) \
1771 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1773 endef
1775 gb_ExternalProject__use_freehand :=
1777 else # !SYSTEM_FREEHAND
1779 define gb_LinkTarget__use_freehand
1780 $(call gb_LinkTarget_set_include,$(1),\
1781 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1782 $$(INCLUDE) \
1784 $(call gb_LinkTarget_add_libs,$(1),\
1785 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1787 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1789 endef
1791 define gb_ExternalProject__use_freehand
1792 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1794 endef
1796 endif # SYSTEM_FREEHAND
1799 ifneq ($(SYSTEM_ODFGEN),)
1801 define gb_LinkTarget__use_odfgen
1802 $(call gb_LinkTarget_set_include,$(1),\
1803 $$(INCLUDE) \
1804 $(ODFGEN_CFLAGS) \
1806 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1808 endef
1810 else # !SYSTEM_ODFGEN
1812 ifeq ($(COM),MSC)
1814 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1815 odfgen \
1818 define gb_LinkTarget__use_odfgen
1819 $(call gb_LinkTarget_set_include,$(1),\
1820 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1821 $$(INCLUDE) \
1823 $(call gb_LinkTarget_use_libraries,$(1),\
1824 odfgen \
1827 endef
1829 else # !MSC
1831 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1832 libodfgen \
1835 define gb_LinkTarget__use_odfgen
1836 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1838 $(call gb_LinkTarget_set_include,$(1),\
1839 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1840 -DLIBODFGEN_VISIBILITY \
1841 $$(INCLUDE) \
1843 $(call gb_LinkTarget_add_libs,$(1),\
1844 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1847 endef
1849 endif
1851 endif # SYSTEM_ODFGEN
1854 ifneq ($(SYSTEM_REVENGE),)
1856 define gb_LinkTarget__use_revenge
1857 $(call gb_LinkTarget_set_include,$(1),\
1858 $$(INCLUDE) \
1859 $(REVENGE_CFLAGS) \
1861 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1863 endef
1865 gb_ExternalProject__use_revenge :=
1867 else # !SYSTEM_REVENGE
1869 ifeq ($(COM),MSC)
1871 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1872 revenge \
1875 define gb_LinkTarget__use_revenge
1876 $(call gb_LinkTarget_set_include,$(1),\
1877 $(REVENGE_CFLAGS) \
1878 $$(INCLUDE) \
1880 $(call gb_LinkTarget_use_libraries,$(1),\
1881 revenge \
1884 endef
1886 define gb_ExternalProject__use_revenge
1887 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1889 endef
1891 else # !MSC
1893 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1894 librevenge \
1897 define gb_LinkTarget__use_revenge
1898 $(call gb_LinkTarget_use_package,$(1),librevenge)
1900 $(call gb_LinkTarget_set_include,$(1),\
1901 $(REVENGE_CFLAGS) \
1902 -DLIBREVENGE_VISIBILITY \
1903 $$(INCLUDE) \
1905 $(call gb_LinkTarget_add_libs,$(1),\
1906 $(REVENGE_LIBS) \
1908 endef
1910 define gb_ExternalProject__use_revenge
1911 $(call gb_ExternalProject_use_package,$(1),librevenge)
1913 endef
1915 endif # MSC
1917 endif # SYSTEM_REVENGE
1920 ifneq ($(SYSTEM_ABW),)
1922 define gb_LinkTarget__use_abw
1923 $(call gb_LinkTarget_set_include,$(1),\
1924 $$(INCLUDE) \
1925 $(ABW_CFLAGS) \
1927 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1929 endef
1930 gb_ExternalProject__use_abw :=
1932 else # !SYSTEM_ABW
1934 define gb_LinkTarget__use_abw
1935 $(call gb_LinkTarget_set_include,$(1),\
1936 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1937 $$(INCLUDE) \
1939 $(call gb_LinkTarget_add_libs,$(1),\
1940 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1942 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1944 endef
1945 define gb_ExternalProject__use_abw
1946 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1948 endef
1950 endif # SYSTEM_ABW
1953 ifneq ($(SYSTEM_MSPUB),)
1955 define gb_LinkTarget__use_mspub
1956 $(call gb_LinkTarget_set_include,$(1),\
1957 $$(INCLUDE) \
1958 $(MSPUB_CFLAGS) \
1960 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1962 endef
1964 else # !SYSTEM_MSPUB
1966 define gb_LinkTarget__use_mspub
1967 $(call gb_LinkTarget_set_include,$(1),\
1968 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1969 $$(INCLUDE) \
1971 $(call gb_LinkTarget_add_libs,$(1),\
1972 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1974 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1976 endef
1978 endif # SYSTEM_MSPUB
1981 ifneq ($(SYSTEM_PAGEMAKER),)
1983 define gb_LinkTarget__use_pagemaker
1984 $(call gb_LinkTarget_set_include,$(1),\
1985 $$(INCLUDE) \
1986 $(PAGEMAKER_CFLAGS) \
1988 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1990 endef
1991 gb_ExternalProject__use_pagemaker :=
1993 else # !SYSTEM_PAGEMAKER
1995 define gb_LinkTarget__use_pagemaker
1996 $(call gb_LinkTarget_set_include,$(1),\
1997 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1998 $$(INCLUDE) \
2000 $(call gb_LinkTarget_add_libs,$(1),\
2001 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2003 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2005 endef
2006 define gb_ExternalProject__use_pagemaker
2007 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2009 endef
2011 endif # SYSTEM_PAGEMAKER
2014 ifneq ($(SYSTEM_VISIO),)
2016 define gb_LinkTarget__use_visio
2017 $(call gb_LinkTarget_set_include,$(1),\
2018 $$(INCLUDE) \
2019 $(VISIO_CFLAGS) \
2021 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2023 endef
2025 else # !SYSTEM_VISIO
2027 define gb_LinkTarget__use_visio
2028 $(call gb_LinkTarget_set_include,$(1),\
2029 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2030 $$(INCLUDE) \
2032 $(call gb_LinkTarget_add_libs,$(1),\
2033 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2035 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2037 endef
2039 endif # SYSTEM_VISIO
2042 ifneq ($(SYSTEM_WPD),)
2044 define gb_LinkTarget__use_wpd
2045 $(call gb_LinkTarget_set_include,$(1),\
2046 $$(INCLUDE) \
2047 $(WPD_CFLAGS) \
2049 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2051 endef
2052 gb_ExternalProject__use_wpd :=
2054 else # !SYSTEM_WPD
2056 ifeq ($(COM),MSC)
2058 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2059 wpd \
2062 define gb_LinkTarget__use_wpd
2063 $(call gb_LinkTarget_set_include,$(1),\
2064 $(WPD_CFLAGS) \
2065 $$(INCLUDE) \
2067 $(call gb_LinkTarget_use_libraries,$(1),\
2068 wpd \
2071 endef
2073 define gb_ExternalProject__use_wpd
2074 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2076 endef
2078 else # !MSC
2080 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2081 libwpd \
2084 define gb_LinkTarget__use_wpd
2085 $(call gb_LinkTarget_use_package,$(1),libwpd)
2087 $(call gb_LinkTarget_set_include,$(1),\
2088 $(WPD_CFLAGS) \
2089 $$(INCLUDE) \
2091 $(call gb_LinkTarget_add_libs,$(1),\
2092 $(WPD_LIBS) \
2095 endef
2097 define gb_ExternalProject__use_wpd
2098 $(call gb_ExternalProject_use_package,$(1),libwpd)
2100 endef
2102 endif # MSC
2104 endif # SYSTEM_WPD
2107 ifneq ($(SYSTEM_WPG),)
2109 define gb_LinkTarget__use_wpg
2110 $(call gb_LinkTarget_set_include,$(1),\
2111 $$(INCLUDE) \
2112 $(WPG_CFLAGS) \
2114 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2116 endef
2117 gb_ExternalProject__use_wpg :=
2119 else # !SYSTEM_WPG
2121 ifeq ($(COM),MSC)
2123 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2124 wpg \
2127 define gb_LinkTarget__use_wpg
2128 $(call gb_LinkTarget_set_include,$(1),\
2129 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2130 $$(INCLUDE) \
2132 $(call gb_LinkTarget_use_libraries,$(1),\
2133 wpg \
2136 endef
2138 else # !MSC
2140 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2141 libwpg \
2144 define gb_LinkTarget__use_wpg
2145 $(call gb_LinkTarget_use_package,$(1),libwpg)
2147 $(call gb_LinkTarget_set_include,$(1),\
2148 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2149 $$(INCLUDE) \
2151 $(call gb_LinkTarget_add_libs,$(1),\
2152 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2155 endef
2157 endif # MSC
2159 endif # SYSTEM_WPG
2162 ifneq ($(SYSTEM_WPS),)
2164 define gb_LinkTarget__use_wps
2165 $(call gb_LinkTarget_set_include,$(1),\
2166 $$(INCLUDE) \
2167 $(WPS_CFLAGS) \
2169 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2171 endef
2172 gb_ExternalProject__use_wps :=
2174 else # !SYSTEM_WPS
2176 ifeq ($(COM),MSC)
2178 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2179 wps \
2182 define gb_LinkTarget__use_wps
2183 $(call gb_LinkTarget_set_include,$(1),\
2184 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2185 $$(INCLUDE) \
2188 $(call gb_LinkTarget_use_libraries,$(1),\
2189 wps \
2192 endef
2194 else # !MSC
2196 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2197 libwps \
2200 define gb_LinkTarget__use_wps
2201 $(call gb_LinkTarget_use_package,$(1),libwps)
2203 $(call gb_LinkTarget_set_include,$(1),\
2204 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2205 $$(INCLUDE) \
2207 $(call gb_LinkTarget_add_libs,$(1),\
2208 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2211 endef
2213 endif # MSC
2215 endif # SYSTEM_WPS
2218 ifneq ($(SYSTEM_MWAW),)
2220 define gb_LinkTarget__use_mwaw
2221 $(call gb_LinkTarget_set_include,$(1),\
2222 $$(INCLUDE) \
2223 $(MWAW_CFLAGS) \
2225 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2227 endef
2229 else # !SYSTEM_MWAW
2231 ifeq ($(COM),MSC)
2233 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2234 mwaw \
2237 define gb_LinkTarget__use_mwaw
2238 $(call gb_LinkTarget_set_include,$(1),\
2239 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2240 $$(INCLUDE) \
2243 $(call gb_LinkTarget_use_libraries,$(1),\
2244 mwaw \
2247 endef
2249 else # !MSC
2251 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2252 libmwaw \
2255 define gb_LinkTarget__use_mwaw
2256 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2258 $(call gb_LinkTarget_set_include,$(1),\
2259 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2260 $$(INCLUDE) \
2262 $(call gb_LinkTarget_add_libs,$(1),\
2263 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2266 endef
2268 endif # MSC
2270 endif # SYSTEM_MWAW
2273 ifneq ($(SYSTEM_LCMS2),)
2275 define gb_LinkTarget__use_lcms2
2276 $(call gb_LinkTarget_set_include,$(1),\
2277 $$(INCLUDE) \
2278 $(LCMS2_CFLAGS) \
2280 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2282 endef
2284 gb_ExternalProject__use_lcms2 :=
2286 else # !SYSTEM_LCMS2
2288 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2289 lcms2 \
2292 define gb_ExternalProject__use_lcms2
2293 $(call gb_ExternalProject_use_package,$(1),lcms2)
2295 endef
2297 ifeq ($(OS),ANDROID)
2299 define gb_LinkTarget__use_lcms2
2300 $(call gb_LinkTarget_use_package,$(1),lcms2)
2301 $(call gb_LinkTarget_set_include,$(1),\
2302 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2303 $$(INCLUDE) \
2306 endef
2308 else
2310 define gb_LinkTarget__use_lcms2
2311 $(call gb_LinkTarget_use_package,$(1),lcms2)
2312 $(call gb_LinkTarget_set_include,$(1),\
2313 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2314 $$(INCLUDE) \
2316 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2318 endef
2320 endif # ANDROID
2321 endif # SYSTEM_LCMS2
2323 ifneq ($(ENABLE_LPSOLVE),)
2325 ifneq ($(SYSTEM_LPSOLVE),)
2327 define gb_LinkTarget__use_lpsolve
2328 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2329 $(call gb_LinkTarget_add_defs,$(1),\
2330 -DSYSTEM_LPSOLVE \
2333 endef
2335 else # !SYSTEM_LPSOLVE
2337 define gb_LinkTarget__use_lpsolve
2338 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2339 ifeq ($(COM),MSC)
2340 $(call gb_LinkTarget_add_libs,$(1),\
2341 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2343 else
2344 $(call gb_LinkTarget_add_libs,$(1),\
2345 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2347 endif
2348 $(call gb_LinkTarget_set_include,$(1),\
2349 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2350 $$(INCLUDE) \
2353 endef
2355 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2356 lpsolve \
2359 endif # SYSTEM_LPSOLVE
2361 else
2363 gb_LinkTarget__use_lpsolve :=
2365 endif # ENABLE_LPSOLVE
2367 ifneq ($(ENABLE_COINMP),)
2369 ifneq ($(SYSTEM_COINMP),TRUE)
2371 define gb_LinkTarget__use_coinmp
2372 $(call gb_LinkTarget_use_package,$(1),coinmp)
2373 ifeq ($(COM),MSC)
2374 $(call gb_LinkTarget_add_libs,$(1),\
2375 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2377 else
2378 $(call gb_LinkTarget_add_libs,$(1),\
2379 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2380 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2381 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2382 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2383 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2384 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2385 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2387 endif
2388 $(call gb_LinkTarget_set_include,$(1),\
2389 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2390 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2391 $$(INCLUDE) \
2394 endef
2396 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2397 coinmp \
2400 else # SYSTEM_COINMP
2402 define gb_LinkTarget__use_coinmp
2403 $(call gb_LinkTarget_set_include,$(1),\
2404 $$(INCLUDE) \
2405 $(COINMP_CFLAGS) \
2407 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2409 endef
2411 endif
2413 else
2415 gb_LinkTarget__use_coinmp :=
2417 endif # ENABLE_COINMP
2419 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2421 define gb_LinkTarget__use_mDNSResponder
2422 $(call gb_LinkTarget_set_include,$(1),\
2423 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2424 $$(INCLUDE) \
2426 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2427 endef
2429 endif # MDNSRESPONDER
2431 ifeq ($(ENABLE_GIO),TRUE)
2433 define gb_LinkTarget__use_gio
2434 $(call gb_LinkTarget_set_include,$(1),\
2435 $$(INCLUDE) \
2436 $(GIO_CFLAGS) \
2439 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2441 endef
2443 else # ENABLE_GIO
2445 define gb_LinkTarget__use_gio
2447 endef
2449 endif # ENABLE_GIO
2451 ifeq ($(ENABLE_AVAHI),TRUE)
2453 define gb_LinkTarget__use_avahi
2454 $(call gb_LinkTarget_set_include,$(1),\
2455 $$(INCLUDE) \
2456 $(AVAHI_CFLAGS) \
2459 $(call gb_LinkTarget_add_defs,$(1),\
2460 -DENABLE_AVAHI \
2463 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2465 endef
2467 else # ENABLE_AVAHI
2469 gb_LinkTarget__use_avahi :=
2471 endif # ENABLE_AVAHI
2474 define gb_LinkTarget__use_gtk
2475 $(call gb_LinkTarget_set_include,$(1),\
2476 $$(INCLUDE) \
2477 $(GTK_CFLAGS) \
2480 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2482 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2484 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2486 $(call gb_LinkTarget_set_include,$(1),\
2487 $$(INCLUDE) \
2488 $(GTK_PRINT_CFLAGS) \
2491 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2493 endif
2495 endef
2497 define gb_LinkTarget__use_gthread
2498 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2499 endef
2501 ifeq ($(ENABLE_CUPS),TRUE)
2503 define gb_LinkTarget__use_cups
2504 $(call gb_LinkTarget_add_defs,$(1),\
2505 -DENABLE_CUPS \
2508 $(call gb_LinkTarget_add_libs,$(1),\
2509 -lcups \
2512 endef
2514 else # ENABLE_CUPS
2516 define gb_LinkTarget__use_cups
2518 endef
2520 endif # ENABLE_DBUS
2522 ifeq ($(ENABLE_DBUS),TRUE)
2524 define gb_LinkTarget__use_dbus
2525 $(call gb_LinkTarget_set_include,$(1),\
2526 $$(INCLUDE) \
2527 $(DBUS_CFLAGS) \
2530 $(call gb_LinkTarget_add_libs,$(1),\
2531 $(DBUS_LIBS) \
2534 endef
2536 else # ENABLE_DBUS
2538 define gb_LinkTarget__use_dbus
2540 endef
2542 endif # ENABLE_DBUS
2545 define gb_LinkTarget__use_dbusmenugtk
2546 $(call gb_LinkTarget_set_include,$(1),\
2547 $$(INCLUDE) \
2548 $(DBUSMENUGTK_CFLAGS) \
2551 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2553 endef
2556 ifeq ($(ENABLE_TELEPATHY),TRUE)
2558 define gb_LinkTarget__use_telepathy
2559 $(call gb_LinkTarget_set_include,$(1),\
2560 $$(INCLUDE) \
2561 $(TELEPATHY_CFLAGS) \
2564 $(call gb_LinkTarget_add_libs,$(1),\
2565 $(TELEPATHY_LIBS) \
2568 endef
2570 else # !ENABLE_TELEPATHY
2572 gb_LinkTarget__use_telepathy :=
2574 endif # ENABLE_TELEPATHY
2576 ifneq ($(SYSTEM_LIBPNG),)
2578 define gb_LinkTarget__use_png
2579 $(call gb_LinkTarget_set_include,$(1),\
2580 $$(INCLUDE) \
2581 $(LIBPNG_CFLAGS) \
2584 $(call gb_LinkTarget_add_libs,$(1),\
2585 $(LIBPNG_LIBS) \
2588 endef
2590 else # !SYSTEM_LIBPNG
2592 define gb_LinkTarget__use_png
2593 $(call gb_LinkTarget_set_include,$(1),\
2594 $(LIBPNG_CFLAGS) \
2595 $$(INCLUDE) \
2597 $(call gb_LinkTarget_use_static_libraries,$(1),\
2598 png \
2600 $(call gb_LinkTarget__use_zlib,$(1))
2602 endef
2604 endif # !SYSTEM_LIBPNG
2607 ifneq ($(SYSTEM_CURL),)
2609 define gb_LinkTarget__use_curl
2610 $(call gb_LinkTarget_add_defs,$(1),\
2611 -DSYSTEM_CURL \
2613 $(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(CURL_CFLAGS) \
2617 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2619 endef
2621 else # !SYSTEM_CURL
2623 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2624 curl \
2627 define gb_LinkTarget__use_curl
2628 $(call gb_LinkTarget_use_package,$(1),curl)
2629 $(call gb_LinkTarget_set_include,$(1),\
2630 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2631 $$(INCLUDE) \
2634 ifeq ($(COM),MSC)
2635 $(call gb_LinkTarget_add_libs,$(1),\
2636 $(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 \
2638 else
2639 $(call gb_LinkTarget_add_libs,$(1),\
2640 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2642 endif
2644 endef
2646 endif # SYSTEM_CURL
2648 ifeq ($(ENABLE_VALGRIND),TRUE)
2650 define gb_LinkTarget__use_valgrind
2651 $(call gb_LinkTarget_add_defs,$(1),\
2652 -DHAVE_VALGRIND_HEADERS \
2655 $(call gb_LinkTarget_set_include,$(1),\
2656 $$(INCLUDE) \
2657 $(VALGRIND_CFLAGS) \
2660 endef
2662 else # !ENABLE_VALGRIND
2664 define gb_LinkTarget__use_valgrind
2666 endef
2668 endif # ENABLE_VALGRIND
2670 ifneq ($(SYSTEM_POPPLER),)
2672 define gb_LinkTarget__use_poppler
2673 $(call gb_LinkTarget_set_include,$(1),\
2674 $(POPPLER_CFLAGS) \
2675 $$(INCLUDE) \
2678 $(call gb_LinkTarget_add_libs,$(1),\
2679 $(POPPLER_LIBS) \
2682 endef
2684 else # !SYSTEM_POPPLER
2686 define gb_LinkTarget__use_poppler
2687 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2689 $(call gb_LinkTarget_set_include,$(1),\
2690 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2691 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2692 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2693 $$(INCLUDE) \
2696 $(call gb_LinkTarget_add_libs,$(1),\
2697 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2698 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2699 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2702 $(call gb_LinkTarget_use_external,$(1),jpeg)
2704 ifeq ($(OS),MACOSX)
2705 $(call gb_LinkTarget_add_libs,$(1),\
2706 -lobjc \
2708 else ifeq ($(OS),LINUX)
2709 $(call gb_LinkTarget_add_libs,$(1),\
2710 -pthread \
2712 else ifeq ($(OS),WNT)
2713 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2714 advapi32 \
2715 gdi32 \
2717 endif
2719 endef
2721 endif # SYSTEM_POPPLER
2724 ifneq ($(SYSTEM_CLUCENE),)
2726 define gb_LinkTarget__use_clucene
2727 $(call gb_LinkTarget_add_defs,$(1),\
2728 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2731 $(call gb_LinkTarget_set_include,$(1),\
2732 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2733 $$(INCLUDE) \
2736 $(call gb_LinkTarget_add_libs,$(1),\
2737 $(CLUCENE_LIBS) \
2740 endef
2742 else # !SYSTEM_CLUCENE
2744 define gb_LinkTarget__use_clucene
2745 $(call gb_LinkTarget_set_include,$(1),\
2746 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2747 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2748 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2749 $$(INCLUDE) \
2752 $(call gb_LinkTarget_use_libraries,$(1),\
2753 clucene \
2756 endef
2758 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2759 clucene \
2762 endif # SYSTEM_CLUCENE
2764 define gb_LinkTarget__use_gobject
2765 $(call gb_LinkTarget_add_libs,$(1),\
2766 $(GOBJECT_LIBS) \
2769 $(call gb_LinkTarget_set_include,$(1),\
2770 $$(INCLUDE) \
2771 $(GOBJECT_CFLAGS) \
2773 endef
2775 ifneq ($(SYSTEM_HSQLDB),)
2777 define gb_LinkTarget__use_hsqldb
2779 $(call gb_LinkTarget_add_defs,$(1),\
2780 -DSYSTEM_HSQLDB \
2781 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2784 endef
2786 else # !SYSTEM_HSQLDB
2788 define gb_LinkTarget__use_hsqldb
2790 endef
2792 endif # SYSTEM_HSQLDB
2795 ifneq ($(SYSTEM_OPENLDAP),)
2797 define gb_LinkTarget__use_openldap
2799 $(call gb_LinkTarget_add_libs,$(1),\
2800 -lldap \
2801 -llber \
2804 endef
2806 gb_ExternalProject__use_openldap :=
2808 else # !SYSTEM_OPENLDAP
2810 define gb_LinkTarget__use_openldap
2811 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2812 $(call gb_LinkTarget_set_include,$(1),\
2813 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2814 $$(INCLUDE) \
2816 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2817 $(call gb_LinkTarget_add_libs,$(1), \
2818 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2819 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2822 endef
2824 define gb_ExternalProject__use_openldap
2825 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2827 endef
2829 endif # SYSTEM_OPENLDAP
2832 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2834 ifneq ($(SYSTEM_FIREBIRD),)
2836 define gb_LinkTarget__use_libfbembed
2837 $(call gb_LinkTarget_set_include,$(1),\
2838 $(FIREBIRD_CFLAGS) \
2839 $$(INCLUDE) \
2841 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2843 endef
2845 # gb_LinkTarget__use_atomic_ops :=
2846 # gb_LinkTarget__use_tommath :=
2848 else # !SYSTEM_FIREBIRD
2850 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2852 define gb_LinkTarget__use_libfbembed
2853 $(call gb_LinkTarget_use_package,$(1),firebird)
2854 $(call gb_LinkTarget_set_include,$(1),\
2855 $$(INCLUDE) \
2856 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
2858 ifeq ($(COM),MSC)
2859 $(call gb_LinkTarget_add_libs,$(1),\
2860 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
2862 else
2863 $(call gb_LinkTarget_add_libs,$(1),\
2864 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2866 endif
2868 endef
2870 # define gb_LinkTarget__use_tommath
2871 # $(call gb_LinkTarget_set_include,$(1),\
2872 # $(TOMMATH_CFLAGS) \
2873 # $$(INCLUDE) \
2876 # $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2878 # endef
2880 endif # SYSTEM_FIREBIRD
2882 else # !ENABLE_FIREBIRD_SDBC
2884 gb_LinkTarget__use_firebird :=
2885 # gb_LinkTarget__use_atomic_ops :=
2886 # gb_LinkTarget__use_tommath :=
2888 endif # ENABLE_FIREBIRD_SDBC
2891 ifneq ($(SYSTEM_POSTGRESQL),)
2893 define gb_LinkTarget__use_postgresql
2895 $(call gb_LinkTarget_set_include,$(1),\
2896 $(POSTGRESQL_INC) \
2897 $$(INCLUDE) \
2900 $(call gb_LinkTarget_add_libs,$(1),\
2901 -lpq \
2904 $(call gb_LinkTarget_add_ldflags,$(1),\
2905 $(POSTGRESQL_LIB) \
2908 endef
2910 else # !SYSTEM_POSTGRESQL
2912 define gb_LinkTarget__use_postgresql
2914 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2916 $(call gb_LinkTarget_set_include,$(1),\
2917 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2918 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2919 $$(INCLUDE) \
2922 $(call gb_LinkTarget_add_libs,$(1),\
2923 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2926 ifeq ($(OS)$(COM),WNTMSC)
2927 $(call gb_LinkTarget_use_external,$(1),openssl)
2929 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2930 secur32 \
2931 ws2_32 \
2934 endif
2936 endef
2938 endif # SYSTEM_POSTGRESQL
2940 ifeq ($(ENABLE_KDE4),TRUE)
2942 define gb_LinkTarget__use_kde4
2943 $(call gb_LinkTarget_set_include,$(1),\
2944 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
2945 $$(INCLUDE) \
2948 $(call gb_LinkTarget_add_defs,$(1),\
2949 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
2952 $(call gb_LinkTarget_add_libs,$(1),\
2953 $(KDE4_LIBS) \
2956 endef
2958 else # !ENABLE_KDE4
2960 define gb_LinkTarget__use_kde4
2962 endef
2964 endif # ENABLE_KDE4
2967 ifeq ($(ENABLE_TDE),TRUE)
2969 define gb_LinkTarget__use_tde
2970 $(call gb_LinkTarget_add_libs,$(1),\
2971 $(TDE_LIBS) \
2974 $(call gb_LinkTarget_set_include,$(1),\
2975 $$(INCLUDE) \
2976 $(TDE_CFLAGS) \
2978 endef
2980 else # ! ENABLE_TDE
2982 define gb_LinkTarget__use_tde
2984 endef
2986 endif # ENABLE_TDE
2989 # PYTHON
2990 # extra python_headers external because pyuno wrapper must not link python
2991 ifneq ($(SYSTEM_PYTHON),)
2993 define gb_LinkTarget__use_python_headers
2994 $(call gb_LinkTarget_add_defs,$(1),\
2995 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
2998 $(call gb_LinkTarget_set_include,$(1),\
2999 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3000 $$(INCLUDE) \
3003 endef
3005 define gb_LinkTarget__use_python
3006 $(call gb_LinkTarget__use_python_headers,$(1))
3008 $(call gb_LinkTarget_add_libs,$(1),\
3009 $(PYTHON_LIBS) \
3012 endef
3014 else # !SYSTEM_PYTHON
3016 $(eval $(call gb_Helper_register_packages_for_install,python,\
3017 python3 \
3020 define gb_LinkTarget__use_python_headers
3021 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3022 $(call gb_LinkTarget_set_include,$(1),\
3023 -I$(call gb_UnpackedTarball_get_dir,python3) \
3024 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3025 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3026 $$(INCLUDE) \
3029 endef
3031 define gb_LinkTarget__use_python
3032 $(call gb_LinkTarget__use_python_headers,$(1))
3033 ifeq ($(OS),MACOSX)
3034 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3035 else
3036 $(call gb_LinkTarget_use_package,$(1),python3)
3037 endif
3039 ifeq ($(OS),WNT)
3040 $(call gb_LinkTarget_add_libs,$(1),\
3041 $(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 \
3043 else ifeq ($(OS),MACOSX)
3044 $(call gb_LinkTarget_add_libs,$(1),\
3045 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3047 else
3048 $(call gb_LinkTarget_add_libs,$(1),\
3049 -L$(call gb_UnpackedTarball_get_dir,python3) \
3050 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3052 endif
3054 endef
3056 endif # SYSTEM_PYTHON
3058 # ORCUS
3059 ifeq ($(ENABLE_ORCUS),TRUE)
3061 ifneq ($(SYSTEM_LIBORCUS),)
3063 define gb_LinkTarget__use_orcus
3064 $(call gb_LinkTarget_set_include,$(1),\
3065 $$(INCLUDE) \
3066 $(ORCUS_CFLAGS) \
3068 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3069 endef
3071 define gb_LinkTarget__use_orcus-parser
3073 endef
3075 else # !SYSTEM_LIBORCUS
3077 ifeq ($(COM),MSC)
3079 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3080 orcus \
3081 orcus-parser \
3084 define gb_LinkTarget__use_orcus
3085 $(call gb_LinkTarget_set_include,$(1),\
3086 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3087 $$(INCLUDE) \
3090 $(call gb_LinkTarget_use_libraries,$(1),\
3091 orcus \
3094 endef
3096 define gb_LinkTarget__use_orcus-parser
3097 $(call gb_LinkTarget_set_include,$(1),\
3098 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3099 $$(INCLUDE) \
3102 $(call gb_LinkTarget_use_libraries,$(1),\
3103 orcus-parser \
3106 endef
3108 else # !MSC
3110 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3111 liborcus \
3114 define gb_LinkTarget__use_orcus
3115 $(call gb_LinkTarget_use_package,$(1),liborcus)
3117 $(call gb_LinkTarget_set_include,$(1),\
3118 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3119 $$(INCLUDE) \
3122 $(call gb_LinkTarget_add_libs,$(1),\
3123 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
3126 $(if $(SYSTEM_BOOST), \
3127 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3128 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3131 endef
3133 define gb_LinkTarget__use_orcus-parser
3134 $(call gb_LinkTarget_use_package,$(1),liborcus)
3136 $(call gb_LinkTarget_set_include,$(1),\
3137 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3138 $$(INCLUDE) \
3141 $(call gb_LinkTarget_add_libs,$(1),\
3142 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
3145 endef
3147 endif # MSC
3149 endif # SYSTEM_LIBORCUS
3151 else # ENABLE_ORCUS != TRUE
3153 gb_LinkTarget__use_orcus :=
3154 gb_LinkTarget__use_orcus-parser :=
3156 endif
3158 ifeq ($(ENABLE_EOT),TRUE)
3160 ifneq ($(SYSTEM_LIBEOT),)
3162 define gb_LinkTarget__use_libeot
3163 $(call gb_LinkTarget_set_include,$(1),\
3164 $$(INCLUDE) \
3165 $(LIBEOT_CFLAGS) \
3167 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3169 endef
3171 gb_ExternalProject__use_libeot :=
3173 else # !SYSTEM_LIBEOT
3175 define gb_LinkTarget__use_libeot
3176 $(call gb_LinkTarget_set_include,$(1),\
3177 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3178 $$(INCLUDE) \
3180 $(call gb_LinkTarget_add_libs,$(1),\
3181 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3183 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3185 endef
3187 define gb_ExternalProject__use_libeot
3188 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3190 endef
3192 endif # SYSTEM_LIBEOT
3194 else # !ENABLE_EOT
3196 gb_LinkTarget__use_libeot :=
3197 gb_ExternalProject__use_libeot :=
3199 endif # ENABLE_EOT
3201 ### X11 stuff ###
3203 ifeq ($(USING_X11), TRUE)
3205 define gb_LinkTarget__use_Xrandr
3206 $(call gb_LinkTarget_set_include,$(1),\
3207 $$(INCLUDE) \
3208 $(XRANDR_CFLAGS) \
3211 $(call gb_LinkTarget_add_libs,$(1),\
3212 $(XRANDR_LIBS) \
3214 endef
3216 define gb_LinkTarget__use_Xrender
3217 $(call gb_LinkTarget_set_include,$(1),\
3218 $$(INCLUDE) \
3219 $(XRENDER_CFLAGS) \
3222 $(call gb_LinkTarget_add_libs,$(1),\
3223 $(XRENDER_LIBS) \
3225 endef
3227 endif # USING_X11
3230 gb_ExternalProject__use_nss3:=
3232 ifeq ($(OS),ANDROID)
3234 gb_LinkTarget__use_nss3:=
3235 gb_LinkTarget__use_plc4:=
3237 else
3239 ifneq ($(SYSTEM_NSS),)
3241 define gb_LinkTarget__use_nss3
3242 $(call gb_LinkTarget_add_defs,$(1),\
3243 -DSYSTEM_NSS \
3246 $(call gb_LinkTarget_set_include,$(1),\
3247 $$(INCLUDE) \
3248 $(NSS_CFLAGS) \
3251 $(call gb_LinkTarget_add_libs,$(1),\
3252 $(NSS_LIBS) \
3255 endef
3257 define gb_LinkTarget__use_plc4
3258 $(call gb_LinkTarget__use_nss3,$(1))
3260 endef
3262 define gb_LinkTarget__use_ssl3
3263 $(call gb_LinkTarget__use_nss3,$(1))
3265 endef
3267 else # !SYSTEM_NSS
3269 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3270 nss \
3273 define gb_LinkTarget__use_nss3
3274 $(call gb_LinkTarget_use_package,$(1),nss)
3275 $(call gb_LinkTarget_set_include,$(1),\
3276 $$(INCLUDE) \
3277 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3278 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3281 ifeq ($(COM),MSC)
3282 $(call gb_LinkTarget_add_libs,$(1),\
3283 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3284 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3285 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3287 else
3288 $(call gb_LinkTarget_add_libs,$(1),\
3289 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3290 -lnspr4 \
3291 -lnss3 \
3292 -lsmime3 \
3294 endif
3296 endef
3298 define gb_LinkTarget__use_plc4
3299 $(call gb_LinkTarget_use_package,$(1),nss)
3300 ifeq ($(COM),MSC)
3301 $(call gb_LinkTarget_add_libs,$(1),\
3302 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3304 else
3305 $(call gb_LinkTarget_add_libs,$(1),\
3306 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3308 endif
3310 endef
3312 define gb_LinkTarget__use_ssl3
3313 $(call gb_LinkTarget_use_package,$(1),nss)
3314 ifeq ($(COM),MSC)
3315 $(call gb_LinkTarget_add_libs,$(1),\
3316 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3318 else
3319 $(call gb_LinkTarget_add_libs,$(1),\
3320 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3322 endif
3324 endef
3326 define gb_ExternalProject__use_nss3
3327 $(call gb_ExternalProject_use_package,$(1),nss)
3329 endef
3331 endif # SYSTEM_NSS
3333 endif # DESKTOP
3335 ifeq ($(ENABLE_BREAKPAD),TRUE)
3337 define gb_LinkTarget__use_breakpad
3338 $(call gb_LinkTarget_set_include,$(1),\
3339 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3340 $$(INCLUDE) \
3343 ifeq ($(COM),MSC)
3344 $(call gb_LinkTarget_use_static_libraries,$(1),\
3345 breakpad \
3347 else
3348 $(call gb_LinkTarget_add_libs,$(1),\
3349 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3351 endif
3353 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3355 endef
3357 endif # ENABLE_BREAKPAD
3359 ifeq ($(ENABLE_GLTF),TRUE)
3361 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3363 define gb_LinkTarget__use_libgltf
3364 $(call gb_LinkTarget_set_include,$(1),\
3365 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3366 $$(INCLUDE) \
3369 ifeq ($(COM),MSC)
3370 $(call gb_LinkTarget_add_libs,$(1),\
3371 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3373 else
3374 $(call gb_LinkTarget_add_libs,$(1),\
3375 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3377 endif
3379 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3381 endef
3383 else # SYSTEM_LIBGLTF
3385 define gb_LinkTarget__use_libgltf
3386 $(call gb_LinkTarget_set_include,$(1),\
3387 $$(INCLUDE) \
3388 $(LIBGLTF_CFLAGS) \
3390 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3392 endef
3394 endif # SYSTEM_LIBGLTF
3396 ifeq ($(ENABLE_COLLADA),TRUE)
3398 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3400 define gb_LinkTarget__use_opencollada_parser
3401 $(call gb_LinkTarget_set_include,$(1),\
3402 $$(INCLUDE) \
3403 $(OPENCOLLADA_CFLAGS) \
3406 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3408 endef
3410 else # !SYSTEM_OPENCOLLADA
3412 define gb_LinkTarget__use_opencollada_parser
3413 $(call gb_LinkTarget_set_include,$(1),\
3414 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3415 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3416 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3417 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3418 $$(INCLUDE) \
3421 $(call gb_LinkTarget_use_static_libraries,$(1),\
3422 opencollada_parser \
3424 endef
3426 endif # SYSTEM_OPENCOLLADA
3428 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3430 define gb_LinkTarget__use_collada2gltf
3431 $(call gb_LinkTarget_set_include,$(1),\
3432 $$(INCLUDE) \
3433 $(COLLADA2GLTF_CFLAGS) \
3436 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3438 endef
3440 else # !SYSTEM_COLLADA2GLTF
3442 define gb_LinkTarget__use_collada2gltf
3443 $(call gb_LinkTarget_set_include,$(1),\
3444 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3445 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3446 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3447 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3448 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3449 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3450 $$(INCLUDE) \
3453 $(call gb_LinkTarget_use_static_libraries,$(1),\
3454 collada2gltf \
3456 endef
3458 endif # SYSTEM_COLLADA2GLTF
3460 endif # ENABLE_COLLADA
3462 endif # ENABLE_GLTF
3464 define gb_LinkTarget__use_dconf
3465 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3466 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3467 endef
3469 ### Jars ############################################################
3471 ifneq ($(SYSTEM_HSQLDB),)
3473 define gb_Jar__use_hsqldb
3474 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3475 endef
3476 define gb_JunitTest__use_hsqldb
3477 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3478 endef
3480 else # !SYSTEM_HSQLDB
3482 ifeq ($(ENABLE_JAVA),TRUE)
3483 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3484 hsqldb \
3486 endif
3488 define gb_Jar__use_hsqldb
3489 $(call gb_Jar_use_jar,$(1),hsqldb)
3490 endef
3491 define gb_JunitTest__use_hsqldb
3492 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3493 endef
3495 endif # SYSTEM_HSQLDB
3498 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3500 ifneq ($(SYSTEM_BSH),)
3502 define gb_Jar__use_bsh
3503 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3504 endef
3506 else # !SYSTEM_BSH
3508 ifeq ($(ENABLE_JAVA),TRUE)
3509 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3510 bsh \
3512 endif
3514 define gb_Jar__use_bsh
3515 $(call gb_Jar_use_jar,$(1),bsh)
3516 endef
3518 endif # SYSTEM_BSH
3520 endif
3522 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3524 ifneq ($(SYSTEM_RHINO),)
3526 define gb_Jar__use_rhino
3527 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3528 endef
3530 else # !SYSTEM_RHINO
3532 ifeq ($(ENABLE_JAVA),TRUE)
3533 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3534 js \
3536 endif
3538 define gb_Jar__use_rhino
3539 $(call gb_Jar_use_jar,$(1),js)
3540 endef
3542 endif # SYSTEM_RHINO
3544 endif
3546 ifneq ($(SYSTEM_APACHE_COMMONS),)
3548 define gb_Jar__use_commons-logging
3549 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3550 endef
3551 gb_ExternalProject__use_commons-logging :=
3553 else # !SYSTEM_APACHE_COMMONS
3555 ifeq ($(ENABLE_JAVA),TRUE)
3556 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3557 commons-logging-$(COMMONS_LOGGING_VERSION) \
3559 endif
3561 define gb_Jar__use_commons-logging
3562 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3563 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3564 endef
3565 define gb_ExternalProject__use_commons-logging
3566 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3567 endef
3569 endif # SYSTEM_APACHE_COMMONS
3572 ifneq ($(SYSTEM_JFREEREPORT),)
3574 define gb_Jar__use_flow-engine
3575 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3576 endef
3578 define gb_Jar__use_flute
3579 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3580 endef
3582 define gb_Jar__use_libbase
3583 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3584 endef
3586 define gb_Jar__use_libfonts
3587 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3588 endef
3590 define gb_Jar__use_libformula
3591 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3592 endef
3594 define gb_Jar__use_liblayout
3595 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3596 endef
3598 define gb_Jar__use_libloader
3599 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3600 endef
3602 define gb_Jar__use_librepository
3603 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3604 endef
3606 define gb_Jar__use_libserializer
3607 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3608 endef
3610 define gb_Jar__use_libxml
3611 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3612 endef
3614 define gb_Jar__use_sac
3615 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3616 endef
3618 else # !SYSTEM_JFREEREPORT
3620 ifeq ($(ENABLE_JAVA),TRUE)
3621 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3622 flow-engine \
3623 flute-1.1.6 \
3624 libbase-1.1.6 \
3625 libfonts-1.1.6 \
3626 libformula-1.1.7 \
3627 liblayout \
3628 libloader-1.1.6 \
3629 librepository-1.1.6 \
3630 libserializer-1.1.6 \
3631 libxml-1.1.7 \
3632 sac \
3634 endif
3636 define gb_Jar__use_flow-engine
3637 $(call gb_Jar_use_jar,$(1),flow-engine)
3638 endef
3640 define gb_Jar__use_flute
3641 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3642 endef
3644 define gb_Jar__use_libbase
3645 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3646 endef
3648 define gb_Jar__use_libfonts
3649 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3650 endef
3652 define gb_Jar__use_libformula
3653 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3654 endef
3656 define gb_Jar__use_liblayout
3657 $(call gb_Jar_use_jar,$(1),liblayout)
3658 endef
3660 define gb_Jar__use_libloader
3661 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3662 endef
3664 define gb_Jar__use_librepository
3665 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3666 endef
3668 define gb_Jar__use_libserializer
3669 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3670 endef
3672 define gb_Jar__use_libxml
3673 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3674 endef
3676 define gb_Jar__use_sac
3677 $(call gb_Jar_use_jar,$(1),sac)
3678 endef
3680 endif # SYSTEM_JFREEREPORT
3683 # Executables
3685 # FIXME: the library target should be for build too
3686 define gb_Executable__register_bestreversemap
3687 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3688 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3690 endef
3692 # TODO depending on the whole URE might be overkill, but I do not have a
3693 # Windows machine to debug it...
3694 # FIXME: the library target should be for build too
3695 define gb_Executable__register_climaker
3696 $(call gb_Executable_add_runtime_dependencies,climaker,\
3697 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3698 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3699 $(call gb_UnoApi_get_target,udkapi) \
3700 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3702 endef
3704 define gb_Executable__register_cppumaker
3705 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3706 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3708 endef
3710 # This is used to determine what we need for 'build' platform.
3711 # FIXME: the library target should be for build too
3712 define gb_Executable__register_gengal
3713 $(call gb_Executable_add_runtime_dependencies,gengal,\
3714 $(call gb_AllLangResTarget_get_target,ofa) \
3715 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3716 $(call gb_Package_get_target_for_build,postprocess_images) \
3717 $(call gb_Package_get_target_for_build,postprocess_registry) \
3718 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3719 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3720 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3721 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3722 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3723 $(call gb_UnoApi_get_target,offapi) \
3724 $(call gb_UnoApi_get_target,udkapi) \
3726 endef
3728 ifeq ($(SYSTEM_ICU),)
3730 define gb_Executable__register_gendict
3731 $(call gb_Executable_add_runtime_dependencies,gendict,\
3732 $(call gb_Package_get_target_for_build,icu) \
3734 endef
3736 endif
3738 define gb_Executable__register_idlc
3739 $(call gb_Executable_add_runtime_dependencies,idlc,\
3740 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3742 endef
3744 define gb_Executable__register_localize
3745 $(call gb_Executable_add_runtime_dependencies,localize,\
3746 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3747 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3750 endef
3752 # FIXME ure/services.rdb needs cleanup
3753 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3754 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3755 # FIXME: the library target should be for build too
3756 define gb_Executable__register_saxparser
3757 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3758 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3759 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3760 $(call gb_Rdb_get_target_for_build,saxparser) \
3761 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3762 $(call gb_UnoApi_get_target,udkapi) \
3764 endef
3766 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3767 # required due to the settings for URE_SERVICES and URE_TYPES in
3768 # cppuhelper/source/unorc
3769 # FIXME: the library target should be for build too
3770 define gb_Executable__register_uno
3771 $(call gb_Executable_add_runtime_dependencies,uno,\
3772 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3773 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3774 $(call gb_UnoApi_get_target,udkapi) \
3776 endef
3779 # External executables
3781 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3783 gb_ExternalExecutable__register_xmllint :=
3785 else # ! SYSTEM_LIBXML_FOR_BUILD
3787 define gb_ExternalExecutable__register_xmllint
3788 $(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)
3789 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3790 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3791 $(call gb_Package_get_target,xml2) \
3794 endef
3796 endif # SYSTEM_LIBXML_FOR_BUILD
3798 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3800 gb_ExternalExecutable__register_xsltproc :=
3802 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3804 define gb_ExternalExecutable__register_xsltproc
3805 $(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)
3806 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3807 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3808 $(call gb_Package_get_target,xml2) \
3809 $(call gb_Package_get_target,xslt) \
3812 endef
3814 endif # SYSTEM_LIBXSLT_FOR_BUILD
3816 ifneq (,$(SYSTEM_UCPP))
3818 gb_ExternalExecutable__register_ucpp :=
3820 else # ! SYSTEM_UCPP
3822 define gb_ExternalExecutable__register_ucpp
3823 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3825 endef
3827 endif # SYSTEM_UCPP
3829 ifeq (,$(PYTHON_FOR_BUILD))
3831 define gb_ExternalExecutable__register_python
3832 ifeq ($(OS),MACOSX)
3834 # use set_external, to avoid having the command added as prerequisite for the
3835 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3836 # matching rule to build that specific file)
3837 $(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))
3838 # the Zip ensures that internal python has been built (cannot use the Package
3839 # target, as that is not used on Mac)
3840 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3842 else
3844 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3845 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3846 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3848 endif
3850 endef
3852 else
3854 define gb_ExternalExecutable__register_python
3855 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3857 endef
3859 endif # PYTHON_FOR_BUILD
3861 ifneq ($(SYSTEM_GENBRK),)
3863 define gb_ExternalExecutable__register_genbrk
3864 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3866 endef
3868 else # ! SYSTEM_GENBRK
3870 define gb_ExternalExecutable__register_genbrk
3871 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3872 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3873 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3874 $(call gb_Package_get_target_for_build,icu) \
3877 endef
3879 endif
3881 ifneq ($(SYSTEM_GENCCODE),)
3883 define gb_ExternalExecutable__register_genccode
3884 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3886 endef
3888 else # ! SYSTEM_GENCCODE
3890 define gb_ExternalExecutable__register_genccode
3891 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3892 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3893 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3894 $(call gb_Package_get_target_for_build,icu) \
3897 endef
3899 endif
3901 ifneq ($(SYSTEM_GENCMN),)
3903 define gb_ExternalExecutable__register_gencmn
3904 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3906 endef
3908 else # ! SYSTEM_GENCMN
3910 define gb_ExternalExecutable__register_gencmn
3911 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3912 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3913 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3914 $(call gb_Package_get_target_for_build,icu) \
3917 endef
3919 endif
3921 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3923 $(eval $(call gb_Helper_register_jars,OXT,\
3924 owncloud-android-library \
3927 define gb_Jar__use_owncloud_android_lib
3928 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
3929 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
3930 endef
3931 define gb_ExternalProject__use_owncloud_android_lib
3932 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
3933 endef
3935 endif
3937 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
3938 ifneq ($(SYSTEM_BZIP2),)
3940 define gb_LinkTarget__use_bzip2
3941 $(call gb_LinkTarget_set_include,$(1),\
3942 $(BZIP2_CFLAGS) \
3943 $$(INCLUDE) \
3945 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
3947 endef
3949 gb_ExternalProject__use_bzip2 :=
3951 else # !SYSTEM_BZIP2
3953 define gb_LinkTarget__use_bzip2
3954 $(call gb_LinkTarget_set_include,$(1),\
3955 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
3956 $$(INCLUDE) \
3959 ifeq ($(COM),MSC)
3960 $(call gb_LinkTarget_add_libs,$(1),\
3961 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
3963 else
3964 $(call gb_LinkTarget_add_libs,$(1),\
3965 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
3967 endif
3969 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
3970 endef
3972 define gb_ExternalProject__use_bzip2
3973 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
3974 endef
3976 endif
3977 endif
3979 define gb_LinkTarget__use_clew
3980 $(call gb_LinkTarget_set_include,$(1), \
3981 -I$(SRCDIR)/external/clew/source/include \
3982 $$(INCLUDE) \
3984 $(call gb_LinkTarget_use_libraries,$(1),clew)
3985 endef
3987 # vim: set noet sw=4 ts=4: