update credits
[LibreOffice.git] / RepositoryExternal.mk
blobb32b06ddc51989b369ba1b739ea517b94d4efd41
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
30 # External headers
32 ifneq ($(SYSTEM_MESA_HEADERS),)
34 gb_LinkTarget__use_mesa_headers :=
36 else # !SYSTEM_MESA_HEADERS
38 define gb_LinkTarget__use_mesa_headers
39 $(call gb_LinkTarget_set_include,$(1),\
40 -I$(SRCDIR)/external/Mesa/inc \
41 $$(INCLUDE) \
44 endef
46 endif # SYSTEM_MESA_HEADERS
48 ifneq ($(SYSTEM_NPAPI_HEADERS),)
50 # yes this uses internal headers too...
51 # they are split across 2 dirs for this reason
52 define gb_LinkTarget__use_npapi_headers
53 $(call gb_LinkTarget_set_include,$(1),\
54 $(NPAPI_HEADERS_CFLAGS) \
55 -I$(SRCDIR)/external/np_sdk \
56 $$(INCLUDE) \
59 endef
61 else #!SYSTEM_NPAPI_HEADERS
63 define gb_LinkTarget__use_npapi_headers
64 $(call gb_LinkTarget_set_include,$(1),\
65 -I$(SRCDIR)/external/np_sdk/inc \
66 -I$(SRCDIR)/external/np_sdk \
67 $$(INCLUDE) \
70 endef
72 endif #SYSTEM_NPAPI_HEADERS
74 ifneq ($(SYSTEM_ODBC_HEADERS),)
76 define gb_LinkTarget__use_odbc_headers
77 $(call gb_LinkTarget_add_defs,$(1),\
78 -DSYSTEM_ODBC_HEADERS \
81 endef
83 else # !SYSTEM_ODBC_HEADERS
85 define gb_LinkTarget__use_odbc_headers
86 $(call gb_LinkTarget_set_include,$(1),\
87 -I$(SRCDIR)/external/unixODBC/inc \
88 $$(INCLUDE) \
91 endef
93 endif # SYSTEM_ODBC_HEADERS
95 ifneq ($(SYSTEM_VIGRA),)
97 gb_LinkTarget__use_vigra_headers :=
99 else
101 define gb_LinkTarget__use_vigra_headers
102 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
103 $(call gb_LinkTarget_set_include,$(1),\
104 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
105 $$(INCLUDE) \
108 endef
110 endif
112 ifneq ($(SYSTEM_MDDS),)
114 gb_ExternalProject__use_mdds_headers :=
116 define gb_LinkTarget__use_mdds_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(MDDS_CFLAGS) \
119 $$(INCLUDE) \
122 endef
124 else # !SYSTEM_MDDS
126 define gb_ExternalProject__use_mdds_headers
127 $(call gb_ExternalProject_use_external_project,$(1),mdds)
129 endef
131 define gb_LinkTarget__use_mdds_headers
132 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
133 $(call gb_LinkTarget_set_include,$(1),\
134 $(MDDS_CFLAGS) \
135 $$(INCLUDE) \
138 endef
140 endif # SYSTEM_MDDS
142 ifneq ($(SYSTEM_GLM),)
144 gb_LinkTarget__use_glm_headers :=
145 gb_ExternalProject__use_glm_headers :=
147 else
149 define gb_LinkTarget__use_glm_headers
150 $(call gb_LinkTarget_use_unpacked,$(1),glm)
151 $(call gb_LinkTarget_set_include,$(1),\
152 -I$(call gb_UnpackedTarball_get_dir,glm) \
153 $$(INCLUDE) \
156 endef
158 define gb_ExternalProject__use_glm_headers
159 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
161 endef
163 endif
165 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
167 define gb_LinkTarget__use_sane_headers
168 $(call gb_LinkTarget_set_include,$(1),\
169 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
170 $$(INCLUDE) \
173 endef
175 else
177 gb_LinkTarget__use_sane_headers :=
179 endif
181 ifneq ($(SYSTEM_BLUEZ),)
183 gb_LinkTarget__use_bluez_bluetooth_headers :=
185 else # !SYSTEM_BLUEZ
187 define gb_LinkTarget__use_bluez_bluetooth_headers
188 $(call gb_LinkTarget_set_include,$(1),\
189 -I$(SRCDIR)/external/bluez_bluetooth/inc \
190 $$(INCLUDE) \
193 endef
195 endif # SYSTEM_BLUEZ
197 # External libraries
199 ifneq ($(SYSTEM_CPPUNIT),)
201 define gb_LinkTarget__use_cppunit
202 $(call gb_LinkTarget_set_include,$(1),\
203 $$(INCLUDE) \
204 $(CPPUNIT_CFLAGS) \
207 $(call gb_LinkTarget_add_libs,$(1),\
208 $(CPPUNIT_LIBS) \
211 endef
213 else # !SYSTEM_CPPUNIT
215 define gb_LinkTarget__use_cppunit
216 $(call gb_LinkTarget_use_external_project,$(1),cppunit)
218 $(call gb_LinkTarget_set_include,$(1),\
219 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
220 $$(INCLUDE) \
223 ifeq ($(COM),MSC)
224 $(call gb_LinkTarget_add_libs,$(1),\
225 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
227 else
228 $(call gb_LinkTarget_add_libs,$(1),\
229 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
231 endif
233 endef
235 endif # SYSTEM_CPPUNIT
237 ifneq ($(SYSTEM_GLEW),)
239 define gb_LinkTarget__use_glew
240 $(call gb_LinkTarget_set_include,$(1),\
241 $$(INCLUDE) \
242 $(GLEW_CFLAGS) \
244 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
246 endef
248 gb_ExternalProject__use_glew :=
250 else # !SYSTEM_GLEW
252 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
253 glew \
256 define gb_LinkTarget__use_glew
257 $(call gb_LinkTarget_use_package,$(1),glew)
258 $(call gb_LinkTarget_set_include,$(1),\
259 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
260 $$(INCLUDE) \
263 ifeq ($(COM),MSC)
264 $(call gb_LinkTarget_add_libs,$(1),\
265 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/Win32/glew32d.lib,Release/Win32/glew32.lib) \
267 else
268 $(call gb_LinkTarget_add_libs,$(1),\
269 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
271 endif
273 endef
275 define gb_ExternalProject__use_glew
276 $(call gb_ExternalProject_use_external_project,$(1),glew)
278 endef
280 endif # SYSTEM_GLEW
282 define gb_LinkTarget__use_iconv
283 $(call gb_LinkTarget_add_libs,$(1),-liconv)
285 endef
287 ifneq ($(SYSTEM_MARIADB),)
289 define gb_LinkTarget__use_mariadb
290 $(call gb_LinkTarget_set_include,$(1),\
291 $$(INCLUDE) \
292 $(MARIADB_CFLAGS) \
294 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
296 endef
297 gb_ExternalProject__use_mariadb :=
299 else # !SYSTEM_MARIADB
301 define gb_LinkTarget__use_mariadb
302 $(call gb_LinkTarget_set_include,$(1),\
303 $$(INCLUDE) \
304 $(MARIADB_CFLAGS) \
306 $(call gb_LinkTarget_use_static_libraries,$(1),\
307 mariadblib \
310 endef
311 define gb_ExternalProject__use_mariadb
312 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
314 endef
316 endif # SYSTEM_MARIADB
319 ifneq ($(SYSTEM_MARIADB),)
321 define gb_LinkTarget__use_mysql
323 $(call gb_LinkTarget_add_defs,$(1),\
324 -DSYSTEM_MARIADB \
327 $(call gb_LinkTarget_add_libs,$(1),\
328 $(MARIADB_LIBS) \
331 $(call gb_LinkTarget_set_include,$(1),\
332 $(MARIADB_CFLAGS) \
333 $$(INCLUDE) \
335 endef
337 else
339 define gb_LinkTarget__use_mysql
341 $(call gb_LinkTarget_set_include,$(1),\
342 $$(INCLUDE) \
345 endef
347 endif
349 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
351 define gb_LinkTarget__use_mysqlcppconn
352 $(call gb_LinkTarget_add_libs,$(1),\
353 -lmysqlcppconn \
356 $(call gb_LinkTarget_add_defs,$(1),\
357 -DSYSTEM_MYSQL_CPPCONN \
359 endef
361 else
363 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
364 mysqlcppconn \
367 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
368 define gb_LinkTarget__use_mysqlcppconn
370 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
372 $(call gb_LinkTarget_add_defs,$(1),\
373 -DCPPCONN_LIB_BUILD \
376 $(call gb_LinkTarget_set_include,$(1),\
377 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
378 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
379 $$(INCLUDE) \
382 endef
384 endif
386 ifneq ($(SYSTEM_ZLIB),)
388 define gb_LinkTarget__use_zlib
389 $(call gb_LinkTarget_add_defs,$(1),\
390 -DSYSTEM_ZLIB \
392 $(call gb_LinkTarget_add_libs,$(1),-lz)
394 endef
396 # nothing on system
397 define gb_LinkTarget__use_zlib_x64
399 endef
401 gb_ExternalProject__use_zlib :=
403 else # !SYSTEM_ZLIB
405 define gb_LinkTarget__use_zlib_multiarch
406 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
408 $(call gb_LinkTarget_set_include,$(1),\
409 $(ZLIB_CFLAGS) \
410 $$(INCLUDE) \
413 $(call gb_LinkTarget_use_static_libraries,$(1),\
414 $(2) \
417 endef
419 define gb_LinkTarget__use_zlib
420 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
422 endef
424 define gb_LinkTarget__use_zlib_x64
425 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
427 endef
429 define gb_ExternalProject__use_zlib
430 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
432 endef
434 endif # SYSTEM_ZLIB
437 ifneq ($(SYSTEM_JPEG),)
439 define gb_LinkTarget__use_jpeg
440 $(call gb_LinkTarget_add_libs,$(1),-ljpeg)
441 $(call gb_LinkTarget_set_ldflags,$(1),\
442 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
445 endef
447 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
449 define gb_LinkTarget__use_jpeg
450 $(call gb_LinkTarget_set_include,$(1),\
451 -I$(call gb_UnpackedTarball_get_dir,jpeg-turbo) \
452 $$(INCLUDE) \
454 $(call gb_LinkTarget_add_libs,$(1),\
455 $(call gb_UnpackedTarball_get_dir,jpeg-turbo)/.libs/libjpeg$(gb_StaticLibrary_PLAINEXT) \
457 $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo)
459 endef
461 else # !SYSTEM_JPEG
463 define gb_LinkTarget__use_jpeg
464 $(call gb_LinkTarget_set_include,$(1),\
465 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
466 $$(INCLUDE) \
469 $(call gb_LinkTarget_use_static_libraries,$(1),\
470 jpeg \
473 endef
475 endif # SYSTEM_JPEG
477 ifneq ($(SYSTEM_MYTHES),)
479 define gb_LinkTarget__use_mythes
480 $(call gb_LinkTarget_set_include,$(1),\
481 $$(INCLUDE) \
482 $(MYTHES_CFLAGS) \
484 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
486 endef
488 else # !SYSTEM_MYTHES
490 define gb_LinkTarget__use_mythes
491 $(call gb_LinkTarget_set_include,$(1),\
492 -I$(call gb_UnpackedTarball_get_dir,mythes) \
493 $$(INCLUDE) \
496 ifeq ($(COM),MSC)
497 $(call gb_LinkTarget_use_static_libraries,$(1),\
498 mythes \
500 else
501 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
502 $(call gb_LinkTarget_use_external_project,$(1),mythes)
503 endif
505 endef
507 endif # SYSTEM_MYTHES
510 ifneq ($(SYSTEM_EXPAT),)
512 define gb_LinkTarget__use_expat_impl
513 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
515 $(call gb_LinkTarget_add_defs,$(1),\
516 -DSYSTEM_EXPAT \
519 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
521 endef
523 gb_ExternalProject__use_expat :=
525 else # !SYSTEM_EXPAT
527 define gb_LinkTarget__use_expat_impl
528 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
530 $(call gb_LinkTarget_set_include,$(1),\
531 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
532 $$(INCLUDE) \
535 $(call gb_LinkTarget_use_static_libraries,$(1),\
536 $(2) \
539 endef
541 define gb_ExternalProject__use_expat
542 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
544 endef
546 endif # SYSTEM_EXPAT
548 define gb_LinkTarget__use_expat
549 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
551 endef
553 define gb_LinkTarget__use_expat_x64
554 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
556 endef
558 ifneq ($(SYSTEM_HYPH),)
560 define gb_LinkTarget__use_hyphen
561 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
563 endef
565 else # !SYSTEM_HYPH
567 define gb_LinkTarget__use_hyphen
568 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
569 $(call gb_LinkTarget_set_include,$(1),\
570 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
571 $$(INCLUDE) \
574 ifeq ($(COM),MSC)
575 $(call gb_LinkTarget_use_static_libraries,$(1),\
576 hyphen \
578 else
579 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
580 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
581 endif
583 endef
585 endif # SYSTEM_HYPH
587 ifneq ($(SYSTEM_HUNSPELL),)
589 define gb_LinkTarget__use_hunspell
590 $(call gb_LinkTarget_set_include,$(1),\
591 $$(INCLUDE) \
592 $(HUNSPELL_CFLAGS) \
594 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
596 endef
598 gb_ExternalProject__use_hunspell :=
600 else # !SYSTEM_HUNSPELL
602 define gb_LinkTarget__use_hunspell
603 $(call gb_LinkTarget_add_defs,$(1),\
604 -DHUNSPELL_STATIC \
606 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
607 $(call gb_LinkTarget_set_include,$(1),\
608 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
609 $$(INCLUDE) \
612 ifeq ($(COM),MSC)
613 $(call gb_LinkTarget_use_static_libraries,$(1),\
614 hunspell \
616 else
617 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
618 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
619 endif
621 endef
623 define gb_ExternalProject__use_hunspell
624 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
626 endef
628 endif # SYSTEM_HUNSPELL
631 ifneq ($(SYSTEM_BOOST),)
633 define gb_LinkTarget__use_boostdatetime
634 $(call gb_LinkTarget_set_include,$(1),\
635 $$(INCLUDE) \
636 $(BOOST_CPPFLAGS) \
639 $(call gb_LinkTarget_add_ldflags,$(1),\
640 $(BOOST_LDFLAGS) \
643 $(call gb_LinkTarget_add_libs,$(1),\
644 $(BOOST_DATE_TIME_LIB) \
647 endef
649 define gb_LinkTarget__use_boost_iostreams
650 $(call gb_LinkTarget_set_include,$(1),\
651 $$(INCLUDE) \
652 $(BOOST_CPPFLAGS) \
655 $(call gb_LinkTarget_add_ldflags,$(1),\
656 $(BOOST_LDFLAGS) \
659 $(call gb_LinkTarget_add_libs,$(1),\
660 $(BOOST_IOSTREAMS_LIB) \
663 endef
665 gb_ExternalProject__use_boost_iostreams :=
667 define gb_LinkTarget__use_boost_system
668 $(call gb_LinkTarget_set_include,$(1),\
669 $$(INCLUDE) \
670 $(BOOST_CPPFLAGS) \
673 $(call gb_LinkTarget_add_ldflags,$(1),\
674 $(BOOST_LDFLAGS) \
677 $(call gb_LinkTarget_add_libs,$(1),\
678 $(BOOST_SYSTEM_LIB) \
681 endef
683 gb_ExternalProject__use_boost_system :=
685 define gb_LinkTarget__use_boost_headers
686 $(call gb_LinkTarget_set_include,$(1),\
687 $$(INCLUDE) \
688 $(BOOST_CPPFLAGS) \
691 endef
693 gb_ExternalProject__use_boost_headers:=
695 else # !SYSTEM_BOOST
697 ifeq ($(OS),WNT)
698 define gb_LinkTarget__use_boostthread
699 $(call gb_LinkTarget_add_defs,$(1),\
700 -DBOOST_ALL_NO_LIB \
703 $(call gb_LinkTarget_use_static_libraries,$(1),\
704 boostthread \
706 endef
707 endif
709 define gb_LinkTarget__use_boostdatetime
710 $(call gb_LinkTarget_add_defs,$(1),\
711 -DBOOST_ALL_NO_LIB \
714 $(call gb_LinkTarget_use_static_libraries,$(1),\
715 boostdatetime \
718 endef
720 define gb_LinkTarget__use_boost_iostreams
721 $(call gb_LinkTarget_add_defs,$(1),\
722 -DBOOST_ALL_NO_LIB \
725 $(call gb_LinkTarget_use_static_libraries,$(1),\
726 boost_iostreams \
729 endef
731 define gb_ExternalProject__use_boost_iostreams
732 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
733 endef
735 define gb_LinkTarget__use_boost_system
736 $(call gb_LinkTarget_add_defs,$(1),\
737 -DBOOST_ALL_NO_LIB \
740 $(call gb_LinkTarget_use_static_libraries,$(1),\
741 boost_system \
744 endef
746 define gb_ExternalProject__use_boost_system
747 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
748 endef
750 define gb_LinkTarget__use_boost_headers
751 $(call gb_LinkTarget_use_unpacked,$(1),boost)
752 $(call gb_LinkTarget_set_include,$(1),\
753 -I$(call gb_UnpackedTarball_get_dir,boost) \
754 $$(INCLUDE) \
757 endef
759 define gb_ExternalProject__use_boost_headers
760 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
762 endef
763 endif # SYSTEM_BOOST
766 ifneq ($(SYSTEM_CMIS),)
768 define gb_LinkTarget__use_cmis
769 $(call gb_LinkTarget_set_include,$(1),\
770 $$(INCLUDE) \
771 $(CMIS_CFLAGS) \
773 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
775 endef
777 else # !SYSTEM_CMIS
779 define gb_LinkTarget__use_cmis
780 $(call gb_LinkTarget_set_include,$(1),\
781 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
782 $$(INCLUDE) \
784 $(call gb_LinkTarget_use_static_libraries,$(1),\
785 cmislib \
788 endef
790 endif # SYSTEM_CMIS
792 ifeq ($(ENABLE_JAVA),TRUE)
794 ifeq ($(OS)$(COM),WNTGCC)
796 define gb_LinkTarget__use_jawt
797 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
799 $(call gb_LinkTarget_add_ldflags,$(1),\
800 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
803 $(call gb_LinkTarget_add_libs,$(1),\
804 $(JAWTLIB) \
807 endef
809 else # $(OS)$(COM) != WNTGCC
811 define gb_LinkTarget__use_jawt
812 $(call gb_LinkTarget_add_libs,$(1),\
813 $(JAWTLIB) \
816 endef
818 endif # $(OS)$(COM) = WNTGCC
820 else # !ENABLE_JAVA
822 gb_LinkTarget__use_jawt :=
824 endif # ENABLE_JAVA
826 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
828 define gb_LinkTarget__use_libatomic_ops
829 $(call gb_LinkTarget_set_include,$(1),\
830 $$(INCLUDE) \
831 $(LIBATOMIC_OPS_CFLAGS) \
833 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
835 endef
836 gb_ExternalProject__use_libatomic_ops :=
838 else # !SYSTEM_LIBATOMIC_OPS
840 define gb_LinkTarget__use_libatomic_ops
841 $(call gb_LinkTarget_set_include,$(1),\
842 $(LIBATOMIC_OPS_CFLAGS) \
843 $$(INCLUDE) \
844 $(LIBATOMIC_OPS_CFLAGS) \
846 $(call gb_LinkTarget_use_external_project,$(1),\
847 libatomic_ops \
850 $(call gb_LinkTarget_add_libs,$(1),\
851 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
854 endef
856 define gb_ExternalProject__use_libatomic_ops
857 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
859 endef
861 endif # SYSTEM_LIBATOMIC_OPS
864 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
866 define gb_LinkTarget__use_libexttextcat
867 $(call gb_LinkTarget_set_include,$(1),\
868 $$(INCLUDE) \
869 $(LIBEXTTEXTCAT_CFLAGS) \
871 $(call gb_LinkTarget_add_defs,$(1),\
872 -DSYSTEM_LIBEXTTEXTCAT \
874 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
876 endef
878 else # !SYSTEM_LIBEXTTEXTCAT
880 define gb_LinkTarget__use_libexttextcat
881 $(call gb_LinkTarget_set_include,$(1),\
882 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
883 $$(INCLUDE) \
886 ifeq ($(COM),MSC)
887 $(call gb_LinkTarget_use_static_libraries,$(1),\
888 exttextcat \
890 else
891 $(call gb_LinkTarget_add_libs,$(1),\
892 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
894 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
895 endif
898 endef
900 endif # SYSTEM_LIBEXTTEXTCAT
903 ifneq ($(SYSTEM_LIBXML),)
905 define gb_LinkTarget__use_libxml2
906 $(call gb_LinkTarget_add_defs,$(1),\
907 -DSYSTEM_LIBXML \
909 $(call gb_LinkTarget_set_include,$(1),\
910 $$(INCLUDE) \
911 $(LIBXML_CFLAGS) \
913 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
915 endef
916 gb_ExternalProject__use_libxml2:=
918 else # !SYSTEM_LIBXML
920 $(eval $(call gb_Helper_register_packages_for_install,ure,\
921 xml2 \
924 define gb_LinkTarget__use_libxml2
925 $(call gb_LinkTarget_use_package,$(1),xml2)
926 $(call gb_LinkTarget_set_include,$(1),\
927 $$(INCLUDE) \
928 $(LIBXML_CFLAGS) \
931 $(call gb_LinkTarget_add_libs,$(1),\
932 $(LIBXML_LIBS) \
935 ifeq ($(COM),MSC)
936 $(call gb_LinkTarget_use_external,$(1),icu_headers)
937 endif
939 endef
940 define gb_ExternalProject__use_libxml2
941 $(call gb_ExternalProject_use_package,$(1),xml2)
943 ifeq ($(COM),MSC)
944 $(call gb_ExternalProject_use_external_project,$(1),icu)
945 endif
947 endef
949 endif # SYSTEM_LIBXML
952 ifneq ($(SYSTEM_LIBXSLT),)
954 define gb_LinkTarget__use_libxslt
955 $(call gb_LinkTarget_set_include,$(1),\
956 $$(INCLUDE) \
957 $(LIBXSLT_CFLAGS) \
959 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
961 endef
963 define gb_LinkTarget__use_libexslt
964 $(call gb_LinkTarget_set_include,$(1),\
965 $$(INCLUDE) \
966 $(LIBEXSLT_CFLAGS) \
969 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
971 endef
973 else # !SYSTEM_LIBXSLT
975 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
976 xslt \
979 define gb_LinkTarget__use_libxslt
980 $(call gb_LinkTarget_use_package,$(1),xslt)
981 $(call gb_LinkTarget_set_include,$(1),\
982 $$(INCLUDE) \
983 -I$(call gb_UnpackedTarball_get_dir,xslt) \
986 ifeq ($(COM),MSC)
987 $(call gb_LinkTarget_add_libs,$(1),\
988 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
990 else
991 $(call gb_LinkTarget_add_libs,$(1),\
992 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
994 endif
996 endef
998 define gb_LinkTarget__use_libexslt
999 $(call gb_LinkTarget_use_package,$(1),xslt)
1000 $(call gb_LinkTarget_set_include,$(1),\
1001 $$(INCLUDE) \
1002 -I$(call gb_UnpackedTarball_get_dir,xslt) \
1005 ifeq ($(COM),MSC)
1006 $(call gb_LinkTarget_add_libs,$(1),\
1007 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
1009 else
1010 $(call gb_LinkTarget_add_libs,$(1),\
1011 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
1013 endif
1015 endef
1017 endif # SYSTEM_LIBXSLT
1019 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
1021 ifneq ($(SYSTEM_LIBLANGTAG),)
1023 define gb_LinkTarget__use_liblangtag
1024 $(call gb_LinkTarget_set_include,$(1),\
1025 $$(INCLUDE) \
1026 $(LIBLANGTAG_CFLAGS) \
1029 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1031 endef
1033 else # !SYSTEM_LIBLANGTAG
1035 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1036 liblangtag_data \
1039 define gb_LinkTarget__use_liblangtag
1040 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
1041 $(call gb_LinkTarget_set_include,$(1),\
1042 -I$(call gb_UnpackedTarball_get_dir,langtag) \
1043 $$(INCLUDE) \
1045 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1046 $(call gb_LinkTarget_use_external_project,$(1),langtag)
1048 endef
1050 endif # SYSTEM_LIBLANGTAG
1052 else
1054 gb_LinkTarget__use_liblangtag :=
1056 endif # ENABLE_LIBLANGTAG
1058 gb_ExternalProject__use_apr :=
1060 ifeq ($(WITH_WEBDAV),serf)
1062 define gb_LinkTarget__use_apr
1063 $(call gb_LinkTarget_set_include,$(1),\
1064 $$(INCLUDE) \
1065 $(APR_CFLAGS) \
1067 $(call gb_LinkTarget_add_libs,$(1),\
1068 $(APR_LIBS) \
1069 $(if $(filter $(OS),LINUX),-lpthread) \
1070 $(if $(filter $(OS),MACOSX),-liconv) \
1073 ifeq ($(SYSTEM_APR),)
1074 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1075 mswsock \
1076 rpcrt4 \
1077 shell32 \
1079 $(call gb_LinkTarget_add_defs,$(1),\
1080 -DAPR_DECLARE_STATIC \
1081 -DAPU_DECLARE_STATIC \
1083 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1084 endif
1086 endef
1088 define gb_ExternalProject__use_apr
1089 ifeq ($(SYSTEM_APR),)
1090 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1091 endif
1093 endef
1095 define gb_LinkTarget__use_serf
1096 $(call gb_LinkTarget_set_include,$(1),\
1097 $(SERF_CFLAGS) \
1098 $$(INCLUDE) \
1100 $(call gb_LinkTarget_add_libs,$(1),\
1101 $(SERF_LIBS) \
1104 ifeq ($(SYSTEM_SERF),)
1105 $(call gb_LinkTarget_use_external_project,$(1),serf)
1106 endif
1108 endef
1110 else ifeq ($(WITH_WEBDAV),neon)
1112 ifneq ($(SYSTEM_NEON),)
1114 define gb_LinkTarget__use_neon
1115 $(call gb_LinkTarget_add_defs,$(1),\
1116 -DNEON_VERSION=0x$(NEON_VERSION) \
1117 -DSYSTEM_NEON \
1119 $(call gb_LinkTarget_set_include,$(1),\
1120 $$(INCLUDE) \
1121 $(NEON_CFLAGS) \
1124 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1126 endef
1128 else # !SYSTEM_NEON
1130 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1131 neon \
1134 define gb_LinkTarget__use_neon
1135 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1136 $(call gb_LinkTarget_set_include,$(1),\
1137 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1138 $$(INCLUDE) \
1140 $(call gb_LinkTarget_use_libraries,$(1),\
1141 neon \
1144 endef
1146 endif # SYSTEM_NEON
1148 endif # WITH_WEBDAV
1150 ifneq ($(SYSTEM_REDLAND),)
1152 define gb_LinkTarget__use_librdf
1153 $(call gb_LinkTarget_add_defs,$(1),\
1154 -DSYSTEM_REDLAND \
1156 $(call gb_LinkTarget_set_include,$(1),\
1157 $$(INCLUDE) \
1158 $(REDLAND_CFLAGS) \
1160 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1162 endef
1164 gb_LinkTarget__use_redland_headers:=
1166 gb_LinkTarget__use_raptor_headers:=
1168 gb_LinkTarget__use_rasqal_headers:=
1170 else # !SYSTEM_REDLAND
1172 define gb_LinkTarget__use_redland_headers
1173 $(call gb_LinkTarget_set_include,$(1),\
1174 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1175 $$(INCLUDE) \
1178 endef
1180 define gb_LinkTarget__use_raptor_headers
1181 $(call gb_LinkTarget_set_include,$(1),\
1182 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1183 $$(INCLUDE) \
1186 endef
1188 define gb_LinkTarget__use_rasqal_headers
1189 $(call gb_LinkTarget_set_include,$(1),\
1190 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1191 $$(INCLUDE) \
1194 endef
1196 ifneq ($(OS),ANDROID)
1198 ifeq ($(COM),MSC)
1199 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1200 raptor2 \
1201 rasqal \
1202 rdf \
1204 else
1205 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1206 raptor \
1207 rasqal \
1208 redland \
1210 endif
1212 define gb_LinkTarget__use_librdf
1213 ifeq ($(COM),MSC)
1214 $(call gb_LinkTarget_use_libraries,$(1),\
1215 raptor2 \
1216 rdf \
1218 else
1219 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1221 $(call gb_LinkTarget_add_libs,$(1),\
1222 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1223 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1225 endif
1227 endef
1229 else # ANDROID
1231 define gb_LinkTarget__use_librdf
1232 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1234 endef
1236 endif # ANDROID
1238 endif # SYSTEM_REDLAND
1241 ifneq ($(filter unx,$(GUIBASE))$(ENABLE_CAIRO_CANVAS),) # or
1243 ifneq ($(SYSTEM_CAIRO),)
1245 define gb_LinkTarget__use_cairo
1246 $(call gb_LinkTarget_set_include,$(1),\
1247 $$(INCLUDE) \
1248 $(CAIRO_CFLAGS) \
1250 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1251 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1253 endef
1255 else # !SYSTEM_CAIRO
1257 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1258 cairo \
1259 $(if $(filter $(OS),WNT),,pixman) \
1262 define gb_LinkTarget__use_cairo
1263 $(call gb_LinkTarget_use_package,$(1),cairo)
1264 $(call gb_LinkTarget_use_package,$(1),pixman)
1265 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1266 $(call gb_LinkTarget_set_include,$(1),\
1267 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1268 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1269 $$(INCLUDE) \
1271 $(call gb_LinkTarget_add_libs,$(1),\
1272 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1273 $(if $(filter-out MACOSX WNT,$(OS)), \
1274 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1278 endef
1280 endif # SYSTEM_CAIRO
1282 endif # CAIRO
1284 ifneq ($(SYSTEM_FREETYPE),)
1286 define gb_LinkTarget__use_freetype_headers
1287 $(call gb_LinkTarget_set_include,$(1),\
1288 $$(INCLUDE) \
1289 $(FREETYPE_CFLAGS) \
1292 endef
1294 define gb_LinkTarget__use_freetype
1295 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1296 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1298 endef
1300 gb_ExternalProject__use_freetype :=
1302 else ifeq ($(OS),ANDROID)
1304 define gb_LinkTarget__use_freetype_headers
1305 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1306 $(call gb_LinkTarget_set_include,$(1),\
1307 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1308 $$(INCLUDE) \
1311 endef
1313 define gb_LinkTarget__use_freetype
1314 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1315 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1317 endef
1319 define gb_ExternalProject__use_freetype
1320 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1322 endef
1324 endif # SYSTEM_FREETYPE
1326 ifneq ($(SYSTEM_FONTCONFIG),)
1328 define gb_LinkTarget__use_fontconfig
1329 $(call gb_LinkTarget_set_include,$(1),\
1330 $$(INCLUDE) \
1331 $(FONTCONFIG_CFLAGS) \
1334 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1336 endef
1338 else ifeq ($(OS),ANDROID)
1340 define gb_LinkTarget__use_fontconfig
1341 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1342 $(call gb_LinkTarget_set_include,$(1),\
1343 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1344 $$(INCLUDE) \
1347 endef
1349 endif # SYSTEM_FONTCONFIG
1351 ifeq ($(ENABLE_GRAPHITE),TRUE)
1353 ifneq ($(SYSTEM_GRAPHITE),)
1355 define gb_LinkTarget__use_graphite
1356 $(call gb_LinkTarget_set_include,$(1),\
1357 $$(INCLUDE) \
1358 $(GRAPHITE_CFLAGS) \
1360 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1362 endef
1364 else # !SYSTEM_GRAPHITE
1366 define gb_LinkTarget__use_graphite
1367 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1368 $(call gb_LinkTarget_set_include,$(1),\
1369 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1370 $$(INCLUDE) \
1372 $(call gb_LinkTarget_use_static_libraries,$(1),\
1373 graphite \
1376 endef
1378 endif # SYSTEM_GRAPHITE
1380 else # !ENABLE_GRAPHITE
1382 gb_LinkTarget__use_graphite :=
1384 endif # ENABLE_GRAPHITE
1386 ifneq ($(SYSTEM_ICU),)
1388 gb_LinkTarget__use_icu_headers:=
1389 gb_ExternalProject__use_icu:=
1391 define gb_LinkTarget__use_icudata
1392 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1394 endef
1395 define gb_LinkTarget__use_icui18n
1396 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1398 endef
1399 define gb_LinkTarget__use_icuuc
1400 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1402 endef
1404 else # !SYSTEM_ICU
1406 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1407 icu_ure \
1410 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1411 icu \
1414 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1415 gb_ICU_suffix:=lo
1416 else
1417 gb_ICU_suffix:=
1418 endif
1420 define gb_LinkTarget__use_icu_headers
1421 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1422 $(call gb_LinkTarget_set_include,$(1),\
1423 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1424 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1425 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1426 $$(INCLUDE) \
1429 endef
1431 define gb_ExternalProject__use_icu
1432 $(call gb_ExternalProject_use_package,$(1),icu)
1434 endef
1436 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1437 define gb_LinkTarget__use_icudata
1438 $(call gb_LinkTarget_use_package,$(1),icu)
1440 ifeq ($(OS),WNT)
1441 $(call gb_LinkTarget_add_libs,$(1),\
1442 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1444 else
1445 $(call gb_LinkTarget_add_libs,$(1),\
1446 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1448 endif
1450 endef
1452 define gb_LinkTarget__use_icui18n
1453 $(call gb_LinkTarget_use_package,$(1),icu)
1455 ifeq ($(OS),WNT)
1456 $(call gb_LinkTarget_add_libs,$(1),\
1457 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1459 else
1460 $(call gb_LinkTarget_add_libs,$(1),\
1461 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1463 endif
1465 endef
1467 define gb_LinkTarget__use_icuuc
1468 $(call gb_LinkTarget_use_package,$(1),icu)
1470 ifeq ($(OS),WNT)
1471 $(call gb_LinkTarget_add_libs,$(1),\
1472 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1474 else
1475 $(call gb_LinkTarget_add_libs,$(1),\
1476 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1478 endif
1480 endef
1482 endif # SYSTEM_ICU
1484 ifeq ($(ENABLE_HARFBUZZ),TRUE)
1485 ifneq ($(SYSTEM_HARFBUZZ),)
1487 define gb_LinkTarget__use_harfbuzz
1488 $(call gb_LinkTarget_set_include,$(1),\
1489 $$(INCLUDE) \
1490 $(HARFBUZZ_CFLAGS) \
1492 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1494 endef
1496 else # SYSTEM_HARFBUZZ != TRUE
1498 define gb_LinkTarget__use_harfbuzz
1499 $(call gb_LinkTarget_set_include,$(1),\
1500 $(HARFBUZZ_CFLAGS) \
1501 $$(INCLUDE) \
1503 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1504 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1506 endef
1508 endif # SYSTEM_HARFBUZZ
1509 else # ENABLE_HARFBUZZ != YES
1511 gb_LinkTarget__use_harfbuzz :=
1513 endif # ENABLE_HARFBUZZ
1515 ifeq ($(DISABLE_OPENSSL),TRUE)
1517 gb_ExternalProject__use_openssl:=
1518 gb_LinkTarget__use_openssl_headers:=
1519 gb_LinkTarget__use_openssl:=
1521 else # !DISABLE_OPENSSL
1523 ifneq ($(SYSTEM_OPENSSL),)
1525 gb_LinkTarget__use_openssl_headers:=
1526 gb_ExternalProject__use_openssl:=
1528 define gb_LinkTarget__use_openssl
1529 $(call gb_LinkTarget_set_include,$(1),\
1530 $$(INCLUDE) \
1531 $(OPENSSL_CFLAGS) \
1533 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1535 endef
1537 else # !SYSTEM_OPENSSL
1539 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1540 openssl \
1543 define gb_ExternalProject__use_openssl
1544 $(call gb_ExternalProject_use_package,$(1),openssl)
1546 endef
1548 define gb_LinkTarget__use_openssl_headers
1549 $(call gb_LinkTarget_set_include,$(1),\
1550 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1551 $$(INCLUDE) \
1554 endef
1556 define gb_LinkTarget__use_openssl
1557 $(call gb_LinkTarget_use_package,$(1),openssl)
1558 ifeq ($(OS),WNT)
1559 $(call gb_LinkTarget_add_libs,$(1),\
1560 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1561 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1563 else
1564 $(call gb_LinkTarget_add_libs,$(1),\
1565 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1566 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1568 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1569 ifeq ($(OS),SOLARIS)
1570 $(call gb_LinkTarget_add_libs,$(1),\
1571 -lnsl \
1572 -lsocket \
1574 endif
1575 endif
1577 endef
1579 endif # SYSTEM_OPENSSL
1580 endif # DISABLE_OPENSSL
1583 ifeq ($(DISABLE_OPENSSL),TRUE)
1585 define gb_LinkTarget__use_gnutls
1586 $(call gb_LinkTarget_set_include,$(1),\
1587 $$(INCLUDE) \
1588 $(GNUTLS_CFLAGS) \
1591 $(call gb_LinkTarget_add_defs,$(1),\
1592 -DDISABLE_OPENSSL \
1595 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1597 endef
1599 define gb_LinkTarget__use_libgcrypt
1600 $(call gb_LinkTarget_set_include,$(1),\
1601 $$(INCLUDE) \
1602 $(LIBGCRYPT_CFLAGS) \
1605 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1607 endef
1609 else # !DISABLE_OPENSSL
1611 gb_LinkTarget__use_gnutls:=
1612 gb_LinkTarget__use_libgcrypt:=
1614 endif # DISABLE_OPENSSL
1617 ifneq ($(SYSTEM_CDR),)
1619 define gb_LinkTarget__use_cdr
1620 $(call gb_LinkTarget_set_include,$(1),\
1621 $$(INCLUDE) \
1622 $(CDR_CFLAGS) \
1624 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1626 endef
1628 else # !SYSTEM_CDR
1630 define gb_LinkTarget__use_cdr
1631 $(call gb_LinkTarget_set_include,$(1),\
1632 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1633 $$(INCLUDE) \
1635 $(call gb_LinkTarget_add_libs,$(1),\
1636 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1638 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1639 endef
1641 endif # SYSTEM_CDR
1644 ifneq ($(SYSTEM_EBOOK),)
1646 define gb_LinkTarget__use_ebook
1647 $(call gb_LinkTarget_set_include,$(1),\
1648 $$(INCLUDE) \
1649 $(EBOOK_CFLAGS) \
1651 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1653 endef
1655 gb_ExternalProject__use_ebook :=
1657 else # !SYSTEM_EBOOK
1659 define gb_LinkTarget__use_ebook
1660 $(call gb_LinkTarget_set_include,$(1),\
1661 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1662 $$(INCLUDE) \
1664 $(call gb_LinkTarget_add_libs,$(1),\
1665 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1667 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1669 endef
1671 define gb_ExternalProject__use_ebook
1672 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1674 endef
1676 endif # SYSTEM_EBOOK
1679 ifneq ($(SYSTEM_ETONYEK),)
1681 define gb_LinkTarget__use_etonyek
1682 $(call gb_LinkTarget_set_include,$(1),\
1683 $$(INCLUDE) \
1684 $(ETONYEK_CFLAGS) \
1686 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1688 endef
1690 gb_ExternalProject__use_etonyek :=
1692 else # !SYSTEM_ETONYEK
1694 define gb_LinkTarget__use_etonyek
1695 $(call gb_LinkTarget_set_include,$(1),\
1696 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1697 $$(INCLUDE) \
1699 $(call gb_LinkTarget_add_libs,$(1),\
1700 $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \
1702 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1704 endef
1706 define gb_ExternalProject__use_etonyek
1707 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1709 endef
1711 endif # SYSTEM_ETONYEK
1714 ifneq ($(SYSTEM_FREEHAND),)
1716 define gb_LinkTarget__use_freehand
1717 $(call gb_LinkTarget_set_include,$(1),\
1718 $$(INCLUDE) \
1719 $(FREEHAND_CFLAGS) \
1721 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1723 endef
1725 gb_ExternalProject__use_freehand :=
1727 else # !SYSTEM_FREEHAND
1729 define gb_LinkTarget__use_freehand
1730 $(call gb_LinkTarget_set_include,$(1),\
1731 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1732 $$(INCLUDE) \
1734 $(call gb_LinkTarget_add_libs,$(1),\
1735 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1737 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1739 endef
1741 define gb_ExternalProject__use_freehand
1742 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1744 endef
1746 endif # SYSTEM_FREEHAND
1749 ifneq ($(SYSTEM_ODFGEN),)
1751 define gb_LinkTarget__use_odfgen
1752 $(call gb_LinkTarget_set_include,$(1),\
1753 $$(INCLUDE) \
1754 $(ODFGEN_CFLAGS) \
1756 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1758 endef
1760 else # !SYSTEM_ODFGEN
1762 ifeq ($(COM),MSC)
1764 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1765 odfgen \
1768 define gb_LinkTarget__use_odfgen
1769 $(call gb_LinkTarget_set_include,$(1),\
1770 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1771 $$(INCLUDE) \
1773 $(call gb_LinkTarget_use_libraries,$(1),\
1774 odfgen \
1777 endef
1779 else # !MSC
1781 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1782 libodfgen \
1785 define gb_LinkTarget__use_odfgen
1786 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1788 $(call gb_LinkTarget_set_include,$(1),\
1789 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1790 $$(INCLUDE) \
1792 $(call gb_LinkTarget_add_libs,$(1),\
1793 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1796 endef
1798 endif
1800 endif # SYSTEM_ODFGEN
1803 ifneq ($(SYSTEM_REVENGE),)
1805 define gb_LinkTarget__use_revenge
1806 $(call gb_LinkTarget_set_include,$(1),\
1807 $$(INCLUDE) \
1808 $(REVENGE_CFLAGS) \
1810 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1812 endef
1814 gb_ExternalProject__use_revenge :=
1816 else # !SYSTEM_REVENGE
1818 ifeq ($(COM),MSC)
1820 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1821 revenge \
1824 define gb_LinkTarget__use_revenge
1825 $(call gb_LinkTarget_set_include,$(1),\
1826 $(REVENGE_CFLAGS) \
1827 $$(INCLUDE) \
1829 $(call gb_LinkTarget_use_libraries,$(1),\
1830 revenge \
1833 endef
1835 define gb_ExternalProject__use_revenge
1836 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1838 endef
1840 else # !MSC
1842 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1843 librevenge \
1846 define gb_LinkTarget__use_revenge
1847 $(call gb_LinkTarget_use_package,$(1),librevenge)
1849 $(call gb_LinkTarget_set_include,$(1),\
1850 $(REVENGE_CFLAGS) \
1851 $$(INCLUDE) \
1853 $(call gb_LinkTarget_add_libs,$(1),\
1854 $(REVENGE_LIBS) \
1856 endef
1858 define gb_ExternalProject__use_revenge
1859 $(call gb_ExternalProject_use_package,$(1),librevenge)
1861 endef
1863 endif # MSC
1865 endif # SYSTEM_REVENGE
1868 ifneq ($(SYSTEM_ABW),)
1870 define gb_LinkTarget__use_abw
1871 $(call gb_LinkTarget_set_include,$(1),\
1872 $$(INCLUDE) \
1873 $(ABW_CFLAGS) \
1875 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1877 endef
1878 gb_ExternalProject__use_abw :=
1880 else # !SYSTEM_ABW
1882 define gb_LinkTarget__use_abw
1883 $(call gb_LinkTarget_set_include,$(1),\
1884 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1885 $$(INCLUDE) \
1887 $(call gb_LinkTarget_add_libs,$(1),\
1888 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1890 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1892 endef
1893 define gb_ExternalProject__use_abw
1894 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1896 endef
1898 endif # SYSTEM_ABW
1901 ifneq ($(SYSTEM_MSPUB),)
1903 define gb_LinkTarget__use_mspub
1904 $(call gb_LinkTarget_set_include,$(1),\
1905 $$(INCLUDE) \
1906 $(MSPUB_CFLAGS) \
1908 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1910 endef
1912 else # !SYSTEM_MSPUB
1914 define gb_LinkTarget__use_mspub
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1917 $$(INCLUDE) \
1919 $(call gb_LinkTarget_add_libs,$(1),\
1920 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1922 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1924 endef
1926 endif # SYSTEM_MSPUB
1929 ifneq ($(SYSTEM_PAGEMAKER),)
1931 define gb_LinkTarget__use_pagemaker
1932 $(call gb_LinkTarget_set_include,$(1),\
1933 $$(INCLUDE) \
1934 $(PAGEMAKER_CFLAGS) \
1936 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1938 endef
1939 gb_ExternalProject__use_pagemaker :=
1941 else # !SYSTEM_PAGEMAKER
1943 define gb_LinkTarget__use_pagemaker
1944 $(call gb_LinkTarget_set_include,$(1),\
1945 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1946 $$(INCLUDE) \
1948 $(call gb_LinkTarget_add_libs,$(1),\
1949 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1951 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1953 endef
1954 define gb_ExternalProject__use_pagemaker
1955 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1957 endef
1959 endif # SYSTEM_PAGEMAKER
1962 ifneq ($(SYSTEM_VISIO),)
1964 define gb_LinkTarget__use_visio
1965 $(call gb_LinkTarget_set_include,$(1),\
1966 $$(INCLUDE) \
1967 $(VISIO_CFLAGS) \
1969 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
1971 endef
1973 else # !SYSTEM_VISIO
1975 define gb_LinkTarget__use_visio
1976 $(call gb_LinkTarget_set_include,$(1),\
1977 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1978 $$(INCLUDE) \
1980 $(call gb_LinkTarget_add_libs,$(1),\
1981 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
1983 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
1985 endef
1987 endif # SYSTEM_VISIO
1990 ifneq ($(SYSTEM_WPD),)
1992 define gb_LinkTarget__use_wpd
1993 $(call gb_LinkTarget_set_include,$(1),\
1994 $$(INCLUDE) \
1995 $(WPD_CFLAGS) \
1997 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
1999 endef
2000 gb_ExternalProject__use_wpd :=
2002 else # !SYSTEM_WPD
2004 define gb_LinkTarget__use_wpd
2005 $(call gb_LinkTarget_set_include,$(1),\
2006 $(WPD_CFLAGS) \
2007 $$(INCLUDE) \
2009 $(call gb_LinkTarget_add_libs,$(1),\
2010 $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.10$(gb_StaticLibrary_PLAINEXT) \
2012 $(call gb_LinkTarget_use_external_project,$(1),libwpd)
2014 endef
2015 define gb_ExternalProject__use_wpd
2016 $(call gb_ExternalProject_use_external_project,$(1),libwpd)
2018 endef
2020 endif # SYSTEM_WPD
2023 ifneq ($(SYSTEM_WPG),)
2025 define gb_LinkTarget__use_wpg
2026 $(call gb_LinkTarget_set_include,$(1),\
2027 $$(INCLUDE) \
2028 $(WPG_CFLAGS) \
2030 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2032 endef
2033 gb_ExternalProject__use_wpg :=
2035 else # !SYSTEM_WPG
2037 define gb_LinkTarget__use_wpg
2038 $(call gb_LinkTarget_set_include,$(1),\
2039 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2040 $$(INCLUDE) \
2042 $(call gb_LinkTarget_add_libs,$(1),\
2043 $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.3$(gb_StaticLibrary_PLAINEXT) \
2045 $(call gb_LinkTarget_use_external_project,$(1),libwpg)
2047 endef
2048 define gb_ExternalProject__use_wpg
2049 $(call gb_ExternalProject_use_external_project,$(1),libwpg)
2051 endef
2053 endif # SYSTEM_WPG
2056 ifneq ($(SYSTEM_WPS),)
2058 define gb_LinkTarget__use_wps
2059 $(call gb_LinkTarget_set_include,$(1),\
2060 $$(INCLUDE) \
2061 $(WPS_CFLAGS) \
2063 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2065 endef
2066 gb_ExternalProject__use_wps :=
2068 else # !SYSTEM_WPS
2070 ifeq ($(COM),MSC)
2072 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2073 wps \
2076 define gb_LinkTarget__use_wps
2077 $(call gb_LinkTarget_set_include,$(1),\
2078 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2079 $$(INCLUDE) \
2082 $(call gb_LinkTarget_use_libraries,$(1),\
2083 wps \
2086 endef
2088 else # !MSC
2090 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2091 libwps \
2094 define gb_LinkTarget__use_wps
2095 $(call gb_LinkTarget_use_package,$(1),libwps)
2097 $(call gb_LinkTarget_set_include,$(1),\
2098 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2099 $$(INCLUDE) \
2101 $(call gb_LinkTarget_add_libs,$(1),\
2102 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.3 \
2105 endef
2107 endif # MSC
2109 endif # SYSTEM_WPS
2112 ifneq ($(SYSTEM_MWAW),)
2114 define gb_LinkTarget__use_mwaw
2115 $(call gb_LinkTarget_set_include,$(1),\
2116 $$(INCLUDE) \
2117 $(MWAW_CFLAGS) \
2119 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2121 endef
2123 else # !SYSTEM_MWAW
2125 ifeq ($(COM),MSC)
2127 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2128 mwaw \
2131 define gb_LinkTarget__use_mwaw
2132 $(call gb_LinkTarget_set_include,$(1),\
2133 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2134 $$(INCLUDE) \
2137 $(call gb_LinkTarget_use_libraries,$(1),\
2138 mwaw \
2141 endef
2143 else # !MSC
2145 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2146 libmwaw \
2149 define gb_LinkTarget__use_mwaw
2150 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2152 $(call gb_LinkTarget_set_include,$(1),\
2153 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2154 $$(INCLUDE) \
2156 $(call gb_LinkTarget_add_libs,$(1),\
2157 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2160 endef
2162 endif # MSC
2164 endif # SYSTEM_MWAW
2167 ifneq ($(SYSTEM_LCMS2),)
2169 define gb_LinkTarget__use_lcms2
2170 $(call gb_LinkTarget_set_include,$(1),\
2171 $$(INCLUDE) \
2172 $(LCMS2_CFLAGS) \
2174 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2176 endef
2178 gb_ExternalProject__use_lcms2 :=
2180 else # !SYSTEM_LCMS2
2182 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2183 lcms2 \
2186 define gb_ExternalProject__use_lcms2
2187 $(call gb_ExternalProject_use_package,$(1),lcms2)
2189 endef
2191 ifeq ($(OS),ANDROID)
2193 define gb_LinkTarget__use_lcms2
2194 $(call gb_LinkTarget_use_package,$(1),lcms2)
2195 $(call gb_LinkTarget_set_include,$(1),\
2196 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2197 $$(INCLUDE) \
2200 endef
2202 else
2204 define gb_LinkTarget__use_lcms2
2205 $(call gb_LinkTarget_use_package,$(1),lcms2)
2206 $(call gb_LinkTarget_set_include,$(1),\
2207 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2208 $$(INCLUDE) \
2210 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2212 endef
2214 endif # ANDROID
2215 endif # SYSTEM_LCMS2
2217 ifneq ($(ENABLE_LPSOLVE),)
2219 ifneq ($(SYSTEM_LPSOLVE),)
2221 define gb_LinkTarget__use_lpsolve
2222 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2223 $(call gb_LinkTarget_add_defs,$(1),\
2224 -DSYSTEM_LPSOLVE \
2227 endef
2229 else # !SYSTEM_LPSOLVE
2231 define gb_LinkTarget__use_lpsolve
2232 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
2233 ifeq ($(COM),MSC)
2234 $(call gb_LinkTarget_add_libs,$(1),\
2235 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2237 else
2238 $(call gb_LinkTarget_add_libs,$(1),\
2239 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2241 endif
2242 $(call gb_LinkTarget_set_include,$(1),\
2243 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2244 $$(INCLUDE) \
2247 endef
2249 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2250 lpsolve \
2253 endif # SYSTEM_LPSOLVE
2255 else
2257 gb_LinkTarget__use_lpsolve :=
2259 endif # ENABLE_LPSOLVE
2261 ifneq ($(ENABLE_COINMP),)
2263 ifneq ($(SYSTEM_COINMP),TRUE)
2265 define gb_LinkTarget__use_coinmp
2266 $(call gb_LinkTarget_use_package,$(1),coinmp)
2267 ifeq ($(COM),MSC)
2268 $(call gb_LinkTarget_add_libs,$(1),\
2269 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2271 else
2272 $(call gb_LinkTarget_add_libs,$(1),\
2273 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2274 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2275 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2276 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2277 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2278 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2279 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2281 endif
2282 $(call gb_LinkTarget_set_include,$(1),\
2283 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2284 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2285 $$(INCLUDE) \
2288 endef
2290 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2291 coinmp \
2294 else # SYSTEM_COINMP
2296 define gb_LinkTarget__use_coinmp
2297 $(call gb_LinkTarget_set_include,$(1),\
2298 $$(INCLUDE) \
2299 $(COINMP_CFLAGS) \
2301 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2303 endef
2305 endif
2307 else
2309 gb_LinkTarget__use_coinmp :=
2311 endif # ENABLE_COINMP
2313 ifeq ($(ENABLE_GIO),TRUE)
2315 define gb_LinkTarget__use_gio
2316 $(call gb_LinkTarget_set_include,$(1),\
2317 $$(INCLUDE) \
2318 $(GIO_CFLAGS) \
2321 $(call gb_LinkTarget_add_defs,$(1),\
2322 -DENABLE_GIO \
2325 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2327 endef
2329 else # ENABLE_GIO
2331 define gb_LinkTarget__use_gio
2333 endef
2335 endif # ENABLE_GIO
2337 ifeq ($(ENABLE_AVAHI),TRUE)
2339 define gb_LinkTarget__use_avahi
2340 $(call gb_LinkTarget_set_include,$(1),\
2341 $$(INCLUDE) \
2342 $(AVAHI_CFLAGS) \
2345 $(call gb_LinkTarget_add_defs,$(1),\
2346 -DENABLE_AVAHI \
2349 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2351 endef
2353 else # ENABLE_AVAHI
2355 gb_LinkTarget__use_avahi :=
2357 endif # ENABLE_AVAHI
2360 define gb_LinkTarget__use_gtk
2361 $(call gb_LinkTarget_set_include,$(1),\
2362 $$(INCLUDE) \
2363 $(GTK_CFLAGS) \
2366 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2368 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2370 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2372 $(call gb_LinkTarget_set_include,$(1),\
2373 $$(INCLUDE) \
2374 $(GTK_PRINT_CFLAGS) \
2377 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2379 endif
2381 endef
2383 define gb_LinkTarget__use_gthread
2384 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2385 endef
2387 ifeq ($(ENABLE_CUPS),TRUE)
2389 define gb_LinkTarget__use_cups
2390 $(call gb_LinkTarget_add_defs,$(1),\
2391 -DENABLE_CUPS \
2394 $(call gb_LinkTarget_add_libs,$(1),\
2395 -lcups \
2398 endef
2400 else # ENABLE_CUPS
2402 define gb_LinkTarget__use_cups
2404 endef
2406 endif # ENABLE_DBUS
2408 ifeq ($(ENABLE_DBUS),TRUE)
2410 define gb_LinkTarget__use_dbus
2411 $(call gb_LinkTarget_set_include,$(1),\
2412 $$(INCLUDE) \
2413 $(DBUS_CFLAGS) \
2416 $(call gb_LinkTarget_add_defs,$(1),\
2417 -DENABLE_DBUS \
2420 ifeq ($(ENABLE_PACKAGEKIT),TRUE)
2421 $(call gb_LinkTarget_add_defs,$(1),\
2422 -DENABLE_PACKAGEKIT \
2424 endif # ENABLE_PACKAGEKIT
2426 $(call gb_LinkTarget_add_libs,$(1),\
2427 $(DBUS_LIBS) \
2430 endef
2432 else # ENABLE_DBUS
2434 define gb_LinkTarget__use_dbus
2436 endef
2438 endif # ENABLE_DBUS
2441 define gb_LinkTarget__use_dbusmenugtk
2442 $(call gb_LinkTarget_set_include,$(1),\
2443 $$(INCLUDE) \
2444 $(DBUSMENUGTK_CFLAGS) \
2447 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2449 endef
2452 ifeq ($(ENABLE_TELEPATHY),TRUE)
2454 define gb_LinkTarget__use_telepathy
2455 $(call gb_LinkTarget_set_include,$(1),\
2456 $$(INCLUDE) \
2457 $(TELEPATHY_CFLAGS) \
2460 $(call gb_LinkTarget_add_libs,$(1),\
2461 $(TELEPATHY_LIBS) \
2464 endef
2466 else # !ENABLE_TELEPATHY
2468 gb_LinkTarget__use_telepathy :=
2470 endif # ENABLE_TELEPATHY
2472 ifneq ($(SYSTEM_LIBPNG),)
2474 define gb_LinkTarget__use_png
2475 $(call gb_LinkTarget_set_include,$(1),\
2476 $$(INCLUDE) \
2477 $(LIBPNG_CFLAGS) \
2480 $(call gb_LinkTarget_add_libs,$(1),\
2481 $(LIBPNG_LIBS) \
2484 endef
2486 else # !SYSTEM_LIBPNG
2488 define gb_LinkTarget__use_png
2489 $(call gb_LinkTarget_set_include,$(1),\
2490 $(LIBPNG_CFLAGS) \
2491 $$(INCLUDE) \
2493 $(call gb_LinkTarget_use_static_libraries,$(1),\
2494 png \
2496 $(call gb_LinkTarget__use_zlib,$(1))
2498 endef
2500 endif # !SYSTEM_LIBPNG
2503 ifneq ($(SYSTEM_CURL),)
2505 define gb_LinkTarget__use_curl
2506 $(call gb_LinkTarget_add_defs,$(1),\
2507 -DSYSTEM_CURL \
2509 $(call gb_LinkTarget_set_include,$(1),\
2510 $$(INCLUDE) \
2511 $(CURL_CFLAGS) \
2513 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2515 endef
2517 else # !SYSTEM_CURL
2519 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2520 curl \
2523 define gb_LinkTarget__use_curl
2524 $(call gb_LinkTarget_use_package,$(1),curl)
2525 $(call gb_LinkTarget_set_include,$(1),\
2526 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2527 $$(INCLUDE) \
2530 ifeq ($(COM),MSC)
2531 $(call gb_LinkTarget_add_libs,$(1),\
2532 $(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 \
2534 else
2535 $(call gb_LinkTarget_add_libs,$(1),\
2536 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2538 endif
2540 endef
2542 endif # SYSTEM_CURL
2544 ifeq ($(ENABLE_VALGRIND),TRUE)
2546 define gb_LinkTarget__use_valgrind
2547 $(call gb_LinkTarget_add_defs,$(1),\
2548 -DHAVE_VALGRIND_HEADERS \
2551 $(call gb_LinkTarget_set_include,$(1),\
2552 $$(INCLUDE) \
2553 $(VALGRIND_CFLAGS) \
2556 endef
2558 else # !ENABLE_VALGRIND
2560 define gb_LinkTarget__use_valgrind
2562 endef
2564 endif # ENABLE_VALGRIND
2566 ifneq ($(SYSTEM_POPPLER),)
2568 define gb_LinkTarget__use_poppler
2569 $(call gb_LinkTarget_set_include,$(1),\
2570 $(POPPLER_CFLAGS) \
2571 $$(INCLUDE) \
2574 $(call gb_LinkTarget_add_libs,$(1),\
2575 $(POPPLER_LIBS) \
2578 endef
2580 else # !SYSTEM_POPPLER
2582 define gb_LinkTarget__use_poppler
2583 $(call gb_LinkTarget_use_external_project,$(1),poppler)
2585 $(call gb_LinkTarget_set_include,$(1),\
2586 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2587 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2588 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2589 $$(INCLUDE) \
2592 $(call gb_LinkTarget_add_libs,$(1),\
2593 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2594 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2595 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2598 ifeq ($(OS),MACOSX)
2599 $(call gb_LinkTarget_add_libs,$(1),\
2600 -lobjc \
2602 else ifeq ($(OS),LINUX)
2603 $(call gb_LinkTarget_add_libs,$(1),\
2604 -pthread \
2606 else ifeq ($(OS),WNT)
2607 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2608 advapi32 \
2609 gdi32 \
2611 endif
2613 endef
2615 endif # SYSTEM_POPPLER
2618 ifneq ($(SYSTEM_CLUCENE),)
2620 define gb_LinkTarget__use_clucene
2621 $(call gb_LinkTarget_add_defs,$(1),\
2622 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2625 $(call gb_LinkTarget_set_include,$(1),\
2626 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2627 $$(INCLUDE) \
2630 $(call gb_LinkTarget_add_libs,$(1),\
2631 $(CLUCENE_LIBS) \
2634 endef
2636 else # !SYSTEM_CLUCENE
2638 define gb_LinkTarget__use_clucene
2639 $(call gb_LinkTarget_set_include,$(1),\
2640 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2641 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2642 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2643 $$(INCLUDE) \
2646 $(call gb_LinkTarget_use_libraries,$(1),\
2647 clucene \
2650 endef
2652 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2653 clucene \
2656 endif # SYSTEM_CLUCENE
2658 define gb_LinkTarget__use_gobject
2659 $(call gb_LinkTarget_add_libs,$(1),\
2660 $(GOBJECT_LIBS) \
2663 $(call gb_LinkTarget_set_include,$(1),\
2664 $$(INCLUDE) \
2665 $(GOBJECT_CFLAGS) \
2667 endef
2669 ifneq ($(SYSTEM_HSQLDB),)
2671 define gb_LinkTarget__use_hsqldb
2673 $(call gb_LinkTarget_add_defs,$(1),\
2674 -DSYSTEM_HSQLDB \
2675 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2678 endef
2680 else # !SYSTEM_HSQLDB
2682 define gb_LinkTarget__use_hsqldb
2684 endef
2686 endif # SYSTEM_HSQLDB
2689 ifneq ($(SYSTEM_OPENLDAP),)
2691 define gb_LinkTarget__use_openldap
2693 $(call gb_LinkTarget_add_libs,$(1),\
2694 -lldap \
2695 -llber \
2698 endef
2700 gb_ExternalProject__use_openldap :=
2702 else # !SYSTEM_OPENLDAP
2704 define gb_LinkTarget__use_openldap
2705 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2706 $(call gb_LinkTarget_set_include,$(1),\
2707 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2708 $$(INCLUDE) \
2710 $(call gb_LinkTarget_use_external_project,$(1),openldap)
2711 $(call gb_LinkTarget_add_libs,$(1), \
2712 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2713 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2716 endef
2718 define gb_ExternalProject__use_openldap
2719 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2721 endef
2723 endif # SYSTEM_OPENLDAP
2726 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2728 ifneq ($(SYSTEM_FIREBIRD),)
2730 define gb_LinkTarget__use_libfbembed
2731 $(call gb_LinkTarget_set_include,$(1),\
2732 $(FIREBIRD_CFLAGS) \
2733 $$(INCLUDE) \
2735 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2737 endef
2739 # gb_LinkTarget__use_atomic_ops :=
2740 # gb_LinkTarget__use_tommath :=
2742 else # !SYSTEM_FIREBIRD
2744 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2746 define gb_LinkTarget__use_libfbembed
2747 $(call gb_LinkTarget_use_package,$(1),firebird)
2748 $(call gb_LinkTarget_set_include,$(1),\
2749 $$(INCLUDE) \
2750 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
2752 ifeq ($(COM),MSC)
2753 $(call gb_LinkTarget_add_libs,$(1),\
2754 $(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
2756 else
2757 $(call gb_LinkTarget_add_libs,$(1),\
2758 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
2760 endif
2762 endef
2764 # define gb_LinkTarget__use_tommath
2765 # $(call gb_LinkTarget_set_include,$(1),\
2766 # $(TOMMATH_CFLAGS) \
2767 # $$(INCLUDE) \
2770 # $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
2772 # endef
2774 endif # SYSTEM_FIREBIRD
2776 else # !ENABLE_FIREBIRD_SDBC
2778 gb_LinkTarget__use_firebird :=
2779 # gb_LinkTarget__use_atomic_ops :=
2780 # gb_LinkTarget__use_tommath :=
2782 endif # ENABLE_FIREBIRD_SDBC
2785 ifneq ($(SYSTEM_POSTGRESQL),)
2787 define gb_LinkTarget__use_postgresql
2789 $(call gb_LinkTarget_set_include,$(1),\
2790 $(POSTGRESQL_INC) \
2791 $$(INCLUDE) \
2794 $(call gb_LinkTarget_add_libs,$(1),\
2795 -lpq \
2798 $(call gb_LinkTarget_add_ldflags,$(1),\
2799 $(POSTGRESQL_LIB) \
2802 endef
2804 else # !SYSTEM_POSTGRESQL
2806 define gb_LinkTarget__use_postgresql
2808 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2810 $(call gb_LinkTarget_set_include,$(1),\
2811 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2812 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2813 $$(INCLUDE) \
2816 $(call gb_LinkTarget_add_libs,$(1),\
2817 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2820 ifeq ($(OS)$(COM),WNTMSC)
2821 $(call gb_LinkTarget_use_external,$(1),openssl)
2823 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2824 secur32 \
2825 ws2_32 \
2828 endif
2830 endef
2832 endif # SYSTEM_POSTGRESQL
2834 ifneq ($(WITH_MOZAB4WIN),)
2836 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2837 moz_runtime \
2840 define gb_LinkTarget__use_mozilla
2842 $(call gb_LinkTarget_use_unpacked,$(1),moz_lib)
2843 $(call gb_LinkTarget_use_unpacked,$(1),moz_inc)
2845 $(call gb_LinkTarget_add_defs,$(1),\
2846 -DMOZILLA_INTERNAL_API \
2849 $(call gb_LinkTarget_set_include,$(1),\
2850 -I$(call gb_UnpackedTarball_get_dir,moz_inc) \
2851 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/addrbook \
2852 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/content \
2853 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/embed_base \
2854 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/intl \
2855 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mime \
2856 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/mozldap \
2857 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/msgbase \
2858 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/necko \
2859 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/pref \
2860 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/profile \
2861 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/rdf \
2862 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/string \
2863 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/uconv \
2864 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom \
2865 -I$(call gb_UnpackedTarball_get_dir,moz_inc)/xpcom_obsolete \
2866 $$(INCLUDE) \
2869 $(call gb_LinkTarget_add_libs,$(1),\
2870 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
2871 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom.lib \
2872 $(call gb_UnpackedTarball_get_dir,moz_lib)/xpcom_core.lib \
2875 $(call gb_LinkTarget_add_defs,$(1),\
2876 -DMOZILLA_CLIENT \
2877 -DMOZ_REFLOW_PERF \
2878 -DMOZ_REFLOW_PERF_DSP \
2879 -DMOZ_XUL \
2880 -DOJI \
2881 -DWIN32 \
2882 -DXP_PC \
2883 -DXP_WIN \
2884 -DXP_WIN32 \
2885 -D_WINDOWS \
2888 ifeq ($(COM),GCC)
2890 $(call gb_LinkTarget_add_cxxflags,$(1),\
2891 -Wall \
2892 -Wcast-align \
2893 -Wconversion \
2894 -Wno-long-long \
2895 -Woverloaded-virtual \
2896 -Wpointer-arith \
2897 -Wsynth \
2898 -fno-rtti \
2901 else
2903 ifneq ($(DBG_LEVEL),0)
2904 $(call gb_LinkTarget_add_defs,$(1),\
2905 -D_STL_NOFORCE_MANIFEST \
2907 endif
2909 $(call gb_LinkTarget_add_libs,$(1),\
2910 $(call gb_UnpackedTarball_get_dir,moz_lib)/embed_base_s.lib \
2911 $(call gb_UnpackedTarball_get_dir,moz_lib)/mozreg_s.lib \
2914 endif # !GCC
2916 endef
2918 endif # WITH_MOZAB4WIN
2920 ifeq ($(ENABLE_KDE),TRUE)
2922 define gb_LinkTarget__use_kde
2923 $(call gb_LinkTarget_set_include,$(1),\
2924 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS)))) \
2925 $$(INCLUDE) \
2928 $(call gb_LinkTarget_add_defs,$(1),\
2929 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE_CFLAGS))) \
2932 $(call gb_LinkTarget_add_libs,$(1),\
2933 $(KDE_LIBS) \
2936 ifeq ($(COM),GCC)
2937 $(call gb_LinkTarget_add_cxxflags,$(1),\
2938 -Wno-shadow \
2940 endif
2942 endef
2944 else # !ENABLE_KDE
2946 define gb_LinkTarget__use_kde
2948 endef
2950 endif # ENABLE_KDE
2953 ifeq ($(ENABLE_KDE4),TRUE)
2955 define gb_LinkTarget__use_kde4
2956 $(call gb_LinkTarget_set_include,$(1),\
2957 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
2958 $$(INCLUDE) \
2961 $(call gb_LinkTarget_add_defs,$(1),\
2962 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
2965 $(call gb_LinkTarget_add_libs,$(1),\
2966 $(KDE4_LIBS) \
2969 ifeq ($(COM),GCC)
2970 $(call gb_LinkTarget_add_cxxflags,$(1),\
2971 -Wno-shadow \
2973 endif
2975 endef
2977 else # !ENABLE_KDE4
2979 define gb_LinkTarget__use_kde4
2981 endef
2983 endif # ENABLE_KDE4
2986 ifeq ($(ENABLE_TDE),TRUE)
2988 define gb_LinkTarget__use_tde
2989 $(call gb_LinkTarget_add_libs,$(1),\
2990 $(TDE_LIBS) \
2993 $(call gb_LinkTarget_set_include,$(1),\
2994 $$(INCLUDE) \
2995 $(TDE_CFLAGS) \
2997 endef
2999 else # ! ENABLE_TDE
3001 define gb_LinkTarget__use_tde
3003 endef
3005 endif # ENABLE_TDE
3008 ifeq ($(ENABLE_GCONF),TRUE)
3010 define gb_LinkTarget__use_gconf
3011 $(call gb_LinkTarget_set_include,$(1),\
3012 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS)))) \
3013 $$(INCLUDE) \
3016 $(call gb_LinkTarget_add_defs,$(1),\
3017 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(GCONF_CFLAGS))) \
3020 $(call gb_LinkTarget_add_libs,$(1),\
3021 $(GCONF_LIBS) \
3024 endef
3026 else # !ENABLE_GCONF
3028 define gb_LinkTarget__use_gconf
3030 endef
3032 endif # ENABLE_GCONF
3035 # PYTHON
3036 # extra python_headers external because pyuno wrapper must not link python
3037 ifneq ($(SYSTEM_PYTHON),)
3039 define gb_LinkTarget__use_python_headers
3040 $(call gb_LinkTarget_add_defs,$(1),\
3041 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3044 $(call gb_LinkTarget_set_include,$(1),\
3045 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3046 $$(INCLUDE) \
3049 endef
3051 define gb_LinkTarget__use_python
3052 $(call gb_LinkTarget__use_python_headers,$(1))
3054 $(call gb_LinkTarget_add_libs,$(1),\
3055 $(PYTHON_LIBS) \
3058 endef
3060 else # !SYSTEM_PYTHON
3062 $(eval $(call gb_Helper_register_packages_for_install,python,\
3063 python3 \
3066 # depend on external project because on MACOSX the Package is disabled...
3067 define gb_LinkTarget__use_python_headers
3068 $(call gb_LinkTarget_use_external_project,$(1),python3)
3069 $(call gb_LinkTarget_set_include,$(1),\
3070 -I$(call gb_UnpackedTarball_get_dir,python3) \
3071 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3072 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3073 $$(INCLUDE) \
3076 endef
3078 define gb_LinkTarget__use_python
3079 $(call gb_LinkTarget__use_python_headers,$(1))
3081 ifeq ($(OS),WNT)
3082 $(call gb_LinkTarget_add_libs,$(1),\
3083 $(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 \
3085 else ifeq ($(OS),MACOSX)
3086 $(call gb_LinkTarget_add_libs,$(1),\
3087 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3089 else
3090 $(call gb_LinkTarget_add_libs,$(1),\
3091 -L$(call gb_UnpackedTarball_get_dir,python3) \
3092 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3094 endif
3096 endef
3098 endif # SYSTEM_PYTHON
3100 # ORCUS
3101 ifeq ($(ENABLE_ORCUS),TRUE)
3103 ifneq ($(SYSTEM_LIBORCUS),)
3105 define gb_LinkTarget__use_orcus
3106 $(call gb_LinkTarget_set_include,$(1),\
3107 $$(INCLUDE) \
3108 $(ORCUS_CFLAGS) \
3110 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3111 endef
3113 define gb_LinkTarget__use_orcus-parser
3115 endef
3117 else # !SYSTEM_LIBORCUS
3119 define gb_LinkTarget__use_orcus
3120 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3121 $(call gb_LinkTarget_set_include,$(1),\
3122 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3123 $$(INCLUDE) \
3125 $(call gb_LinkTarget_add_libs,$(1),\
3126 $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
3129 $(if $(SYSTEM_BOOST), \
3130 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3131 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3134 endef
3136 define gb_LinkTarget__use_orcus-parser
3137 $(call gb_LinkTarget_use_external_project,$(1),liborcus)
3138 $(call gb_LinkTarget_set_include,$(1),\
3139 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3140 $$(INCLUDE) \
3142 $(call gb_LinkTarget_add_libs,$(1),\
3143 $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
3146 endef
3148 endif # SYSTEM_LIBORCUS
3150 else # ENABLE_ORCUS != TRUE
3152 gb_LinkTarget__use_orcus :=
3153 gb_LinkTarget__use_orcus-parser :=
3155 endif
3157 ifeq ($(ENABLE_EOT),TRUE)
3159 ifneq ($(SYSTEM_LIBEOT),)
3161 define gb_LinkTarget__use_libeot
3162 $(call gb_LinkTarget_set_include,$(1),\
3163 $$(INCLUDE) \
3164 $(LIBEOT_CFLAGS) \
3166 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3168 endef
3170 gb_ExternalProject__use_libeot :=
3172 else # !SYSTEM_LIBEOT
3174 define gb_LinkTarget__use_libeot
3175 $(call gb_LinkTarget_set_include,$(1),\
3176 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3177 $$(INCLUDE) \
3179 $(call gb_LinkTarget_add_libs,$(1),\
3180 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3182 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3184 endef
3186 define gb_ExternalProject__use_libeot
3187 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3189 endef
3191 endif # SYSTEM_LIBEOT
3193 else # !ENABLE_EOT
3195 gb_LinkTarget__use_libeot :=
3196 gb_ExternalProject__use_libeot :=
3198 endif # ENABLE_EOT
3200 ### X11 stuff ###
3202 ifeq ($(GUIBASE),unx)
3204 ifeq ($(XRANDR_DLOPEN),FALSE)
3206 define gb_LinkTarget__use_Xrandr
3207 $(call gb_LinkTarget_set_include,$(1),\
3208 $$(INCLUDE) \
3209 $(XRANDR_CFLAGS) \
3212 $(call gb_LinkTarget_add_libs,$(1),\
3213 $(XRANDR_LIBS) \
3215 endef
3217 else # XRANDR_DLOPEN
3219 define gb_LinkTarget__use_Xrandr
3220 $(call gb_LinkTarget_add_defs,$(1),\
3221 -DXRANDR_DLOPEN \
3223 endef
3225 endif # XRANDR_DLOPEN
3227 define gb_LinkTarget__use_Xrender
3228 $(call gb_LinkTarget_set_include,$(1),\
3229 $$(INCLUDE) \
3230 $(XRENDER_CFLAGS) \
3233 $(call gb_LinkTarget_add_libs,$(1),\
3234 $(XRENDER_LIBS) \
3236 endef
3238 endif # GUIBASE=unx
3241 gb_ExternalProject__use_nss3:=
3243 ifeq ($(OS),ANDROID)
3245 gb_LinkTarget__use_nss3:=
3247 else
3249 ifneq ($(SYSTEM_NSS),)
3251 define gb_LinkTarget__use_nss3
3252 $(call gb_LinkTarget_add_defs,$(1),\
3253 -DSYSTEM_NSS \
3256 $(call gb_LinkTarget_set_include,$(1),\
3257 $$(INCLUDE) \
3258 $(NSS_CFLAGS) \
3261 $(call gb_LinkTarget_add_libs,$(1),\
3262 $(NSS_LIBS) \
3265 endef
3267 define gb_LinkTarget__use_plc4
3268 $(call gb_LinkTarget__use_nss3,$(1))
3270 endef
3272 define gb_LinkTarget__use_ssl3
3273 $(call gb_LinkTarget__use_nss3,$(1))
3275 endef
3277 else # !SYSTEM_NSS
3279 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3280 nss \
3283 define gb_LinkTarget__use_nss3
3284 $(call gb_LinkTarget_use_package,$(1),nss)
3285 $(call gb_LinkTarget_set_include,$(1),\
3286 $$(INCLUDE) \
3287 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3288 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3291 ifeq ($(COM),MSC)
3292 $(call gb_LinkTarget_add_libs,$(1),\
3293 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3294 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3295 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3297 else
3298 $(call gb_LinkTarget_add_libs,$(1),\
3299 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3300 -lnspr4 \
3301 -lnss3 \
3302 -lsmime3 \
3304 endif
3306 endef
3308 define gb_LinkTarget__use_plc4
3309 $(call gb_LinkTarget_use_package,$(1),nss)
3310 ifeq ($(COM),MSC)
3311 $(call gb_LinkTarget_add_libs,$(1),\
3312 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3314 else
3315 $(call gb_LinkTarget_add_libs,$(1),\
3316 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3318 endif
3320 endef
3322 define gb_LinkTarget__use_ssl3
3323 $(call gb_LinkTarget_use_package,$(1),nss)
3324 ifeq ($(COM),MSC)
3325 $(call gb_LinkTarget_add_libs,$(1),\
3326 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3328 else
3329 $(call gb_LinkTarget_add_libs,$(1),\
3330 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3332 endif
3334 endef
3336 define gb_ExternalProject__use_nss3
3337 $(call gb_ExternalProject_use_package,$(1),nss)
3339 endef
3341 endif # SYSTEM_NSS
3343 endif # DESKTOP
3345 ifeq ($(ENABLE_GLTF),TRUE)
3347 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3349 define gb_LinkTarget__use_libgltf
3350 $(call gb_LinkTarget_set_include,$(1),\
3351 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3352 $$(INCLUDE) \
3355 ifeq ($(COM),MSC)
3356 $(call gb_LinkTarget_add_libs,$(1),\
3357 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3359 else
3360 $(call gb_LinkTarget_add_libs,$(1),\
3361 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3363 endif
3365 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3367 endef
3369 else # SYSTEM_LIBGLTF
3371 define gb_LinkTarget__use_libgltf
3372 $(call gb_LinkTarget_set_include,$(1),\
3373 $$(INCLUDE) \
3374 $(LIBGLTF_CFLAGS) \
3376 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3378 endef
3380 endif # SYSTEN_LIBGLTF
3382 ifeq ($(ENABLE_COLLADA),TRUE)
3384 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3386 define gb_LinkTarget__use_opencollada_parser
3387 $(call gb_LinkTarget_set_include,$(1),\
3388 $$(INCLUDE) \
3389 $(OPENCOLLADA_CFLAGS) \
3392 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3394 endef
3396 else # !SYSTEM_OPENCOLLADA
3398 define gb_LinkTarget__use_opencollada_parser
3399 $(call gb_LinkTarget_set_include,$(1),\
3400 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3401 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3402 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3403 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3404 $$(INCLUDE) \
3407 $(call gb_LinkTarget_use_static_libraries,$(1),\
3408 opencollada_parser \
3410 endef
3412 endif # SYSTEM_OPENCOLLADA
3414 define gb_LinkTarget__use_collada2gltf
3415 $(call gb_LinkTarget_set_include,$(1),\
3416 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3417 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3418 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3419 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3420 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3421 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3422 $$(INCLUDE) \
3425 $(call gb_LinkTarget_use_static_libraries,$(1),\
3426 collada2gltf \
3428 endef
3430 endif # ENABLE_COLLADA
3432 endif # ENABLE_GLTF
3434 ### Jars ############################################################
3436 ifneq ($(SYSTEM_HSQLDB),)
3438 define gb_Jar__use_hsqldb
3439 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3440 endef
3441 define gb_JunitTest__use_hsqldb
3442 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3443 endef
3445 else # !SYSTEM_HSQLDB
3447 ifeq ($(ENABLE_JAVA),TRUE)
3448 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3449 hsqldb \
3451 endif
3453 define gb_Jar__use_hsqldb
3454 $(call gb_Jar_use_jar,$(1),hsqldb)
3455 endef
3456 define gb_JunitTest__use_hsqldb
3457 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3458 endef
3460 endif # SYSTEM_HSQLDB
3463 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3465 ifneq ($(SYSTEM_BSH),)
3467 define gb_Jar__use_bsh
3468 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3469 endef
3471 else # !SYSTEM_BSH
3473 ifeq ($(ENABLE_JAVA),TRUE)
3474 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3475 bsh \
3477 endif
3479 define gb_Jar__use_bsh
3480 $(call gb_Jar_use_jar,$(1),bsh)
3481 endef
3483 endif # SYSTEM_BSH
3485 endif
3487 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3489 ifneq ($(SYSTEM_RHINO),)
3491 define gb_Jar__use_rhino
3492 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3493 endef
3495 else # !SYSTEM_RHINO
3497 ifeq ($(ENABLE_JAVA),TRUE)
3498 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3499 js \
3501 endif
3503 define gb_Jar__use_rhino
3504 $(call gb_Jar_use_jar,$(1),js)
3505 endef
3507 endif # SYSTEM_RHINO
3509 endif
3511 ifneq ($(SYSTEM_APACHE_COMMONS),)
3513 define gb_Jar__use_commons-codec
3514 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
3515 endef
3516 gb_ExternalProject__use_commons-codec :=
3518 define gb_Jar__use_commons-httpclient
3519 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
3520 endef
3521 gb_ExternalProject__use_commons-httpclient :=
3523 define gb_Jar__use_commons-lang
3524 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
3525 endef
3526 gb_ExternalProject__use_commons-lang :=
3528 define gb_Jar__use_commons-logging
3529 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3530 endef
3531 gb_ExternalProject__use_commons-logging :=
3533 else # !SYSTEM_APACHE_COMMONS
3535 ifeq ($(ENABLE_JAVA),TRUE)
3536 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3537 commons-logging-$(COMMONS_LOGGING_VERSION) \
3539 endif
3540 $(eval $(call gb_Helper_register_jars,OXT,\
3541 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
3542 commons-httpclient-3.1 \
3543 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
3546 define gb_Jar__use_commons-codec
3547 $(call gb_Jar_use_external_project,$(1),apache_commons_codec)
3548 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
3549 $(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
3550 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
3552 endef
3553 define gb_ExternalProject__use_commons-codec
3554 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
3555 endef
3557 define gb_Jar__use_commons-httpclient
3558 $(call gb_Jar_use_external_project,$(1),apache_commons_httpclient)
3559 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar,commons-httpclient-3.1.jar)
3560 endef
3561 define gb_ExternalProject__use_commons-httpclient
3562 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
3563 endef
3565 define gb_Jar__use_commons-lang
3566 $(call gb_Jar_use_external_project,$(1),apache_commons_lang)
3567 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
3568 $(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
3569 $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
3571 endef
3572 define gb_ExternalProject__use_commons-lang
3573 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
3574 endef
3576 define gb_Jar__use_commons-logging
3577 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3578 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3579 endef
3580 define gb_ExternalProject__use_commons-logging
3581 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3582 endef
3584 endif # SYSTEM_APACHE_COMMONS
3587 ifneq ($(SYSTEM_JFREEREPORT),)
3589 define gb_Jar__use_flow-engine
3590 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3591 endef
3593 define gb_Jar__use_flute
3594 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3595 endef
3597 define gb_Jar__use_libbase
3598 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3599 endef
3601 define gb_Jar__use_libfonts
3602 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3603 endef
3605 define gb_Jar__use_libformula
3606 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3607 endef
3609 define gb_Jar__use_liblayout
3610 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3611 endef
3613 define gb_Jar__use_libloader
3614 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3615 endef
3617 define gb_Jar__use_librepository
3618 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3619 endef
3621 define gb_Jar__use_libserializer
3622 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3623 endef
3625 define gb_Jar__use_libxml
3626 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3627 endef
3629 define gb_Jar__use_sac
3630 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3631 endef
3633 else # !SYSTEM_JFREEREPORT
3635 ifeq ($(ENABLE_JAVA),TRUE)
3636 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3637 flow-engine \
3638 flute-1.1.6 \
3639 libbase-1.1.6 \
3640 libfonts-1.1.6 \
3641 libformula-1.1.7 \
3642 liblayout \
3643 libloader-1.1.6 \
3644 librepository-1.1.6 \
3645 libserializer-1.1.6 \
3646 libxml-1.1.7 \
3647 sac \
3649 endif
3651 define gb_Jar__use_flow-engine
3652 $(call gb_Jar_use_jar,$(1),flow-engine)
3653 endef
3655 define gb_Jar__use_flute
3656 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3657 endef
3659 define gb_Jar__use_libbase
3660 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3661 endef
3663 define gb_Jar__use_libfonts
3664 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3665 endef
3667 define gb_Jar__use_libformula
3668 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3669 endef
3671 define gb_Jar__use_liblayout
3672 $(call gb_Jar_use_jar,$(1),liblayout)
3673 endef
3675 define gb_Jar__use_libloader
3676 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3677 endef
3679 define gb_Jar__use_librepository
3680 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3681 endef
3683 define gb_Jar__use_libserializer
3684 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3685 endef
3687 define gb_Jar__use_libxml
3688 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3689 endef
3691 define gb_Jar__use_sac
3692 $(call gb_Jar_use_jar,$(1),sac)
3693 endef
3695 endif # SYSTEM_JFREEREPORT
3698 # Executables
3700 # FIXME: the library target should be for build too
3701 define gb_Executable__register_bestreversemap
3702 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3703 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3705 endef
3707 # TODO depending on the whole URE might be overkill, but I do not have a
3708 # Windows machine to debug it...
3709 # FIXME: the library target should be for build too
3710 define gb_Executable__register_climaker
3711 $(call gb_Executable_add_runtime_dependencies,climaker,\
3712 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3713 $(call gb_Rdb_get_target_for_build,ure/services) \
3714 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3715 $(call gb_UnoApi_get_target,udkapi) \
3717 endef
3719 define gb_Executable__register_cppumaker
3720 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3721 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3723 endef
3725 gb_Gallery__UNO_COMPONENTS := \
3726 comphelper/util/comphelp \
3727 configmgr/source/configmgr \
3728 drawinglayer/drawinglayer \
3729 framework/util/fwk \
3730 i18npool/util/i18npool \
3731 package/source/xstor/xstor \
3732 package/util/package2 \
3733 sax/source/expatwrap/expwrap \
3734 sfx2/util/sfx \
3735 svgio/svgio \
3736 svx/util/svx \
3737 svx/util/svxcore \
3738 ucb/source/core/ucb1 \
3739 ucb/source/ucp/file/ucpfile1 \
3740 unoxml/source/service/unoxml
3742 # This is used to determine what we need for 'build' platform.
3743 define gb_Executable__register_gengal
3744 $(call gb_Executable_add_runtime_dependencies,gengal,\
3745 $(foreach component,$(gb_Gallery__UNO_COMPONENTS) \
3746 ,$(call gb_ComponentTarget_get_target_for_build,$(component))) \
3747 $(call gb_AllLangResTarget_get_target,ofa) \
3748 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3749 $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
3750 $(call gb_Library_get_target,vclplug_svp) \
3751 )) \
3752 $(call gb_Package_get_target_for_build,postprocess_images) \
3753 $(call gb_Package_get_target_for_build,postprocess_registry) \
3754 $(call gb_Rdb_get_target_for_build,ure/services) \
3755 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3756 $(call gb_UnoApi_get_target,offapi) \
3757 $(call gb_UnoApi_get_target,udkapi) \
3759 endef
3761 ifeq ($(SYSTEM_ICU),)
3763 define gb_Executable__register_gendict
3764 $(call gb_Executable_add_runtime_dependencies,gendict,\
3765 $(call gb_Package_get_target_for_build,icu) \
3767 endef
3769 endif
3771 define gb_Executable__register_idlc
3772 $(call gb_Executable_add_runtime_dependencies,idlc,\
3773 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3775 endef
3777 define gb_Executable__register_localize
3778 $(call gb_Executable_add_runtime_dependencies,localize,\
3779 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3780 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3783 endef
3785 # FIXME ure/services.rdb needs cleanup
3786 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3787 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3788 # FIXME: the library target should be for build too
3789 define gb_Executable__register_saxparser
3790 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3791 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3792 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3793 $(call gb_Rdb_get_target_for_build,saxparser) \
3794 $(call gb_Rdb_get_target_for_build,ure/services) \
3795 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3796 $(call gb_UnoApi_get_target,udkapi) \
3798 endef
3800 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3801 # required due to the settings for URE_SERVICES and URE_TYPES in
3802 # cppuhelper/source/unorc
3803 # FIXME: the library target should be for build too
3804 define gb_Executable__register_uno
3805 $(call gb_Executable_add_runtime_dependencies,uno,\
3806 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3807 $(call gb_Rdb_get_target_for_build,ure/services) \
3808 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3809 $(call gb_UnoApi_get_target,udkapi) \
3811 endef
3814 # External executables
3816 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3818 gb_ExternalExecutable__register_xmllint :=
3820 else # ! SYSTEM_LIBXML_FOR_BUILD
3822 define gb_ExternalExecutable__register_xmllint
3823 $(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)
3824 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3825 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3826 $(call gb_Package_get_target,xml2) \
3829 endef
3831 endif # SYSTEM_LIBXML_FOR_BUILD
3833 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3835 gb_ExternalExecutable__register_xsltproc :=
3837 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3839 define gb_ExternalExecutable__register_xsltproc
3840 $(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)
3841 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3842 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3843 $(call gb_Package_get_target,xslt) \
3846 endef
3848 endif # SYSTEM_LIBXSLT_FOR_BUILD
3850 ifneq (,$(SYSTEM_UCPP))
3852 gb_ExternalExecutable__register_ucpp :=
3854 else # ! SYSTEM_UCPP
3856 define gb_ExternalExecutable__register_ucpp
3857 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3859 endef
3861 endif # SYSTEM_UCPP
3863 ifeq (,$(PYTHON_FOR_BUILD))
3865 define gb_ExternalExecutable__register_python
3866 ifeq ($(OS),MACOSX)
3868 # use set_external, to avoid having the command added as prerequisite for the
3869 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3870 # matching rule to build that specific file)
3871 $(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))
3872 # the Zip ensures that internal python has been built (cannot use the Package
3873 # target, as that is not used on Mac)
3874 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3876 else
3878 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3879 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3880 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3882 endif
3884 endef
3886 else
3888 define gb_ExternalExecutable__register_python
3889 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3891 endef
3893 endif # PYTHON_FOR_BUILD
3895 ifneq ($(SYSTEM_GENBRK),)
3897 define gb_ExternalExecutable__register_genbrk
3898 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3900 endef
3902 else # ! SYSTEM_GENBRK
3904 define gb_ExternalExecutable__register_genbrk
3905 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3906 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3907 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3908 $(call gb_Package_get_target_for_build,icu) \
3911 endef
3913 endif
3915 ifneq ($(SYSTEM_GENCCODE),)
3917 define gb_ExternalExecutable__register_genccode
3918 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3920 endef
3922 else # ! SYSTEM_GENCCODE
3924 define gb_ExternalExecutable__register_genccode
3925 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3926 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3927 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3928 $(call gb_Package_get_target_for_build,icu) \
3931 endef
3933 endif
3935 ifneq ($(SYSTEM_GENCMN),)
3937 define gb_ExternalExecutable__register_gencmn
3938 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3940 endef
3942 else # ! SYSTEM_GENCMN
3944 define gb_ExternalExecutable__register_gencmn
3945 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3946 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3947 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3948 $(call gb_Package_get_target_for_build,icu) \
3951 endef
3953 endif
3955 # vim: set noet sw=4 ts=4: