Remove include stdio (part1)
[LibreOffice.git] / RepositoryExternal.mk
blobb6324cfa6eb9907af3b60262ca6770d8df7ef2ae
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_MESA_HEADERS),)
42 gb_LinkTarget__use_mesa_headers :=
44 else # !SYSTEM_MESA_HEADERS
46 define gb_LinkTarget__use_mesa_headers
47 $(call gb_LinkTarget_set_include,$(1),\
48 -I$(SRCDIR)/external/Mesa/inc \
49 $$(INCLUDE) \
52 endef
54 endif # SYSTEM_MESA_HEADERS
56 ifneq ($(SYSTEM_NPAPI_HEADERS),)
58 # yes this uses internal headers too...
59 # they are split across 2 dirs for this reason
60 define gb_LinkTarget__use_npapi_headers
61 $(call gb_LinkTarget_set_include,$(1),\
62 $(NPAPI_HEADERS_CFLAGS) \
63 -I$(SRCDIR)/external/np_sdk \
64 $$(INCLUDE) \
67 endef
69 else #!SYSTEM_NPAPI_HEADERS
71 define gb_LinkTarget__use_npapi_headers
72 $(call gb_LinkTarget_set_include,$(1),\
73 -I$(SRCDIR)/external/np_sdk/inc \
74 -I$(SRCDIR)/external/np_sdk \
75 $$(INCLUDE) \
78 endef
80 endif #SYSTEM_NPAPI_HEADERS
82 ifneq ($(SYSTEM_ODBC_HEADERS),)
84 define gb_LinkTarget__use_odbc_headers
85 $(call gb_LinkTarget_add_defs,$(1),\
86 -DSYSTEM_ODBC_HEADERS \
89 endef
91 else # !SYSTEM_ODBC_HEADERS
93 define gb_LinkTarget__use_odbc_headers
94 $(call gb_LinkTarget_set_include,$(1),\
95 -I$(SRCDIR)/external/unixODBC/inc \
96 $$(INCLUDE) \
99 endef
101 endif # SYSTEM_ODBC_HEADERS
103 ifneq ($(SYSTEM_VIGRA),)
105 gb_LinkTarget__use_vigra_headers :=
107 else
109 define gb_LinkTarget__use_vigra_headers
110 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
111 $(call gb_LinkTarget_set_include,$(1),\
112 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
113 $$(INCLUDE) \
116 endef
118 endif
120 ifneq ($(SYSTEM_MDDS),)
122 gb_ExternalProject__use_mdds_headers :=
124 define gb_LinkTarget__use_mdds_headers
125 $(call gb_LinkTarget_set_include,$(1),\
126 $(MDDS_CFLAGS) \
127 $$(INCLUDE) \
130 endef
132 else # !SYSTEM_MDDS
134 define gb_ExternalProject__use_mdds_headers
135 $(call gb_ExternalProject_use_external_project,$(1),mdds)
137 endef
139 define gb_LinkTarget__use_mdds_headers
140 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
141 $(call gb_LinkTarget_set_include,$(1),\
142 $(MDDS_CFLAGS) \
143 $$(INCLUDE) \
146 endef
148 endif # SYSTEM_MDDS
150 ifneq ($(SYSTEM_GLM),)
152 gb_LinkTarget__use_glm_headers :=
153 gb_ExternalProject__use_glm_headers :=
155 else
157 define gb_LinkTarget__use_glm_headers
158 $(call gb_LinkTarget_use_unpacked,$(1),glm)
159 $(call gb_LinkTarget_set_include,$(1),\
160 -I$(call gb_UnpackedTarball_get_dir,glm) \
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 define gb_LinkTarget__use_etonyek
1704 $(call gb_LinkTarget_set_include,$(1),\
1705 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1706 $$(INCLUDE) \
1708 $(call gb_LinkTarget_add_libs,$(1),\
1709 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \
1711 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1713 endef
1715 define gb_ExternalProject__use_etonyek
1716 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1718 endef
1720 endif # SYSTEM_ETONYEK
1723 ifneq ($(SYSTEM_FREEHAND),)
1725 define gb_LinkTarget__use_freehand
1726 $(call gb_LinkTarget_set_include,$(1),\
1727 $$(INCLUDE) \
1728 $(FREEHAND_CFLAGS) \
1730 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1732 endef
1734 gb_ExternalProject__use_freehand :=
1736 else # !SYSTEM_FREEHAND
1738 define gb_LinkTarget__use_freehand
1739 $(call gb_LinkTarget_set_include,$(1),\
1740 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1741 $$(INCLUDE) \
1743 $(call gb_LinkTarget_add_libs,$(1),\
1744 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1746 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1748 endef
1750 define gb_ExternalProject__use_freehand
1751 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1753 endef
1755 endif # SYSTEM_FREEHAND
1758 ifneq ($(SYSTEM_ODFGEN),)
1760 define gb_LinkTarget__use_odfgen
1761 $(call gb_LinkTarget_set_include,$(1),\
1762 $$(INCLUDE) \
1763 $(ODFGEN_CFLAGS) \
1765 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1767 endef
1769 else # !SYSTEM_ODFGEN
1771 ifeq ($(COM),MSC)
1773 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1774 odfgen \
1777 define gb_LinkTarget__use_odfgen
1778 $(call gb_LinkTarget_set_include,$(1),\
1779 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1780 $$(INCLUDE) \
1782 $(call gb_LinkTarget_use_libraries,$(1),\
1783 odfgen \
1786 endef
1788 else # !MSC
1790 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1791 libodfgen \
1794 define gb_LinkTarget__use_odfgen
1795 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1797 $(call gb_LinkTarget_set_include,$(1),\
1798 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1799 -DLIBODFGEN_VISIBILITY \
1800 $$(INCLUDE) \
1802 $(call gb_LinkTarget_add_libs,$(1),\
1803 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1806 endef
1808 endif
1810 endif # SYSTEM_ODFGEN
1813 ifneq ($(SYSTEM_REVENGE),)
1815 define gb_LinkTarget__use_revenge
1816 $(call gb_LinkTarget_set_include,$(1),\
1817 $$(INCLUDE) \
1818 $(REVENGE_CFLAGS) \
1820 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1822 endef
1824 gb_ExternalProject__use_revenge :=
1826 else # !SYSTEM_REVENGE
1828 ifeq ($(COM),MSC)
1830 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1831 revenge \
1834 define gb_LinkTarget__use_revenge
1835 $(call gb_LinkTarget_set_include,$(1),\
1836 $(REVENGE_CFLAGS) \
1837 $$(INCLUDE) \
1839 $(call gb_LinkTarget_use_libraries,$(1),\
1840 revenge \
1843 endef
1845 define gb_ExternalProject__use_revenge
1846 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1848 endef
1850 else # !MSC
1852 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1853 librevenge \
1856 define gb_LinkTarget__use_revenge
1857 $(call gb_LinkTarget_use_package,$(1),librevenge)
1859 $(call gb_LinkTarget_set_include,$(1),\
1860 $(REVENGE_CFLAGS) \
1861 -DLIBREVENGE_VISIBILITY \
1862 $$(INCLUDE) \
1864 $(call gb_LinkTarget_add_libs,$(1),\
1865 $(REVENGE_LIBS) \
1867 endef
1869 define gb_ExternalProject__use_revenge
1870 $(call gb_ExternalProject_use_package,$(1),librevenge)
1872 endef
1874 endif # MSC
1876 endif # SYSTEM_REVENGE
1879 ifneq ($(SYSTEM_ABW),)
1881 define gb_LinkTarget__use_abw
1882 $(call gb_LinkTarget_set_include,$(1),\
1883 $$(INCLUDE) \
1884 $(ABW_CFLAGS) \
1886 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1888 endef
1889 gb_ExternalProject__use_abw :=
1891 else # !SYSTEM_ABW
1893 define gb_LinkTarget__use_abw
1894 $(call gb_LinkTarget_set_include,$(1),\
1895 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1896 $$(INCLUDE) \
1898 $(call gb_LinkTarget_add_libs,$(1),\
1899 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1901 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1903 endef
1904 define gb_ExternalProject__use_abw
1905 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1907 endef
1909 endif # SYSTEM_ABW
1912 ifneq ($(SYSTEM_MSPUB),)
1914 define gb_LinkTarget__use_mspub
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 $$(INCLUDE) \
1917 $(MSPUB_CFLAGS) \
1919 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1921 endef
1923 else # !SYSTEM_MSPUB
1925 define gb_LinkTarget__use_mspub
1926 $(call gb_LinkTarget_set_include,$(1),\
1927 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1928 $$(INCLUDE) \
1930 $(call gb_LinkTarget_add_libs,$(1),\
1931 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1933 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1935 endef
1937 endif # SYSTEM_MSPUB
1940 ifneq ($(SYSTEM_PAGEMAKER),)
1942 define gb_LinkTarget__use_pagemaker
1943 $(call gb_LinkTarget_set_include,$(1),\
1944 $$(INCLUDE) \
1945 $(PAGEMAKER_CFLAGS) \
1947 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1949 endef
1950 gb_ExternalProject__use_pagemaker :=
1952 else # !SYSTEM_PAGEMAKER
1954 define gb_LinkTarget__use_pagemaker
1955 $(call gb_LinkTarget_set_include,$(1),\
1956 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1957 $$(INCLUDE) \
1959 $(call gb_LinkTarget_add_libs,$(1),\
1960 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1962 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1964 endef
1965 define gb_ExternalProject__use_pagemaker
1966 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1968 endef
1970 endif # SYSTEM_PAGEMAKER
1973 ifneq ($(SYSTEM_VISIO),)
1975 define gb_LinkTarget__use_visio
1976 $(call gb_LinkTarget_set_include,$(1),\
1977 $$(INCLUDE) \
1978 $(VISIO_CFLAGS) \
1980 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
1982 endef
1984 else # !SYSTEM_VISIO
1986 define gb_LinkTarget__use_visio
1987 $(call gb_LinkTarget_set_include,$(1),\
1988 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1989 $$(INCLUDE) \
1991 $(call gb_LinkTarget_add_libs,$(1),\
1992 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
1994 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
1996 endef
1998 endif # SYSTEM_VISIO
2001 ifneq ($(SYSTEM_WPD),)
2003 define gb_LinkTarget__use_wpd
2004 $(call gb_LinkTarget_set_include,$(1),\
2005 $$(INCLUDE) \
2006 $(WPD_CFLAGS) \
2008 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2010 endef
2011 gb_ExternalProject__use_wpd :=
2013 else # !SYSTEM_WPD
2015 ifeq ($(COM),MSC)
2017 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2018 wpd \
2021 define gb_LinkTarget__use_wpd
2022 $(call gb_LinkTarget_set_include,$(1),\
2023 $(WPD_CFLAGS) \
2024 $$(INCLUDE) \
2026 $(call gb_LinkTarget_use_libraries,$(1),\
2027 wpd \
2030 endef
2032 define gb_ExternalProject__use_wpd
2033 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2035 endef
2037 else # !MSC
2039 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2040 libwpd \
2043 define gb_LinkTarget__use_wpd
2044 $(call gb_LinkTarget_use_package,$(1),libwpd)
2046 $(call gb_LinkTarget_set_include,$(1),\
2047 $(WPD_CFLAGS) \
2048 $$(INCLUDE) \
2050 $(call gb_LinkTarget_add_libs,$(1),\
2051 $(WPD_LIBS) \
2054 endef
2056 define gb_ExternalProject__use_wpd
2057 $(call gb_ExternalProject_use_package,$(1),libwpd)
2059 endef
2061 endif # MSC
2063 endif # SYSTEM_WPD
2066 ifneq ($(SYSTEM_WPG),)
2068 define gb_LinkTarget__use_wpg
2069 $(call gb_LinkTarget_set_include,$(1),\
2070 $$(INCLUDE) \
2071 $(WPG_CFLAGS) \
2073 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2075 endef
2076 gb_ExternalProject__use_wpg :=
2078 else # !SYSTEM_WPG
2080 ifeq ($(COM),MSC)
2082 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2083 wpg \
2086 define gb_LinkTarget__use_wpg
2087 $(call gb_LinkTarget_set_include,$(1),\
2088 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2089 $$(INCLUDE) \
2091 $(call gb_LinkTarget_use_libraries,$(1),\
2092 wpg \
2095 endef
2097 else # !MSC
2099 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2100 libwpg \
2103 define gb_LinkTarget__use_wpg
2104 $(call gb_LinkTarget_use_package,$(1),libwpg)
2106 $(call gb_LinkTarget_set_include,$(1),\
2107 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2108 $$(INCLUDE) \
2110 $(call gb_LinkTarget_add_libs,$(1),\
2111 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2114 endef
2116 endif # MSC
2118 endif # SYSTEM_WPG
2121 ifneq ($(SYSTEM_WPS),)
2123 define gb_LinkTarget__use_wps
2124 $(call gb_LinkTarget_set_include,$(1),\
2125 $$(INCLUDE) \
2126 $(WPS_CFLAGS) \
2128 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2130 endef
2131 gb_ExternalProject__use_wps :=
2133 else # !SYSTEM_WPS
2135 ifeq ($(COM),MSC)
2137 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2138 wps \
2141 define gb_LinkTarget__use_wps
2142 $(call gb_LinkTarget_set_include,$(1),\
2143 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2144 $$(INCLUDE) \
2147 $(call gb_LinkTarget_use_libraries,$(1),\
2148 wps \
2151 endef
2153 else # !MSC
2155 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2156 libwps \
2159 define gb_LinkTarget__use_wps
2160 $(call gb_LinkTarget_use_package,$(1),libwps)
2162 $(call gb_LinkTarget_set_include,$(1),\
2163 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2164 $$(INCLUDE) \
2166 $(call gb_LinkTarget_add_libs,$(1),\
2167 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
2170 endef
2172 endif # MSC
2174 endif # SYSTEM_WPS
2177 ifneq ($(SYSTEM_MWAW),)
2179 define gb_LinkTarget__use_mwaw
2180 $(call gb_LinkTarget_set_include,$(1),\
2181 $$(INCLUDE) \
2182 $(MWAW_CFLAGS) \
2184 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2186 endef
2188 else # !SYSTEM_MWAW
2190 ifeq ($(COM),MSC)
2192 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2193 mwaw \
2196 define gb_LinkTarget__use_mwaw
2197 $(call gb_LinkTarget_set_include,$(1),\
2198 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2199 $$(INCLUDE) \
2202 $(call gb_LinkTarget_use_libraries,$(1),\
2203 mwaw \
2206 endef
2208 else # !MSC
2210 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2211 libmwaw \
2214 define gb_LinkTarget__use_mwaw
2215 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2217 $(call gb_LinkTarget_set_include,$(1),\
2218 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2219 $$(INCLUDE) \
2221 $(call gb_LinkTarget_add_libs,$(1),\
2222 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2225 endef
2227 endif # MSC
2229 endif # SYSTEM_MWAW
2232 ifneq ($(SYSTEM_LCMS2),)
2234 define gb_LinkTarget__use_lcms2
2235 $(call gb_LinkTarget_set_include,$(1),\
2236 $$(INCLUDE) \
2237 $(LCMS2_CFLAGS) \
2239 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2241 endef
2243 gb_ExternalProject__use_lcms2 :=
2245 else # !SYSTEM_LCMS2
2247 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2248 lcms2 \
2251 define gb_ExternalProject__use_lcms2
2252 $(call gb_ExternalProject_use_package,$(1),lcms2)
2254 endef
2256 ifeq ($(OS),ANDROID)
2258 define gb_LinkTarget__use_lcms2
2259 $(call gb_LinkTarget_use_package,$(1),lcms2)
2260 $(call gb_LinkTarget_set_include,$(1),\
2261 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2262 $$(INCLUDE) \
2265 endef
2267 else
2269 define gb_LinkTarget__use_lcms2
2270 $(call gb_LinkTarget_use_package,$(1),lcms2)
2271 $(call gb_LinkTarget_set_include,$(1),\
2272 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2273 $$(INCLUDE) \
2275 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2277 endef
2279 endif # ANDROID
2280 endif # SYSTEM_LCMS2
2282 ifneq ($(ENABLE_LPSOLVE),)
2284 ifneq ($(SYSTEM_LPSOLVE),)
2286 define gb_LinkTarget__use_lpsolve
2287 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2288 $(call gb_LinkTarget_add_defs,$(1),\
2289 -DSYSTEM_LPSOLVE \
2292 endef
2294 else # !SYSTEM_LPSOLVE
2296 define gb_LinkTarget__use_lpsolve
2297 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2298 ifeq ($(COM),MSC)
2299 $(call gb_LinkTarget_add_libs,$(1),\
2300 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2302 else
2303 $(call gb_LinkTarget_add_libs,$(1),\
2304 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2306 endif
2307 $(call gb_LinkTarget_set_include,$(1),\
2308 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2309 $$(INCLUDE) \
2312 endef
2314 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2315 lpsolve \
2318 endif # SYSTEM_LPSOLVE
2320 else
2322 gb_LinkTarget__use_lpsolve :=
2324 endif # ENABLE_LPSOLVE
2326 ifneq ($(ENABLE_COINMP),)
2328 ifneq ($(SYSTEM_COINMP),TRUE)
2330 define gb_LinkTarget__use_coinmp
2331 $(call gb_LinkTarget_use_package,$(1),coinmp)
2332 ifeq ($(COM),MSC)
2333 $(call gb_LinkTarget_add_libs,$(1),\
2334 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2336 else
2337 $(call gb_LinkTarget_add_libs,$(1),\
2338 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2339 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2340 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2341 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2342 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2343 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2344 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2346 endif
2347 $(call gb_LinkTarget_set_include,$(1),\
2348 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2349 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2350 $$(INCLUDE) \
2353 endef
2355 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2356 coinmp \
2359 else # SYSTEM_COINMP
2361 define gb_LinkTarget__use_coinmp
2362 $(call gb_LinkTarget_set_include,$(1),\
2363 $$(INCLUDE) \
2364 $(COINMP_CFLAGS) \
2366 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2368 endef
2370 endif
2372 else
2374 gb_LinkTarget__use_coinmp :=
2376 endif # ENABLE_COINMP
2378 ifeq ($(ENABLE_GIO),TRUE)
2380 define gb_LinkTarget__use_gio
2381 $(call gb_LinkTarget_set_include,$(1),\
2382 $$(INCLUDE) \
2383 $(GIO_CFLAGS) \
2386 $(call gb_LinkTarget_add_defs,$(1),\
2387 -DENABLE_GIO \
2390 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2392 endef
2394 else # ENABLE_GIO
2396 define gb_LinkTarget__use_gio
2398 endef
2400 endif # ENABLE_GIO
2402 ifeq ($(ENABLE_AVAHI),TRUE)
2404 define gb_LinkTarget__use_avahi
2405 $(call gb_LinkTarget_set_include,$(1),\
2406 $$(INCLUDE) \
2407 $(AVAHI_CFLAGS) \
2410 $(call gb_LinkTarget_add_defs,$(1),\
2411 -DENABLE_AVAHI \
2414 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2416 endef
2418 else # ENABLE_AVAHI
2420 gb_LinkTarget__use_avahi :=
2422 endif # ENABLE_AVAHI
2425 define gb_LinkTarget__use_gtk
2426 $(call gb_LinkTarget_set_include,$(1),\
2427 $$(INCLUDE) \
2428 $(GTK_CFLAGS) \
2431 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2433 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2435 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2437 $(call gb_LinkTarget_set_include,$(1),\
2438 $$(INCLUDE) \
2439 $(GTK_PRINT_CFLAGS) \
2442 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2444 endif
2446 endef
2448 define gb_LinkTarget__use_gthread
2449 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2450 endef
2452 ifeq ($(ENABLE_CUPS),TRUE)
2454 define gb_LinkTarget__use_cups
2455 $(call gb_LinkTarget_add_defs,$(1),\
2456 -DENABLE_CUPS \
2459 $(call gb_LinkTarget_add_libs,$(1),\
2460 -lcups \
2463 endef
2465 else # ENABLE_CUPS
2467 define gb_LinkTarget__use_cups
2469 endef
2471 endif # ENABLE_DBUS
2473 ifeq ($(ENABLE_DBUS),TRUE)
2475 define gb_LinkTarget__use_dbus
2476 $(call gb_LinkTarget_set_include,$(1),\
2477 $$(INCLUDE) \
2478 $(DBUS_CFLAGS) \
2481 $(call gb_LinkTarget_add_defs,$(1),\
2482 -DENABLE_DBUS \
2485 ifeq ($(ENABLE_PACKAGEKIT),TRUE)
2486 $(call gb_LinkTarget_add_defs,$(1),\
2487 -DENABLE_PACKAGEKIT \
2489 endif # ENABLE_PACKAGEKIT
2491 $(call gb_LinkTarget_add_libs,$(1),\
2492 $(DBUS_LIBS) \
2495 endef
2497 else # ENABLE_DBUS
2499 define gb_LinkTarget__use_dbus
2501 endef
2503 endif # ENABLE_DBUS
2506 define gb_LinkTarget__use_dbusmenugtk
2507 $(call gb_LinkTarget_set_include,$(1),\
2508 $$(INCLUDE) \
2509 $(DBUSMENUGTK_CFLAGS) \
2512 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2514 endef
2517 ifeq ($(ENABLE_TELEPATHY),TRUE)
2519 define gb_LinkTarget__use_telepathy
2520 $(call gb_LinkTarget_set_include,$(1),\
2521 $$(INCLUDE) \
2522 $(TELEPATHY_CFLAGS) \
2525 $(call gb_LinkTarget_add_libs,$(1),\
2526 $(TELEPATHY_LIBS) \
2529 endef
2531 else # !ENABLE_TELEPATHY
2533 gb_LinkTarget__use_telepathy :=
2535 endif # ENABLE_TELEPATHY
2537 ifneq ($(SYSTEM_LIBPNG),)
2539 define gb_LinkTarget__use_png
2540 $(call gb_LinkTarget_set_include,$(1),\
2541 $$(INCLUDE) \
2542 $(LIBPNG_CFLAGS) \
2545 $(call gb_LinkTarget_add_libs,$(1),\
2546 $(LIBPNG_LIBS) \
2549 endef
2551 else # !SYSTEM_LIBPNG
2553 define gb_LinkTarget__use_png
2554 $(call gb_LinkTarget_set_include,$(1),\
2555 $(LIBPNG_CFLAGS) \
2556 $$(INCLUDE) \
2558 $(call gb_LinkTarget_use_static_libraries,$(1),\
2559 png \
2561 $(call gb_LinkTarget__use_zlib,$(1))
2563 endef
2565 endif # !SYSTEM_LIBPNG
2568 ifneq ($(SYSTEM_CURL),)
2570 define gb_LinkTarget__use_curl
2571 $(call gb_LinkTarget_add_defs,$(1),\
2572 -DSYSTEM_CURL \
2574 $(call gb_LinkTarget_set_include,$(1),\
2575 $$(INCLUDE) \
2576 $(CURL_CFLAGS) \
2578 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2580 endef
2582 else # !SYSTEM_CURL
2584 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2585 curl \
2588 define gb_LinkTarget__use_curl
2589 $(call gb_LinkTarget_use_package,$(1),curl)
2590 $(call gb_LinkTarget_set_include,$(1),\
2591 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2592 $$(INCLUDE) \
2595 ifeq ($(COM),MSC)
2596 $(call gb_LinkTarget_add_libs,$(1),\
2597 $(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 \
2599 else
2600 $(call gb_LinkTarget_add_libs,$(1),\
2601 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2603 endif
2605 endef
2607 endif # SYSTEM_CURL
2609 ifeq ($(ENABLE_VALGRIND),TRUE)
2611 define gb_LinkTarget__use_valgrind
2612 $(call gb_LinkTarget_add_defs,$(1),\
2613 -DHAVE_VALGRIND_HEADERS \
2616 $(call gb_LinkTarget_set_include,$(1),\
2617 $$(INCLUDE) \
2618 $(VALGRIND_CFLAGS) \
2621 endef
2623 else # !ENABLE_VALGRIND
2625 define gb_LinkTarget__use_valgrind
2627 endef
2629 endif # ENABLE_VALGRIND
2631 ifneq ($(SYSTEM_POPPLER),)
2633 define gb_LinkTarget__use_poppler
2634 $(call gb_LinkTarget_set_include,$(1),\
2635 $(POPPLER_CFLAGS) \
2636 $$(INCLUDE) \
2639 $(call gb_LinkTarget_add_libs,$(1),\
2640 $(POPPLER_LIBS) \
2643 endef
2645 else # !SYSTEM_POPPLER
2647 define gb_LinkTarget__use_poppler
2648 $(call gb_LinkTarget_use_external_project,$(1),poppler)
2650 $(call gb_LinkTarget_set_include,$(1),\
2651 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2652 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2653 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2654 $$(INCLUDE) \
2657 $(call gb_LinkTarget_add_libs,$(1),\
2658 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2659 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2660 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2663 ifeq ($(OS),MACOSX)
2664 $(call gb_LinkTarget_add_libs,$(1),\
2665 -lobjc \
2667 else ifeq ($(OS),LINUX)
2668 $(call gb_LinkTarget_add_libs,$(1),\
2669 -pthread \
2671 else ifeq ($(OS),WNT)
2672 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2673 advapi32 \
2674 gdi32 \
2676 endif
2678 endef
2680 endif # SYSTEM_POPPLER
2683 ifneq ($(SYSTEM_CLUCENE),)
2685 define gb_LinkTarget__use_clucene
2686 $(call gb_LinkTarget_add_defs,$(1),\
2687 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2690 $(call gb_LinkTarget_set_include,$(1),\
2691 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2692 $$(INCLUDE) \
2695 $(call gb_LinkTarget_add_libs,$(1),\
2696 $(CLUCENE_LIBS) \
2699 endef
2701 else # !SYSTEM_CLUCENE
2703 define gb_LinkTarget__use_clucene
2704 $(call gb_LinkTarget_set_include,$(1),\
2705 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2706 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2707 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2708 $$(INCLUDE) \
2711 $(call gb_LinkTarget_use_libraries,$(1),\
2712 clucene \
2715 endef
2717 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2718 clucene \
2721 endif # SYSTEM_CLUCENE
2723 define gb_LinkTarget__use_gobject
2724 $(call gb_LinkTarget_add_libs,$(1),\
2725 $(GOBJECT_LIBS) \
2728 $(call gb_LinkTarget_set_include,$(1),\
2729 $$(INCLUDE) \
2730 $(GOBJECT_CFLAGS) \
2732 endef
2734 ifneq ($(SYSTEM_HSQLDB),)
2736 define gb_LinkTarget__use_hsqldb
2738 $(call gb_LinkTarget_add_defs,$(1),\
2739 -DSYSTEM_HSQLDB \
2740 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2743 endef
2745 else # !SYSTEM_HSQLDB
2747 define gb_LinkTarget__use_hsqldb
2749 endef
2751 endif # SYSTEM_HSQLDB
2754 ifneq ($(SYSTEM_OPENLDAP),)
2756 define gb_LinkTarget__use_openldap
2758 $(call gb_LinkTarget_add_libs,$(1),\
2759 -lldap \
2760 -llber \
2763 endef
2765 gb_ExternalProject__use_openldap :=
2767 else # !SYSTEM_OPENLDAP
2769 define gb_LinkTarget__use_openldap
2770 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2771 $(call gb_LinkTarget_set_include,$(1),\
2772 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2773 $$(INCLUDE) \
2775 $(call gb_LinkTarget_use_external_project,$(1),openldap)
2776 $(call gb_LinkTarget_add_libs,$(1), \
2777 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2778 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2781 endef
2783 define gb_ExternalProject__use_openldap
2784 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2786 endef
2788 endif # SYSTEM_OPENLDAP
2791 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2793 ifneq ($(SYSTEM_FIREBIRD),)
2795 define gb_LinkTarget__use_libfbembed
2796 $(call gb_LinkTarget_set_include,$(1),\
2797 $(FIREBIRD_CFLAGS) \
2798 $$(INCLUDE) \
2800 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2802 endef
2804 # gb_LinkTarget__use_atomic_ops :=
2805 # gb_LinkTarget__use_tommath :=
2807 else # !SYSTEM_FIREBIRD
2809 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2811 define gb_LinkTarget__use_libfbembed
2812 $(call gb_LinkTarget_use_package,$(1),firebird)
2813 $(call gb_LinkTarget_set_include,$(1),\
2814 $$(INCLUDE) \
2815 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
2817 ifeq ($(COM),MSC)
2818 $(call gb_LinkTarget_add_libs,$(1),\
2819 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
2821 else
2822 $(call gb_LinkTarget_add_libs,$(1),\
2823 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2825 endif
2827 endef
2829 # define gb_LinkTarget__use_tommath
2830 # $(call gb_LinkTarget_set_include,$(1),\
2831 # $(TOMMATH_CFLAGS) \
2832 # $$(INCLUDE) \
2835 # $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2837 # endef
2839 endif # SYSTEM_FIREBIRD
2841 else # !ENABLE_FIREBIRD_SDBC
2843 gb_LinkTarget__use_firebird :=
2844 # gb_LinkTarget__use_atomic_ops :=
2845 # gb_LinkTarget__use_tommath :=
2847 endif # ENABLE_FIREBIRD_SDBC
2850 ifneq ($(SYSTEM_POSTGRESQL),)
2852 define gb_LinkTarget__use_postgresql
2854 $(call gb_LinkTarget_set_include,$(1),\
2855 $(POSTGRESQL_INC) \
2856 $$(INCLUDE) \
2859 $(call gb_LinkTarget_add_libs,$(1),\
2860 -lpq \
2863 $(call gb_LinkTarget_add_ldflags,$(1),\
2864 $(POSTGRESQL_LIB) \
2867 endef
2869 else # !SYSTEM_POSTGRESQL
2871 define gb_LinkTarget__use_postgresql
2873 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2875 $(call gb_LinkTarget_set_include,$(1),\
2876 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2877 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2878 $$(INCLUDE) \
2881 $(call gb_LinkTarget_add_libs,$(1),\
2882 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2885 ifeq ($(OS)$(COM),WNTMSC)
2886 $(call gb_LinkTarget_use_external,$(1),openssl)
2888 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2889 secur32 \
2890 ws2_32 \
2893 endif
2895 endef
2897 endif # SYSTEM_POSTGRESQL
2899 ifneq ($(WITH_MOZAB4WIN),)
2901 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2902 moz_runtime \
2905 define gb_LinkTarget__use_mozilla
2907 $(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2908 $(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2910 $(call gb_LinkTarget_add_defs,$(1),\
2911 -DMOZILLA_INTERNAL_API \
2914 $(call gb_LinkTarget_set_include,$(1),\
2915 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2916 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2917 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2918 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2919 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2920 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2921 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2922 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2923 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2924 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2925 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2926 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2927 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2928 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2929 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2930 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
2931 $$(INCLUDE) \
2934 $(call gb_LinkTarget_add_libs,$(1),\
2935 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
2936 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2937 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
2940 $(call gb_LinkTarget_add_defs,$(1),\
2941 -DMOZILLA_CLIENT \
2942 -DMOZ_REFLOW_PERF \
2943 -DMOZ_REFLOW_PERF_DSP \
2944 -DMOZ_XUL \
2945 -DOJI \
2946 -DWIN32 \
2947 -DXP_PC \
2948 -DXP_WIN \
2949 -DXP_WIN32 \
2950 -D_WINDOWS \
2953 ifeq ($(COM),GCC)
2955 $(call gb_LinkTarget_add_cxxflags,$(1),\
2956 -Wall \
2957 -Wcast-align \
2958 -Wconversion \
2959 -Wno-long-long \
2960 -Woverloaded-virtual \
2961 -Wpointer-arith \
2962 -Wsynth \
2963 -fno-rtti \
2966 else
2968 ifneq ($(DBG_LEVEL),0)
2969 $(call gb_LinkTarget_add_defs,$(1),\
2970 -D_STL_NOFORCE_MANIFEST \
2972 endif
2974 $(call gb_LinkTarget_add_libs,$(1),\
2975 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2976 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
2979 endif # !GCC
2981 endef
2983 endif # WITH_MOZAB4WIN
2985 ifeq ($(ENABLE_KDE),TRUE)
2987 define gb_LinkTarget__use_kde
2988 $(call gb_LinkTarget_set_include,$(1),\
2989 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS)))) \
2990 $$(INCLUDE) \
2993 $(call gb_LinkTarget_add_defs,$(1),\
2994 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS))) \
2997 $(call gb_LinkTarget_add_libs,$(1),\
2998 $(KDE_LIBS) \
3001 ifeq ($(COM),GCC)
3002 $(call gb_LinkTarget_add_cxxflags,$(1),\
3003 -Wno-shadow \
3005 endif
3007 endef
3009 else # !ENABLE_KDE
3011 define gb_LinkTarget__use_kde
3013 endef
3015 endif # ENABLE_KDE
3018 ifeq ($(ENABLE_KDE4),TRUE)
3020 define gb_LinkTarget__use_kde4
3021 $(call gb_LinkTarget_set_include,$(1),\
3022 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3023 $$(INCLUDE) \
3026 $(call gb_LinkTarget_add_defs,$(1),\
3027 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3030 $(call gb_LinkTarget_add_libs,$(1),\
3031 $(KDE4_LIBS) \
3034 ifeq ($(COM),GCC)
3035 $(call gb_LinkTarget_add_cxxflags,$(1),\
3036 -Wno-shadow \
3038 endif
3040 endef
3042 else # !ENABLE_KDE4
3044 define gb_LinkTarget__use_kde4
3046 endef
3048 endif # ENABLE_KDE4
3051 ifeq ($(ENABLE_TDE),TRUE)
3053 define gb_LinkTarget__use_tde
3054 $(call gb_LinkTarget_add_libs,$(1),\
3055 $(TDE_LIBS) \
3058 $(call gb_LinkTarget_set_include,$(1),\
3059 $$(INCLUDE) \
3060 $(TDE_CFLAGS) \
3062 endef
3064 else # ! ENABLE_TDE
3066 define gb_LinkTarget__use_tde
3068 endef
3070 endif # ENABLE_TDE
3073 ifeq ($(ENABLE_GCONF),TRUE)
3075 define gb_LinkTarget__use_gconf
3076 $(call gb_LinkTarget_set_include,$(1),\
3077 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS)))) \
3078 $$(INCLUDE) \
3081 $(call gb_LinkTarget_add_defs,$(1),\
3082 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS))) \
3085 $(call gb_LinkTarget_add_libs,$(1),\
3086 $(GCONF_LIBS) \
3089 endef
3091 else # !ENABLE_GCONF
3093 define gb_LinkTarget__use_gconf
3095 endef
3097 endif # ENABLE_GCONF
3100 # PYTHON
3101 # extra python_headers external because pyuno wrapper must not link python
3102 ifneq ($(SYSTEM_PYTHON),)
3104 define gb_LinkTarget__use_python_headers
3105 $(call gb_LinkTarget_add_defs,$(1),\
3106 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3109 $(call gb_LinkTarget_set_include,$(1),\
3110 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3111 $$(INCLUDE) \
3114 endef
3116 define gb_LinkTarget__use_python
3117 $(call gb_LinkTarget__use_python_headers,$(1))
3119 $(call gb_LinkTarget_add_libs,$(1),\
3120 $(PYTHON_LIBS) \
3123 endef
3125 else # !SYSTEM_PYTHON
3127 $(eval $(call gb_Helper_register_packages_for_install,python,\
3128 python3 \
3131 # depend on external project because on MACOSX the Package is disabled...
3132 define gb_LinkTarget__use_python_headers
3133 $(call gb_LinkTarget_use_external_project,$(1),python3)
3134 $(call gb_LinkTarget_set_include,$(1),\
3135 -I$(call gb_UnpackedTarball_get_dir,python3) \
3136 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3137 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3138 $$(INCLUDE) \
3141 endef
3143 define gb_LinkTarget__use_python
3144 $(call gb_LinkTarget__use_python_headers,$(1))
3146 ifeq ($(OS),WNT)
3147 $(call gb_LinkTarget_add_libs,$(1),\
3148 $(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 \
3150 else ifeq ($(OS),MACOSX)
3151 $(call gb_LinkTarget_add_libs,$(1),\
3152 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3154 else
3155 $(call gb_LinkTarget_add_libs,$(1),\
3156 -L$(call gb_UnpackedTarball_get_dir,python3) \
3157 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3159 endif
3161 endef
3163 endif # SYSTEM_PYTHON
3165 # ORCUS
3166 ifeq ($(ENABLE_ORCUS),TRUE)
3168 ifneq ($(SYSTEM_LIBORCUS),)
3170 define gb_LinkTarget__use_orcus
3171 $(call gb_LinkTarget_set_include,$(1),\
3172 $$(INCLUDE) \
3173 $(ORCUS_CFLAGS) \
3175 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3176 endef
3178 define gb_LinkTarget__use_orcus-parser
3180 endef
3182 else # !SYSTEM_LIBORCUS
3184 define gb_LinkTarget__use_orcus
3185 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3186 $(call gb_LinkTarget_set_include,$(1),\
3187 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3188 $$(INCLUDE) \
3190 $(call gb_LinkTarget_add_libs,$(1),\
3191 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
3194 $(if $(SYSTEM_BOOST), \
3195 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3196 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3199 endef
3201 define gb_LinkTarget__use_orcus-parser
3202 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3203 $(call gb_LinkTarget_set_include,$(1),\
3204 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3205 $$(INCLUDE) \
3207 $(call gb_LinkTarget_add_libs,$(1),\
3208 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
3211 endef
3213 endif # SYSTEM_LIBORCUS
3215 else # ENABLE_ORCUS != TRUE
3217 gb_LinkTarget__use_orcus :=
3218 gb_LinkTarget__use_orcus-parser :=
3220 endif
3222 ifeq ($(ENABLE_EOT),TRUE)
3224 ifneq ($(SYSTEM_LIBEOT),)
3226 define gb_LinkTarget__use_libeot
3227 $(call gb_LinkTarget_set_include,$(1),\
3228 $$(INCLUDE) \
3229 $(LIBEOT_CFLAGS) \
3231 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3233 endef
3235 gb_ExternalProject__use_libeot :=
3237 else # !SYSTEM_LIBEOT
3239 define gb_LinkTarget__use_libeot
3240 $(call gb_LinkTarget_set_include,$(1),\
3241 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3242 $$(INCLUDE) \
3244 $(call gb_LinkTarget_add_libs,$(1),\
3245 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3247 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3249 endef
3251 define gb_ExternalProject__use_libeot
3252 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3254 endef
3256 endif # SYSTEM_LIBEOT
3258 else # !ENABLE_EOT
3260 gb_LinkTarget__use_libeot :=
3261 gb_ExternalProject__use_libeot :=
3263 endif # ENABLE_EOT
3265 ### X11 stuff ###
3267 ifeq ($(GUIBASE),unx)
3269 ifeq ($(XRANDR_DLOPEN),FALSE)
3271 define gb_LinkTarget__use_Xrandr
3272 $(call gb_LinkTarget_set_include,$(1),\
3273 $$(INCLUDE) \
3274 $(XRANDR_CFLAGS) \
3277 $(call gb_LinkTarget_add_libs,$(1),\
3278 $(XRANDR_LIBS) \
3280 endef
3282 else # XRANDR_DLOPEN
3284 define gb_LinkTarget__use_Xrandr
3285 $(call gb_LinkTarget_add_defs,$(1),\
3286 -DXRANDR_DLOPEN \
3288 endef
3290 endif # XRANDR_DLOPEN
3292 define gb_LinkTarget__use_Xrender
3293 $(call gb_LinkTarget_set_include,$(1),\
3294 $$(INCLUDE) \
3295 $(XRENDER_CFLAGS) \
3298 $(call gb_LinkTarget_add_libs,$(1),\
3299 $(XRENDER_LIBS) \
3301 endef
3303 endif # GUIBASE=unx
3306 gb_ExternalProject__use_nss3:=
3308 ifeq ($(OS),ANDROID)
3310 gb_LinkTarget__use_nss3:=
3311 gb_LinkTarget__use_plc4:=
3313 else
3315 ifneq ($(SYSTEM_NSS),)
3317 define gb_LinkTarget__use_nss3
3318 $(call gb_LinkTarget_add_defs,$(1),\
3319 -DSYSTEM_NSS \
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 $$(INCLUDE) \
3324 $(NSS_CFLAGS) \
3327 $(call gb_LinkTarget_add_libs,$(1),\
3328 $(NSS_LIBS) \
3331 endef
3333 define gb_LinkTarget__use_plc4
3334 $(call gb_LinkTarget__use_nss3,$(1))
3336 endef
3338 define gb_LinkTarget__use_ssl3
3339 $(call gb_LinkTarget__use_nss3,$(1))
3341 endef
3343 else # !SYSTEM_NSS
3345 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3346 nss \
3349 define gb_LinkTarget__use_nss3
3350 $(call gb_LinkTarget_use_package,$(1),nss)
3351 $(call gb_LinkTarget_set_include,$(1),\
3352 $$(INCLUDE) \
3353 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3354 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3357 ifeq ($(COM),MSC)
3358 $(call gb_LinkTarget_add_libs,$(1),\
3359 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3360 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3361 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3363 else
3364 $(call gb_LinkTarget_add_libs,$(1),\
3365 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3366 -lnspr4 \
3367 -lnss3 \
3368 -lsmime3 \
3370 endif
3372 endef
3374 define gb_LinkTarget__use_plc4
3375 $(call gb_LinkTarget_use_package,$(1),nss)
3376 ifeq ($(COM),MSC)
3377 $(call gb_LinkTarget_add_libs,$(1),\
3378 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3380 else
3381 $(call gb_LinkTarget_add_libs,$(1),\
3382 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3384 endif
3386 endef
3388 define gb_LinkTarget__use_ssl3
3389 $(call gb_LinkTarget_use_package,$(1),nss)
3390 ifeq ($(COM),MSC)
3391 $(call gb_LinkTarget_add_libs,$(1),\
3392 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3394 else
3395 $(call gb_LinkTarget_add_libs,$(1),\
3396 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3398 endif
3400 endef
3402 define gb_ExternalProject__use_nss3
3403 $(call gb_ExternalProject_use_package,$(1),nss)
3405 endef
3407 endif # SYSTEM_NSS
3409 endif # DESKTOP
3411 ifeq ($(ENABLE_GLTF),TRUE)
3413 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3415 define gb_LinkTarget__use_libgltf
3416 $(call gb_LinkTarget_set_include,$(1),\
3417 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3418 $$(INCLUDE) \
3421 ifeq ($(COM),MSC)
3422 $(call gb_LinkTarget_add_libs,$(1),\
3423 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3425 else
3426 $(call gb_LinkTarget_add_libs,$(1),\
3427 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3429 endif
3431 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3433 endef
3435 else # SYSTEM_LIBGLTF
3437 define gb_LinkTarget__use_libgltf
3438 $(call gb_LinkTarget_set_include,$(1),\
3439 $$(INCLUDE) \
3440 $(LIBGLTF_CFLAGS) \
3442 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3444 endef
3446 endif # SYSTEN_LIBGLTF
3448 ifeq ($(ENABLE_COLLADA),TRUE)
3450 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3452 define gb_LinkTarget__use_opencollada_parser
3453 $(call gb_LinkTarget_set_include,$(1),\
3454 $$(INCLUDE) \
3455 $(OPENCOLLADA_CFLAGS) \
3458 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3460 endef
3462 else # !SYSTEM_OPENCOLLADA
3464 define gb_LinkTarget__use_opencollada_parser
3465 $(call gb_LinkTarget_set_include,$(1),\
3466 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3467 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3468 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3469 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3470 $$(INCLUDE) \
3473 $(call gb_LinkTarget_use_static_libraries,$(1),\
3474 opencollada_parser \
3476 endef
3478 endif # SYSTEM_OPENCOLLADA
3480 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3482 define gb_LinkTarget__use_collada2gltf
3483 $(call gb_LinkTarget_set_include,$(1),\
3484 $$(INCLUDE) \
3485 $(COLLADA2GLTF_CFLAGS) \
3488 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3490 endef
3492 else # !SYSTEM_COLLADA2GLTF
3494 define gb_LinkTarget__use_collada2gltf
3495 $(call gb_LinkTarget_set_include,$(1),\
3496 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3497 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3498 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3499 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3500 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3501 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3502 $$(INCLUDE) \
3505 $(call gb_LinkTarget_use_static_libraries,$(1),\
3506 collada2gltf \
3508 endef
3510 endif # SYSTEM_COLLADA2GLTF
3512 endif # ENABLE_COLLADA
3514 endif # ENABLE_GLTF
3516 ### Jars ############################################################
3518 ifneq ($(SYSTEM_HSQLDB),)
3520 define gb_Jar__use_hsqldb
3521 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3522 endef
3523 define gb_JunitTest__use_hsqldb
3524 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3525 endef
3527 else # !SYSTEM_HSQLDB
3529 ifeq ($(ENABLE_JAVA),TRUE)
3530 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3531 hsqldb \
3533 endif
3535 define gb_Jar__use_hsqldb
3536 $(call gb_Jar_use_jar,$(1),hsqldb)
3537 endef
3538 define gb_JunitTest__use_hsqldb
3539 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3540 endef
3542 endif # SYSTEM_HSQLDB
3545 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3547 ifneq ($(SYSTEM_BSH),)
3549 define gb_Jar__use_bsh
3550 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3551 endef
3553 else # !SYSTEM_BSH
3555 ifeq ($(ENABLE_JAVA),TRUE)
3556 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3557 bsh \
3559 endif
3561 define gb_Jar__use_bsh
3562 $(call gb_Jar_use_jar,$(1),bsh)
3563 endef
3565 endif # SYSTEM_BSH
3567 endif
3569 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3571 ifneq ($(SYSTEM_RHINO),)
3573 define gb_Jar__use_rhino
3574 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3575 endef
3577 else # !SYSTEM_RHINO
3579 ifeq ($(ENABLE_JAVA),TRUE)
3580 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3581 js \
3583 endif
3585 define gb_Jar__use_rhino
3586 $(call gb_Jar_use_jar,$(1),js)
3587 endef
3589 endif # SYSTEM_RHINO
3591 endif
3593 ifneq ($(SYSTEM_APACHE_COMMONS),)
3595 define gb_Jar__use_commons-codec
3596 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
3597 endef
3598 gb_ExternalProject__use_commons-codec :=
3600 define gb_Jar__use_commons-httpclient
3601 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
3602 endef
3603 gb_ExternalProject__use_commons-httpclient :=
3605 define gb_Jar__use_commons-lang
3606 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
3607 endef
3608 gb_ExternalProject__use_commons-lang :=
3610 define gb_Jar__use_commons-logging
3611 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3612 endef
3613 gb_ExternalProject__use_commons-logging :=
3615 else # !SYSTEM_APACHE_COMMONS
3617 ifeq ($(ENABLE_JAVA),TRUE)
3618 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3619 commons-logging-$(COMMONS_LOGGING_VERSION) \
3621 endif
3622 $(eval $(call gb_Helper_register_jars,OXT,\
3623 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
3624 commons-httpclient-3.1 \
3625 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
3628 define gb_Jar__use_commons-codec
3629 $(call gb_Jar_use_external_project,$(1),apache_commons_codec)
3630 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3631 $(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3632 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3634 endef
3635 define gb_ExternalProject__use_commons-codec
3636 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3637 endef
3639 define gb_Jar__use_commons-httpclient
3640 $(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3641 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
3642 endef
3643 define gb_ExternalProject__use_commons-httpclient
3644 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3645 endef
3647 define gb_Jar__use_commons-lang
3648 $(call gb_Jar_use_external_project,$(1),apache_commons_lang)
3649 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3650 $(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3651 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3653 endef
3654 define gb_ExternalProject__use_commons-lang
3655 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3656 endef
3658 define gb_Jar__use_commons-logging
3659 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3660 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3661 endef
3662 define gb_ExternalProject__use_commons-logging
3663 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3664 endef
3666 endif # SYSTEM_APACHE_COMMONS
3669 ifneq ($(SYSTEM_JFREEREPORT),)
3671 define gb_Jar__use_flow-engine
3672 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3673 endef
3675 define gb_Jar__use_flute
3676 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3677 endef
3679 define gb_Jar__use_libbase
3680 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3681 endef
3683 define gb_Jar__use_libfonts
3684 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3685 endef
3687 define gb_Jar__use_libformula
3688 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3689 endef
3691 define gb_Jar__use_liblayout
3692 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3693 endef
3695 define gb_Jar__use_libloader
3696 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3697 endef
3699 define gb_Jar__use_librepository
3700 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3701 endef
3703 define gb_Jar__use_libserializer
3704 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3705 endef
3707 define gb_Jar__use_libxml
3708 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3709 endef
3711 define gb_Jar__use_sac
3712 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3713 endef
3715 else # !SYSTEM_JFREEREPORT
3717 ifeq ($(ENABLE_JAVA),TRUE)
3718 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3719 flow-engine \
3720 flute-1.1.6 \
3721 libbase-1.1.6 \
3722 libfonts-1.1.6 \
3723 libformula-1.1.7 \
3724 liblayout \
3725 libloader-1.1.6 \
3726 librepository-1.1.6 \
3727 libserializer-1.1.6 \
3728 libxml-1.1.7 \
3729 sac \
3731 endif
3733 define gb_Jar__use_flow-engine
3734 $(call gb_Jar_use_jar,$(1),flow-engine)
3735 endef
3737 define gb_Jar__use_flute
3738 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3739 endef
3741 define gb_Jar__use_libbase
3742 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3743 endef
3745 define gb_Jar__use_libfonts
3746 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3747 endef
3749 define gb_Jar__use_libformula
3750 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3751 endef
3753 define gb_Jar__use_liblayout
3754 $(call gb_Jar_use_jar,$(1),liblayout)
3755 endef
3757 define gb_Jar__use_libloader
3758 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3759 endef
3761 define gb_Jar__use_librepository
3762 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3763 endef
3765 define gb_Jar__use_libserializer
3766 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3767 endef
3769 define gb_Jar__use_libxml
3770 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3771 endef
3773 define gb_Jar__use_sac
3774 $(call gb_Jar_use_jar,$(1),sac)
3775 endef
3777 endif # SYSTEM_JFREEREPORT
3780 # Executables
3782 # FIXME: the library target should be for build too
3783 define gb_Executable__register_bestreversemap
3784 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3785 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3787 endef
3789 # TODO depending on the whole URE might be overkill, but I do not have a
3790 # Windows machine to debug it...
3791 # FIXME: the library target should be for build too
3792 define gb_Executable__register_climaker
3793 $(call gb_Executable_add_runtime_dependencies,climaker,\
3794 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3795 $(call gb_Rdb_get_target_for_build,ure/services) \
3796 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3797 $(call gb_UnoApi_get_target,udkapi) \
3798 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3800 endef
3802 define gb_Executable__register_cppumaker
3803 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3804 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3806 endef
3808 gb_Gallery__UNO_COMPONENTS := \
3809 comphelper/util/comphelp \
3810 configmgr/source/configmgr \
3811 drawinglayer/drawinglayer \
3812 framework/util/fwk \
3813 i18npool/util/i18npool \
3814 package/source/xstor/xstor \
3815 package/util/package2 \
3816 sax/source/expatwrap/expwrap \
3817 sfx2/util/sfx \
3818 svgio/svgio \
3819 svx/util/svx \
3820 svx/util/svxcore \
3821 ucb/source/core/ucb1 \
3822 ucb/source/ucp/file/ucpfile1 \
3823 unoxml/source/service/unoxml
3825 # This is used to determine what we need for 'build' platform.
3826 define gb_Executable__register_gengal
3827 $(call gb_Executable_add_runtime_dependencies,gengal,\
3828 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
3829 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
3830 $(call gb_AllLangResTarget_get_target,ofa) \
3831 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3832 $(call gb_Package_get_target_for_build,postprocess_images) \
3833 $(call gb_Package_get_target_for_build,postprocess_registry) \
3834 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3835 $(call gb_Rdb_get_target_for_build,ure/services) \
3836 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3837 $(call gb_UnoApi_get_target,offapi) \
3838 $(call gb_UnoApi_get_target,udkapi) \
3840 endef
3842 ifeq ($(SYSTEM_ICU),)
3844 define gb_Executable__register_gendict
3845 $(call gb_Executable_add_runtime_dependencies,gendict,\
3846 $(call gb_Package_get_target_for_build,icu) \
3848 endef
3850 endif
3852 define gb_Executable__register_idlc
3853 $(call gb_Executable_add_runtime_dependencies,idlc,\
3854 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3856 endef
3858 define gb_Executable__register_localize
3859 $(call gb_Executable_add_runtime_dependencies,localize,\
3860 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3861 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3864 endef
3866 # FIXME ure/services.rdb needs cleanup
3867 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3868 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3869 # FIXME: the library target should be for build too
3870 define gb_Executable__register_saxparser
3871 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3872 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3873 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3874 $(call gb_Rdb_get_target_for_build,saxparser) \
3875 $(call gb_Rdb_get_target_for_build,ure/services) \
3876 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3877 $(call gb_UnoApi_get_target,udkapi) \
3879 endef
3881 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3882 # required due to the settings for URE_SERVICES and URE_TYPES in
3883 # cppuhelper/source/unorc
3884 # FIXME: the library target should be for build too
3885 define gb_Executable__register_uno
3886 $(call gb_Executable_add_runtime_dependencies,uno,\
3887 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3888 $(call gb_Rdb_get_target_for_build,ure/services) \
3889 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3890 $(call gb_UnoApi_get_target,udkapi) \
3892 endef
3895 # External executables
3897 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3899 gb_ExternalExecutable__register_xmllint :=
3901 else # ! SYSTEM_LIBXML_FOR_BUILD
3903 define gb_ExternalExecutable__register_xmllint
3904 $(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)
3905 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3906 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3907 $(call gb_Package_get_target,xml2) \
3910 endef
3912 endif # SYSTEM_LIBXML_FOR_BUILD
3914 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3916 gb_ExternalExecutable__register_xsltproc :=
3918 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3920 define gb_ExternalExecutable__register_xsltproc
3921 $(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)
3922 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3923 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3924 $(call gb_Package_get_target,xslt) \
3927 endef
3929 endif # SYSTEM_LIBXSLT_FOR_BUILD
3931 ifneq (,$(SYSTEM_UCPP))
3933 gb_ExternalExecutable__register_ucpp :=
3935 else # ! SYSTEM_UCPP
3937 define gb_ExternalExecutable__register_ucpp
3938 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3940 endef
3942 endif # SYSTEM_UCPP
3944 ifeq (,$(PYTHON_FOR_BUILD))
3946 define gb_ExternalExecutable__register_python
3947 ifeq ($(OS),MACOSX)
3949 # use set_external, to avoid having the command added as prerequisite for the
3950 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3951 # matching rule to build that specific file)
3952 $(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))
3953 # the Zip ensures that internal python has been built (cannot use the Package
3954 # target, as that is not used on Mac)
3955 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3957 else
3959 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3960 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3961 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3963 endif
3965 endef
3967 else
3969 define gb_ExternalExecutable__register_python
3970 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3972 endef
3974 endif # PYTHON_FOR_BUILD
3976 ifneq ($(SYSTEM_GENBRK),)
3978 define gb_ExternalExecutable__register_genbrk
3979 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3981 endef
3983 else # ! SYSTEM_GENBRK
3985 define gb_ExternalExecutable__register_genbrk
3986 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3987 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3988 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3989 $(call gb_Package_get_target_for_build,icu) \
3992 endef
3994 endif
3996 ifneq ($(SYSTEM_GENCCODE),)
3998 define gb_ExternalExecutable__register_genccode
3999 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4001 endef
4003 else # ! SYSTEM_GENCCODE
4005 define gb_ExternalExecutable__register_genccode
4006 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4007 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4008 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4009 $(call gb_Package_get_target_for_build,icu) \
4012 endef
4014 endif
4016 ifneq ($(SYSTEM_GENCMN),)
4018 define gb_ExternalExecutable__register_gencmn
4019 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4021 endef
4023 else # ! SYSTEM_GENCMN
4025 define gb_ExternalExecutable__register_gencmn
4026 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4027 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4028 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4029 $(call gb_Package_get_target_for_build,icu) \
4032 endef
4034 endif
4036 # vim: set noet sw=4 ts=4: