bump product version to 4.1.6.2
[LibreOffice.git] / RepositoryExternal.mk
blob2f2502938a53d8bdc4b5bc4b836c2e24133e9ecc
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 ifeq ($(SYSTEM_MARIADB),YES)
34 define gb_LinkTarget__use_mariadb
35 $(call gb_LinkTarget_set_include,$(1),\
36 $$(INCLUDE) \
37 $(MARIADB_CFLAGS) \
39 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
41 endef
42 gb_ExternalProject__use_mariadb :=
44 else # !SYSTEM_MARIADB
46 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
47 mariadblib \
50 define gb_LinkTarget__use_mariadb
51 $(call gb_LinkTarget_set_include,$(1),\
52 $$(INCLUDE) \
53 $(MARIADB_CFLAGS) \
55 $(call gb_LinkTarget_use_static_libraries,$(1),\
56 mariadblib \
59 endef
60 define gb_ExternalProject__use_mariadb
61 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
63 endef
65 endif # SYSTEM_MARIADB
68 ifeq ($(SYSTEM_MESA_HEADERS),YES)
70 gb_LinkTarget__use_mesa_headers :=
72 else
74 define gb_LinkTarget__use_mesa_headers
75 $(call gb_LinkTarget_set_include,$(1),\
76 -I$(SRCDIR)/Mesa/inc \
77 $$(INCLUDE) \
80 endef
82 endif
84 ifeq ($(SYSTEM_NPAPI_HEADERS),YES)
86 # yes this uses internal headers too...
87 # they are split across 2 dirs for this reason
88 define gb_LinkTarget__use_npapi_headers
89 $(call gb_LinkTarget_set_include,$(1),\
90 $(NPAPI_HEADERS_CFLAGS) \
91 -I$(SRCDIR)/np_sdk \
92 $$(INCLUDE) \
95 endef
97 else #!SYSTEM_NPAPI_HEADERS
99 define gb_LinkTarget__use_npapi_headers
100 $(call gb_LinkTarget_set_include,$(1),\
101 -I$(SRCDIR)/np_sdk/inc \
102 -I$(SRCDIR)/np_sdk \
103 $$(INCLUDE) \
106 endef
108 endif #SYSTEM_NPAPI_HEADERS
110 ifeq ($(SYSTEM_ODBC_HEADERS),YES)
112 define gb_LinkTarget__use_odbc_headers
113 $(call gb_LinkTarget_add_defs,$(1),\
114 -DSYSTEM_ODBC_HEADERS \
117 endef
119 else
121 define gb_LinkTarget__use_odbc_headers
122 $(call gb_LinkTarget_set_include,$(1),\
123 -I$(SRCDIR)/unixODBC/inc \
124 $$(INCLUDE) \
127 endef
129 endif
131 ifeq ($(SYSTEM_VIGRA),YES)
133 gb_LinkTarget__use_vigra_headers :=
135 else
137 define gb_LinkTarget__use_vigra_headers
138 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
139 $(call gb_LinkTarget_set_include,$(1),\
140 -I$(call gb_UnpackedTarball_get_dir,vigra/include) \
141 $$(INCLUDE) \
144 endef
146 endif
148 ifeq ($(SYSTEM_MDDS),YES)
150 gb_LinkTarget__use_mdds_headers :=
152 else
154 define gb_LinkTarget__use_mdds_headers
155 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
156 $(call gb_LinkTarget_set_include,$(1),\
157 -I$(call gb_UnpackedTarball_get_dir,mdds/include) \
158 $$(INCLUDE) \
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)/$(if $(filter WNT,$(OS)),twain,sane)/inc \
170 $$(INCLUDE) \
173 endef
175 else
177 gb_LinkTarget__use_sane_headers :=
179 endif
181 # External libraries
183 ifeq ($(SYSTEM_CPPUNIT),YES)
185 define gb_LinkTarget__use_cppunit
186 $(call gb_LinkTarget_set_include,$(1),\
187 $$(INCLUDE) \
188 $(CPPUNIT_CFLAGS) \
191 $(call gb_LinkTarget_add_libs,$(1),\
192 $(CPPUNIT_LIBS) \
195 endef
197 else
199 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
200 cppunit \
203 define gb_LinkTarget__use_cppunit
204 $(call gb_LinkTarget_use_package,$(1),cppunit)
206 $(call gb_LinkTarget_use_libraries,$(1),\
207 cppunit \
209 $(call gb_LinkTarget_set_include,$(1),\
210 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
211 $$(INCLUDE) \
214 endef
216 endif
218 define gb_LinkTarget__use_iconv
219 $(call gb_LinkTarget_add_libs,$(1),-liconv)
221 endef
223 ifeq ($(SYSTEM_MARIADB),YES)
225 define gb_LinkTarget__use_mysql
227 $(call gb_LinkTarget_add_defs,$(1),\
228 -DSYSTEM_MARIADB \
231 $(call gb_LinkTarget_add_libs,$(1),\
232 $(MARIADB_LIBS) \
235 $(call gb_LinkTarget_set_include,$(1),\
236 $(MARIADB_CFLAGS) \
237 $$(INCLUDE) \
239 endef
241 else
243 define gb_LinkTarget__use_mysql
245 $(call gb_LinkTarget_set_include,$(1),\
246 $$(INCLUDE) \
249 endef
251 endif
253 ifeq ($(SYSTEM_MYSQL_CPPCONN),YES)
255 define gb_LinkTarget__use_mysqlcppconn
256 $(call gb_LinkTarget_add_libs,$(1),\
257 -lmysqlcppconn \
260 $(call gb_LinkTarget_add_defs,$(1),\
261 -DSYSTEM_MYSQL_CPPCONN \
263 endef
265 else
267 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
268 mysqlcppconn \
271 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
272 define gb_LinkTarget__use_mysqlcppconn
274 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
276 $(call gb_LinkTarget_add_defs,$(1),\
277 -DCPPCONN_LIB_BUILD \
280 $(call gb_LinkTarget_set_include,$(1),\
281 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
282 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
283 $$(INCLUDE) \
286 endef
288 endif
290 ifeq ($(SYSTEM_ZLIB),YES)
292 define gb_LinkTarget__use_zlib
293 $(call gb_LinkTarget_add_defs,$(1),\
294 -DSYSTEM_ZLIB \
296 $(call gb_LinkTarget_add_libs,$(1),-lz)
298 endef
300 # nothing on system
301 define gb_LinkTarget__use_zlib_x64
303 endef
305 gb_ExternalProject__use_zlib :=
307 else # !SYSTEM_ZLIB
309 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
310 zlib \
311 zlib_x64 \
314 define gb_LinkTarget__use_zlib_multiarch
315 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
317 $(call gb_LinkTarget_set_include,$(1),\
318 $(ZLIB_CFLAGS) \
319 $$(INCLUDE) \
322 $(call gb_LinkTarget_use_static_libraries,$(1),\
323 $(2) \
326 endef
328 define gb_LinkTarget__use_zlib
329 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
331 endef
333 define gb_LinkTarget__use_zlib_x64
334 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
336 endef
338 define gb_ExternalProject__use_zlib
339 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
341 endef
343 endif # SYSTEM_ZLIB
346 ifeq ($(SYSTEM_JPEG),YES)
348 define gb_LinkTarget__use_jpeg
349 $(call gb_LinkTarget_add_libs,$(1),-ljpeg)
350 $(call gb_LinkTarget_set_ldflags,$(1),\
351 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
354 endef
356 else # !SYSTEM_JPEG
358 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
359 jpeg \
362 define gb_LinkTarget__use_jpeg
363 $(call gb_LinkTarget_set_include,$(1),\
364 -I$(call gb_UnpackedTarball_get_dir,jpeg) \
365 $$(INCLUDE) \
368 $(call gb_LinkTarget_use_static_libraries,$(1),\
369 jpeg \
372 endef
374 endif # SYSTEM_JPEG
376 ifeq ($(SYSTEM_MYTHES),YES)
378 define gb_LinkTarget__use_mythes
379 $(call gb_LinkTarget_set_include,$(1),\
380 $$(INCLUDE) \
381 $(MYTHES_CFLAGS) \
383 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
385 endef
387 else # !SYSTEM_MYTHES
389 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
390 mythes \
393 define gb_LinkTarget__use_mythes
394 $(call gb_LinkTarget_set_include,$(1),\
395 -I$(call gb_UnpackedTarball_get_dir,mythes) \
396 $$(INCLUDE) \
398 $(call gb_LinkTarget_use_package,$(1),\
399 mythes \
401 $(call gb_LinkTarget_use_static_libraries,$(1),\
402 mythes \
405 endef
407 endif # SYSTEM_MYTHES
410 ifeq ($(SYSTEM_EXPAT),YES)
412 define gb_LinkTarget__use_expat_impl
413 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
415 $(call gb_LinkTarget_add_defs,$(1),\
416 -DSYSTEM_EXPAT \
419 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
421 endef
423 gb_ExternalProject__use_expat :=
425 else # !SYSTEM_EXPAT
427 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
428 expat \
429 expat_x64 \
432 define gb_LinkTarget__use_expat_impl
433 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
435 $(call gb_LinkTarget_set_include,$(1),\
436 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
437 $$(INCLUDE) \
440 $(call gb_LinkTarget_use_static_libraries,$(1),\
441 $(2) \
444 endef
446 define gb_ExternalProject__use_expat
447 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
449 endef
451 endif # SYSTEM_EXPAT
453 define gb_LinkTarget__use_expat
454 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
456 endef
458 define gb_LinkTarget__use_expat_x64
459 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
461 endef
463 ifeq ($(OS),ANDROID)
464 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
465 fontconfig \
466 freetype \
468 endif
470 ifeq ($(SYSTEM_HYPH),YES)
472 define gb_LinkTarget__use_hyphen
473 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
475 endef
477 else # !SYSTEM_HYPH
479 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
480 hyphen \
483 define gb_LinkTarget__use_hyphen
484 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
485 $(call gb_LinkTarget_set_include,$(1),\
486 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
487 $$(INCLUDE) \
489 $(call gb_LinkTarget_use_static_libraries,$(1),\
490 hyphen \
493 endef
495 endif # SYSTEM_HYPH
497 ifeq ($(SYSTEM_HUNSPELL),YES)
499 define gb_LinkTarget__use_hunspell
500 $(call gb_LinkTarget_set_include,$(1),\
501 $$(INCLUDE) \
502 $(HUNSPELL_CFLAGS) \
504 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
506 endef
508 else # !SYSTEM_HUNSPELL
510 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
511 hunspell \
514 define gb_LinkTarget__use_hunspell
515 $(call gb_LinkTarget_add_defs,$(1),\
516 -DHUNSPELL_STATIC \
518 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
519 $(call gb_LinkTarget_set_include,$(1),\
520 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
521 $$(INCLUDE) \
523 $(call gb_LinkTarget_use_static_libraries,$(1),\
524 hunspell \
527 endef
529 endif # SYSTEM_HUNSPELL
532 ifeq ($(SYSTEM_BOOST),YES)
534 define gb_LinkTarget__use_boostdatetime
535 $(call gb_LinkTarget_set_include,$(1),\
536 $$(INCLUDE) \
537 $(BOOST_CPPFLAGS) \
540 $(call gb_LinkTarget_add_ldflags,$(1),\
541 $(BOOST_LDFLAGS) \
544 $(call gb_LinkTarget_add_libs,$(1),\
545 $(BOOST_DATE_TIME_LIB) \
548 endef
550 define gb_LinkTarget__use_boost_headers
551 $(call gb_LinkTarget_set_include,$(1),\
552 $$(INCLUDE) \
553 $(BOOST_CPPFLAGS) \
556 endef
558 gb_ExternalProject__use_boost_headers:=
560 else # !SYSTEM_BOOST
562 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
563 boostdatetime \
566 ifeq ($(OS),WNT)
567 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
568 boostthread \
571 define gb_LinkTarget__use_boostthread
572 $(call gb_LinkTarget_add_defs,$(1),\
573 -DBOOST_ALL_NO_LIB \
576 $(call gb_LinkTarget_use_static_libraries,$(1),\
577 boostthread \
579 endef
581 endif # WNT
583 define gb_LinkTarget__use_boostdatetime
584 $(call gb_LinkTarget_add_defs,$(1),\
585 -DBOOST_ALL_NO_LIB \
588 $(call gb_LinkTarget_use_static_libraries,$(1),\
589 boostdatetime \
592 endef
594 define gb_LinkTarget__use_boost_headers
595 $(call gb_LinkTarget_use_unpacked,$(1),boost)
596 $(call gb_LinkTarget_set_include,$(1),\
597 -I$(call gb_UnpackedTarball_get_dir,boost) \
598 $$(INCLUDE) \
601 endef
603 define gb_ExternalProject__use_boost_headers
604 $(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,boost)
606 endef
607 endif # SYSTEM_BOOST
610 ifeq ($(SYSTEM_CMIS),YES)
612 define gb_LinkTarget__use_cmis
613 $(call gb_LinkTarget_set_include,$(1),\
614 $$(INCLUDE) \
615 $(CMIS_CFLAGS) \
617 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
619 endef
621 else # !SYSTEM_CMIS
623 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
624 cmislib \
627 define gb_LinkTarget__use_cmis
628 $(call gb_LinkTarget_set_include,$(1),\
629 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
630 $$(INCLUDE) \
632 $(call gb_LinkTarget_use_static_libraries,$(1),\
633 cmislib \
636 endef
638 endif # SYSTEM_CMIS
640 ifeq ($(OS)$(COM),WNTGCC)
642 define gb_LinkTarget__use_jawt
643 $(call gb_LinkTarget_use_packages,$(1),\
644 jawt \
647 endef
649 else # $(OS)$(COM) != WNTGCC
651 gb_LinkTarget__use_jawt :=
653 endif # $(OS)$(COM) = WNTGCC
656 ifeq ($(SYSTEM_LIBEXTTEXTCAT),YES)
658 define gb_LinkTarget__use_libexttextcat
659 $(call gb_LinkTarget_set_include,$(1),\
660 $$(INCLUDE) \
661 $(LIBEXTTEXTCAT_CFLAGS) \
663 $(call gb_LinkTarget_add_defs,$(1),\
664 -DSYSTEM_LIBEXTTEXTCAT \
666 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
668 endef
670 else # !SYSTEM_LIBEXTTEXTCAT
672 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
673 exttextcat \
676 define gb_LinkTarget__use_libexttextcat
677 $(call gb_LinkTarget_use_static_libraries,$(1),\
678 exttextcat \
681 $(call gb_LinkTarget_set_include,$(1),\
682 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
683 $$(INCLUDE) \
686 endef
688 endif # SYSTEM_LIBEXTTEXTCAT
691 ifeq ($(SYSTEM_LIBXML),YES)
693 define gb_LinkTarget__use_libxml2
694 $(call gb_LinkTarget_add_defs,$(1),\
695 -DSYSTEM_LIBXML \
697 $(call gb_LinkTarget_set_include,$(1),\
698 $$(INCLUDE) \
699 $(LIBXML_CFLAGS) \
701 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
703 endef
704 gb_ExternalProject__use_libxml2:=
706 else # !SYSTEM_LIBXML
708 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
709 xml2 \
712 define gb_LinkTarget__use_libxml2
713 $(call gb_LinkTarget_use_package,$(1),xml2)
714 $(call gb_LinkTarget_use_libraries,$(1),\
715 xml2 \
717 $(call gb_LinkTarget_set_include,$(1),\
718 $$(INCLUDE) \
719 -I$(call gb_UnpackedTarball_get_dir,xml2)/include \
722 endef
723 define gb_ExternalProject__use_libxml2
724 $(call gb_ExternalProject_use_package,$(1),xml2)
726 endef
728 endif # SYSTEM_LIBXML
731 ifeq ($(SYSTEM_LIBXSLT),YES)
733 define gb_LinkTarget__use_libxslt
734 $(call gb_LinkTarget_set_include,$(1),\
735 $$(INCLUDE) \
736 $(LIBXSLT_CFLAGS) \
738 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
740 endef
742 define gb_LinkTarget__use_libexslt
743 $(call gb_LinkTarget_set_include,$(1),\
744 $$(INCLUDE) \
745 $(LIBEXSLT_CFLAGS) \
748 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
750 endef
752 else # !SYSTEM_LIBXSLT
754 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
755 exslt \
756 xslt \
759 define gb_LinkTarget__use_libxslt
760 $(call gb_LinkTarget_use_package,$(1),xslt)
761 $(call gb_LinkTarget_set_include,$(1),\
762 $$(INCLUDE) \
763 -I$(call gb_UnpackedTarball_get_dir,xslt) \
765 $(call gb_LinkTarget_use_libraries,$(1),\
766 xslt \
769 endef
771 define gb_LinkTarget__use_libexslt
772 $(call gb_LinkTarget_use_package,$(1),xslt)
773 $(call gb_LinkTarget_set_include,$(1),\
774 $$(INCLUDE) \
775 -I$(call gb_UnpackedTarball_get_dir,xslt) \
778 $(call gb_LinkTarget_use_libraries,$(1),\
779 exslt \
782 endef
784 endif # SYSTEM_LIBXSLT
786 define gb_LinkTarget__use_glib
787 $(error gb_LinkTarget__use_glib should not be called any more)
788 endef
790 ifeq ($(ENABLE_LIBLANGTAG),YES)
792 ifeq ($(SYSTEM_LIBLANGTAG),YES)
794 define gb_LinkTarget__use_liblangtag
795 $(call gb_LinkTarget_set_include,$(1),\
796 $$(INCLUDE) \
797 $(LIBLANGTAG_CFLAGS) \
800 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
802 endef
804 else # !SYSTEM_LIBLANGTAG
806 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
807 langtag \
810 define gb_LinkTarget__use_liblangtag
811 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
812 $(call gb_LinkTarget_set_include,$(1),\
813 -I$(call gb_UnpackedTarball_get_dir,langtag) \
814 $$(INCLUDE) \
816 $(call gb_LinkTarget_use_static_libraries,$(1),\
817 langtag \
820 endef
822 endif # SYSTEM_LIBLANGTAG
824 else
826 gb_LinkTarget__use_liblangtag :=
828 endif # ENABLE_LIBLANGTAG
831 ifeq ($(SYSTEM_NEON),YES)
833 define gb_LinkTarget__use_neon
834 $(call gb_LinkTarget_add_defs,$(1),\
835 -DNEON_VERSION=0x$(NEON_VERSION) \
836 -DSYSTEM_NEON \
838 $(call gb_LinkTarget_set_include,$(1),\
839 $$(INCLUDE) \
840 $(NEON_CFLAGS) \
843 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
845 endef
847 else # !SYSTEM_NEON
849 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
850 neon \
853 define gb_LinkTarget__use_neon
854 $(call gb_LinkTarget_use_unpacked,$(1),neon)
855 $(call gb_LinkTarget_set_include,$(1),\
856 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
857 $$(INCLUDE) \
859 $(call gb_LinkTarget_use_libraries,$(1),\
860 neon \
863 endef
865 endif # SYSTEM_NEON
868 ifeq ($(SYSTEM_REDLAND),YES)
870 define gb_LinkTarget__use_librdf
871 $(call gb_LinkTarget_add_defs,$(1),\
872 -DSYSTEM_REDLAND \
874 $(call gb_LinkTarget_set_include,$(1),\
875 $$(INCLUDE) \
876 $(REDLAND_CFLAGS) \
878 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
880 endef
882 gb_LinkTarget__use_redland_headers:=
884 gb_LinkTarget__use_raptor_headers:=
886 gb_LinkTarget__use_rasqal_headers:=
888 else # !SYSTEM_REDLAND
890 define gb_LinkTarget__use_redland_headers
891 $(call gb_LinkTarget_set_include,$(1),\
892 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
893 $$(INCLUDE) \
896 endef
898 define gb_LinkTarget__use_raptor_headers
899 $(call gb_LinkTarget_set_include,$(1),\
900 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
901 $$(INCLUDE) \
904 endef
906 define gb_LinkTarget__use_rasqal_headers
907 $(call gb_LinkTarget_set_include,$(1),\
908 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
909 $$(INCLUDE) \
912 endef
914 ifneq ($(OS),ANDROID)
916 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
917 raptor2 \
918 rasqal \
919 rdf \
922 define gb_LinkTarget__use_librdf
923 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
924 $(call gb_LinkTarget_use_libraries,$(1),\
925 raptor2 \
926 rdf \
929 endef
931 else # ANDROID
933 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
934 rdf \
935 rasqal \
936 raptor2 \
939 define gb_LinkTarget__use_librdf
940 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
941 $(call gb_LinkTarget_use_static_libraries,$(1),\
942 rdf \
943 rasqal \
944 raptor2 \
947 endef
949 endif # ANDROID
951 endif # SYSTEM_REDLAND
954 ifeq ($(SYSTEM_CAIRO),YES)
956 # FREETYPE_CLAGS from environment if ENABLE_CAIRO is used
957 define gb_LinkTarget__use_cairo
958 $(call gb_LinkTarget_set_include,$(1),\
959 $$(INCLUDE) \
960 $(FREETYPE_CFLAGS) \
961 $(CAIRO_CFLAGS) \
963 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
965 endef
967 else ifeq ($(SYSTEM_CAIRO),NO)
969 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
970 cairo \
971 $(if $(filter-out MACOSX WNT,$(OS)), \
972 pixman-1 \
976 define gb_LinkTarget__use_cairo
977 $(call gb_LinkTarget_use_package,$(1),cairo)
978 $(call gb_LinkTarget_use_package,$(1),pixman)
979 $(call gb_LinkTarget_set_include,$(1),\
980 -I$(call gb_UnpackedTarball_get_dir,cairo) \
981 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
982 $(FREETYPE_CFLAGS) \
983 $$(INCLUDE) \
985 $(call gb_LinkTarget_use_libraries,$(1),\
986 cairo \
987 $(if $(filter-out MACOSX WNT,$(OS)), \
988 pixman-1 \
992 endef
994 endif # SYSTEM_CAIRO
996 define gb_LinkTarget__use_freetype
997 $(call gb_LinkTarget_set_include,$(1),\
998 $$(INCLUDE) \
999 $(FREETYPE_CFLAGS) \
1002 ifneq ($(OS),ANDROID)
1003 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1004 else
1005 $(call gb_LinkTarget_use_static_libraries,$(1),freetype)
1006 endif
1008 endef
1010 define gb_LinkTarget__use_fontconfig
1011 $(call gb_LinkTarget_set_include,$(1),\
1012 $$(INCLUDE) \
1013 $(FONTCONFIG_CFLAGS) \
1016 ifneq ($(OS),ANDROID)
1017 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1018 else
1019 $(call gb_LinkTarget_use_static_libraries,$(1),fontconfig)
1020 endif
1022 endef
1024 ifeq ($(SYSTEM_GRAPHITE),YES)
1026 define gb_LinkTarget__use_graphite
1027 $(call gb_LinkTarget_set_include,$(1),\
1028 $$(INCLUDE) \
1029 $(GRAPHITE_CFLAGS) \
1031 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1033 endef
1035 else ifeq ($(SYSTEM_GRAPHITE),NO)
1037 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1038 graphite \
1040 define gb_LinkTarget__use_graphite
1041 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1042 $(call gb_LinkTarget_set_include,$(1),\
1043 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1044 $$(INCLUDE) \
1046 $(call gb_LinkTarget_use_static_libraries,$(1),\
1047 graphite \
1050 endef
1052 else # DISABLED GRAPHITE
1054 gb_LinkTarget__use_graphite :=
1056 endif # SYSTEM_GRAPHITE
1058 ifeq ($(SYSTEM_ICU),YES)
1060 gb_LinkTarget__use_icu_headers:=
1061 gb_ExternalProject__use_icu:=
1063 define gb_LinkTarget__use_icudata
1064 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1066 endef
1067 define gb_LinkTarget__use_icui18n
1068 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1070 endef
1071 define gb_LinkTarget__use_icule
1072 $(call gb_LinkTarget_add_libs,$(1),-licule)
1074 endef
1075 define gb_LinkTarget__use_icutu
1076 $(call gb_LinkTarget_add_libs,$(1),-licutu)
1078 endef
1079 define gb_LinkTarget__use_icuuc
1080 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1082 endef
1084 else # !SYSTEM_ICU
1086 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1087 gb_ICU_suffix:=lo
1088 else
1089 gb_ICU_suffix:=
1090 endif
1092 define gb_LinkTarget__use_icu_headers
1093 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1094 $(call gb_LinkTarget_set_include,$(1),\
1095 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1096 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1097 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1098 $$(INCLUDE) \
1101 endef
1103 define gb_ExternalProject__use_icu
1104 $(call gb_ExternalProject_use_package,$(1),icu)
1106 endef
1108 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1109 ifeq ($(OS)$(COM),WNTMSC)
1110 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1111 icudt \
1112 icuin \
1115 define gb_LinkTarget__use_icudata
1116 $(call gb_LinkTarget_use_package,$(1),icu)
1117 $(call gb_LinkTarget_use_libraries,$(1),\
1118 icudt \
1121 endef
1122 define gb_LinkTarget__use_icui18n
1123 $(call gb_LinkTarget_use_package,$(1),icu)
1124 $(call gb_LinkTarget_use_libraries,$(1),\
1125 icuin \
1128 endef
1129 else
1130 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1131 icudata$(gb_ICU_suffix) \
1132 icui18n$(gb_ICU_suffix) \
1135 define gb_LinkTarget__use_icudata
1136 $(call gb_LinkTarget_use_package,$(1),icu)
1137 $(call gb_LinkTarget_use_libraries,$(1),\
1138 icudata$(gb_ICU_suffix) \
1141 endef
1142 define gb_LinkTarget__use_icui18n
1143 $(call gb_LinkTarget_use_package,$(1),icu)
1144 $(call gb_LinkTarget_use_libraries,$(1),\
1145 icui18n$(gb_ICU_suffix) \
1148 endef
1149 endif
1151 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1152 icule$(gb_ICU_suffix) \
1153 icutu$(gb_ICU_suffix) \
1154 icuuc$(gb_ICU_suffix) \
1157 define gb_LinkTarget__use_icule
1158 $(call gb_LinkTarget_use_package,$(1),icu)
1159 $(call gb_LinkTarget_use_libraries,$(1),\
1160 icule$(gb_ICU_suffix) \
1163 endef
1164 define gb_LinkTarget__use_icutu
1165 $(call gb_LinkTarget_use_package,$(1),icu)
1166 $(call gb_LinkTarget_use_libraries,$(1),\
1167 icutu$(gb_ICU_suffix) \
1170 endef
1171 define gb_LinkTarget__use_icuuc
1172 $(call gb_LinkTarget_use_package,$(1),icu)
1173 $(call gb_LinkTarget_use_libraries,$(1),\
1174 icuuc$(gb_ICU_suffix) \
1177 endef
1179 endif # SYSTEM_ICU
1181 ifeq ($(ENABLE_HARFBUZZ),TRUE)
1182 ifeq ($(SYSTEM_HARFBUZZ),YES)
1184 define gb_LinkTarget__use_harfbuzz
1185 $(call gb_LinkTarget_set_include,$(1),\
1186 $$(INCLUDE) \
1187 $(HARFBUZZ_CFLAGS) \
1189 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1191 endef
1193 else # SYSTEM_HARFBUZZ != YES
1195 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1196 harfbuzz \
1198 define gb_LinkTarget__use_harfbuzz
1199 $(call gb_LinkTarget_set_include,$(1),\
1200 -I$(call gb_UnpackedTarball_get_dir,harfbuzz)/src \
1201 $$(INCLUDE) \
1203 $(call gb_LinkTarget_use_package,$(1),\
1204 harfbuzz \
1206 $(call gb_LinkTarget_use_static_libraries,$(1),\
1207 harfbuzz \
1210 endef
1212 endif # SYSTEM_HARFBUZZ
1213 else # ENABLE_HARFBUZZ != YES
1215 gb_LinkTarget__use_harfbuzz :=
1217 endif # ENABLE_HARFBUZZ
1219 ifeq ($(DISABLE_OPENSSL),YES)
1221 gb_ExternalProject__use_openssl:=
1222 gb_LinkTarget__use_openssl_headers:=
1223 gb_LinkTarget__use_openssl:=
1225 else # !DISABLE_OPENSSL
1227 ifeq ($(SYSTEM_OPENSSL),YES)
1229 gb_LinkTarget__use_openssl_headers:=
1230 gb_ExternalProject__use_openssl:=
1232 define gb_LinkTarget__use_openssl
1233 $(call gb_LinkTarget_set_include,$(1),\
1234 $$(INCLUDE) \
1235 $(OPENSSL_CFLAGS) \
1237 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1239 endef
1241 else # !SYSTEM_OPENSSL
1243 ifeq ($(OS),WNT)
1244 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1245 crypto \
1246 ssl \
1248 else
1249 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1250 crypto \
1251 ssl \
1253 endif
1255 define gb_ExternalProject__use_openssl
1256 $(call gb_ExternalProject_use_package,$(1),openssl)
1258 endef
1260 define gb_LinkTarget__use_openssl_headers
1261 $(call gb_LinkTarget_set_include,$(1),\
1262 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1263 $$(INCLUDE) \
1266 endef
1268 define gb_LinkTarget__use_openssl
1269 $(call gb_LinkTarget_use_package,$(1),openssl)
1270 ifeq ($(OS),WNT)
1271 $(call gb_LinkTarget_use_libraries,$(1),\
1272 crypto \
1273 ssl \
1275 else
1276 $(call gb_LinkTarget_use_static_libraries,$(1),\
1277 crypto \
1278 ssl \
1280 ifeq ($(OS),SOLARIS)
1281 $(call gb_LinkTarget_add_libs,$(1),\
1282 -lnsl \
1283 -lsocket \
1285 endif
1286 endif
1288 endef
1290 endif # SYSTEM_OPENSSL
1291 endif # DISABLE_OPENSSL
1294 ifeq ($(DISABLE_OPENSSL),YES)
1296 define gb_LinkTarget__use_gnutls
1297 $(call gb_LinkTarget_set_include,$(1),\
1298 $$(INCLUDE) \
1299 $(GNUTLS_CFLAGS) \
1302 $(call gb_LinkTarget_add_defs,$(1),\
1303 -DDISABLE_OPENSSL \
1306 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1308 endef
1310 define gb_LinkTarget__use_libgcrypt
1311 $(call gb_LinkTarget_set_include,$(1),\
1312 $$(INCLUDE) \
1313 $(LIBGCRYPT_CFLAGS) \
1316 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1318 endef
1320 else # !DISABLE_OPENSSL
1322 gb_LinkTarget__use_gnutls:=
1323 gb_LinkTarget__use_libgcrypt:=
1325 endif # DISABLE_OPENSSL
1328 ifeq ($(SYSTEM_CDR),YES)
1330 define gb_LinkTarget__use_cdr
1331 $(call gb_LinkTarget_set_include,$(1),\
1332 $$(INCLUDE) \
1333 $(CDR_CFLAGS) \
1335 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1337 endef
1339 else # !SYSTEM_CDR
1341 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1342 cdr-0.0 \
1345 define gb_LinkTarget__use_cdr
1346 $(call gb_LinkTarget_use_package,$(1),\
1347 libcdr \
1349 $(call gb_LinkTarget_use_static_libraries,$(1),\
1350 cdr-0.0 \
1353 endef
1355 endif # SYSTEM_CDR
1358 ifeq ($(SYSTEM_ODFGEN),YES)
1360 define gb_LinkTarget__use_odfgen
1361 $(call gb_LinkTarget_set_include,$(1),\
1362 $$(INCLUDE) \
1363 $(ODFGEN_CFLAGS) \
1365 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1367 endef
1369 else # !SYSTEM_ODFGEN
1371 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1372 odfgen-0.0 \
1375 define gb_LinkTarget__use_odfgen
1376 $(call gb_LinkTarget_use_package,$(1),\
1377 libodfgen \
1379 $(call gb_LinkTarget_use_static_libraries,$(1),\
1380 odfgen-0.0 \
1383 endef
1385 endif # SYSTEM_ODFGEN
1388 ifeq ($(SYSTEM_MSPUB),YES)
1390 define gb_LinkTarget__use_mspub
1391 $(call gb_LinkTarget_set_include,$(1),\
1392 $$(INCLUDE) \
1393 $(MSPUB_CFLAGS) \
1395 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1397 endef
1399 else # !SYSTEM_MSPUB
1401 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1402 mspub-0.0 \
1405 define gb_LinkTarget__use_mspub
1406 $(call gb_LinkTarget_set_include,$(1),\
1407 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1408 $$(INCLUDE) \
1410 $(call gb_LinkTarget_use_package,$(1),\
1411 libmspub \
1413 $(call gb_LinkTarget_use_static_libraries,$(1),\
1414 mspub-0.0 \
1417 endef
1419 endif # SYSTEM_MSPUB
1422 ifeq ($(SYSTEM_VISIO),YES)
1424 define gb_LinkTarget__use_visio
1425 $(call gb_LinkTarget_set_include,$(1),\
1426 $$(INCLUDE) \
1427 $(VISIO_CFLAGS) \
1429 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
1431 endef
1433 else # !SYSTEM_VISIO
1435 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1436 visio-0.0 \
1439 define gb_LinkTarget__use_visio
1440 $(call gb_LinkTarget_set_include,$(1),\
1441 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
1442 $$(INCLUDE) \
1444 $(call gb_LinkTarget_use_package,$(1),\
1445 libvisio \
1447 $(call gb_LinkTarget_use_static_libraries,$(1),\
1448 visio-0.0 \
1451 endef
1453 endif # SYSTEM_VISIO
1456 ifeq ($(SYSTEM_WPD),YES)
1458 define gb_LinkTarget__use_wpd
1459 $(call gb_LinkTarget_set_include,$(1),\
1460 $$(INCLUDE) \
1461 $(WPD_CFLAGS) \
1463 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
1465 endef
1466 gb_ExternalProject__use_wpd :=
1468 else # !SYSTEM_WPD
1470 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1471 wpd-0.9 \
1474 define gb_LinkTarget__use_wpd
1475 $(call gb_LinkTarget_set_include,$(1),\
1476 $(WPD_CFLAGS) \
1477 $$(INCLUDE) \
1479 $(call gb_LinkTarget_use_package,$(1),\
1480 libwpd \
1482 $(call gb_LinkTarget_use_static_libraries,$(1),\
1483 wpd-0.9 \
1486 endef
1487 define gb_ExternalProject__use_wpd
1488 $(call gb_ExternalProject_use_package,$(1),libwpd)
1490 endef
1492 endif # SYSTEM_WPD
1495 ifeq ($(SYSTEM_WPG),YES)
1497 define gb_LinkTarget__use_wpg
1498 $(call gb_LinkTarget_set_include,$(1),\
1499 $$(INCLUDE) \
1500 $(WPG_CFLAGS) \
1502 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
1504 endef
1505 gb_ExternalProject__use_wpg :=
1507 else # !SYSTEM_WPG
1509 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1510 wpg-0.2 \
1513 define gb_LinkTarget__use_wpg
1514 $(call gb_LinkTarget_use_package,$(1),\
1515 libwpg \
1517 $(call gb_LinkTarget_use_static_libraries,$(1),\
1518 wpg-0.2 \
1521 endef
1522 define gb_ExternalProject__use_wpg
1523 $(call gb_ExternalProject_use_package,$(1),libwpg)
1525 endef
1527 endif # SYSTEM_WPG
1530 ifeq ($(SYSTEM_WPS),YES)
1532 define gb_LinkTarget__use_wps
1533 $(call gb_LinkTarget_set_include,$(1),\
1534 $$(INCLUDE) \
1535 $(WPS_CFLAGS) \
1537 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
1539 endef
1540 gb_ExternalProject__use_wps :=
1542 else # !SYSTEM_WPS
1544 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1545 wps-0.2 \
1548 define gb_LinkTarget__use_wps
1549 $(call gb_LinkTarget_use_package,$(1),\
1550 libwps \
1552 $(call gb_LinkTarget_use_static_libraries,$(1),\
1553 wps-0.2 \
1556 endef
1557 define gb_ExternalProject__use_wps
1558 $(call gb_ExternalProject_use_package,$(1),libwps)
1560 endef
1562 endif # SYSTEM_WPS
1565 ifeq ($(SYSTEM_MWAW),YES)
1567 define gb_LinkTarget__use_mwaw
1568 $(call gb_LinkTarget_set_include,$(1),\
1569 $$(INCLUDE) \
1570 $(MWAW_CFLAGS) \
1572 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
1574 endef
1576 else # !SYSTEM_MWAW
1578 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1579 mwaw-0.1 \
1582 define gb_LinkTarget__use_mwaw
1583 $(call gb_LinkTarget_set_include,$(1),\
1584 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
1585 $$(INCLUDE) \
1587 $(call gb_LinkTarget_use_package,$(1),\
1588 libmwaw \
1590 $(call gb_LinkTarget_use_static_libraries,$(1),\
1591 mwaw-0.1 \
1594 endef
1596 endif # SYSTEM_MWAW
1599 ifeq ($(SYSTEM_LCMS2),YES)
1601 define gb_LinkTarget__use_lcms2
1602 $(call gb_LinkTarget_set_include,$(1),\
1603 $$(INCLUDE) \
1604 $(LCMS2_CFLAGS) \
1606 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
1608 endef
1610 gb_ExternalProject__use_lcms2 :=
1612 else # !SYSTEM_LCMS2
1614 define gb_ExternalProject__use_lcms2
1615 $(call gb_ExternalProject_use_package,$(1),lcms2)
1617 endef
1619 ifeq ($(OS),ANDROID)
1621 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
1622 lcms2 \
1625 define gb_LinkTarget__use_lcms2
1626 $(call gb_LinkTarget_use_package,$(1),lcms2)
1627 $(call gb_LinkTarget_set_include,$(1),\
1628 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
1629 $$(INCLUDE) \
1631 $(call gb_LinkTarget_use_static_libraries,$(1),\
1632 lcms2 \
1635 endef
1637 else
1639 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1640 lcms2 \
1643 define gb_LinkTarget__use_lcms2
1644 $(call gb_LinkTarget_use_package,$(1),lcms2)
1645 $(call gb_LinkTarget_set_include,$(1),\
1646 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
1647 $$(INCLUDE) \
1649 $(call gb_LinkTarget_use_libraries,$(1),\
1650 lcms2 \
1653 endef
1655 endif # ANDROID
1656 endif # SYSTEM_LCMS2
1659 ifeq ($(SYSTEM_LPSOLVE),YES)
1661 define gb_LinkTarget__use_lpsolve
1662 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
1663 $(call gb_LinkTarget_add_defs,$(1),\
1664 -DSYSTEM_LPSOLVE \
1667 endef
1669 else # !SYSTEM_LPSOLVE
1671 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1672 lpsolve55 \
1675 define gb_LinkTarget__use_lpsolve
1676 $(call gb_LinkTarget_use_unpacked,$(1),lpsolve)
1677 $(call gb_LinkTarget_use_libraries,$(1),\
1678 lpsolve55 \
1680 $(call gb_LinkTarget_set_include,$(1),\
1681 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
1682 $$(INCLUDE) \
1685 endef
1687 endif # SYSTEM_LPSOLVE
1689 ifeq ($(ENABLE_GIO),TRUE)
1691 define gb_LinkTarget__use_gio
1692 $(call gb_LinkTarget_set_include,$(1),\
1693 $$(INCLUDE) \
1694 $(GIO_CFLAGS) \
1697 $(call gb_LinkTarget_add_defs,$(1),\
1698 -DENABLE_GIO \
1701 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
1703 endef
1705 else # ENABLE_GIO
1707 define gb_LinkTarget__use_gio
1709 endef
1711 endif # ENABLE_GIO
1713 define gb_LinkTarget__use_gtk
1714 $(call gb_LinkTarget_set_include,$(1),\
1715 $$(INCLUDE) \
1716 $(GTK_CFLAGS) \
1719 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
1721 ifeq ($(ENABLE_GTK_PRINT),TRUE)
1723 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
1725 $(call gb_LinkTarget_set_include,$(1),\
1726 $$(INCLUDE) \
1727 $(GTK_PRINT_CFLAGS) \
1730 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
1732 endif
1734 endef
1736 define gb_LinkTarget__use_gthread
1737 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
1738 endef
1740 ifeq ($(ENABLE_CUPS),TRUE)
1742 define gb_LinkTarget__use_cups
1743 $(call gb_LinkTarget_add_defs,$(1),\
1744 -DENABLE_CUPS \
1747 $(call gb_LinkTarget_add_libs,$(1),\
1748 -lcups \
1751 endef
1753 else # ENABLE_CUPS
1755 define gb_LinkTarget__use_cups
1757 endef
1759 endif # ENABLE_DBUS
1761 ifeq ($(ENABLE_DBUS),TRUE)
1763 define gb_LinkTarget__use_dbus
1764 $(call gb_LinkTarget_set_include,$(1),\
1765 $$(INCLUDE) \
1766 $(DBUS_CFLAGS) \
1769 $(call gb_LinkTarget_add_defs,$(1),\
1770 -DENABLE_DBUS \
1773 ifeq ($(ENABLE_PACKAGEKIT),YES)
1774 $(call gb_LinkTarget_add_defs,$(1),\
1775 -DENABLE_PACKAGEKIT \
1777 endif # ENABLE_PACKAGEKIT
1779 $(call gb_LinkTarget_add_libs,$(1),\
1780 $(DBUS_LIBS) \
1783 endef
1785 else # ENABLE_DBUS
1787 define gb_LinkTarget__use_dbus
1789 endef
1791 endif # ENABLE_DBUS
1794 define gb_LinkTarget__use_dbusmenugtk
1795 $(call gb_LinkTarget_set_include,$(1),\
1796 $$(INCLUDE) \
1797 $(DBUSMENUGTK_CFLAGS) \
1800 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
1802 endef
1805 ifeq ($(ENABLE_TELEPATHY),TRUE)
1807 define gb_LinkTarget__use_telepathy
1808 $(call gb_LinkTarget_set_include,$(1),\
1809 $$(INCLUDE) \
1810 $(TELEPATHY_CFLAGS) \
1813 $(call gb_LinkTarget_add_libs,$(1),\
1814 $(TELEPATHY_LIBS) \
1817 endef
1819 else # !ENABLE_TELEPATHY
1821 gb_LinkTarget__use_telepathy :=
1823 endif # ENABLE_TELEPATHY
1825 define gb_LinkTarget__use_croco
1826 $(error gb_LinkTarget__use_croco should not be used any more)
1827 endef
1829 define gb_LinkTarget__use_pango
1830 $(error gb_LinkTarget__use_pango should not be used any more)
1831 endef
1833 define gb_LinkTarget__use_gsf
1834 $(error gb_LinkTarget__use_gsf should not be used any more)
1835 endef
1837 define gb_LinkTarget__use_pixbuf
1838 $(error gb_LinkTarget__use_pixbuf should not be used any more)
1839 endef
1841 ifeq ($(SYSTEM_LIBPNG),YES)
1843 define gb_LinkTarget__use_png
1844 $(call gb_LinkTarget_set_include,$(1),\
1845 $$(INCLUDE) \
1846 $(LIBPNG_CFLAGS) \
1849 $(call gb_LinkTarget_add_libs,$(1),\
1850 $(LIBPNG_LIBS) \
1853 endef
1855 else # !SYSTEM_LIBPNG
1857 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
1858 png \
1861 define gb_LinkTarget__use_png
1862 $(call gb_LinkTarget_set_include,$(1),\
1863 $(LIBPNG_CFLAGS) \
1864 $$(INCLUDE) \
1866 $(call gb_LinkTarget_use_static_libraries,$(1),\
1867 png \
1869 $(call gb_LinkTarget__use_zlib,$(1))
1871 endef
1873 endif # !SYSTEM_LIBPNG
1876 ifeq ($(SYSTEM_CURL),YES)
1878 define gb_LinkTarget__use_curl
1879 $(call gb_LinkTarget_set_include,$(1),\
1880 $$(INCLUDE) \
1881 $(CURL_CFLAGS) \
1883 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
1885 endef
1887 else # !SYSTEM_CURL
1889 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
1890 curl \
1893 define gb_LinkTarget__use_curl
1894 $(call gb_LinkTarget_use_package,$(1),curl)
1895 $(call gb_LinkTarget_set_include,$(1),\
1896 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
1897 $$(INCLUDE) \
1899 $(call gb_LinkTarget_use_libraries,$(1),\
1900 curl \
1903 endef
1905 endif # SYSTEM_CURL
1907 ifeq ($(ENABLE_VALGRIND),TRUE)
1909 define gb_LinkTarget__use_valgrind
1910 $(call gb_LinkTarget_add_defs,$(1),\
1911 -DHAVE_VALGRIND_HEADERS \
1914 $(call gb_LinkTarget_set_include,$(1),\
1915 $$(INCLUDE) \
1916 $(VALGRIND_CFLAGS) \
1919 endef
1921 else # !ENABLE_VALGRIND
1923 define gb_LinkTarget__use_valgrind
1925 endef
1927 endif # ENABLE_VALGRIND
1929 ifeq ($(SYSTEM_POPPLER),YES)
1931 define gb_LinkTarget__use_poppler
1932 $(call gb_LinkTarget_add_defs,$(1),\
1933 -DSYSTEM_POPPLER \
1936 $(call gb_LinkTarget_set_include,$(1),\
1937 $(POPPLER_CFLAGS) \
1938 $$(INCLUDE) \
1941 $(call gb_LinkTarget_add_libs,$(1),\
1942 $(POPPLER_LIBS) \
1945 endef
1947 else # !SYSTEM_POPPLER
1949 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
1950 fofi \
1951 Goo \
1952 xpdf \
1955 define gb_LinkTarget__use_poppler
1956 $(call gb_LinkTarget_use_package,$(1),xpdf)
1958 $(call gb_LinkTarget_set_include,$(1),\
1959 -I$(call gb_UnpackedTarball_get_dir,xpdf) \
1960 -I$(call gb_UnpackedTarball_get_dir,xpdf)/xpdf \
1961 -I$(call gb_UnpackedTarball_get_dir,xpdf)/goo \
1962 $$(INCLUDE) \
1965 $(call gb_LinkTarget_use_static_libraries,$(1),\
1966 fofi \
1967 Goo \
1968 xpdf \
1971 ifeq ($(OS),MACOSX)
1972 $(call gb_LinkTarget_add_libs,$(1),\
1973 -lobjc \
1975 else ifeq ($(OS),WNT)
1976 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1977 advapi32 \
1978 gdi32 \
1980 endif
1982 endef
1984 endif # SYSTEM_POPPLER
1987 ifeq ($(SYSTEM_CLUCENE),YES)
1989 define gb_LinkTarget__use_clucene
1990 $(call gb_LinkTarget_add_defs,$(1),\
1991 $(filter-out -I%,$(CLUCENE_CFLAGS)) \
1994 $(call gb_LinkTarget_set_include,$(1),\
1995 $(filter -I%,$(CLUCENE_CFLAGS)) \
1996 $$(INCLUDE) \
1999 $(call gb_LinkTarget_add_libs,$(1),\
2000 $(CLUCENE_LIBS) \
2003 endef
2005 else # !SYSTEM_CLUCENE
2007 define gb_LinkTarget__use_clucene
2008 $(call gb_LinkTarget_set_include,$(1),\
2009 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2010 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2011 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2012 $$(INCLUDE) \
2015 $(call gb_LinkTarget_use_libraries,$(1),\
2016 clucene \
2019 endef
2021 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
2022 clucene \
2025 endif # SYSTEM_CLUCENE
2027 define gb_LinkTarget__use_gobject
2028 $(call gb_LinkTarget_add_libs,$(1),\
2029 $(GOBJECT_LIBS) \
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(GOBJECT_CFLAGS) \
2036 endef
2038 ifeq ($(SYSTEM_HSQLDB),YES)
2040 define gb_LinkTarget__use_hsqldb
2042 $(call gb_LinkTarget_add_defs,$(1),\
2043 -DSYSTEM_HSQLDB \
2044 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2047 endef
2049 else # !SYSTEM_HSQLDB
2051 define gb_LinkTarget__use_hsqldb
2053 endef
2055 endif # SYSTEM_HSQLDB
2058 ifeq ($(SYSTEM_OPENLDAP),YES)
2060 define gb_LinkTarget__use_openldap
2062 $(call gb_LinkTarget_add_libs,$(1),\
2063 -lldap \
2064 -llber \
2067 endef
2069 else ifeq ($(SYSTEM_OPENLDAP),NO)
2071 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
2072 ldap \
2073 lber \
2076 define gb_LinkTarget__use_openldap
2077 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2078 $(call gb_LinkTarget_set_include,$(1),\
2079 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2080 $$(INCLUDE) \
2082 $(call gb_LinkTarget_use_package,$(1),openldap)
2083 $(call gb_LinkTarget_use_static_libraries,$(1),\
2084 ldap \
2085 lber \
2088 endef
2090 else # no openldap
2092 gb_LinkTarget__use_openldap :=
2094 endif # SYSTEM_OPENLDAP
2097 ifeq ($(SYSTEM_POSTGRESQL),YES)
2099 define gb_LinkTarget__use_postgresql
2101 $(call gb_LinkTarget_set_include,$(1),\
2102 $(POSTGRESQL_INC) \
2103 $$(INCLUDE) \
2106 $(call gb_LinkTarget_add_libs,$(1),\
2107 -lpq \
2110 $(call gb_LinkTarget_add_ldflags,$(1),\
2111 $(POSTGRESQL_LIB) \
2114 endef
2116 else # !SYSTEM_POSTGRESQL
2118 define gb_LinkTarget__use_postgresql
2120 $(call gb_LinkTarget_use_packages,$(1),\
2121 postgresql \
2124 $(call gb_LinkTarget_set_include,$(1),\
2125 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2126 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2127 $$(INCLUDE) \
2130 $(call gb_LinkTarget_use_static_libraries,$(1),\
2131 $(if $(filter MSC,$(COM)),lib)pq \
2134 ifeq ($(OS)$(COM),WNTMSC)
2135 $(call gb_LinkTarget_use_external,$(1),openssl)
2137 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2138 secur32 \
2139 ws2_32 \
2142 endif
2144 endef
2146 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
2147 $(if $(filter MSC,$(COM)),lib)pq \
2150 endif # SYSTEM_POSTGRESQL
2152 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
2153 define gb_LinkTarget__use_mozilla
2155 $(call gb_LinkTarget_add_defs,$(1),\
2156 -DMOZILLA_INTERNAL_API \
2159 $(call gb_LinkTarget_set_include,$(1),\
2160 $$(INCLUDE) \
2161 -I$(OUTDIR)/inc/mozilla \
2164 $(call gb_LinkTarget_use_libraries,$(1),\
2165 nspr4 \
2166 xpcom \
2167 xpcom_core \
2170 $(call gb_LinkTarget_use_static_libraries,$(1),\
2171 embed_base_s \
2172 mozreg_s \
2175 $(call gb_LinkTarget_add_defs,$(1),\
2176 -DMOZILLA_CLIENT \
2177 -DMOZ_REFLOW_PERF \
2178 -DMOZ_REFLOW_PERF_DSP \
2179 -DMOZ_XUL \
2180 -DOJI \
2181 -DWIN32 \
2182 -DXP_PC \
2183 -DXP_WIN \
2184 -DXP_WIN32 \
2185 -D_WINDOWS \
2188 ifeq ($(COM),GCC)
2190 $(call gb_LinkTarget_add_cxxflags,$(1),\
2191 -Wall \
2192 -Wcast-align \
2193 -Wconversion \
2194 -Wno-long-long \
2195 -Woverloaded-virtual \
2196 -Wpointer-arith \
2197 -Wsynth \
2198 -fno-rtti \
2201 else
2203 ifneq ($(DBG_LEVEL),0)
2204 $(call gb_LinkTarget_add_defs,$(1),\
2205 -D_STL_NOFORCE_MANIFEST \
2207 endif
2209 $(call gb_LinkTarget_add_libs,$(1),\
2210 $(OUTDIR)/lib/embed_base_s.lib \
2211 $(OUTDIR)/lib/mozreg_s.lib \
2214 endif # !GCC
2216 endef
2218 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
2219 xpcom \
2220 xpcom_core \
2223 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
2224 embed_base_s \
2225 mozreg_s \
2228 endif # DESKTOP
2230 ifeq ($(ENABLE_KDE),TRUE)
2232 define gb_LinkTarget__use_kde
2233 $(call gb_LinkTarget_set_include,$(1),\
2234 $(filter -I%,$(KDE_CFLAGS)) \
2235 $$(INCLUDE) \
2238 $(call gb_LinkTarget_add_defs,$(1),\
2239 $(filter-out -I%,$(KDE_CFLAGS)) \
2242 $(call gb_LinkTarget_add_libs,$(1),\
2243 $(KDE_LIBS) \
2246 ifeq ($(COM),GCC)
2247 $(call gb_LinkTarget_add_cxxflags,$(1),\
2248 -Wno-shadow \
2250 endif
2252 endef
2254 else # !ENABLE_KDE
2256 define gb_LinkTarget__use_kde
2258 endef
2260 endif # ENABLE_KDE
2263 ifeq ($(ENABLE_KDE4),TRUE)
2265 define gb_LinkTarget__use_kde4
2266 $(call gb_LinkTarget_set_include,$(1),\
2267 $(filter -I%,$(KDE4_CFLAGS)) \
2268 $$(INCLUDE) \
2271 $(call gb_LinkTarget_add_defs,$(1),\
2272 $(filter-out -I%,$(KDE4_CFLAGS)) \
2275 $(call gb_LinkTarget_add_libs,$(1),\
2276 $(KDE4_LIBS) \
2279 ifeq ($(COM),GCC)
2280 $(call gb_LinkTarget_add_cxxflags,$(1),\
2281 -Wno-shadow \
2283 endif
2285 endef
2287 else # !ENABLE_KDE4
2289 define gb_LinkTarget__use_kde4
2291 endef
2293 endif # ENABLE_KDE4
2296 ifeq ($(ENABLE_TDE),TRUE)
2298 define gb_LinkTarget__use_tde
2299 $(call gb_LinkTarget_add_libs,$(1),\
2300 $(TDE_LIBS) \
2303 $(call gb_LinkTarget_set_include,$(1),\
2304 $$(INCLUDE) \
2305 $(TDE_CFLAGS) \
2307 endef
2309 else # ! ENABLE_TDE
2311 define gb_LinkTarget__use_tde
2313 endef
2315 endif # ENABLE_TDE
2318 ifeq ($(ENABLE_GCONF),TRUE)
2320 define gb_LinkTarget__use_gconf
2321 $(call gb_LinkTarget_set_include,$(1),\
2322 $(filter -I%,$(GCONF_CFLAGS)) \
2323 $$(INCLUDE) \
2326 $(call gb_LinkTarget_add_defs,$(1),\
2327 $(filter-out -I%,$(GCONF_CFLAGS)) \
2330 $(call gb_LinkTarget_add_libs,$(1),\
2331 $(GCONF_LIBS) \
2334 endef
2336 else # !ENABLE_GCONF
2338 define gb_LinkTarget__use_gconf
2340 endef
2342 endif # ENABLE_GCONF
2345 # PYTHON
2346 # extra python_headers external because pyuno wrapper must not link python
2347 ifeq ($(SYSTEM_PYTHON),YES)
2349 define gb_LinkTarget__use_python_headers
2350 $(call gb_LinkTarget_add_defs,$(1),\
2351 $(filter-out -I%,$(PYTHON_CFLAGS)) \
2354 $(call gb_LinkTarget_set_include,$(1),\
2355 $(filter -I%,$(PYTHON_CFLAGS)) \
2356 $$(INCLUDE) \
2359 endef
2361 define gb_LinkTarget__use_python
2362 $(call gb_LinkTarget__use_python_headers,$(1))
2364 $(call gb_LinkTarget_add_libs,$(1),\
2365 $(PYTHON_LIBS) \
2368 endef
2370 else # !SYSTEM_PYTHON
2372 # depend on external project because on MACOSX the Package is disabled...
2373 define gb_LinkTarget__use_python_headers
2374 $(call gb_LinkTarget_use_external_project,$(1),python3)
2375 $(call gb_LinkTarget_set_include,$(1),\
2376 -I$(call gb_UnpackedTarball_get_dir,python3) \
2377 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
2378 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
2379 $$(INCLUDE) \
2382 endef
2384 define gb_LinkTarget__use_python
2385 $(call gb_LinkTarget__use_python_headers,$(1))
2387 ifeq ($(OS),WNT)
2388 $(call gb_LinkTarget_add_libs,$(1),\
2389 $(call gb_UnpackedTarball_get_dir,python3)/$(if $(filter 90,$(VCVER)),PC/VS9.0,PCbuild)$(if $(filter X86_64,$(CPUNAME)),/amd64)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
2391 else ifeq ($(OS),MACOSX)
2392 $(call gb_LinkTarget_add_libs,$(1),\
2393 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
2395 else
2396 $(call gb_LinkTarget_add_libs,$(1),\
2397 -L$(call gb_UnpackedTarball_get_dir,python3) \
2398 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
2400 endif
2402 endef
2404 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
2405 python$(PYTHON_VERSION_MAJOR) \
2406 python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
2409 endif # SYSTEM_PYTHON
2411 # ORCUS
2412 ifeq ($(SYSTEM_LIBORCUS),YES)
2414 define gb_LinkTarget__use_orcus
2415 $(call gb_LinkTarget_set_include,$(1),\
2416 $$(INCLUDE) \
2417 $(ORCUS_CFLAGS) \
2419 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
2420 endef
2422 define gb_LinkTarget__use_orcus-parser
2424 endef
2426 else # !SYSTEM_LIBORCUS
2428 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
2429 orcus \
2432 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
2433 orcus-parser \
2436 define gb_LinkTarget__use_orcus
2437 $(call gb_LinkTarget_use_unpacked,$(1),liborcus)
2438 $(call gb_LinkTarget_set_include,$(1),\
2439 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
2440 $$(INCLUDE) \
2442 $(call gb_LinkTarget_use_static_libraries,$(1),orcus)
2444 $(if $(filter YES,$(SYSTEM_BOOST)), \
2445 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
2446 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
2449 endef
2451 define gb_LinkTarget__use_orcus-parser
2452 $(call gb_LinkTarget_use_static_libraries,$(1),\
2453 orcus-parser \
2456 endef
2458 endif # SYSTEM_LIBORCUS
2461 ### X11 stuff ###
2463 ifeq ($(GUIBASE),unx)
2465 # TODO: do we really need these X11 headers in the repo?
2466 ifneq ($(filter X11_EXTENSIONS,$(BUILD_TYPE)),)
2468 define gb_LinkTarget__use_x11extensions
2469 $(call gb_LinkTarget_set_include,$(1),\
2470 -I$(SRCDIR)/x11_extensions/inc \
2471 $$(INCLUDE) \
2473 endef
2475 else # !X11_EXTENSIONS
2477 gb_LinkTarget__use_x11extensions :=
2479 endif # X11_EXTENSIONS
2481 ifeq ($(XRANDR_DLOPEN),FALSE)
2483 define gb_LinkTarget__use_Xrandr
2484 $(call gb_LinkTarget__use_x11extensions,$(1))
2486 $(call gb_LinkTarget_set_include,$(1),\
2487 $$(INCLUDE) \
2488 $(XRANDR_CFLAGS) \
2491 $(call gb_LinkTarget_add_libs,$(1),\
2492 $(XRANDR_LIBS) \
2494 endef
2496 else # XRANDR_DLOPEN
2498 define gb_LinkTarget__use_Xrandr
2499 $(call gb_LinkTarget__use_x11extensions,$(1))
2501 $(call gb_LinkTarget_add_defs,$(1),\
2502 -DXRANDR_DLOPEN \
2504 endef
2506 endif # XRANDR_DLOPEN
2508 define gb_LinkTarget__use_Xrender
2509 $(call gb_LinkTarget__use_x11extensions,$(1))
2511 $(call gb_LinkTarget_set_include,$(1),\
2512 $$(INCLUDE) \
2513 $(XRENDER_CFLAGS) \
2516 $(call gb_LinkTarget_add_libs,$(1),\
2517 $(XRENDER_LIBS) \
2519 endef
2521 endif # GUIBASE=unx
2524 gb_ExternalProject__use_nss3:=
2526 ifeq (,$(filter DESKTOP,$(BUILD_TYPE)))
2528 gb_LinkTarget__use_nss3:=
2530 else
2532 ifeq ($(SYSTEM_NSS),YES)
2534 define gb_LinkTarget__use_nss3
2535 $(call gb_LinkTarget_add_defs,$(1),\
2536 -DSYSTEM_NSS \
2539 $(call gb_LinkTarget_set_include,$(1),\
2540 $$(INCLUDE) \
2541 $(NSS_CFLAGS) \
2544 $(call gb_LinkTarget_add_libs,$(1),\
2545 $(NSS_LIBS) \
2548 endef
2550 define gb_LinkTarget__use_plc4
2551 $(call gb_LinkTarget__use_nss3,$(1))
2553 endef
2555 define gb_LinkTarget__use_ssl3
2556 $(call gb_LinkTarget__use_nss3,$(1))
2558 endef
2560 else
2562 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
2563 nspr4 \
2564 nss3 \
2565 plc4 \
2566 smime3 \
2567 ssl3 \
2570 define gb_LinkTarget__use_nss3
2571 $(call gb_LinkTarget_use_package,$(1),nss)
2572 $(call gb_LinkTarget_set_include,$(1),\
2573 $$(INCLUDE) \
2574 -I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss \
2575 -I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
2578 $(call gb_LinkTarget_use_libraries,$(1),\
2579 nspr4 \
2580 nss3 \
2581 smime3 \
2584 endef
2586 define gb_LinkTarget__use_plc4
2587 $(call gb_LinkTarget_use_package,$(1),nss)
2588 $(call gb_LinkTarget_use_libraries,$(1),\
2589 plc4 \
2592 endef
2594 define gb_LinkTarget__use_ssl3
2595 $(call gb_LinkTarget_use_package,$(1),nss)
2596 $(call gb_LinkTarget_use_libraries,$(1),\
2597 ssl3 \
2600 endef
2602 define gb_ExternalProject__use_nss3
2603 $(call gb_ExternalProject_use_package,$(1),nss)
2604 $(call gb_ExternalProject_use_libraries,$(1),\
2605 nspr4 \
2606 nss3 \
2607 smime3 \
2610 endef
2612 endif
2613 endif # DESKTOP
2615 ### Jars ############################################################
2617 ifeq ($(SYSTEM_HSQLDB),YES)
2619 define gb_Jar__use_hsqldb
2620 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
2621 endef
2622 define gb_JunitTest__use_hsqldb
2623 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
2624 endef
2626 else # !SYSTEM_HSQLDB
2628 $(eval $(call gb_Helper_register_jars,OOO,\
2629 hsqldb \
2632 define gb_Jar__use_hsqldb
2633 $(call gb_Jar_use_jar,$(1),hsqldb)
2634 endef
2635 define gb_JunitTest__use_hsqldb
2636 $(call gb_JunitTest_use_jar,$(1),hsqldb)
2637 endef
2639 endif # SYSTEM_HSQLDB
2642 ifeq ($(SYSTEM_BSH),YES)
2644 define gb_Jar__use_bsh
2645 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
2646 endef
2648 else # !SYSTEM_BSH
2650 $(eval $(call gb_Helper_register_jars,OOO,\
2651 bsh \
2654 define gb_Jar__use_bsh
2655 $(call gb_Jar_use_jar,$(1),bsh)
2656 endef
2658 endif # SYSTEM_BSH
2661 ifeq ($(SYSTEM_RHINO),YES)
2663 define gb_Jar__use_rhino
2664 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
2665 endef
2667 else # !SYSTEM_RHINO
2669 $(eval $(call gb_Helper_register_jars,OOO,\
2670 js \
2673 define gb_Jar__use_rhino
2674 $(call gb_Jar_use_jar,$(1),js)
2675 endef
2677 endif # SYSTEM_RHINO
2679 ifeq ($(SYSTEM_APACHE_COMMONS),YES)
2681 define gb_Jar__use_commons-codec
2682 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
2683 endef
2684 gb_ExternalProject__use_commons-codec :=
2686 define gb_Jar__use_commons-httpclient
2687 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
2688 endef
2689 gb_ExternalProject__use_commons-httpclient :=
2691 define gb_Jar__use_commons-lang
2692 $(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
2693 endef
2694 gb_ExternalProject__use_commons-lang :=
2696 define gb_Jar__use_commons-logging
2697 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
2698 endef
2699 gb_ExternalProject__use_commons-logging :=
2701 else # !SYSTEM_APACHE_COMMONS
2703 $(eval $(call gb_Helper_register_jars,OXT,\
2704 commons-codec-1.6 \
2705 commons-httpclient-3.1 \
2706 commons-lang-2.4 \
2707 commons-logging-1.1.1 \
2710 define gb_Jar__use_commons-codec
2711 $(call gb_Jar_use_jar,$(1),commons-codec-1.6)
2712 endef
2713 define gb_ExternalProject__use_commons-codec
2714 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
2715 endef
2717 define gb_Jar__use_commons-httpclient
2718 $(call gb_Jar_use_jar,$(1),commons-httpclient-3.1)
2719 endef
2720 define gb_ExternalProject__use_commons-httpclient
2721 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
2722 endef
2724 define gb_Jar__use_commons-lang
2725 $(call gb_Jar_use_jar,$(1),commons-lang-2.4)
2726 endef
2727 define gb_ExternalProject__use_commons-lang
2728 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
2729 endef
2731 define gb_Jar__use_commons-logging
2732 $(call gb_Jar_use_jar,$(1),commons-logging-1.1.1)
2733 endef
2734 define gb_ExternalProject__use_commons-logging
2735 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
2736 endef
2738 endif # SYSTEM_APACHE_COMMONS
2741 ifeq ($(SYSTEM_JFREEREPORT),YES)
2743 define gb_Jar__use_flow-engine
2744 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
2745 endef
2747 define gb_Jar__use_flute
2748 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
2749 endef
2751 define gb_Jar__use_libbase
2752 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
2753 endef
2755 define gb_Jar__use_libfonts
2756 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
2757 endef
2759 define gb_Jar__use_libformula
2760 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
2761 endef
2763 define gb_Jar__use_liblayout
2764 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
2765 endef
2767 define gb_Jar__use_libloader
2768 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
2769 endef
2771 define gb_Jar__use_librepository
2772 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
2773 endef
2775 define gb_Jar__use_libserializer
2776 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
2777 endef
2779 define gb_Jar__use_libxml
2780 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
2781 endef
2783 define gb_Jar__use_sac
2784 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
2785 endef
2787 else # !SYSTEM_JFREEREPORT
2789 $(eval $(call gb_Helper_register_jars,OXT,\
2790 flow-engine-0.9.4 \
2791 flute-1.1.6 \
2792 libbase-1.1.6 \
2793 libfonts-1.1.6 \
2794 libformula-1.1.7 \
2795 liblayout-0.2.10 \
2796 libloader-1.1.6 \
2797 librepository-1.1.6 \
2798 libserializer-1.1.6 \
2799 libxml-1.1.7 \
2800 sac \
2803 define gb_Jar__use_flow-engine
2804 $(call gb_Jar_use_jar,$(1),flow-engine-0.9.4)
2805 endef
2807 define gb_Jar__use_flute
2808 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
2809 endef
2811 define gb_Jar__use_libbase
2812 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
2813 endef
2815 define gb_Jar__use_libfonts
2816 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
2817 endef
2819 define gb_Jar__use_libformula
2820 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
2821 endef
2823 define gb_Jar__use_liblayout
2824 $(call gb_Jar_use_jar,$(1),liblayout-0.2.10)
2825 endef
2827 define gb_Jar__use_libloader
2828 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
2829 endef
2831 define gb_Jar__use_librepository
2832 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
2833 endef
2835 define gb_Jar__use_libserializer
2836 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
2837 endef
2839 define gb_Jar__use_libxml
2840 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
2841 endef
2843 define gb_Jar__use_sac
2844 $(call gb_Jar_use_jar,$(1),sac)
2845 endef
2847 endif # SYSTEM_JFREEREPORT
2850 # Executables
2852 # FIXME: the library target should be for build too
2853 define gb_Executable__register_bestreversemap
2854 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
2855 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
2857 endef
2859 # TODO depending on the whole URE might be overkill, but I do not have a
2860 # Windows machine to debug it...
2861 # FIXME: the library target should be for build too
2862 define gb_Executable__register_climaker
2863 $(call gb_Executable_add_runtime_dependencies,climaker,\
2864 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
2865 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
2866 $(call gb_Rdb_get_outdir_target_for_build,ure/services) \
2867 $(call gb_UnoApi_get_target,udkapi) \
2869 endef
2871 # Better duplication with gb_Gallery__UNO_COMPONENTS than nothing.
2872 # This is used to determine what we need for 'build' platform.
2873 define gb_Executable__register_gengal_impl
2874 $(call gb_Executable_add_runtime_dependencies,$(1),\
2875 $(foreach component, \
2876 comphelper/util/comphelp \
2877 configmgr/source/configmgr \
2878 fileaccess/source/fileacc \
2879 framework/util/fwk \
2880 i18npool/util/i18npool \
2881 package/source/xstor/xstor \
2882 package/util/package2 \
2883 sfx2/util/sfx \
2884 svx/util/svx \
2885 svx/util/svxcore \
2886 ucb/source/core/ucb1 \
2887 ucb/source/ucp/file/ucpfile1 \
2888 unoxml/source/service/unoxml \
2889 ,$(call gb_ComponentTarget_get_outdir_target_for_build,$(component))) \
2890 $(call gb_AllLangResTarget_get_target,ofa) \
2891 $(call gb_Configuration_get_target,registry) \
2892 $(call gb_Configuration_get_target,fcfg_langpack) \
2893 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
2894 $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
2895 $(call gb_Library_get_target,vclplug_svp) \
2896 )) \
2897 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
2898 $(call gb_Rdb_get_outdir_target_for_build,ure/services) \
2899 $(call gb_UnoApi_get_target,offapi) \
2900 $(call gb_UnoApi_get_target,udkapi) \
2902 endef
2904 ifeq ($(OS),WNT)
2905 gb_Executable__register_gengal = $(call gb_Executable__register_gengal_impl,gengal)
2906 else
2907 gb_Executable__register_gengal.bin = $(call gb_Executable__register_gengal_impl,gengal.bin)
2908 endif
2910 ifneq ($(SYSTEM_ICU),YES)
2912 define gb_Executable__register_gendict
2913 $(call gb_Executable_add_runtime_dependencies,gendict,\
2914 $(call gb_Package_get_target_for_build,icu) \
2916 endef
2918 endif
2920 define gb_Executable__register_idlc
2921 $(call gb_Executable_add_runtime_dependencies,idlc,\
2922 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
2924 endef
2926 define gb_Executable__register_localize
2927 $(call gb_Executable_add_runtime_dependencies,localize,\
2928 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
2929 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
2932 endef
2934 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
2935 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
2936 # FIXME: the library target should be for build too
2937 define gb_Executable__register_saxparser
2938 $(call gb_Executable_add_runtime_dependencies,saxparser,\
2939 $(call gb_ComponentTarget_get_outdir_target,sax/source/expatwrap/expwrap) \
2940 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
2941 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
2942 $(call gb_Rdb_get_outdir_target_for_build,ure/services) \
2943 $(call gb_UnoApi_get_target,udkapi) \
2945 endef
2947 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
2948 # required due to the settings for URE_SERVICES and URE_TYPES in
2949 # cppuhelper/source/unorc
2950 # FIXME: the library target should be for build too
2951 define gb_Executable__register_uno
2952 $(call gb_Executable_add_runtime_dependencies,uno,\
2953 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
2954 $(call gb_Package_get_target_for_build,cppuhelper_unorc) \
2955 $(call gb_Rdb_get_outdir_target_for_build,ure/services) \
2956 $(call gb_UnoApi_get_target,udkapi) \
2958 endef
2961 # External executables
2963 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),YES)
2965 gb_ExternalExecutable__register_xmllint :=
2967 else # ! SYSTEM_LIBXML_FOR_BUILD
2969 define gb_ExternalExecutable__register_xmllint
2970 $(call gb_ExternalExecutable_set_internal,xmllint)
2972 endef
2974 endif # SYSTEM_LIBXML_FOR_BUILD
2976 ifeq ($(SYSTEM_LIBXSLT_FOR_BUILD),YES)
2978 gb_ExternalExecutable__register_xsltproc :=
2980 else # ! SYSTEM_LIBXSLT_FOR_BUILD
2982 define gb_ExternalExecutable__register_xsltproc
2983 $(call gb_ExternalExecutable_set_internal,xsltproc)
2984 $(call gb_ExternalExecutable_add_dependencies,xsltproc,$(call gb_Package_get_target,xslt))
2986 endef
2988 endif # SYSTEM_LIBXSLT_FOR_BUILD
2990 ifneq (,$(SYSTEM_UCPP))
2992 gb_ExternalExecutable__register_ucpp :=
2994 else # ! SYSTEM_UCPP
2996 define gb_ExternalExecutable__register_ucpp
2997 $(call gb_ExternalExecutable_set_internal,ucpp)
2999 endef
3001 endif # SYSTEM_UCPP
3003 ifeq (,$(PYTHON_FOR_BUILD))
3005 define gb_ExternalExecutable__register_python
3006 ifeq ($(OS),MACOSX)
3008 # use set_external, to avoid having the command added as prerequisite for the
3009 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3010 # matching rule to build that specific file)
3011 $(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))
3012 # the Zip ensures that internal python has been built (cannot use the Package
3013 # target, as that is not used on Mac)
3014 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3016 else
3018 $(call gb_ExternalExecutable_set_internal,python,$(INSTDIR)/program/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3019 $(call gb_ExternalExecutable_set_precommand,python,$(gb_Python_PRECOMMAND))
3020 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3022 endif
3024 endef
3026 else
3028 define gb_ExternalExecutable__register_python
3029 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3031 endef
3033 endif # PYTHON_FOR_BUILD
3035 ifneq ($(SYSTEM_GENBRK),)
3037 define gb_ExternalExecutable__register_genbrk
3038 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3040 endef
3042 else # ! SYSTEM_GENBRK
3044 define gb_ExternalExecutable__register_genbrk
3045 $(call gb_ExternalExecutable_set_internal,genbrk)
3046 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3047 $(call gb_Package_get_target_for_build,icu) \
3050 endef
3052 endif
3054 ifneq ($(SYSTEM_GENCCODE),)
3056 define gb_ExternalExecutable__register_genccode
3057 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3059 endef
3061 else # ! SYSTEM_GENCCODE
3063 define gb_ExternalExecutable__register_genccode
3064 $(call gb_ExternalExecutable_set_internal,genccode)
3065 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3066 $(call gb_Package_get_target_for_build,icu) \
3069 endef
3071 endif
3073 ifneq ($(SYSTEM_GENCMN),)
3075 define gb_ExternalExecutable__register_gencmn
3076 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3078 endef
3080 else # ! SYSTEM_GENCMN
3082 define gb_ExternalExecutable__register_gencmn
3083 $(call gb_ExternalExecutable_set_internal,gencmn)
3084 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3085 $(call gb_Package_get_target_for_build,icu) \
3088 endef
3090 endif
3092 # vim: set noet sw=4 ts=4: