sc: add ScModelObj::getTextSelection().
[LibreOffice.git] / RepositoryExternal.mk
blob4bf24f73bfa386a0962303ad44cc9ff0975a4fb9
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_MESA_HEADERS),)
42 gb_LinkTarget__use_mesa_headers :=
44 else # !SYSTEM_MESA_HEADERS
46 define gb_LinkTarget__use_mesa_headers
47 $(call gb_LinkTarget_set_include,$(1),\
48 -I$(SRCDIR)/external/Mesa/inc \
49 $$(INCLUDE) \
52 endef
54 endif # SYSTEM_MESA_HEADERS
56 ifneq ($(SYSTEM_NPAPI_HEADERS),)
58 # yes this uses internal headers too...
59 # they are split across 2 dirs for this reason
60 define gb_LinkTarget__use_npapi_headers
61 $(call gb_LinkTarget_set_include,$(1),\
62 $(NPAPI_HEADERS_CFLAGS) \
63 -I$(SRCDIR)/external/np_sdk \
64 $$(INCLUDE) \
67 endef
69 else #!SYSTEM_NPAPI_HEADERS
71 define gb_LinkTarget__use_npapi_headers
72 $(call gb_LinkTarget_set_include,$(1),\
73 -I$(SRCDIR)/external/np_sdk/inc \
74 -I$(SRCDIR)/external/np_sdk \
75 $$(INCLUDE) \
78 endef
80 endif #SYSTEM_NPAPI_HEADERS
82 ifneq ($(SYSTEM_ODBC_HEADERS),)
84 define gb_LinkTarget__use_odbc_headers
85 $(call gb_LinkTarget_add_defs,$(1),\
86 -DSYSTEM_ODBC_HEADERS \
89 endef
91 else # !SYSTEM_ODBC_HEADERS
93 define gb_LinkTarget__use_odbc_headers
94 $(call gb_LinkTarget_set_include,$(1),\
95 -I$(SRCDIR)/external/unixODBC/inc \
96 $$(INCLUDE) \
99 endef
101 endif # SYSTEM_ODBC_HEADERS
103 ifneq ($(SYSTEM_VIGRA),)
105 gb_LinkTarget__use_vigra_headers :=
107 else
109 define gb_LinkTarget__use_vigra_headers
110 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
111 $(call gb_LinkTarget_set_include,$(1),\
112 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
113 $$(INCLUDE) \
116 endef
118 endif
120 ifneq ($(SYSTEM_MDDS),)
122 gb_ExternalProject__use_mdds_headers :=
124 define gb_LinkTarget__use_mdds_headers
125 $(call gb_LinkTarget_set_include,$(1),\
126 $(MDDS_CFLAGS) \
127 $$(INCLUDE) \
130 endef
132 else # !SYSTEM_MDDS
134 define gb_ExternalProject__use_mdds_headers
135 $(call gb_ExternalProject_use_external_project,$(1),mdds)
137 endef
139 define gb_LinkTarget__use_mdds_headers
140 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
141 $(call gb_LinkTarget_set_include,$(1),\
142 $(MDDS_CFLAGS) \
143 $$(INCLUDE) \
146 endef
148 endif # SYSTEM_MDDS
150 ifneq ($(SYSTEM_GLM),)
152 gb_LinkTarget__use_glm_headers :=
153 gb_ExternalProject__use_glm_headers :=
155 else
157 define gb_LinkTarget__use_glm_headers
158 $(call gb_LinkTarget_use_unpacked,$(1),glm)
159 $(call gb_LinkTarget_set_include,$(1),\
160 $(GLM_CFLAGS) \
161 $$(INCLUDE) \
164 endef
166 define gb_ExternalProject__use_glm_headers
167 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
169 endef
171 endif
173 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
175 define gb_LinkTarget__use_sane_headers
176 $(call gb_LinkTarget_set_include,$(1),\
177 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
178 $$(INCLUDE) \
181 endef
183 else
185 gb_LinkTarget__use_sane_headers :=
187 endif
189 ifneq ($(SYSTEM_BLUEZ),)
191 gb_LinkTarget__use_bluez_bluetooth_headers :=
193 else # !SYSTEM_BLUEZ
195 define gb_LinkTarget__use_bluez_bluetooth_headers
196 $(call gb_LinkTarget_set_include,$(1),\
197 -I$(SRCDIR)/external/bluez_bluetooth/inc \
198 $$(INCLUDE) \
201 endef
203 endif # SYSTEM_BLUEZ
205 # External libraries
207 ifneq ($(SYSTEM_CPPUNIT),)
209 define gb_LinkTarget__use_cppunit
210 $(call gb_LinkTarget_set_include,$(1),\
211 $$(INCLUDE) \
212 $(CPPUNIT_CFLAGS) \
215 $(call gb_LinkTarget_add_libs,$(1),\
216 $(CPPUNIT_LIBS) \
219 endef
221 else # !SYSTEM_CPPUNIT
223 define gb_LinkTarget__use_cppunit
224 $(call gb_LinkTarget_use_external_project,$(1),cppunit)
226 $(call gb_LinkTarget_set_include,$(1),\
227 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
228 $$(INCLUDE) \
231 ifeq ($(COM),MSC)
232 $(call gb_LinkTarget_add_libs,$(1),\
233 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
235 else
236 $(call gb_LinkTarget_add_libs,$(1),\
237 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
239 endif
241 endef
243 endif # SYSTEM_CPPUNIT
245 ifneq ($(SYSTEM_GLEW),)
247 define gb_LinkTarget__use_glew
248 $(call gb_LinkTarget_set_include,$(1),\
249 $$(INCLUDE) \
250 $(GLEW_CFLAGS) \
252 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
254 endef
256 gb_ExternalProject__use_glew :=
258 else # !SYSTEM_GLEW
260 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
261 glew \
264 define gb_LinkTarget__use_glew
265 $(call gb_LinkTarget_use_package,$(1),glew)
266 $(call gb_LinkTarget_set_include,$(1),\
267 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
268 -DGLEW_NO_GLU \
269 $$(INCLUDE) \
272 ifeq ($(COM),MSC)
273 $(call gb_LinkTarget_add_libs,$(1),\
274 $(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) \
276 else
277 $(call gb_LinkTarget_add_libs,$(1),\
278 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
280 endif
282 endef
284 define gb_ExternalProject__use_glew
285 $(call gb_ExternalProject_use_external_project,$(1),glew)
287 endef
289 endif # SYSTEM_GLEW
291 define gb_LinkTarget__use_iconv
292 $(call gb_LinkTarget_add_libs,$(1),-liconv)
294 endef
296 ifneq ($(SYSTEM_MARIADB),)
298 define gb_LinkTarget__use_mariadb
299 $(call gb_LinkTarget_set_include,$(1),\
300 $$(INCLUDE) \
301 $(MARIADB_CFLAGS) \
303 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
305 endef
306 gb_ExternalProject__use_mariadb :=
308 else # !SYSTEM_MARIADB
310 define gb_LinkTarget__use_mariadb
311 $(call gb_LinkTarget_set_include,$(1),\
312 $$(INCLUDE) \
313 $(MARIADB_CFLAGS) \
315 $(call gb_LinkTarget_use_static_libraries,$(1),\
316 mariadblib \
319 endef
320 define gb_ExternalProject__use_mariadb
321 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
323 endef
325 endif # SYSTEM_MARIADB
328 ifneq ($(SYSTEM_MARIADB),)
330 define gb_LinkTarget__use_mysql
332 $(call gb_LinkTarget_add_defs,$(1),\
333 -DSYSTEM_MARIADB \
336 $(call gb_LinkTarget_add_libs,$(1),\
337 $(MARIADB_LIBS) \
340 $(call gb_LinkTarget_set_include,$(1),\
341 $(MARIADB_CFLAGS) \
342 $$(INCLUDE) \
344 endef
346 else
348 define gb_LinkTarget__use_mysql
350 $(call gb_LinkTarget_set_include,$(1),\
351 $$(INCLUDE) \
354 endef
356 endif
358 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
360 define gb_LinkTarget__use_mysqlcppconn
361 $(call gb_LinkTarget_add_libs,$(1),\
362 -lmysqlcppconn \
365 $(call gb_LinkTarget_add_defs,$(1),\
366 -DSYSTEM_MYSQL_CPPCONN \
368 endef
370 else
372 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
373 mysqlcppconn \
376 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
377 define gb_LinkTarget__use_mysqlcppconn
379 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
381 $(call gb_LinkTarget_add_defs,$(1),\
382 -DCPPCONN_LIB_BUILD \
385 $(call gb_LinkTarget_set_include,$(1),\
386 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
387 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
388 $$(INCLUDE) \
391 endef
393 endif
395 ifneq ($(SYSTEM_ZLIB),)
397 define gb_LinkTarget__use_zlib
398 $(call gb_LinkTarget_add_defs,$(1),\
399 -DSYSTEM_ZLIB \
401 $(call gb_LinkTarget_add_libs,$(1),-lz)
403 endef
405 # nothing on system
406 define gb_LinkTarget__use_zlib_x64
408 endef
410 gb_ExternalProject__use_zlib :=
412 else # !SYSTEM_ZLIB
414 define gb_LinkTarget__use_zlib_multiarch
415 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
417 $(call gb_LinkTarget_set_include,$(1),\
418 $(ZLIB_CFLAGS) \
419 $$(INCLUDE) \
422 $(call gb_LinkTarget_use_static_libraries,$(1),\
423 $(2) \
426 endef
428 define gb_LinkTarget__use_zlib
429 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
431 endef
433 define gb_LinkTarget__use_zlib_x64
434 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
436 endef
438 define gb_ExternalProject__use_zlib
439 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
441 endef
443 endif # SYSTEM_ZLIB
446 ifneq ($(SYSTEM_JPEG),)
448 define gb_LinkTarget__use_jpeg
449 $(call gb_LinkTarget_add_libs,$(1),-ljpeg)
450 $(call gb_LinkTarget_set_ldflags,$(1),\
451 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
454 endef
456 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
458 define gb_LinkTarget__use_jpeg
459 $(call gb_LinkTarget_set_include,$(1),\
460 -I$(call gb_UnpackedTarball_get_dir,jpeg-turbo) \
461 $$(INCLUDE) \
463 $(call gb_LinkTarget_add_libs,$(1),\
464 $(call gb_UnpackedTarball_get_dir,jpeg-turbo)/.libs/libjpeg$(gb_StaticLibrary_PLAINEXT) \
466 $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo)
468 endef
470 else # !SYSTEM_JPEG
472 define gb_LinkTarget__use_jpeg
473 $(call gb_LinkTarget_set_include,$(1),\
474 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
475 $$(INCLUDE) \
478 $(call gb_LinkTarget_use_static_libraries,$(1),\
479 jpeg \
482 endef
484 endif # SYSTEM_JPEG
486 ifneq ($(SYSTEM_MYTHES),)
488 define gb_LinkTarget__use_mythes
489 $(call gb_LinkTarget_set_include,$(1),\
490 $$(INCLUDE) \
491 $(MYTHES_CFLAGS) \
493 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
495 endef
497 else # !SYSTEM_MYTHES
499 define gb_LinkTarget__use_mythes
500 $(call gb_LinkTarget_set_include,$(1),\
501 -I$(call gb_UnpackedTarball_get_dir,mythes) \
502 $$(INCLUDE) \
505 ifeq ($(COM),MSC)
506 $(call gb_LinkTarget_use_static_libraries,$(1),\
507 mythes \
509 else
510 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
511 $(call gb_LinkTarget_use_external_project,$(1),mythes)
512 endif
514 endef
516 endif # SYSTEM_MYTHES
519 ifneq ($(SYSTEM_EXPAT),)
521 define gb_LinkTarget__use_expat_impl
522 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
524 $(call gb_LinkTarget_add_defs,$(1),\
525 -DSYSTEM_EXPAT \
528 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
530 endef
532 gb_ExternalProject__use_expat :=
534 else # !SYSTEM_EXPAT
536 define gb_LinkTarget__use_expat_impl
537 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
539 $(call gb_LinkTarget_set_include,$(1),\
540 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
541 $$(INCLUDE) \
544 $(call gb_LinkTarget_use_static_libraries,$(1),\
545 $(2) \
548 endef
550 define gb_ExternalProject__use_expat
551 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
553 endef
555 endif # SYSTEM_EXPAT
557 define gb_LinkTarget__use_expat
558 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
560 endef
562 define gb_LinkTarget__use_expat_x64
563 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
565 endef
567 ifneq ($(SYSTEM_HYPH),)
569 define gb_LinkTarget__use_hyphen
570 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
572 endef
574 else # !SYSTEM_HYPH
576 define gb_LinkTarget__use_hyphen
577 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
578 $(call gb_LinkTarget_set_include,$(1),\
579 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
580 $$(INCLUDE) \
583 ifeq ($(COM),MSC)
584 $(call gb_LinkTarget_use_static_libraries,$(1),\
585 hyphen \
587 else
588 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
589 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
590 endif
592 endef
594 endif # SYSTEM_HYPH
596 ifneq ($(SYSTEM_HUNSPELL),)
598 define gb_LinkTarget__use_hunspell
599 $(call gb_LinkTarget_set_include,$(1),\
600 $$(INCLUDE) \
601 $(HUNSPELL_CFLAGS) \
603 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
605 endef
607 gb_ExternalProject__use_hunspell :=
609 else # !SYSTEM_HUNSPELL
611 define gb_LinkTarget__use_hunspell
612 $(call gb_LinkTarget_add_defs,$(1),\
613 -DHUNSPELL_STATIC \
615 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
616 $(call gb_LinkTarget_set_include,$(1),\
617 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
618 $$(INCLUDE) \
621 ifeq ($(COM),MSC)
622 $(call gb_LinkTarget_use_static_libraries,$(1),\
623 hunspell \
625 else
626 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
627 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
628 endif
630 endef
632 define gb_ExternalProject__use_hunspell
633 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
635 endef
637 endif # SYSTEM_HUNSPELL
640 ifneq ($(SYSTEM_BOOST),)
642 define gb_LinkTarget__use_boostdatetime
643 $(call gb_LinkTarget_set_include,$(1),\
644 $$(INCLUDE) \
645 $(BOOST_CPPFLAGS) \
648 $(call gb_LinkTarget_add_ldflags,$(1),\
649 $(BOOST_LDFLAGS) \
652 $(call gb_LinkTarget_add_libs,$(1),\
653 $(BOOST_DATE_TIME_LIB) \
656 endef
658 define gb_LinkTarget__use_boost_iostreams
659 $(call gb_LinkTarget_set_include,$(1),\
660 $$(INCLUDE) \
661 $(BOOST_CPPFLAGS) \
664 $(call gb_LinkTarget_add_ldflags,$(1),\
665 $(BOOST_LDFLAGS) \
668 $(call gb_LinkTarget_add_libs,$(1),\
669 $(BOOST_IOSTREAMS_LIB) \
672 endef
674 gb_ExternalProject__use_boost_iostreams :=
676 define gb_LinkTarget__use_boost_system
677 $(call gb_LinkTarget_set_include,$(1),\
678 $$(INCLUDE) \
679 $(BOOST_CPPFLAGS) \
682 $(call gb_LinkTarget_add_ldflags,$(1),\
683 $(BOOST_LDFLAGS) \
686 $(call gb_LinkTarget_add_libs,$(1),\
687 $(BOOST_SYSTEM_LIB) \
690 endef
692 gb_ExternalProject__use_boost_system :=
694 define gb_LinkTarget__use_boost_headers
695 $(call gb_LinkTarget_set_include,$(1),\
696 $$(INCLUDE) \
697 $(BOOST_CPPFLAGS) \
700 endef
702 gb_ExternalProject__use_boost_headers:=
704 else # !SYSTEM_BOOST
706 ifeq ($(OS),WNT)
707 define gb_LinkTarget__use_boostthread
708 $(call gb_LinkTarget_add_defs,$(1),\
709 -DBOOST_ALL_NO_LIB \
712 $(call gb_LinkTarget_use_static_libraries,$(1),\
713 boostthread \
715 endef
716 endif
718 define gb_LinkTarget__use_boostdatetime
719 $(call gb_LinkTarget_add_defs,$(1),\
720 -DBOOST_ALL_NO_LIB \
723 $(call gb_LinkTarget_use_static_libraries,$(1),\
724 boostdatetime \
727 endef
729 define gb_LinkTarget__use_boost_iostreams
730 $(call gb_LinkTarget_add_defs,$(1),\
731 -DBOOST_ALL_NO_LIB \
734 $(call gb_LinkTarget_use_static_libraries,$(1),\
735 boost_iostreams \
738 endef
740 define gb_ExternalProject__use_boost_iostreams
741 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
742 endef
744 define gb_LinkTarget__use_boost_system
745 $(call gb_LinkTarget_add_defs,$(1),\
746 -DBOOST_ALL_NO_LIB \
749 $(call gb_LinkTarget_use_static_libraries,$(1),\
750 boost_system \
753 endef
755 define gb_ExternalProject__use_boost_system
756 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
757 endef
759 define gb_LinkTarget__use_boost_headers
760 $(call gb_LinkTarget_use_unpacked,$(1),boost)
761 $(call gb_LinkTarget_set_include,$(1),\
762 -I$(call gb_UnpackedTarball_get_dir,boost) \
763 $$(INCLUDE) \
766 endef
768 define gb_ExternalProject__use_boost_headers
769 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
771 endef
772 endif # SYSTEM_BOOST
775 ifneq ($(SYSTEM_CMIS),)
777 define gb_LinkTarget__use_cmis
778 $(call gb_LinkTarget_set_include,$(1),\
779 $$(INCLUDE) \
780 $(CMIS_CFLAGS) \
782 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
784 endef
786 else # !SYSTEM_CMIS
788 define gb_LinkTarget__use_cmis
789 $(call gb_LinkTarget_set_include,$(1),\
790 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
791 $$(INCLUDE) \
793 $(call gb_LinkTarget_use_static_libraries,$(1),\
794 cmislib \
797 endef
799 endif # SYSTEM_CMIS
801 ifeq ($(ENABLE_JAVA),TRUE)
803 ifeq ($(OS)$(COM),WNTGCC)
805 define gb_LinkTarget__use_jawt
806 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
808 $(call gb_LinkTarget_add_ldflags,$(1),\
809 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
812 $(call gb_LinkTarget_add_libs,$(1),\
813 $(JAWTLIB) \
816 endef
818 else # $(OS)$(COM) != WNTGCC
820 define gb_LinkTarget__use_jawt
821 $(call gb_LinkTarget_add_libs,$(1),\
822 $(JAWTLIB) \
825 endef
827 endif # $(OS)$(COM) = WNTGCC
829 else # !ENABLE_JAVA
831 gb_LinkTarget__use_jawt :=
833 endif # ENABLE_JAVA
835 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
837 define gb_LinkTarget__use_libatomic_ops
838 $(call gb_LinkTarget_set_include,$(1),\
839 $$(INCLUDE) \
840 $(LIBATOMIC_OPS_CFLAGS) \
842 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
844 endef
845 gb_ExternalProject__use_libatomic_ops :=
847 else # !SYSTEM_LIBATOMIC_OPS
849 define gb_LinkTarget__use_libatomic_ops
850 $(call gb_LinkTarget_set_include,$(1),\
851 $(LIBATOMIC_OPS_CFLAGS) \
852 $$(INCLUDE) \
853 $(LIBATOMIC_OPS_CFLAGS) \
855 $(call gb_LinkTarget_use_external_project,$(1),\
856 libatomic_ops \
859 $(call gb_LinkTarget_add_libs,$(1),\
860 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
863 endef
865 define gb_ExternalProject__use_libatomic_ops
866 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
868 endef
870 endif # SYSTEM_LIBATOMIC_OPS
873 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
875 define gb_LinkTarget__use_libexttextcat
876 $(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 $(LIBEXTTEXTCAT_CFLAGS) \
880 $(call gb_LinkTarget_add_defs,$(1),\
881 -DSYSTEM_LIBEXTTEXTCAT \
883 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
885 endef
887 else # !SYSTEM_LIBEXTTEXTCAT
889 define gb_LinkTarget__use_libexttextcat
890 $(call gb_LinkTarget_set_include,$(1),\
891 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
892 $$(INCLUDE) \
895 ifeq ($(COM),MSC)
896 $(call gb_LinkTarget_use_static_libraries,$(1),\
897 exttextcat \
899 else
900 $(call gb_LinkTarget_add_libs,$(1),\
901 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
903 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
904 endif
907 endef
909 endif # SYSTEM_LIBEXTTEXTCAT
912 ifneq ($(SYSTEM_LIBXML),)
914 define gb_LinkTarget__use_libxml2
915 $(call gb_LinkTarget_add_defs,$(1),\
916 -DSYSTEM_LIBXML \
918 $(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
920 $(LIBXML_CFLAGS) \
922 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
924 endef
925 gb_ExternalProject__use_libxml2:=
927 else # !SYSTEM_LIBXML
929 $(eval $(call gb_Helper_register_packages_for_install,ure,\
930 xml2 \
933 define gb_LinkTarget__use_libxml2
934 $(call gb_LinkTarget_use_package,$(1),xml2)
935 $(call gb_LinkTarget_set_include,$(1),\
936 $$(INCLUDE) \
937 $(LIBXML_CFLAGS) \
940 $(call gb_LinkTarget_add_libs,$(1),\
941 $(LIBXML_LIBS) \
944 ifeq ($(COM),MSC)
945 $(call gb_LinkTarget_use_external,$(1),icu_headers)
946 endif
948 endef
949 define gb_ExternalProject__use_libxml2
950 $(call gb_ExternalProject_use_package,$(1),xml2)
952 ifeq ($(COM),MSC)
953 $(call gb_ExternalProject_use_external_project,$(1),icu)
954 endif
956 endef
958 endif # SYSTEM_LIBXML
961 ifneq ($(SYSTEM_LIBXSLT),)
963 define gb_LinkTarget__use_libxslt
964 $(call gb_LinkTarget_set_include,$(1),\
965 $$(INCLUDE) \
966 $(LIBXSLT_CFLAGS) \
968 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
970 endef
972 define gb_LinkTarget__use_libexslt
973 $(call gb_LinkTarget_set_include,$(1),\
974 $$(INCLUDE) \
975 $(LIBEXSLT_CFLAGS) \
978 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
980 endef
982 else # !SYSTEM_LIBXSLT
984 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
985 xslt \
988 define gb_LinkTarget__use_libxslt
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/libxslt.lib \
999 else
1000 $(call gb_LinkTarget_add_libs,$(1),\
1001 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
1003 endif
1005 endef
1007 define gb_LinkTarget__use_libexslt
1008 $(call gb_LinkTarget_use_package,$(1),xslt)
1009 $(call gb_LinkTarget_set_include,$(1),\
1010 $$(INCLUDE) \
1011 -I$(call gb_UnpackedTarball_get_dir,xslt) \
1014 ifeq ($(COM),MSC)
1015 $(call gb_LinkTarget_add_libs,$(1),\
1016 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
1018 else
1019 $(call gb_LinkTarget_add_libs,$(1),\
1020 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
1022 endif
1024 endef
1026 endif # SYSTEM_LIBXSLT
1028 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
1030 ifneq ($(SYSTEM_LIBLANGTAG),)
1032 define gb_LinkTarget__use_liblangtag
1033 $(call gb_LinkTarget_set_include,$(1),\
1034 $$(INCLUDE) \
1035 $(LIBLANGTAG_CFLAGS) \
1038 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1040 endef
1042 else # !SYSTEM_LIBLANGTAG
1044 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1045 liblangtag_data \
1048 define gb_LinkTarget__use_liblangtag
1049 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
1050 $(call gb_LinkTarget_set_include,$(1),\
1051 -I$(call gb_UnpackedTarball_get_dir,langtag) \
1052 $$(INCLUDE) \
1054 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1055 $(call gb_LinkTarget_use_external_project,$(1),langtag)
1057 endef
1059 endif # SYSTEM_LIBLANGTAG
1061 else
1063 gb_LinkTarget__use_liblangtag :=
1065 endif # ENABLE_LIBLANGTAG
1067 gb_ExternalProject__use_apr :=
1069 ifeq ($(WITH_WEBDAV),serf)
1071 define gb_LinkTarget__use_apr
1072 $(call gb_LinkTarget_set_include,$(1),\
1073 $$(INCLUDE) \
1074 $(APR_CFLAGS) \
1076 $(call gb_LinkTarget_add_libs,$(1),\
1077 $(APR_LIBS) \
1078 $(if $(filter $(OS),LINUX),-lpthread) \
1079 $(if $(filter $(OS),MACOSX),-liconv) \
1082 ifeq ($(SYSTEM_APR),)
1083 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1084 mswsock \
1085 rpcrt4 \
1086 shell32 \
1088 $(call gb_LinkTarget_add_defs,$(1),\
1089 -DAPR_DECLARE_STATIC \
1090 -DAPU_DECLARE_STATIC \
1092 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1093 endif
1095 endef
1097 define gb_ExternalProject__use_apr
1098 ifeq ($(SYSTEM_APR),)
1099 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1100 endif
1102 endef
1104 define gb_LinkTarget__use_serf
1105 $(call gb_LinkTarget_set_include,$(1),\
1106 $(SERF_CFLAGS) \
1107 $$(INCLUDE) \
1109 $(call gb_LinkTarget_add_libs,$(1),\
1110 $(SERF_LIBS) \
1113 ifeq ($(SYSTEM_SERF),)
1114 $(call gb_LinkTarget_use_external_project,$(1),serf)
1115 endif
1117 endef
1119 else ifeq ($(WITH_WEBDAV),neon)
1121 ifneq ($(SYSTEM_NEON),)
1123 define gb_LinkTarget__use_neon
1124 $(call gb_LinkTarget_add_defs,$(1),\
1125 -DNEON_VERSION=0x$(NEON_VERSION) \
1126 -DSYSTEM_NEON \
1128 $(call gb_LinkTarget_set_include,$(1),\
1129 $$(INCLUDE) \
1130 $(NEON_CFLAGS) \
1133 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1135 endef
1137 else # !SYSTEM_NEON
1139 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1140 neon \
1143 define gb_LinkTarget__use_neon
1144 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1145 $(call gb_LinkTarget_set_include,$(1),\
1146 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1147 $$(INCLUDE) \
1149 $(call gb_LinkTarget_use_libraries,$(1),\
1150 neon \
1153 endef
1155 endif # SYSTEM_NEON
1157 endif # WITH_WEBDAV
1159 ifneq ($(SYSTEM_REDLAND),)
1161 define gb_LinkTarget__use_librdf
1162 $(call gb_LinkTarget_add_defs,$(1),\
1163 -DSYSTEM_REDLAND \
1165 $(call gb_LinkTarget_set_include,$(1),\
1166 $$(INCLUDE) \
1167 $(REDLAND_CFLAGS) \
1169 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1171 endef
1173 gb_LinkTarget__use_redland_headers:=
1175 gb_LinkTarget__use_raptor_headers:=
1177 gb_LinkTarget__use_rasqal_headers:=
1179 else # !SYSTEM_REDLAND
1181 define gb_LinkTarget__use_redland_headers
1182 $(call gb_LinkTarget_set_include,$(1),\
1183 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1184 $$(INCLUDE) \
1187 endef
1189 define gb_LinkTarget__use_raptor_headers
1190 $(call gb_LinkTarget_set_include,$(1),\
1191 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1192 $$(INCLUDE) \
1195 endef
1197 define gb_LinkTarget__use_rasqal_headers
1198 $(call gb_LinkTarget_set_include,$(1),\
1199 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1200 $$(INCLUDE) \
1203 endef
1205 ifneq ($(OS),ANDROID)
1207 ifeq ($(COM),MSC)
1208 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1209 raptor2 \
1210 rasqal \
1211 rdf \
1213 else
1214 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1215 raptor \
1216 rasqal \
1217 redland \
1219 endif
1221 define gb_LinkTarget__use_librdf
1222 ifeq ($(COM),MSC)
1223 $(call gb_LinkTarget_use_libraries,$(1),\
1224 raptor2 \
1225 rdf \
1227 else
1228 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1230 $(call gb_LinkTarget_add_libs,$(1),\
1231 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1232 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1234 endif
1236 endef
1238 else # ANDROID
1240 define gb_LinkTarget__use_librdf
1241 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1243 endef
1245 endif # ANDROID
1247 endif # SYSTEM_REDLAND
1250 ifneq ($(filter unx,$(GUIBASE))$(ENABLE_CAIRO_CANVAS),) # or
1252 ifneq ($(SYSTEM_CAIRO),)
1254 define gb_LinkTarget__use_cairo
1255 $(call gb_LinkTarget_set_include,$(1),\
1256 $$(INCLUDE) \
1257 $(CAIRO_CFLAGS) \
1259 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1260 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1262 endef
1264 else # !SYSTEM_CAIRO
1266 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1267 cairo \
1268 $(if $(filter $(OS),WNT),,pixman) \
1271 define gb_LinkTarget__use_cairo
1272 $(call gb_LinkTarget_use_package,$(1),cairo)
1273 $(call gb_LinkTarget_use_package,$(1),pixman)
1274 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1275 $(call gb_LinkTarget_set_include,$(1),\
1276 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1277 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1278 $$(INCLUDE) \
1280 $(call gb_LinkTarget_add_libs,$(1),\
1281 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1282 $(if $(filter-out MACOSX WNT,$(OS)), \
1283 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1287 endef
1289 endif # SYSTEM_CAIRO
1291 endif # CAIRO
1293 ifneq ($(SYSTEM_FREETYPE),)
1295 define gb_LinkTarget__use_freetype_headers
1296 $(call gb_LinkTarget_set_include,$(1),\
1297 $$(INCLUDE) \
1298 $(FREETYPE_CFLAGS) \
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 gb_ExternalProject__use_freetype :=
1311 else ifeq ($(OS),ANDROID)
1313 define gb_LinkTarget__use_freetype_headers
1314 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1315 $(call gb_LinkTarget_set_include,$(1),\
1316 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1317 $$(INCLUDE) \
1320 endef
1322 define gb_LinkTarget__use_freetype
1323 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1324 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1326 endef
1328 define gb_ExternalProject__use_freetype
1329 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1331 endef
1333 endif # SYSTEM_FREETYPE
1335 ifneq ($(SYSTEM_FONTCONFIG),)
1337 define gb_LinkTarget__use_fontconfig
1338 $(call gb_LinkTarget_set_include,$(1),\
1339 $$(INCLUDE) \
1340 $(FONTCONFIG_CFLAGS) \
1343 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1345 endef
1347 else ifeq ($(OS),ANDROID)
1349 define gb_LinkTarget__use_fontconfig
1350 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1351 $(call gb_LinkTarget_set_include,$(1),\
1352 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1353 $$(INCLUDE) \
1356 endef
1358 endif # SYSTEM_FONTCONFIG
1360 ifeq ($(ENABLE_GRAPHITE),TRUE)
1362 ifneq ($(SYSTEM_GRAPHITE),)
1364 define gb_LinkTarget__use_graphite
1365 $(call gb_LinkTarget_set_include,$(1),\
1366 $$(INCLUDE) \
1367 $(GRAPHITE_CFLAGS) \
1369 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1371 endef
1373 else # !SYSTEM_GRAPHITE
1375 define gb_LinkTarget__use_graphite
1376 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1377 $(call gb_LinkTarget_set_include,$(1),\
1378 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1379 $$(INCLUDE) \
1381 $(call gb_LinkTarget_use_static_libraries,$(1),\
1382 graphite \
1385 endef
1387 endif # SYSTEM_GRAPHITE
1389 else # !ENABLE_GRAPHITE
1391 gb_LinkTarget__use_graphite :=
1393 endif # ENABLE_GRAPHITE
1395 ifneq ($(SYSTEM_ICU),)
1397 gb_LinkTarget__use_icu_headers:=
1398 gb_ExternalProject__use_icu:=
1400 define gb_LinkTarget__use_icudata
1401 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1403 endef
1404 define gb_LinkTarget__use_icui18n
1405 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1407 endef
1408 define gb_LinkTarget__use_icuuc
1409 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1411 endef
1413 else # !SYSTEM_ICU
1415 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1416 icu_ure \
1419 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1420 icu \
1423 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1424 gb_ICU_suffix:=lo
1425 else
1426 gb_ICU_suffix:=
1427 endif
1429 define gb_LinkTarget__use_icu_headers
1430 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1431 $(call gb_LinkTarget_set_include,$(1),\
1432 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1433 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1434 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1435 $$(INCLUDE) \
1438 endef
1440 define gb_ExternalProject__use_icu
1441 $(call gb_ExternalProject_use_package,$(1),icu)
1443 endef
1445 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1446 define gb_LinkTarget__use_icudata
1447 $(call gb_LinkTarget_use_package,$(1),icu)
1449 ifeq ($(OS),WNT)
1450 $(call gb_LinkTarget_add_libs,$(1),\
1451 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1453 else
1454 $(call gb_LinkTarget_add_libs,$(1),\
1455 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1457 endif
1459 endef
1461 define gb_LinkTarget__use_icui18n
1462 $(call gb_LinkTarget_use_package,$(1),icu)
1464 ifeq ($(OS),WNT)
1465 $(call gb_LinkTarget_add_libs,$(1),\
1466 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1468 else
1469 $(call gb_LinkTarget_add_libs,$(1),\
1470 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1472 endif
1474 endef
1476 define gb_LinkTarget__use_icuuc
1477 $(call gb_LinkTarget_use_package,$(1),icu)
1479 ifeq ($(OS),WNT)
1480 $(call gb_LinkTarget_add_libs,$(1),\
1481 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1483 else
1484 $(call gb_LinkTarget_add_libs,$(1),\
1485 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1487 endif
1489 endef
1491 endif # SYSTEM_ICU
1493 ifeq ($(ENABLE_HARFBUZZ),TRUE)
1494 ifneq ($(SYSTEM_HARFBUZZ),)
1496 define gb_LinkTarget__use_harfbuzz
1497 $(call gb_LinkTarget_set_include,$(1),\
1498 $$(INCLUDE) \
1499 $(HARFBUZZ_CFLAGS) \
1501 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1503 endef
1505 else # SYSTEM_HARFBUZZ != TRUE
1507 define gb_LinkTarget__use_harfbuzz
1508 $(call gb_LinkTarget_set_include,$(1),\
1509 $(HARFBUZZ_CFLAGS) \
1510 $$(INCLUDE) \
1512 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1513 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1515 endef
1517 endif # SYSTEM_HARFBUZZ
1518 else # ENABLE_HARFBUZZ != YES
1520 gb_LinkTarget__use_harfbuzz :=
1522 endif # ENABLE_HARFBUZZ
1524 ifeq ($(DISABLE_OPENSSL),TRUE)
1526 gb_ExternalProject__use_openssl:=
1527 gb_LinkTarget__use_openssl_headers:=
1528 gb_LinkTarget__use_openssl:=
1530 else # !DISABLE_OPENSSL
1532 ifneq ($(SYSTEM_OPENSSL),)
1534 gb_LinkTarget__use_openssl_headers:=
1535 gb_ExternalProject__use_openssl:=
1537 define gb_LinkTarget__use_openssl
1538 $(call gb_LinkTarget_set_include,$(1),\
1539 $$(INCLUDE) \
1540 $(OPENSSL_CFLAGS) \
1542 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1544 endef
1546 else # !SYSTEM_OPENSSL
1548 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1549 openssl \
1552 define gb_ExternalProject__use_openssl
1553 $(call gb_ExternalProject_use_package,$(1),openssl)
1555 endef
1557 define gb_LinkTarget__use_openssl_headers
1558 $(call gb_LinkTarget_set_include,$(1),\
1559 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1560 $$(INCLUDE) \
1563 endef
1565 define gb_LinkTarget__use_openssl
1566 $(call gb_LinkTarget_use_package,$(1),openssl)
1567 ifeq ($(OS),WNT)
1568 $(call gb_LinkTarget_add_libs,$(1),\
1569 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1570 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1572 else
1573 $(call gb_LinkTarget_add_libs,$(1),\
1574 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1575 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1577 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1578 ifeq ($(OS),SOLARIS)
1579 $(call gb_LinkTarget_add_libs,$(1),\
1580 -lnsl \
1581 -lsocket \
1583 endif
1584 endif
1586 endef
1588 endif # SYSTEM_OPENSSL
1589 endif # DISABLE_OPENSSL
1592 ifeq ($(DISABLE_OPENSSL),TRUE)
1594 define gb_LinkTarget__use_gnutls
1595 $(call gb_LinkTarget_set_include,$(1),\
1596 $$(INCLUDE) \
1597 $(GNUTLS_CFLAGS) \
1600 $(call gb_LinkTarget_add_defs,$(1),\
1601 -DDISABLE_OPENSSL \
1604 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1606 endef
1608 define gb_LinkTarget__use_libgcrypt
1609 $(call gb_LinkTarget_set_include,$(1),\
1610 $$(INCLUDE) \
1611 $(LIBGCRYPT_CFLAGS) \
1614 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1616 endef
1618 else # !DISABLE_OPENSSL
1620 gb_LinkTarget__use_gnutls:=
1621 gb_LinkTarget__use_libgcrypt:=
1623 endif # DISABLE_OPENSSL
1626 ifneq ($(SYSTEM_CDR),)
1628 define gb_LinkTarget__use_cdr
1629 $(call gb_LinkTarget_set_include,$(1),\
1630 $$(INCLUDE) \
1631 $(CDR_CFLAGS) \
1633 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1635 endef
1637 else # !SYSTEM_CDR
1639 define gb_LinkTarget__use_cdr
1640 $(call gb_LinkTarget_set_include,$(1),\
1641 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1642 $$(INCLUDE) \
1644 $(call gb_LinkTarget_add_libs,$(1),\
1645 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1647 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1648 endef
1650 endif # SYSTEM_CDR
1653 ifneq ($(SYSTEM_EBOOK),)
1655 define gb_LinkTarget__use_ebook
1656 $(call gb_LinkTarget_set_include,$(1),\
1657 $$(INCLUDE) \
1658 $(EBOOK_CFLAGS) \
1660 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1662 endef
1664 gb_ExternalProject__use_ebook :=
1666 else # !SYSTEM_EBOOK
1668 define gb_LinkTarget__use_ebook
1669 $(call gb_LinkTarget_set_include,$(1),\
1670 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1671 $$(INCLUDE) \
1673 $(call gb_LinkTarget_add_libs,$(1),\
1674 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1676 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1678 endef
1680 define gb_ExternalProject__use_ebook
1681 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1683 endef
1685 endif # SYSTEM_EBOOK
1688 ifneq ($(SYSTEM_ETONYEK),)
1690 define gb_LinkTarget__use_etonyek
1691 $(call gb_LinkTarget_set_include,$(1),\
1692 $$(INCLUDE) \
1693 $(ETONYEK_CFLAGS) \
1695 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1697 endef
1699 gb_ExternalProject__use_etonyek :=
1701 else # !SYSTEM_ETONYEK
1703 ifeq ($(COM),MSC)
1705 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1706 etonyek \
1709 define gb_LinkTarget__use_etonyek
1710 $(call gb_LinkTarget_set_include,$(1),\
1711 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1712 $$(INCLUDE) \
1714 $(call gb_LinkTarget_use_libraries,$(1),\
1715 etonyek \
1718 endef
1720 else # !MSC
1722 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1723 libetonyek \
1726 define gb_LinkTarget__use_etonyek
1727 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1729 $(call gb_LinkTarget_set_include,$(1),\
1730 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1731 -DLIBETONYEK_VISIBILITY \
1732 $$(INCLUDE) \
1734 $(call gb_LinkTarget_add_libs,$(1),\
1735 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1737 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1739 endef
1741 define gb_ExternalProject__use_etonyek
1742 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1744 endef
1746 endif
1748 endif # SYSTEM_ETONYEK
1751 ifneq ($(SYSTEM_FREEHAND),)
1753 define gb_LinkTarget__use_freehand
1754 $(call gb_LinkTarget_set_include,$(1),\
1755 $$(INCLUDE) \
1756 $(FREEHAND_CFLAGS) \
1758 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1760 endef
1762 gb_ExternalProject__use_freehand :=
1764 else # !SYSTEM_FREEHAND
1766 define gb_LinkTarget__use_freehand
1767 $(call gb_LinkTarget_set_include,$(1),\
1768 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1769 $$(INCLUDE) \
1771 $(call gb_LinkTarget_add_libs,$(1),\
1772 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1774 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1776 endef
1778 define gb_ExternalProject__use_freehand
1779 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1781 endef
1783 endif # SYSTEM_FREEHAND
1786 ifneq ($(SYSTEM_ODFGEN),)
1788 define gb_LinkTarget__use_odfgen
1789 $(call gb_LinkTarget_set_include,$(1),\
1790 $$(INCLUDE) \
1791 $(ODFGEN_CFLAGS) \
1793 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1795 endef
1797 else # !SYSTEM_ODFGEN
1799 ifeq ($(COM),MSC)
1801 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1802 odfgen \
1805 define gb_LinkTarget__use_odfgen
1806 $(call gb_LinkTarget_set_include,$(1),\
1807 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1808 $$(INCLUDE) \
1810 $(call gb_LinkTarget_use_libraries,$(1),\
1811 odfgen \
1814 endef
1816 else # !MSC
1818 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1819 libodfgen \
1822 define gb_LinkTarget__use_odfgen
1823 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1825 $(call gb_LinkTarget_set_include,$(1),\
1826 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1827 -DLIBODFGEN_VISIBILITY \
1828 $$(INCLUDE) \
1830 $(call gb_LinkTarget_add_libs,$(1),\
1831 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1834 endef
1836 endif
1838 endif # SYSTEM_ODFGEN
1841 ifneq ($(SYSTEM_REVENGE),)
1843 define gb_LinkTarget__use_revenge
1844 $(call gb_LinkTarget_set_include,$(1),\
1845 $$(INCLUDE) \
1846 $(REVENGE_CFLAGS) \
1848 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1850 endef
1852 gb_ExternalProject__use_revenge :=
1854 else # !SYSTEM_REVENGE
1856 ifeq ($(COM),MSC)
1858 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1859 revenge \
1862 define gb_LinkTarget__use_revenge
1863 $(call gb_LinkTarget_set_include,$(1),\
1864 $(REVENGE_CFLAGS) \
1865 $$(INCLUDE) \
1867 $(call gb_LinkTarget_use_libraries,$(1),\
1868 revenge \
1871 endef
1873 define gb_ExternalProject__use_revenge
1874 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1876 endef
1878 else # !MSC
1880 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1881 librevenge \
1884 define gb_LinkTarget__use_revenge
1885 $(call gb_LinkTarget_use_package,$(1),librevenge)
1887 $(call gb_LinkTarget_set_include,$(1),\
1888 $(REVENGE_CFLAGS) \
1889 -DLIBREVENGE_VISIBILITY \
1890 $$(INCLUDE) \
1892 $(call gb_LinkTarget_add_libs,$(1),\
1893 $(REVENGE_LIBS) \
1895 endef
1897 define gb_ExternalProject__use_revenge
1898 $(call gb_ExternalProject_use_package,$(1),librevenge)
1900 endef
1902 endif # MSC
1904 endif # SYSTEM_REVENGE
1907 ifneq ($(SYSTEM_ABW),)
1909 define gb_LinkTarget__use_abw
1910 $(call gb_LinkTarget_set_include,$(1),\
1911 $$(INCLUDE) \
1912 $(ABW_CFLAGS) \
1914 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1916 endef
1917 gb_ExternalProject__use_abw :=
1919 else # !SYSTEM_ABW
1921 define gb_LinkTarget__use_abw
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1924 $$(INCLUDE) \
1926 $(call gb_LinkTarget_add_libs,$(1),\
1927 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1929 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1931 endef
1932 define gb_ExternalProject__use_abw
1933 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1935 endef
1937 endif # SYSTEM_ABW
1940 ifneq ($(SYSTEM_MSPUB),)
1942 define gb_LinkTarget__use_mspub
1943 $(call gb_LinkTarget_set_include,$(1),\
1944 $$(INCLUDE) \
1945 $(MSPUB_CFLAGS) \
1947 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1949 endef
1951 else # !SYSTEM_MSPUB
1953 define gb_LinkTarget__use_mspub
1954 $(call gb_LinkTarget_set_include,$(1),\
1955 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1956 $$(INCLUDE) \
1958 $(call gb_LinkTarget_add_libs,$(1),\
1959 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1961 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1963 endef
1965 endif # SYSTEM_MSPUB
1968 ifneq ($(SYSTEM_PAGEMAKER),)
1970 define gb_LinkTarget__use_pagemaker
1971 $(call gb_LinkTarget_set_include,$(1),\
1972 $$(INCLUDE) \
1973 $(PAGEMAKER_CFLAGS) \
1975 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1977 endef
1978 gb_ExternalProject__use_pagemaker :=
1980 else # !SYSTEM_PAGEMAKER
1982 define gb_LinkTarget__use_pagemaker
1983 $(call gb_LinkTarget_set_include,$(1),\
1984 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1985 $$(INCLUDE) \
1987 $(call gb_LinkTarget_add_libs,$(1),\
1988 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1990 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1992 endef
1993 define gb_ExternalProject__use_pagemaker
1994 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1996 endef
1998 endif # SYSTEM_PAGEMAKER
2001 ifneq ($(SYSTEM_VISIO),)
2003 define gb_LinkTarget__use_visio
2004 $(call gb_LinkTarget_set_include,$(1),\
2005 $$(INCLUDE) \
2006 $(VISIO_CFLAGS) \
2008 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2010 endef
2012 else # !SYSTEM_VISIO
2014 define gb_LinkTarget__use_visio
2015 $(call gb_LinkTarget_set_include,$(1),\
2016 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2017 $$(INCLUDE) \
2019 $(call gb_LinkTarget_add_libs,$(1),\
2020 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2022 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2024 endef
2026 endif # SYSTEM_VISIO
2029 ifneq ($(SYSTEM_WPD),)
2031 define gb_LinkTarget__use_wpd
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(WPD_CFLAGS) \
2036 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2038 endef
2039 gb_ExternalProject__use_wpd :=
2041 else # !SYSTEM_WPD
2043 ifeq ($(COM),MSC)
2045 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2046 wpd \
2049 define gb_LinkTarget__use_wpd
2050 $(call gb_LinkTarget_set_include,$(1),\
2051 $(WPD_CFLAGS) \
2052 $$(INCLUDE) \
2054 $(call gb_LinkTarget_use_libraries,$(1),\
2055 wpd \
2058 endef
2060 define gb_ExternalProject__use_wpd
2061 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2063 endef
2065 else # !MSC
2067 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2068 libwpd \
2071 define gb_LinkTarget__use_wpd
2072 $(call gb_LinkTarget_use_package,$(1),libwpd)
2074 $(call gb_LinkTarget_set_include,$(1),\
2075 $(WPD_CFLAGS) \
2076 $$(INCLUDE) \
2078 $(call gb_LinkTarget_add_libs,$(1),\
2079 $(WPD_LIBS) \
2082 endef
2084 define gb_ExternalProject__use_wpd
2085 $(call gb_ExternalProject_use_package,$(1),libwpd)
2087 endef
2089 endif # MSC
2091 endif # SYSTEM_WPD
2094 ifneq ($(SYSTEM_WPG),)
2096 define gb_LinkTarget__use_wpg
2097 $(call gb_LinkTarget_set_include,$(1),\
2098 $$(INCLUDE) \
2099 $(WPG_CFLAGS) \
2101 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2103 endef
2104 gb_ExternalProject__use_wpg :=
2106 else # !SYSTEM_WPG
2108 ifeq ($(COM),MSC)
2110 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2111 wpg \
2114 define gb_LinkTarget__use_wpg
2115 $(call gb_LinkTarget_set_include,$(1),\
2116 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2117 $$(INCLUDE) \
2119 $(call gb_LinkTarget_use_libraries,$(1),\
2120 wpg \
2123 endef
2125 else # !MSC
2127 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2128 libwpg \
2131 define gb_LinkTarget__use_wpg
2132 $(call gb_LinkTarget_use_package,$(1),libwpg)
2134 $(call gb_LinkTarget_set_include,$(1),\
2135 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2136 $$(INCLUDE) \
2138 $(call gb_LinkTarget_add_libs,$(1),\
2139 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2142 endef
2144 endif # MSC
2146 endif # SYSTEM_WPG
2149 ifneq ($(SYSTEM_WPS),)
2151 define gb_LinkTarget__use_wps
2152 $(call gb_LinkTarget_set_include,$(1),\
2153 $$(INCLUDE) \
2154 $(WPS_CFLAGS) \
2156 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2158 endef
2159 gb_ExternalProject__use_wps :=
2161 else # !SYSTEM_WPS
2163 ifeq ($(COM),MSC)
2165 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2166 wps \
2169 define gb_LinkTarget__use_wps
2170 $(call gb_LinkTarget_set_include,$(1),\
2171 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2172 $$(INCLUDE) \
2175 $(call gb_LinkTarget_use_libraries,$(1),\
2176 wps \
2179 endef
2181 else # !MSC
2183 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2184 libwps \
2187 define gb_LinkTarget__use_wps
2188 $(call gb_LinkTarget_use_package,$(1),libwps)
2190 $(call gb_LinkTarget_set_include,$(1),\
2191 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2192 $$(INCLUDE) \
2194 $(call gb_LinkTarget_add_libs,$(1),\
2195 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2198 endef
2200 endif # MSC
2202 endif # SYSTEM_WPS
2205 ifneq ($(SYSTEM_MWAW),)
2207 define gb_LinkTarget__use_mwaw
2208 $(call gb_LinkTarget_set_include,$(1),\
2209 $$(INCLUDE) \
2210 $(MWAW_CFLAGS) \
2212 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2214 endef
2216 else # !SYSTEM_MWAW
2218 ifeq ($(COM),MSC)
2220 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2221 mwaw \
2224 define gb_LinkTarget__use_mwaw
2225 $(call gb_LinkTarget_set_include,$(1),\
2226 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2227 $$(INCLUDE) \
2230 $(call gb_LinkTarget_use_libraries,$(1),\
2231 mwaw \
2234 endef
2236 else # !MSC
2238 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2239 libmwaw \
2242 define gb_LinkTarget__use_mwaw
2243 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2245 $(call gb_LinkTarget_set_include,$(1),\
2246 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2247 $$(INCLUDE) \
2249 $(call gb_LinkTarget_add_libs,$(1),\
2250 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2253 endef
2255 endif # MSC
2257 endif # SYSTEM_MWAW
2260 ifneq ($(SYSTEM_LCMS2),)
2262 define gb_LinkTarget__use_lcms2
2263 $(call gb_LinkTarget_set_include,$(1),\
2264 $$(INCLUDE) \
2265 $(LCMS2_CFLAGS) \
2267 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2269 endef
2271 gb_ExternalProject__use_lcms2 :=
2273 else # !SYSTEM_LCMS2
2275 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2276 lcms2 \
2279 define gb_ExternalProject__use_lcms2
2280 $(call gb_ExternalProject_use_package,$(1),lcms2)
2282 endef
2284 ifeq ($(OS),ANDROID)
2286 define gb_LinkTarget__use_lcms2
2287 $(call gb_LinkTarget_use_package,$(1),lcms2)
2288 $(call gb_LinkTarget_set_include,$(1),\
2289 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2290 $$(INCLUDE) \
2293 endef
2295 else
2297 define gb_LinkTarget__use_lcms2
2298 $(call gb_LinkTarget_use_package,$(1),lcms2)
2299 $(call gb_LinkTarget_set_include,$(1),\
2300 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2301 $$(INCLUDE) \
2303 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2305 endef
2307 endif # ANDROID
2308 endif # SYSTEM_LCMS2
2310 ifneq ($(ENABLE_LPSOLVE),)
2312 ifneq ($(SYSTEM_LPSOLVE),)
2314 define gb_LinkTarget__use_lpsolve
2315 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2316 $(call gb_LinkTarget_add_defs,$(1),\
2317 -DSYSTEM_LPSOLVE \
2320 endef
2322 else # !SYSTEM_LPSOLVE
2324 define gb_LinkTarget__use_lpsolve
2325 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2326 ifeq ($(COM),MSC)
2327 $(call gb_LinkTarget_add_libs,$(1),\
2328 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2330 else
2331 $(call gb_LinkTarget_add_libs,$(1),\
2332 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2334 endif
2335 $(call gb_LinkTarget_set_include,$(1),\
2336 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2337 $$(INCLUDE) \
2340 endef
2342 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2343 lpsolve \
2346 endif # SYSTEM_LPSOLVE
2348 else
2350 gb_LinkTarget__use_lpsolve :=
2352 endif # ENABLE_LPSOLVE
2354 ifneq ($(ENABLE_COINMP),)
2356 ifneq ($(SYSTEM_COINMP),TRUE)
2358 define gb_LinkTarget__use_coinmp
2359 $(call gb_LinkTarget_use_package,$(1),coinmp)
2360 ifeq ($(COM),MSC)
2361 $(call gb_LinkTarget_add_libs,$(1),\
2362 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2364 else
2365 $(call gb_LinkTarget_add_libs,$(1),\
2366 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2367 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2368 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2369 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2370 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2371 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2372 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2374 endif
2375 $(call gb_LinkTarget_set_include,$(1),\
2376 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2377 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2378 $$(INCLUDE) \
2381 endef
2383 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2384 coinmp \
2387 else # SYSTEM_COINMP
2389 define gb_LinkTarget__use_coinmp
2390 $(call gb_LinkTarget_set_include,$(1),\
2391 $$(INCLUDE) \
2392 $(COINMP_CFLAGS) \
2394 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2396 endef
2398 endif
2400 else
2402 gb_LinkTarget__use_coinmp :=
2404 endif # ENABLE_COINMP
2406 ifeq ($(ENABLE_GIO),TRUE)
2408 define gb_LinkTarget__use_gio
2409 $(call gb_LinkTarget_set_include,$(1),\
2410 $$(INCLUDE) \
2411 $(GIO_CFLAGS) \
2414 $(call gb_LinkTarget_add_defs,$(1),\
2415 -DENABLE_GIO \
2418 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2420 endef
2422 else # ENABLE_GIO
2424 define gb_LinkTarget__use_gio
2426 endef
2428 endif # ENABLE_GIO
2430 ifeq ($(ENABLE_AVAHI),TRUE)
2432 define gb_LinkTarget__use_avahi
2433 $(call gb_LinkTarget_set_include,$(1),\
2434 $$(INCLUDE) \
2435 $(AVAHI_CFLAGS) \
2438 $(call gb_LinkTarget_add_defs,$(1),\
2439 -DENABLE_AVAHI \
2442 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2444 endef
2446 else # ENABLE_AVAHI
2448 gb_LinkTarget__use_avahi :=
2450 endif # ENABLE_AVAHI
2453 define gb_LinkTarget__use_gtk
2454 $(call gb_LinkTarget_set_include,$(1),\
2455 $$(INCLUDE) \
2456 $(GTK_CFLAGS) \
2459 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2461 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2463 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2465 $(call gb_LinkTarget_set_include,$(1),\
2466 $$(INCLUDE) \
2467 $(GTK_PRINT_CFLAGS) \
2470 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2472 endif
2474 endef
2476 define gb_LinkTarget__use_gthread
2477 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2478 endef
2480 ifeq ($(ENABLE_CUPS),TRUE)
2482 define gb_LinkTarget__use_cups
2483 $(call gb_LinkTarget_add_defs,$(1),\
2484 -DENABLE_CUPS \
2487 $(call gb_LinkTarget_add_libs,$(1),\
2488 -lcups \
2491 endef
2493 else # ENABLE_CUPS
2495 define gb_LinkTarget__use_cups
2497 endef
2499 endif # ENABLE_DBUS
2501 ifeq ($(ENABLE_DBUS),TRUE)
2503 define gb_LinkTarget__use_dbus
2504 $(call gb_LinkTarget_set_include,$(1),\
2505 $$(INCLUDE) \
2506 $(DBUS_CFLAGS) \
2509 $(call gb_LinkTarget_add_defs,$(1),\
2510 -DENABLE_DBUS \
2513 ifeq ($(ENABLE_PACKAGEKIT),TRUE)
2514 $(call gb_LinkTarget_add_defs,$(1),\
2515 -DENABLE_PACKAGEKIT \
2517 endif # ENABLE_PACKAGEKIT
2519 $(call gb_LinkTarget_add_libs,$(1),\
2520 $(DBUS_LIBS) \
2523 endef
2525 else # ENABLE_DBUS
2527 define gb_LinkTarget__use_dbus
2529 endef
2531 endif # ENABLE_DBUS
2534 define gb_LinkTarget__use_dbusmenugtk
2535 $(call gb_LinkTarget_set_include,$(1),\
2536 $$(INCLUDE) \
2537 $(DBUSMENUGTK_CFLAGS) \
2540 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2542 endef
2545 ifeq ($(ENABLE_TELEPATHY),TRUE)
2547 define gb_LinkTarget__use_telepathy
2548 $(call gb_LinkTarget_set_include,$(1),\
2549 $$(INCLUDE) \
2550 $(TELEPATHY_CFLAGS) \
2553 $(call gb_LinkTarget_add_libs,$(1),\
2554 $(TELEPATHY_LIBS) \
2557 endef
2559 else # !ENABLE_TELEPATHY
2561 gb_LinkTarget__use_telepathy :=
2563 endif # ENABLE_TELEPATHY
2565 ifneq ($(SYSTEM_LIBPNG),)
2567 define gb_LinkTarget__use_png
2568 $(call gb_LinkTarget_set_include,$(1),\
2569 $$(INCLUDE) \
2570 $(LIBPNG_CFLAGS) \
2573 $(call gb_LinkTarget_add_libs,$(1),\
2574 $(LIBPNG_LIBS) \
2577 endef
2579 else # !SYSTEM_LIBPNG
2581 define gb_LinkTarget__use_png
2582 $(call gb_LinkTarget_set_include,$(1),\
2583 $(LIBPNG_CFLAGS) \
2584 $$(INCLUDE) \
2586 $(call gb_LinkTarget_use_static_libraries,$(1),\
2587 png \
2589 $(call gb_LinkTarget__use_zlib,$(1))
2591 endef
2593 endif # !SYSTEM_LIBPNG
2596 ifneq ($(SYSTEM_CURL),)
2598 define gb_LinkTarget__use_curl
2599 $(call gb_LinkTarget_add_defs,$(1),\
2600 -DSYSTEM_CURL \
2602 $(call gb_LinkTarget_set_include,$(1),\
2603 $$(INCLUDE) \
2604 $(CURL_CFLAGS) \
2606 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2608 endef
2610 else # !SYSTEM_CURL
2612 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2613 curl \
2616 define gb_LinkTarget__use_curl
2617 $(call gb_LinkTarget_use_package,$(1),curl)
2618 $(call gb_LinkTarget_set_include,$(1),\
2619 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2620 $$(INCLUDE) \
2623 ifeq ($(COM),MSC)
2624 $(call gb_LinkTarget_add_libs,$(1),\
2625 $(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 \
2627 else
2628 $(call gb_LinkTarget_add_libs,$(1),\
2629 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2631 endif
2633 endef
2635 endif # SYSTEM_CURL
2637 ifeq ($(ENABLE_VALGRIND),TRUE)
2639 define gb_LinkTarget__use_valgrind
2640 $(call gb_LinkTarget_add_defs,$(1),\
2641 -DHAVE_VALGRIND_HEADERS \
2644 $(call gb_LinkTarget_set_include,$(1),\
2645 $$(INCLUDE) \
2646 $(VALGRIND_CFLAGS) \
2649 endef
2651 else # !ENABLE_VALGRIND
2653 define gb_LinkTarget__use_valgrind
2655 endef
2657 endif # ENABLE_VALGRIND
2659 ifneq ($(SYSTEM_POPPLER),)
2661 define gb_LinkTarget__use_poppler
2662 $(call gb_LinkTarget_set_include,$(1),\
2663 $(POPPLER_CFLAGS) \
2664 $$(INCLUDE) \
2667 $(call gb_LinkTarget_add_libs,$(1),\
2668 $(POPPLER_LIBS) \
2671 endef
2673 else # !SYSTEM_POPPLER
2675 define gb_LinkTarget__use_poppler
2676 $(call gb_LinkTarget_use_external_project,$(1),poppler)
2678 $(call gb_LinkTarget_set_include,$(1),\
2679 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2680 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2681 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2682 $$(INCLUDE) \
2685 $(call gb_LinkTarget_add_libs,$(1),\
2686 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2687 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2688 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2691 ifeq ($(OS),MACOSX)
2692 $(call gb_LinkTarget_add_libs,$(1),\
2693 -lobjc \
2695 else ifeq ($(OS),LINUX)
2696 $(call gb_LinkTarget_add_libs,$(1),\
2697 -pthread \
2699 else ifeq ($(OS),WNT)
2700 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2701 advapi32 \
2702 gdi32 \
2704 endif
2706 endef
2708 endif # SYSTEM_POPPLER
2711 ifneq ($(SYSTEM_CLUCENE),)
2713 define gb_LinkTarget__use_clucene
2714 $(call gb_LinkTarget_add_defs,$(1),\
2715 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2718 $(call gb_LinkTarget_set_include,$(1),\
2719 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2720 $$(INCLUDE) \
2723 $(call gb_LinkTarget_add_libs,$(1),\
2724 $(CLUCENE_LIBS) \
2727 endef
2729 else # !SYSTEM_CLUCENE
2731 define gb_LinkTarget__use_clucene
2732 $(call gb_LinkTarget_set_include,$(1),\
2733 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2734 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2735 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2736 $$(INCLUDE) \
2739 $(call gb_LinkTarget_use_libraries,$(1),\
2740 clucene \
2743 endef
2745 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2746 clucene \
2749 endif # SYSTEM_CLUCENE
2751 define gb_LinkTarget__use_gobject
2752 $(call gb_LinkTarget_add_libs,$(1),\
2753 $(GOBJECT_LIBS) \
2756 $(call gb_LinkTarget_set_include,$(1),\
2757 $$(INCLUDE) \
2758 $(GOBJECT_CFLAGS) \
2760 endef
2762 ifneq ($(SYSTEM_HSQLDB),)
2764 define gb_LinkTarget__use_hsqldb
2766 $(call gb_LinkTarget_add_defs,$(1),\
2767 -DSYSTEM_HSQLDB \
2768 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2771 endef
2773 else # !SYSTEM_HSQLDB
2775 define gb_LinkTarget__use_hsqldb
2777 endef
2779 endif # SYSTEM_HSQLDB
2782 ifneq ($(SYSTEM_OPENLDAP),)
2784 define gb_LinkTarget__use_openldap
2786 $(call gb_LinkTarget_add_libs,$(1),\
2787 -lldap \
2788 -llber \
2791 endef
2793 gb_ExternalProject__use_openldap :=
2795 else # !SYSTEM_OPENLDAP
2797 define gb_LinkTarget__use_openldap
2798 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2799 $(call gb_LinkTarget_set_include,$(1),\
2800 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2801 $$(INCLUDE) \
2803 $(call gb_LinkTarget_use_external_project,$(1),openldap)
2804 $(call gb_LinkTarget_add_libs,$(1), \
2805 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2806 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2809 endef
2811 define gb_ExternalProject__use_openldap
2812 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2814 endef
2816 endif # SYSTEM_OPENLDAP
2819 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2821 ifneq ($(SYSTEM_FIREBIRD),)
2823 define gb_LinkTarget__use_libfbembed
2824 $(call gb_LinkTarget_set_include,$(1),\
2825 $(FIREBIRD_CFLAGS) \
2826 $$(INCLUDE) \
2828 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2830 endef
2832 # gb_LinkTarget__use_atomic_ops :=
2833 # gb_LinkTarget__use_tommath :=
2835 else # !SYSTEM_FIREBIRD
2837 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2839 define gb_LinkTarget__use_libfbembed
2840 $(call gb_LinkTarget_use_package,$(1),firebird)
2841 $(call gb_LinkTarget_set_include,$(1),\
2842 $$(INCLUDE) \
2843 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
2845 ifeq ($(COM),MSC)
2846 $(call gb_LinkTarget_add_libs,$(1),\
2847 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
2849 else
2850 $(call gb_LinkTarget_add_libs,$(1),\
2851 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2853 endif
2855 endef
2857 # define gb_LinkTarget__use_tommath
2858 # $(call gb_LinkTarget_set_include,$(1),\
2859 # $(TOMMATH_CFLAGS) \
2860 # $$(INCLUDE) \
2863 # $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2865 # endef
2867 endif # SYSTEM_FIREBIRD
2869 else # !ENABLE_FIREBIRD_SDBC
2871 gb_LinkTarget__use_firebird :=
2872 # gb_LinkTarget__use_atomic_ops :=
2873 # gb_LinkTarget__use_tommath :=
2875 endif # ENABLE_FIREBIRD_SDBC
2878 ifneq ($(SYSTEM_POSTGRESQL),)
2880 define gb_LinkTarget__use_postgresql
2882 $(call gb_LinkTarget_set_include,$(1),\
2883 $(POSTGRESQL_INC) \
2884 $$(INCLUDE) \
2887 $(call gb_LinkTarget_add_libs,$(1),\
2888 -lpq \
2891 $(call gb_LinkTarget_add_ldflags,$(1),\
2892 $(POSTGRESQL_LIB) \
2895 endef
2897 else # !SYSTEM_POSTGRESQL
2899 define gb_LinkTarget__use_postgresql
2901 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2903 $(call gb_LinkTarget_set_include,$(1),\
2904 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2905 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2906 $$(INCLUDE) \
2909 $(call gb_LinkTarget_add_libs,$(1),\
2910 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2913 ifeq ($(OS)$(COM),WNTMSC)
2914 $(call gb_LinkTarget_use_external,$(1),openssl)
2916 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2917 secur32 \
2918 ws2_32 \
2921 endif
2923 endef
2925 endif # SYSTEM_POSTGRESQL
2927 ifneq ($(WITH_MOZAB4WIN),)
2929 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2930 moz_runtime \
2933 define gb_LinkTarget__use_mozilla
2935 $(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2936 $(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2938 $(call gb_LinkTarget_add_defs,$(1),\
2939 -DMOZILLA_INTERNAL_API \
2942 $(call gb_LinkTarget_set_include,$(1),\
2943 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2944 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2945 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2946 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2947 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2948 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2949 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2950 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2951 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2952 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2953 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2954 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2955 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2956 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2957 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2958 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
2959 $$(INCLUDE) \
2962 $(call gb_LinkTarget_add_libs,$(1),\
2963 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
2964 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2965 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
2968 $(call gb_LinkTarget_add_defs,$(1),\
2969 -DMOZILLA_CLIENT \
2970 -DMOZ_REFLOW_PERF \
2971 -DMOZ_REFLOW_PERF_DSP \
2972 -DMOZ_XUL \
2973 -DOJI \
2974 -DWIN32 \
2975 -DXP_PC \
2976 -DXP_WIN \
2977 -DXP_WIN32 \
2978 -D_WINDOWS \
2981 ifeq ($(COM),GCC)
2983 $(call gb_LinkTarget_add_cxxflags,$(1),\
2984 -Wall \
2985 -Wcast-align \
2986 -Wconversion \
2987 -Wno-long-long \
2988 -Woverloaded-virtual \
2989 -Wpointer-arith \
2990 -Wsynth \
2991 -fno-rtti \
2994 else
2996 ifneq ($(DBG_LEVEL),0)
2997 $(call gb_LinkTarget_add_defs,$(1),\
2998 -D_STL_NOFORCE_MANIFEST \
3000 endif
3002 $(call gb_LinkTarget_add_libs,$(1),\
3003 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
3004 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
3007 endif # !GCC
3009 endef
3011 endif # WITH_MOZAB4WIN
3013 ifeq ($(ENABLE_KDE),TRUE)
3015 define gb_LinkTarget__use_kde
3016 $(call gb_LinkTarget_set_include,$(1),\
3017 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS)))) \
3018 $$(INCLUDE) \
3021 $(call gb_LinkTarget_add_defs,$(1),\
3022 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS))) \
3025 $(call gb_LinkTarget_add_libs,$(1),\
3026 $(KDE_LIBS) \
3029 ifeq ($(COM),GCC)
3030 $(call gb_LinkTarget_add_cxxflags,$(1),\
3031 -Wno-shadow \
3033 endif
3035 endef
3037 else # !ENABLE_KDE
3039 define gb_LinkTarget__use_kde
3041 endef
3043 endif # ENABLE_KDE
3046 ifeq ($(ENABLE_KDE4),TRUE)
3048 define gb_LinkTarget__use_kde4
3049 $(call gb_LinkTarget_set_include,$(1),\
3050 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3051 $$(INCLUDE) \
3054 $(call gb_LinkTarget_add_defs,$(1),\
3055 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3058 $(call gb_LinkTarget_add_libs,$(1),\
3059 $(KDE4_LIBS) \
3062 ifeq ($(COM),GCC)
3063 $(call gb_LinkTarget_add_cxxflags,$(1),\
3064 -Wno-shadow \
3066 endif
3068 endef
3070 else # !ENABLE_KDE4
3072 define gb_LinkTarget__use_kde4
3074 endef
3076 endif # ENABLE_KDE4
3079 ifeq ($(ENABLE_TDE),TRUE)
3081 define gb_LinkTarget__use_tde
3082 $(call gb_LinkTarget_add_libs,$(1),\
3083 $(TDE_LIBS) \
3086 $(call gb_LinkTarget_set_include,$(1),\
3087 $$(INCLUDE) \
3088 $(TDE_CFLAGS) \
3090 endef
3092 else # ! ENABLE_TDE
3094 define gb_LinkTarget__use_tde
3096 endef
3098 endif # ENABLE_TDE
3101 ifeq ($(ENABLE_GCONF),TRUE)
3103 define gb_LinkTarget__use_gconf
3104 $(call gb_LinkTarget_set_include,$(1),\
3105 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS)))) \
3106 $$(INCLUDE) \
3109 $(call gb_LinkTarget_add_defs,$(1),\
3110 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS))) \
3113 $(call gb_LinkTarget_add_libs,$(1),\
3114 $(GCONF_LIBS) \
3117 endef
3119 else # !ENABLE_GCONF
3121 define gb_LinkTarget__use_gconf
3123 endef
3125 endif # ENABLE_GCONF
3128 # PYTHON
3129 # extra python_headers external because pyuno wrapper must not link python
3130 ifneq ($(SYSTEM_PYTHON),)
3132 define gb_LinkTarget__use_python_headers
3133 $(call gb_LinkTarget_add_defs,$(1),\
3134 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3137 $(call gb_LinkTarget_set_include,$(1),\
3138 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3139 $$(INCLUDE) \
3142 endef
3144 define gb_LinkTarget__use_python
3145 $(call gb_LinkTarget__use_python_headers,$(1))
3147 $(call gb_LinkTarget_add_libs,$(1),\
3148 $(PYTHON_LIBS) \
3151 endef
3153 else # !SYSTEM_PYTHON
3155 $(eval $(call gb_Helper_register_packages_for_install,python,\
3156 python3 \
3159 # depend on external project because on MACOSX the Package is disabled...
3160 define gb_LinkTarget__use_python_headers
3161 $(call gb_LinkTarget_use_external_project,$(1),python3)
3162 $(call gb_LinkTarget_set_include,$(1),\
3163 -I$(call gb_UnpackedTarball_get_dir,python3) \
3164 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3165 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3166 $$(INCLUDE) \
3169 endef
3171 define gb_LinkTarget__use_python
3172 $(call gb_LinkTarget__use_python_headers,$(1))
3174 ifeq ($(OS),WNT)
3175 $(call gb_LinkTarget_add_libs,$(1),\
3176 $(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 \
3178 else ifeq ($(OS),MACOSX)
3179 $(call gb_LinkTarget_add_libs,$(1),\
3180 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3182 else
3183 $(call gb_LinkTarget_add_libs,$(1),\
3184 -L$(call gb_UnpackedTarball_get_dir,python3) \
3185 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3187 endif
3189 endef
3191 endif # SYSTEM_PYTHON
3193 # ORCUS
3194 ifeq ($(ENABLE_ORCUS),TRUE)
3196 ifneq ($(SYSTEM_LIBORCUS),)
3198 define gb_LinkTarget__use_orcus
3199 $(call gb_LinkTarget_set_include,$(1),\
3200 $$(INCLUDE) \
3201 $(ORCUS_CFLAGS) \
3203 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3204 endef
3206 define gb_LinkTarget__use_orcus-parser
3208 endef
3210 else # !SYSTEM_LIBORCUS
3212 ifeq ($(COM),MSC)
3214 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3215 orcus \
3216 orcus-parser \
3219 define gb_LinkTarget__use_orcus
3220 $(call gb_LinkTarget_set_include,$(1),\
3221 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3222 $$(INCLUDE) \
3225 $(call gb_LinkTarget_use_libraries,$(1),\
3226 orcus \
3229 endef
3231 define gb_LinkTarget__use_orcus-parser
3232 $(call gb_LinkTarget_set_include,$(1),\
3233 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3234 $$(INCLUDE) \
3237 $(call gb_LinkTarget_use_libraries,$(1),\
3238 orcus-parser \
3241 endef
3243 else # !MSC
3245 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3246 liborcus \
3249 define gb_LinkTarget__use_orcus
3250 $(call gb_LinkTarget_use_package,$(1),liborcus)
3252 $(call gb_LinkTarget_set_include,$(1),\
3253 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3254 $$(INCLUDE) \
3257 $(call gb_LinkTarget_add_libs,$(1),\
3258 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.10 \
3261 $(if $(SYSTEM_BOOST), \
3262 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3263 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3266 endef
3268 define gb_LinkTarget__use_orcus-parser
3269 $(call gb_LinkTarget_use_package,$(1),liborcus)
3271 $(call gb_LinkTarget_set_include,$(1),\
3272 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3273 $$(INCLUDE) \
3276 $(call gb_LinkTarget_add_libs,$(1),\
3277 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.10 \
3280 endef
3282 endif # MSC
3284 endif # SYSTEM_LIBORCUS
3286 else # ENABLE_ORCUS != TRUE
3288 gb_LinkTarget__use_orcus :=
3289 gb_LinkTarget__use_orcus-parser :=
3291 endif
3293 ifeq ($(ENABLE_EOT),TRUE)
3295 ifneq ($(SYSTEM_LIBEOT),)
3297 define gb_LinkTarget__use_libeot
3298 $(call gb_LinkTarget_set_include,$(1),\
3299 $$(INCLUDE) \
3300 $(LIBEOT_CFLAGS) \
3302 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3304 endef
3306 gb_ExternalProject__use_libeot :=
3308 else # !SYSTEM_LIBEOT
3310 define gb_LinkTarget__use_libeot
3311 $(call gb_LinkTarget_set_include,$(1),\
3312 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3313 $$(INCLUDE) \
3315 $(call gb_LinkTarget_add_libs,$(1),\
3316 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3318 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3320 endef
3322 define gb_ExternalProject__use_libeot
3323 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3325 endef
3327 endif # SYSTEM_LIBEOT
3329 else # !ENABLE_EOT
3331 gb_LinkTarget__use_libeot :=
3332 gb_ExternalProject__use_libeot :=
3334 endif # ENABLE_EOT
3336 ### X11 stuff ###
3338 ifeq ($(GUIBASE),unx)
3340 ifeq ($(XRANDR_DLOPEN),FALSE)
3342 define gb_LinkTarget__use_Xrandr
3343 $(call gb_LinkTarget_set_include,$(1),\
3344 $$(INCLUDE) \
3345 $(XRANDR_CFLAGS) \
3348 $(call gb_LinkTarget_add_libs,$(1),\
3349 $(XRANDR_LIBS) \
3351 endef
3353 else # XRANDR_DLOPEN
3355 define gb_LinkTarget__use_Xrandr
3356 $(call gb_LinkTarget_add_defs,$(1),\
3357 -DXRANDR_DLOPEN \
3359 endef
3361 endif # XRANDR_DLOPEN
3363 define gb_LinkTarget__use_Xrender
3364 $(call gb_LinkTarget_set_include,$(1),\
3365 $$(INCLUDE) \
3366 $(XRENDER_CFLAGS) \
3369 $(call gb_LinkTarget_add_libs,$(1),\
3370 $(XRENDER_LIBS) \
3372 endef
3374 endif # GUIBASE=unx
3377 gb_ExternalProject__use_nss3:=
3379 ifeq ($(OS),ANDROID)
3381 gb_LinkTarget__use_nss3:=
3382 gb_LinkTarget__use_plc4:=
3384 else
3386 ifneq ($(SYSTEM_NSS),)
3388 define gb_LinkTarget__use_nss3
3389 $(call gb_LinkTarget_add_defs,$(1),\
3390 -DSYSTEM_NSS \
3393 $(call gb_LinkTarget_set_include,$(1),\
3394 $$(INCLUDE) \
3395 $(NSS_CFLAGS) \
3398 $(call gb_LinkTarget_add_libs,$(1),\
3399 $(NSS_LIBS) \
3402 endef
3404 define gb_LinkTarget__use_plc4
3405 $(call gb_LinkTarget__use_nss3,$(1))
3407 endef
3409 define gb_LinkTarget__use_ssl3
3410 $(call gb_LinkTarget__use_nss3,$(1))
3412 endef
3414 else # !SYSTEM_NSS
3416 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3417 nss \
3420 define gb_LinkTarget__use_nss3
3421 $(call gb_LinkTarget_use_package,$(1),nss)
3422 $(call gb_LinkTarget_set_include,$(1),\
3423 $$(INCLUDE) \
3424 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3425 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3428 ifeq ($(COM),MSC)
3429 $(call gb_LinkTarget_add_libs,$(1),\
3430 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3431 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3432 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3434 else
3435 $(call gb_LinkTarget_add_libs,$(1),\
3436 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3437 -lnspr4 \
3438 -lnss3 \
3439 -lsmime3 \
3441 endif
3443 endef
3445 define gb_LinkTarget__use_plc4
3446 $(call gb_LinkTarget_use_package,$(1),nss)
3447 ifeq ($(COM),MSC)
3448 $(call gb_LinkTarget_add_libs,$(1),\
3449 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3451 else
3452 $(call gb_LinkTarget_add_libs,$(1),\
3453 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3455 endif
3457 endef
3459 define gb_LinkTarget__use_ssl3
3460 $(call gb_LinkTarget_use_package,$(1),nss)
3461 ifeq ($(COM),MSC)
3462 $(call gb_LinkTarget_add_libs,$(1),\
3463 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3465 else
3466 $(call gb_LinkTarget_add_libs,$(1),\
3467 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3469 endif
3471 endef
3473 define gb_ExternalProject__use_nss3
3474 $(call gb_ExternalProject_use_package,$(1),nss)
3476 endef
3478 endif # SYSTEM_NSS
3480 endif # DESKTOP
3482 ifeq ($(ENABLE_GLTF),TRUE)
3484 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3486 define gb_LinkTarget__use_libgltf
3487 $(call gb_LinkTarget_set_include,$(1),\
3488 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3489 $$(INCLUDE) \
3492 ifeq ($(COM),MSC)
3493 $(call gb_LinkTarget_add_libs,$(1),\
3494 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3496 else
3497 $(call gb_LinkTarget_add_libs,$(1),\
3498 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3500 endif
3502 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3504 endef
3506 else # SYSTEM_LIBGLTF
3508 define gb_LinkTarget__use_libgltf
3509 $(call gb_LinkTarget_set_include,$(1),\
3510 $$(INCLUDE) \
3511 $(LIBGLTF_CFLAGS) \
3513 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3515 endef
3517 endif # SYSTEN_LIBGLTF
3519 ifeq ($(ENABLE_COLLADA),TRUE)
3521 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3523 define gb_LinkTarget__use_opencollada_parser
3524 $(call gb_LinkTarget_set_include,$(1),\
3525 $$(INCLUDE) \
3526 $(OPENCOLLADA_CFLAGS) \
3529 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3531 endef
3533 else # !SYSTEM_OPENCOLLADA
3535 define gb_LinkTarget__use_opencollada_parser
3536 $(call gb_LinkTarget_set_include,$(1),\
3537 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3538 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3539 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3540 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3541 $$(INCLUDE) \
3544 $(call gb_LinkTarget_use_static_libraries,$(1),\
3545 opencollada_parser \
3547 endef
3549 endif # SYSTEM_OPENCOLLADA
3551 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3553 define gb_LinkTarget__use_collada2gltf
3554 $(call gb_LinkTarget_set_include,$(1),\
3555 $$(INCLUDE) \
3556 $(COLLADA2GLTF_CFLAGS) \
3559 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3561 endef
3563 else # !SYSTEM_COLLADA2GLTF
3565 define gb_LinkTarget__use_collada2gltf
3566 $(call gb_LinkTarget_set_include,$(1),\
3567 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3568 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3569 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3570 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3571 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3572 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3573 $$(INCLUDE) \
3576 $(call gb_LinkTarget_use_static_libraries,$(1),\
3577 collada2gltf \
3579 endef
3581 endif # SYSTEM_COLLADA2GLTF
3583 endif # ENABLE_COLLADA
3585 endif # ENABLE_GLTF
3587 ### Jars ############################################################
3589 ifneq ($(SYSTEM_HSQLDB),)
3591 define gb_Jar__use_hsqldb
3592 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3593 endef
3594 define gb_JunitTest__use_hsqldb
3595 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3596 endef
3598 else # !SYSTEM_HSQLDB
3600 ifeq ($(ENABLE_JAVA),TRUE)
3601 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3602 hsqldb \
3604 endif
3606 define gb_Jar__use_hsqldb
3607 $(call gb_Jar_use_jar,$(1),hsqldb)
3608 endef
3609 define gb_JunitTest__use_hsqldb
3610 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3611 endef
3613 endif # SYSTEM_HSQLDB
3616 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3618 ifneq ($(SYSTEM_BSH),)
3620 define gb_Jar__use_bsh
3621 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3622 endef
3624 else # !SYSTEM_BSH
3626 ifeq ($(ENABLE_JAVA),TRUE)
3627 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3628 bsh \
3630 endif
3632 define gb_Jar__use_bsh
3633 $(call gb_Jar_use_jar,$(1),bsh)
3634 endef
3636 endif # SYSTEM_BSH
3638 endif
3640 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3642 ifneq ($(SYSTEM_RHINO),)
3644 define gb_Jar__use_rhino
3645 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3646 endef
3648 else # !SYSTEM_RHINO
3650 ifeq ($(ENABLE_JAVA),TRUE)
3651 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3652 js \
3654 endif
3656 define gb_Jar__use_rhino
3657 $(call gb_Jar_use_jar,$(1),js)
3658 endef
3660 endif # SYSTEM_RHINO
3662 endif
3664 ifneq ($(SYSTEM_APACHE_COMMONS),)
3666 define gb_Jar__use_commons-codec
3667 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
3668 endef
3669 gb_ExternalProject__use_commons-codec :=
3671 define gb_Jar__use_commons-httpclient
3672 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
3673 endef
3674 gb_ExternalProject__use_commons-httpclient :=
3676 define gb_Jar__use_commons-lang
3677 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
3678 endef
3679 gb_ExternalProject__use_commons-lang :=
3681 define gb_Jar__use_commons-logging
3682 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3683 endef
3684 gb_ExternalProject__use_commons-logging :=
3686 else # !SYSTEM_APACHE_COMMONS
3688 ifeq ($(ENABLE_JAVA),TRUE)
3689 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3690 commons-logging-$(COMMONS_LOGGING_VERSION) \
3692 endif
3693 $(eval $(call gb_Helper_register_jars,OXT,\
3694 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
3695 commons-httpclient-3.1 \
3696 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
3699 define gb_Jar__use_commons-codec
3700 $(call gb_Jar_use_external_project,$(1),apache_commons_codec)
3701 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3702 $(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3703 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3705 endef
3706 define gb_ExternalProject__use_commons-codec
3707 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3708 endef
3710 define gb_Jar__use_commons-httpclient
3711 $(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3712 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
3713 endef
3714 define gb_ExternalProject__use_commons-httpclient
3715 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3716 endef
3718 define gb_Jar__use_commons-lang
3719 $(call gb_Jar_use_external_project,$(1),apache_commons_lang)
3720 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3721 $(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3722 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3724 endef
3725 define gb_ExternalProject__use_commons-lang
3726 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3727 endef
3729 define gb_Jar__use_commons-logging
3730 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3731 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3732 endef
3733 define gb_ExternalProject__use_commons-logging
3734 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3735 endef
3737 endif # SYSTEM_APACHE_COMMONS
3740 ifneq ($(SYSTEM_JFREEREPORT),)
3742 define gb_Jar__use_flow-engine
3743 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3744 endef
3746 define gb_Jar__use_flute
3747 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3748 endef
3750 define gb_Jar__use_libbase
3751 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3752 endef
3754 define gb_Jar__use_libfonts
3755 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3756 endef
3758 define gb_Jar__use_libformula
3759 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3760 endef
3762 define gb_Jar__use_liblayout
3763 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3764 endef
3766 define gb_Jar__use_libloader
3767 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3768 endef
3770 define gb_Jar__use_librepository
3771 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3772 endef
3774 define gb_Jar__use_libserializer
3775 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3776 endef
3778 define gb_Jar__use_libxml
3779 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3780 endef
3782 define gb_Jar__use_sac
3783 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3784 endef
3786 else # !SYSTEM_JFREEREPORT
3788 ifeq ($(ENABLE_JAVA),TRUE)
3789 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3790 flow-engine \
3791 flute-1.1.6 \
3792 libbase-1.1.6 \
3793 libfonts-1.1.6 \
3794 libformula-1.1.7 \
3795 liblayout \
3796 libloader-1.1.6 \
3797 librepository-1.1.6 \
3798 libserializer-1.1.6 \
3799 libxml-1.1.7 \
3800 sac \
3802 endif
3804 define gb_Jar__use_flow-engine
3805 $(call gb_Jar_use_jar,$(1),flow-engine)
3806 endef
3808 define gb_Jar__use_flute
3809 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3810 endef
3812 define gb_Jar__use_libbase
3813 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3814 endef
3816 define gb_Jar__use_libfonts
3817 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3818 endef
3820 define gb_Jar__use_libformula
3821 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3822 endef
3824 define gb_Jar__use_liblayout
3825 $(call gb_Jar_use_jar,$(1),liblayout)
3826 endef
3828 define gb_Jar__use_libloader
3829 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3830 endef
3832 define gb_Jar__use_librepository
3833 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3834 endef
3836 define gb_Jar__use_libserializer
3837 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3838 endef
3840 define gb_Jar__use_libxml
3841 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3842 endef
3844 define gb_Jar__use_sac
3845 $(call gb_Jar_use_jar,$(1),sac)
3846 endef
3848 endif # SYSTEM_JFREEREPORT
3851 # Executables
3853 # FIXME: the library target should be for build too
3854 define gb_Executable__register_bestreversemap
3855 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3856 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3858 endef
3860 # TODO depending on the whole URE might be overkill, but I do not have a
3861 # Windows machine to debug it...
3862 # FIXME: the library target should be for build too
3863 define gb_Executable__register_climaker
3864 $(call gb_Executable_add_runtime_dependencies,climaker,\
3865 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3866 $(call gb_Rdb_get_target_for_build,ure/services) \
3867 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3868 $(call gb_UnoApi_get_target,udkapi) \
3869 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3871 endef
3873 define gb_Executable__register_cppumaker
3874 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3875 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3877 endef
3879 gb_Gallery__UNO_COMPONENTS := \
3880 comphelper/util/comphelp \
3881 configmgr/source/configmgr \
3882 drawinglayer/drawinglayer \
3883 framework/util/fwk \
3884 i18npool/util/i18npool \
3885 package/source/xstor/xstor \
3886 package/util/package2 \
3887 sax/source/expatwrap/expwrap \
3888 sfx2/util/sfx \
3889 svgio/svgio \
3890 svx/util/svx \
3891 svx/util/svxcore \
3892 ucb/source/core/ucb1 \
3893 ucb/source/ucp/file/ucpfile1 \
3894 unoxml/source/service/unoxml
3896 # This is used to determine what we need for 'build' platform.
3897 define gb_Executable__register_gengal
3898 $(call gb_Executable_add_runtime_dependencies,gengal,\
3899 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
3900 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
3901 $(call gb_AllLangResTarget_get_target,ofa) \
3902 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3903 $(call gb_Package_get_target_for_build,postprocess_images) \
3904 $(call gb_Package_get_target_for_build,postprocess_registry) \
3905 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3906 $(call gb_Rdb_get_target_for_build,ure/services) \
3907 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3908 $(call gb_UnoApi_get_target,offapi) \
3909 $(call gb_UnoApi_get_target,udkapi) \
3911 endef
3913 ifeq ($(SYSTEM_ICU),)
3915 define gb_Executable__register_gendict
3916 $(call gb_Executable_add_runtime_dependencies,gendict,\
3917 $(call gb_Package_get_target_for_build,icu) \
3919 endef
3921 endif
3923 define gb_Executable__register_idlc
3924 $(call gb_Executable_add_runtime_dependencies,idlc,\
3925 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3927 endef
3929 define gb_Executable__register_localize
3930 $(call gb_Executable_add_runtime_dependencies,localize,\
3931 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3932 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3935 endef
3937 # FIXME ure/services.rdb needs cleanup
3938 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3939 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3940 # FIXME: the library target should be for build too
3941 define gb_Executable__register_saxparser
3942 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3943 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3944 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3945 $(call gb_Rdb_get_target_for_build,saxparser) \
3946 $(call gb_Rdb_get_target_for_build,ure/services) \
3947 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3948 $(call gb_UnoApi_get_target,udkapi) \
3950 endef
3952 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3953 # required due to the settings for URE_SERVICES and URE_TYPES in
3954 # cppuhelper/source/unorc
3955 # FIXME: the library target should be for build too
3956 define gb_Executable__register_uno
3957 $(call gb_Executable_add_runtime_dependencies,uno,\
3958 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3959 $(call gb_Rdb_get_target_for_build,ure/services) \
3960 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3961 $(call gb_UnoApi_get_target,udkapi) \
3963 endef
3966 # External executables
3968 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3970 gb_ExternalExecutable__register_xmllint :=
3972 else # ! SYSTEM_LIBXML_FOR_BUILD
3974 define gb_ExternalExecutable__register_xmllint
3975 $(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)
3976 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3977 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3978 $(call gb_Package_get_target,xml2) \
3981 endef
3983 endif # SYSTEM_LIBXML_FOR_BUILD
3985 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3987 gb_ExternalExecutable__register_xsltproc :=
3989 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3991 define gb_ExternalExecutable__register_xsltproc
3992 $(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)
3993 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3994 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3995 $(call gb_Package_get_target,xslt) \
3998 endef
4000 endif # SYSTEM_LIBXSLT_FOR_BUILD
4002 ifneq (,$(SYSTEM_UCPP))
4004 gb_ExternalExecutable__register_ucpp :=
4006 else # ! SYSTEM_UCPP
4008 define gb_ExternalExecutable__register_ucpp
4009 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4011 endef
4013 endif # SYSTEM_UCPP
4015 ifeq (,$(PYTHON_FOR_BUILD))
4017 define gb_ExternalExecutable__register_python
4018 ifeq ($(OS),MACOSX)
4020 # use set_external, to avoid having the command added as prerequisite for the
4021 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4022 # matching rule to build that specific file)
4023 $(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))
4024 # the Zip ensures that internal python has been built (cannot use the Package
4025 # target, as that is not used on Mac)
4026 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4028 else
4030 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4031 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4032 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4034 endif
4036 endef
4038 else
4040 define gb_ExternalExecutable__register_python
4041 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4043 endef
4045 endif # PYTHON_FOR_BUILD
4047 ifneq ($(SYSTEM_GENBRK),)
4049 define gb_ExternalExecutable__register_genbrk
4050 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4052 endef
4054 else # ! SYSTEM_GENBRK
4056 define gb_ExternalExecutable__register_genbrk
4057 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4058 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4059 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4060 $(call gb_Package_get_target_for_build,icu) \
4063 endef
4065 endif
4067 ifneq ($(SYSTEM_GENCCODE),)
4069 define gb_ExternalExecutable__register_genccode
4070 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4072 endef
4074 else # ! SYSTEM_GENCCODE
4076 define gb_ExternalExecutable__register_genccode
4077 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4078 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4079 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4080 $(call gb_Package_get_target_for_build,icu) \
4083 endef
4085 endif
4087 ifneq ($(SYSTEM_GENCMN),)
4089 define gb_ExternalExecutable__register_gencmn
4090 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4092 endef
4094 else # ! SYSTEM_GENCMN
4096 define gb_ExternalExecutable__register_gencmn
4097 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4098 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4099 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4100 $(call gb_Package_get_target_for_build,icu) \
4103 endef
4105 endif
4107 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4109 $(eval $(call gb_Helper_register_jars,OXT,\
4110 owncloud-android-library \
4113 define gb_Jar__use_owncloud_android_lib
4114 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4115 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4116 endef
4117 define gb_ExternalProject__use_owncloud_android_lib
4118 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4119 endef
4121 endif
4123 # vim: set noet sw=4 ts=4: