Version 5.0.4.1, tag libreoffice-5.0.4.1
[LibreOffice.git] / RepositoryExternal.mk
blob20de6765d8fb1f74543e24b69dfefb36f36a352f
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_unpacked,$(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_NONE,\
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))
3173 ifeq ($(OS),MACOSX)
3174 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3175 else
3176 $(call gb_LinkTarget_use_package,$(1),python3)
3177 endif
3179 ifeq ($(OS),WNT)
3180 $(call gb_LinkTarget_add_libs,$(1),\
3181 $(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 \
3183 else ifeq ($(OS),MACOSX)
3184 $(call gb_LinkTarget_add_libs,$(1),\
3185 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3187 else
3188 $(call gb_LinkTarget_add_libs,$(1),\
3189 -L$(call gb_UnpackedTarball_get_dir,python3) \
3190 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3192 endif
3194 endef
3196 endif # SYSTEM_PYTHON
3198 # ORCUS
3199 ifeq ($(ENABLE_ORCUS),TRUE)
3201 ifneq ($(SYSTEM_LIBORCUS),)
3203 define gb_LinkTarget__use_orcus
3204 $(call gb_LinkTarget_set_include,$(1),\
3205 $$(INCLUDE) \
3206 $(ORCUS_CFLAGS) \
3208 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3209 endef
3211 define gb_LinkTarget__use_orcus-parser
3213 endef
3215 else # !SYSTEM_LIBORCUS
3217 define gb_LinkTarget__use_orcus
3218 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3219 $(call gb_LinkTarget_set_include,$(1),\
3220 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3221 $$(INCLUDE) \
3223 $(call gb_LinkTarget_add_libs,$(1),\
3224 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
3227 $(if $(SYSTEM_BOOST), \
3228 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3229 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3232 endef
3234 define gb_LinkTarget__use_orcus-parser
3235 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3236 $(call gb_LinkTarget_set_include,$(1),\
3237 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3238 $$(INCLUDE) \
3240 $(call gb_LinkTarget_add_libs,$(1),\
3241 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
3244 endef
3246 endif # SYSTEM_LIBORCUS
3248 else # ENABLE_ORCUS != TRUE
3250 gb_LinkTarget__use_orcus :=
3251 gb_LinkTarget__use_orcus-parser :=
3253 endif
3255 ifeq ($(ENABLE_EOT),TRUE)
3257 ifneq ($(SYSTEM_LIBEOT),)
3259 define gb_LinkTarget__use_libeot
3260 $(call gb_LinkTarget_set_include,$(1),\
3261 $$(INCLUDE) \
3262 $(LIBEOT_CFLAGS) \
3264 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3266 endef
3268 gb_ExternalProject__use_libeot :=
3270 else # !SYSTEM_LIBEOT
3272 define gb_LinkTarget__use_libeot
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3275 $$(INCLUDE) \
3277 $(call gb_LinkTarget_add_libs,$(1),\
3278 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3280 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3282 endef
3284 define gb_ExternalProject__use_libeot
3285 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3287 endef
3289 endif # SYSTEM_LIBEOT
3291 else # !ENABLE_EOT
3293 gb_LinkTarget__use_libeot :=
3294 gb_ExternalProject__use_libeot :=
3296 endif # ENABLE_EOT
3298 ### X11 stuff ###
3300 ifeq ($(GUIBASE),unx)
3302 ifeq ($(XRANDR_DLOPEN),FALSE)
3304 define gb_LinkTarget__use_Xrandr
3305 $(call gb_LinkTarget_set_include,$(1),\
3306 $$(INCLUDE) \
3307 $(XRANDR_CFLAGS) \
3310 $(call gb_LinkTarget_add_libs,$(1),\
3311 $(XRANDR_LIBS) \
3313 endef
3315 else # XRANDR_DLOPEN
3317 define gb_LinkTarget__use_Xrandr
3318 $(call gb_LinkTarget_add_defs,$(1),\
3319 -DXRANDR_DLOPEN \
3321 endef
3323 endif # XRANDR_DLOPEN
3325 define gb_LinkTarget__use_Xrender
3326 $(call gb_LinkTarget_set_include,$(1),\
3327 $$(INCLUDE) \
3328 $(XRENDER_CFLAGS) \
3331 $(call gb_LinkTarget_add_libs,$(1),\
3332 $(XRENDER_LIBS) \
3334 endef
3336 endif # GUIBASE=unx
3339 gb_ExternalProject__use_nss3:=
3341 ifeq ($(OS),ANDROID)
3343 gb_LinkTarget__use_nss3:=
3344 gb_LinkTarget__use_plc4:=
3346 else
3348 ifneq ($(SYSTEM_NSS),)
3350 define gb_LinkTarget__use_nss3
3351 $(call gb_LinkTarget_add_defs,$(1),\
3352 -DSYSTEM_NSS \
3355 $(call gb_LinkTarget_set_include,$(1),\
3356 $$(INCLUDE) \
3357 $(NSS_CFLAGS) \
3360 $(call gb_LinkTarget_add_libs,$(1),\
3361 $(NSS_LIBS) \
3364 endef
3366 define gb_LinkTarget__use_plc4
3367 $(call gb_LinkTarget__use_nss3,$(1))
3369 endef
3371 define gb_LinkTarget__use_ssl3
3372 $(call gb_LinkTarget__use_nss3,$(1))
3374 endef
3376 else # !SYSTEM_NSS
3378 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3379 nss \
3382 define gb_LinkTarget__use_nss3
3383 $(call gb_LinkTarget_use_package,$(1),nss)
3384 $(call gb_LinkTarget_set_include,$(1),\
3385 $$(INCLUDE) \
3386 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3387 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3390 ifeq ($(COM),MSC)
3391 $(call gb_LinkTarget_add_libs,$(1),\
3392 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3393 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3394 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3396 else
3397 $(call gb_LinkTarget_add_libs,$(1),\
3398 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3399 -lnspr4 \
3400 -lnss3 \
3401 -lsmime3 \
3403 endif
3405 endef
3407 define gb_LinkTarget__use_plc4
3408 $(call gb_LinkTarget_use_package,$(1),nss)
3409 ifeq ($(COM),MSC)
3410 $(call gb_LinkTarget_add_libs,$(1),\
3411 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3413 else
3414 $(call gb_LinkTarget_add_libs,$(1),\
3415 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3417 endif
3419 endef
3421 define gb_LinkTarget__use_ssl3
3422 $(call gb_LinkTarget_use_package,$(1),nss)
3423 ifeq ($(COM),MSC)
3424 $(call gb_LinkTarget_add_libs,$(1),\
3425 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3427 else
3428 $(call gb_LinkTarget_add_libs,$(1),\
3429 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3431 endif
3433 endef
3435 define gb_ExternalProject__use_nss3
3436 $(call gb_ExternalProject_use_package,$(1),nss)
3438 endef
3440 endif # SYSTEM_NSS
3442 endif # DESKTOP
3444 ifeq ($(ENABLE_GLTF),TRUE)
3446 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3448 define gb_LinkTarget__use_libgltf
3449 $(call gb_LinkTarget_set_include,$(1),\
3450 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3451 $$(INCLUDE) \
3454 ifeq ($(COM),MSC)
3455 $(call gb_LinkTarget_add_libs,$(1),\
3456 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3458 else
3459 $(call gb_LinkTarget_add_libs,$(1),\
3460 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3462 endif
3464 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3466 endef
3468 else # SYSTEM_LIBGLTF
3470 define gb_LinkTarget__use_libgltf
3471 $(call gb_LinkTarget_set_include,$(1),\
3472 $$(INCLUDE) \
3473 $(LIBGLTF_CFLAGS) \
3475 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3477 endef
3479 endif # SYSTEN_LIBGLTF
3481 ifeq ($(ENABLE_COLLADA),TRUE)
3483 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3485 define gb_LinkTarget__use_opencollada_parser
3486 $(call gb_LinkTarget_set_include,$(1),\
3487 $$(INCLUDE) \
3488 $(OPENCOLLADA_CFLAGS) \
3491 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3493 endef
3495 else # !SYSTEM_OPENCOLLADA
3497 define gb_LinkTarget__use_opencollada_parser
3498 $(call gb_LinkTarget_set_include,$(1),\
3499 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3500 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3501 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3502 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3503 $$(INCLUDE) \
3506 $(call gb_LinkTarget_use_static_libraries,$(1),\
3507 opencollada_parser \
3509 endef
3511 endif # SYSTEM_OPENCOLLADA
3513 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3515 define gb_LinkTarget__use_collada2gltf
3516 $(call gb_LinkTarget_set_include,$(1),\
3517 $$(INCLUDE) \
3518 $(COLLADA2GLTF_CFLAGS) \
3521 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3523 endef
3525 else # !SYSTEM_COLLADA2GLTF
3527 define gb_LinkTarget__use_collada2gltf
3528 $(call gb_LinkTarget_set_include,$(1),\
3529 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3530 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3531 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3532 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3533 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3534 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3535 $$(INCLUDE) \
3538 $(call gb_LinkTarget_use_static_libraries,$(1),\
3539 collada2gltf \
3541 endef
3543 endif # SYSTEM_COLLADA2GLTF
3545 endif # ENABLE_COLLADA
3547 endif # ENABLE_GLTF
3549 ### Jars ############################################################
3551 ifneq ($(SYSTEM_HSQLDB),)
3553 define gb_Jar__use_hsqldb
3554 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3555 endef
3556 define gb_JunitTest__use_hsqldb
3557 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3558 endef
3560 else # !SYSTEM_HSQLDB
3562 ifeq ($(ENABLE_JAVA),TRUE)
3563 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3564 hsqldb \
3566 endif
3568 define gb_Jar__use_hsqldb
3569 $(call gb_Jar_use_jar,$(1),hsqldb)
3570 endef
3571 define gb_JunitTest__use_hsqldb
3572 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3573 endef
3575 endif # SYSTEM_HSQLDB
3578 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3580 ifneq ($(SYSTEM_BSH),)
3582 define gb_Jar__use_bsh
3583 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3584 endef
3586 else # !SYSTEM_BSH
3588 ifeq ($(ENABLE_JAVA),TRUE)
3589 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3590 bsh \
3592 endif
3594 define gb_Jar__use_bsh
3595 $(call gb_Jar_use_jar,$(1),bsh)
3596 endef
3598 endif # SYSTEM_BSH
3600 endif
3602 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3604 ifneq ($(SYSTEM_RHINO),)
3606 define gb_Jar__use_rhino
3607 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3608 endef
3610 else # !SYSTEM_RHINO
3612 ifeq ($(ENABLE_JAVA),TRUE)
3613 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3614 js \
3616 endif
3618 define gb_Jar__use_rhino
3619 $(call gb_Jar_use_jar,$(1),js)
3620 endef
3622 endif # SYSTEM_RHINO
3624 endif
3626 ifneq ($(SYSTEM_APACHE_COMMONS),)
3628 define gb_Jar__use_commons-codec
3629 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
3630 endef
3631 gb_ExternalProject__use_commons-codec :=
3633 define gb_Jar__use_commons-httpclient
3634 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
3635 endef
3636 gb_ExternalProject__use_commons-httpclient :=
3638 define gb_Jar__use_commons-lang
3639 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
3640 endef
3641 gb_ExternalProject__use_commons-lang :=
3643 define gb_Jar__use_commons-logging
3644 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3645 endef
3646 gb_ExternalProject__use_commons-logging :=
3648 else # !SYSTEM_APACHE_COMMONS
3650 ifeq ($(ENABLE_JAVA),TRUE)
3651 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3652 commons-logging-$(COMMONS_LOGGING_VERSION) \
3654 endif
3655 $(eval $(call gb_Helper_register_jars,OXT,\
3656 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
3657 commons-httpclient-3.1 \
3658 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
3661 define gb_Jar__use_commons-codec
3662 $(call gb_Jar_use_external_project,$(1),apache_commons_codec)
3663 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3664 $(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3665 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3667 endef
3668 define gb_ExternalProject__use_commons-codec
3669 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3670 endef
3672 define gb_Jar__use_commons-httpclient
3673 $(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3674 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
3675 endef
3676 define gb_ExternalProject__use_commons-httpclient
3677 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3678 endef
3680 define gb_Jar__use_commons-lang
3681 $(call gb_Jar_use_external_project,$(1),apache_commons_lang)
3682 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3683 $(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3684 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3686 endef
3687 define gb_ExternalProject__use_commons-lang
3688 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3689 endef
3691 define gb_Jar__use_commons-logging
3692 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3693 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3694 endef
3695 define gb_ExternalProject__use_commons-logging
3696 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3697 endef
3699 endif # SYSTEM_APACHE_COMMONS
3702 ifneq ($(SYSTEM_JFREEREPORT),)
3704 define gb_Jar__use_flow-engine
3705 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3706 endef
3708 define gb_Jar__use_flute
3709 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3710 endef
3712 define gb_Jar__use_libbase
3713 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3714 endef
3716 define gb_Jar__use_libfonts
3717 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3718 endef
3720 define gb_Jar__use_libformula
3721 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3722 endef
3724 define gb_Jar__use_liblayout
3725 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3726 endef
3728 define gb_Jar__use_libloader
3729 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3730 endef
3732 define gb_Jar__use_librepository
3733 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3734 endef
3736 define gb_Jar__use_libserializer
3737 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3738 endef
3740 define gb_Jar__use_libxml
3741 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3742 endef
3744 define gb_Jar__use_sac
3745 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3746 endef
3748 else # !SYSTEM_JFREEREPORT
3750 ifeq ($(ENABLE_JAVA),TRUE)
3751 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3752 flow-engine \
3753 flute-1.1.6 \
3754 libbase-1.1.6 \
3755 libfonts-1.1.6 \
3756 libformula-1.1.7 \
3757 liblayout \
3758 libloader-1.1.6 \
3759 librepository-1.1.6 \
3760 libserializer-1.1.6 \
3761 libxml-1.1.7 \
3762 sac \
3764 endif
3766 define gb_Jar__use_flow-engine
3767 $(call gb_Jar_use_jar,$(1),flow-engine)
3768 endef
3770 define gb_Jar__use_flute
3771 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3772 endef
3774 define gb_Jar__use_libbase
3775 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3776 endef
3778 define gb_Jar__use_libfonts
3779 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3780 endef
3782 define gb_Jar__use_libformula
3783 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3784 endef
3786 define gb_Jar__use_liblayout
3787 $(call gb_Jar_use_jar,$(1),liblayout)
3788 endef
3790 define gb_Jar__use_libloader
3791 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3792 endef
3794 define gb_Jar__use_librepository
3795 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3796 endef
3798 define gb_Jar__use_libserializer
3799 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3800 endef
3802 define gb_Jar__use_libxml
3803 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3804 endef
3806 define gb_Jar__use_sac
3807 $(call gb_Jar_use_jar,$(1),sac)
3808 endef
3810 endif # SYSTEM_JFREEREPORT
3813 # Executables
3815 # FIXME: the library target should be for build too
3816 define gb_Executable__register_bestreversemap
3817 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3818 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3820 endef
3822 # TODO depending on the whole URE might be overkill, but I do not have a
3823 # Windows machine to debug it...
3824 # FIXME: the library target should be for build too
3825 define gb_Executable__register_climaker
3826 $(call gb_Executable_add_runtime_dependencies,climaker,\
3827 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3828 $(call gb_Rdb_get_target_for_build,ure/services) \
3829 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3830 $(call gb_UnoApi_get_target,udkapi) \
3831 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3833 endef
3835 define gb_Executable__register_cppumaker
3836 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3837 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3839 endef
3841 gb_Gallery__UNO_COMPONENTS := \
3842 comphelper/util/comphelp \
3843 configmgr/source/configmgr \
3844 drawinglayer/drawinglayer \
3845 framework/util/fwk \
3846 i18npool/util/i18npool \
3847 package/source/xstor/xstor \
3848 package/util/package2 \
3849 sax/source/expatwrap/expwrap \
3850 sfx2/util/sfx \
3851 svgio/svgio \
3852 svx/util/svx \
3853 svx/util/svxcore \
3854 ucb/source/core/ucb1 \
3855 ucb/source/ucp/file/ucpfile1 \
3856 unoxml/source/service/unoxml
3858 # This is used to determine what we need for 'build' platform.
3859 define gb_Executable__register_gengal
3860 $(call gb_Executable_add_runtime_dependencies,gengal,\
3861 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
3862 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
3863 $(call gb_AllLangResTarget_get_target,ofa) \
3864 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3865 $(call gb_Package_get_target_for_build,postprocess_images) \
3866 $(call gb_Package_get_target_for_build,postprocess_registry) \
3867 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3868 $(call gb_Rdb_get_target_for_build,ure/services) \
3869 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3870 $(call gb_UnoApi_get_target,offapi) \
3871 $(call gb_UnoApi_get_target,udkapi) \
3873 endef
3875 ifeq ($(SYSTEM_ICU),)
3877 define gb_Executable__register_gendict
3878 $(call gb_Executable_add_runtime_dependencies,gendict,\
3879 $(call gb_Package_get_target_for_build,icu) \
3881 endef
3883 endif
3885 define gb_Executable__register_idlc
3886 $(call gb_Executable_add_runtime_dependencies,idlc,\
3887 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3889 endef
3891 define gb_Executable__register_localize
3892 $(call gb_Executable_add_runtime_dependencies,localize,\
3893 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3894 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3897 endef
3899 # FIXME ure/services.rdb needs cleanup
3900 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3901 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3902 # FIXME: the library target should be for build too
3903 define gb_Executable__register_saxparser
3904 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3905 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3906 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3907 $(call gb_Rdb_get_target_for_build,saxparser) \
3908 $(call gb_Rdb_get_target_for_build,ure/services) \
3909 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3910 $(call gb_UnoApi_get_target,udkapi) \
3912 endef
3914 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3915 # required due to the settings for URE_SERVICES and URE_TYPES in
3916 # cppuhelper/source/unorc
3917 # FIXME: the library target should be for build too
3918 define gb_Executable__register_uno
3919 $(call gb_Executable_add_runtime_dependencies,uno,\
3920 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3921 $(call gb_Rdb_get_target_for_build,ure/services) \
3922 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3923 $(call gb_UnoApi_get_target,udkapi) \
3925 endef
3928 # External executables
3930 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3932 gb_ExternalExecutable__register_xmllint :=
3934 else # ! SYSTEM_LIBXML_FOR_BUILD
3936 define gb_ExternalExecutable__register_xmllint
3937 $(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)
3938 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3939 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3940 $(call gb_Package_get_target,xml2) \
3943 endef
3945 endif # SYSTEM_LIBXML_FOR_BUILD
3947 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3949 gb_ExternalExecutable__register_xsltproc :=
3951 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3953 define gb_ExternalExecutable__register_xsltproc
3954 $(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)
3955 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3956 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3957 $(call gb_Package_get_target,xslt) \
3960 endef
3962 endif # SYSTEM_LIBXSLT_FOR_BUILD
3964 ifneq (,$(SYSTEM_UCPP))
3966 gb_ExternalExecutable__register_ucpp :=
3968 else # ! SYSTEM_UCPP
3970 define gb_ExternalExecutable__register_ucpp
3971 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3973 endef
3975 endif # SYSTEM_UCPP
3977 ifeq (,$(PYTHON_FOR_BUILD))
3979 define gb_ExternalExecutable__register_python
3980 ifeq ($(OS),MACOSX)
3982 # use set_external, to avoid having the command added as prerequisite for the
3983 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3984 # matching rule to build that specific file)
3985 $(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))
3986 # the Zip ensures that internal python has been built (cannot use the Package
3987 # target, as that is not used on Mac)
3988 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3990 else
3992 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3993 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3994 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3996 endif
3998 endef
4000 else
4002 define gb_ExternalExecutable__register_python
4003 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4005 endef
4007 endif # PYTHON_FOR_BUILD
4009 ifneq ($(SYSTEM_GENBRK),)
4011 define gb_ExternalExecutable__register_genbrk
4012 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4014 endef
4016 else # ! SYSTEM_GENBRK
4018 define gb_ExternalExecutable__register_genbrk
4019 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4020 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4021 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4022 $(call gb_Package_get_target_for_build,icu) \
4025 endef
4027 endif
4029 ifneq ($(SYSTEM_GENCCODE),)
4031 define gb_ExternalExecutable__register_genccode
4032 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4034 endef
4036 else # ! SYSTEM_GENCCODE
4038 define gb_ExternalExecutable__register_genccode
4039 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4040 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4041 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4042 $(call gb_Package_get_target_for_build,icu) \
4045 endef
4047 endif
4049 ifneq ($(SYSTEM_GENCMN),)
4051 define gb_ExternalExecutable__register_gencmn
4052 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4054 endef
4056 else # ! SYSTEM_GENCMN
4058 define gb_ExternalExecutable__register_gencmn
4059 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4060 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4061 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4062 $(call gb_Package_get_target_for_build,icu) \
4065 endef
4067 endif
4069 # vim: set noet sw=4 ts=4: