build fix
[LibreOffice.git] / RepositoryExternal.mk
blobb7eb499504d3fb3d70438918727ebc47fa2345d4
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 gb_LinkTarget__use_glm_headers :=
94 gb_ExternalProject__use_glm_headers :=
96 else
98 define gb_LinkTarget__use_glm_headers
99 $(call gb_LinkTarget_use_unpacked,$(1),glm)
100 $(call gb_LinkTarget_set_include,$(1),\
101 $(GLM_CFLAGS) \
102 $$(INCLUDE) \
105 endef
107 define gb_ExternalProject__use_glm_headers
108 $(call gb_ExternalProject_use_unpacked,$(1),glm)
110 endef
112 endif
114 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
116 define gb_LinkTarget__use_sane_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 -I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
119 $$(INCLUDE) \
122 endef
124 else
126 gb_LinkTarget__use_sane_headers :=
128 endif
130 ifneq ($(SYSTEM_BLUEZ),)
132 gb_LinkTarget__use_bluez_bluetooth_headers :=
134 else # !SYSTEM_BLUEZ
136 define gb_LinkTarget__use_bluez_bluetooth_headers
137 $(call gb_LinkTarget_set_include,$(1),\
138 -I$(SRCDIR)/external/bluez_bluetooth/inc \
139 $$(INCLUDE) \
142 endef
144 endif # SYSTEM_BLUEZ
146 # External libraries
148 ifneq ($(SYSTEM_CPPUNIT),)
150 define gb_LinkTarget__use_cppunit
151 $(call gb_LinkTarget_set_include,$(1),\
152 $$(INCLUDE) \
153 $(CPPUNIT_CFLAGS) \
156 $(call gb_LinkTarget_add_libs,$(1),\
157 $(CPPUNIT_LIBS) \
160 endef
162 else # !SYSTEM_CPPUNIT
164 define gb_LinkTarget__use_cppunit
165 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
167 $(call gb_LinkTarget_set_include,$(1),\
168 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
169 $$(INCLUDE) \
172 ifeq ($(COM),MSC)
173 $(call gb_LinkTarget_add_libs,$(1),\
174 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
176 else
177 $(call gb_LinkTarget_add_libs,$(1),\
178 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
180 endif
182 endef
184 endif # SYSTEM_CPPUNIT
186 ifneq ($(SYSTEM_GLEW),)
188 define gb_LinkTarget__use_glew
189 $(call gb_LinkTarget_set_include,$(1),\
190 $$(INCLUDE) \
191 $(GLEW_CFLAGS) \
193 $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
195 endef
197 gb_ExternalProject__use_glew :=
199 else # !SYSTEM_GLEW
201 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
202 glew \
205 define gb_LinkTarget__use_glew
206 $(call gb_LinkTarget_use_package,$(1),glew)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,glew/include) \
209 -DGLEW_NO_GLU \
210 $$(INCLUDE) \
213 ifeq ($(COM),MSC)
214 $(call gb_LinkTarget_add_libs,$(1),\
215 $(call gb_UnpackedTarball_get_dir,glew)/lib/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/$(wnt_arch_subdir_mandatory)/glew32d.lib,Release/$(wnt_arch_subdir_mandatory)/glew32.lib) \
217 else
218 $(call gb_LinkTarget_add_libs,$(1),\
219 -L$(call gb_UnpackedTarball_get_dir,glew)/lib/ -lGLEW \
221 endif
223 endef
225 define gb_ExternalProject__use_glew
226 $(call gb_ExternalProject_use_external_project,$(1),glew)
228 endef
230 endif # SYSTEM_GLEW
232 define gb_LinkTarget__use_iconv
233 $(call gb_LinkTarget_add_libs,$(1),-liconv)
235 endef
237 ifneq ($(SYSTEM_MARIADB),)
239 define gb_LinkTarget__use_mariadb
240 $(call gb_LinkTarget_set_include,$(1),\
241 $$(INCLUDE) \
242 $(MARIADB_CFLAGS) \
244 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
246 endef
247 gb_ExternalProject__use_mariadb :=
249 else # !SYSTEM_MARIADB
251 define gb_LinkTarget__use_mariadb
252 $(call gb_LinkTarget_set_include,$(1),\
253 $$(INCLUDE) \
254 $(MARIADB_CFLAGS) \
256 $(call gb_LinkTarget_use_static_libraries,$(1),\
257 mariadblib \
260 endef
261 define gb_ExternalProject__use_mariadb
262 $(call gb_ExternalProject_use_static_libraries,$(1),mariadblib)
264 endef
266 endif # SYSTEM_MARIADB
269 ifneq ($(SYSTEM_MARIADB),)
271 define gb_LinkTarget__use_mysql
273 $(call gb_LinkTarget_add_defs,$(1),\
274 -DSYSTEM_MARIADB \
277 $(call gb_LinkTarget_add_libs,$(1),\
278 $(MARIADB_LIBS) \
281 $(call gb_LinkTarget_set_include,$(1),\
282 $(MARIADB_CFLAGS) \
283 $$(INCLUDE) \
285 endef
287 else
289 define gb_LinkTarget__use_mysql
291 $(call gb_LinkTarget_set_include,$(1),\
292 $$(INCLUDE) \
295 endef
297 endif
299 ifneq ($(SYSTEM_MYSQL_CPPCONN),)
301 define gb_LinkTarget__use_mysqlcppconn
302 $(call gb_LinkTarget_add_libs,$(1),\
303 -lmysqlcppconn \
306 $(call gb_LinkTarget_add_defs,$(1),\
307 -DSYSTEM_MYSQL_CPPCONN \
309 endef
311 else
313 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
314 mysqlcppconn \
317 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
318 define gb_LinkTarget__use_mysqlcppconn
320 $(call gb_LinkTarget_use_unpacked,$(1),mysqlcppconn)
322 $(call gb_LinkTarget_add_defs,$(1),\
323 -DCPPCONN_LIB_BUILD \
326 $(call gb_LinkTarget_set_include,$(1),\
327 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
328 -I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
329 $$(INCLUDE) \
332 endef
334 endif
336 ifneq ($(SYSTEM_ZLIB),)
338 define gb_LinkTarget__use_zlib
339 $(call gb_LinkTarget_add_defs,$(1),\
340 -DSYSTEM_ZLIB \
342 $(call gb_LinkTarget_add_libs,$(1),-lz)
344 endef
346 # nothing on system
347 define gb_LinkTarget__use_zlib_x64
349 endef
351 gb_ExternalProject__use_zlib :=
353 else # !SYSTEM_ZLIB
355 define gb_LinkTarget__use_zlib_multiarch
356 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
358 $(call gb_LinkTarget_set_include,$(1),\
359 $(ZLIB_CFLAGS) \
360 $$(INCLUDE) \
363 $(call gb_LinkTarget_use_static_libraries,$(1),\
364 $(2) \
367 endef
369 define gb_LinkTarget__use_zlib
370 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
372 endef
374 define gb_LinkTarget__use_zlib_x64
375 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
377 endef
379 define gb_ExternalProject__use_zlib
380 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
382 endef
384 endif # SYSTEM_ZLIB
387 ifneq ($(SYSTEM_JPEG),)
389 define gb_LinkTarget__use_jpeg
390 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
391 $(call gb_LinkTarget_set_ldflags,$(1),\
392 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
395 endef
397 gb_ExternalProject__use_jpeg :=
399 else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),)
401 define gb_LinkTarget__use_jpeg
402 $(call gb_LinkTarget_set_include,$(1),\
403 $(LIBJPEG_CFLAGS) \
404 $$(INCLUDE) \
406 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
407 $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full)
409 endef
411 define gb_ExternalProject__use_jpeg
412 $(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo)
414 endef
416 else # !SYSTEM_JPEG
418 define gb_LinkTarget__use_jpeg
419 $(call gb_LinkTarget_set_include,$(1),\
420 $(LIBJPEG_CFLAGS) \
421 $$(INCLUDE) \
424 $(call gb_LinkTarget_use_static_libraries,$(1),\
425 jpeg \
428 endef
430 define gb_ExternalProject__use_jpeg
431 $(call gb_ExternalProject_use_static_libraries,$(1),jpeg)
433 endef
435 endif # SYSTEM_JPEG
437 ifneq ($(SYSTEM_MYTHES),)
439 define gb_LinkTarget__use_mythes
440 $(call gb_LinkTarget_set_include,$(1),\
441 $$(INCLUDE) \
442 $(MYTHES_CFLAGS) \
444 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
446 endef
448 else # !SYSTEM_MYTHES
450 define gb_LinkTarget__use_mythes
451 $(call gb_LinkTarget_set_include,$(1),\
452 -I$(call gb_UnpackedTarball_get_dir,mythes) \
453 $$(INCLUDE) \
456 ifeq ($(COM),MSC)
457 $(call gb_LinkTarget_use_static_libraries,$(1),\
458 mythes \
460 else
461 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
462 $(call gb_LinkTarget_use_external_project,$(1),mythes)
463 endif
465 endef
467 endif # SYSTEM_MYTHES
470 ifneq ($(SYSTEM_EXPAT),)
472 define gb_LinkTarget__use_expat_impl
473 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
475 $(call gb_LinkTarget_add_defs,$(1),\
476 -DSYSTEM_EXPAT \
479 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
481 endef
483 gb_ExternalProject__use_expat :=
485 else # !SYSTEM_EXPAT
487 define gb_LinkTarget__use_expat_impl
488 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
490 $(call gb_LinkTarget_set_include,$(1),\
491 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
492 $$(INCLUDE) \
495 $(call gb_LinkTarget_use_static_libraries,$(1),\
496 $(2) \
499 endef
501 define gb_ExternalProject__use_expat
502 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
504 endef
506 endif # SYSTEM_EXPAT
508 define gb_LinkTarget__use_expat
509 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
511 endef
513 define gb_LinkTarget__use_expat_x64
514 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
516 endef
518 ifneq ($(SYSTEM_HYPH),)
520 define gb_LinkTarget__use_hyphen
521 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
523 endef
525 else # !SYSTEM_HYPH
527 define gb_LinkTarget__use_hyphen
528 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
529 $(call gb_LinkTarget_set_include,$(1),\
530 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
531 $$(INCLUDE) \
534 ifeq ($(COM),MSC)
535 $(call gb_LinkTarget_use_static_libraries,$(1),\
536 hyphen \
538 else
539 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
540 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
541 endif
543 endef
545 endif # SYSTEM_HYPH
547 ifneq ($(SYSTEM_HUNSPELL),)
549 define gb_LinkTarget__use_hunspell
550 $(call gb_LinkTarget_set_include,$(1),\
551 $$(INCLUDE) \
552 $(HUNSPELL_CFLAGS) \
554 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
556 endef
558 gb_ExternalProject__use_hunspell :=
560 else # !SYSTEM_HUNSPELL
562 define gb_LinkTarget__use_hunspell
563 $(call gb_LinkTarget_add_defs,$(1),\
564 -DHUNSPELL_STATIC \
566 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
567 $(call gb_LinkTarget_set_include,$(1),\
568 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
569 $$(INCLUDE) \
572 ifeq ($(COM),MSC)
573 $(call gb_LinkTarget_use_static_libraries,$(1),\
574 hunspell \
576 else
577 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
578 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
579 endif
581 endef
583 define gb_ExternalProject__use_hunspell
584 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
586 endef
588 endif # SYSTEM_HUNSPELL
591 ifneq ($(SYSTEM_BOOST),)
593 define gb_LinkTarget__use_boost_lib
594 $(call gb_LinkTarget_set_include,$(1),\
595 $$(INCLUDE) \
596 $(BOOST_CPPFLAGS) \
599 $(call gb_LinkTarget_add_ldflags,$(1),\
600 $(BOOST_LDFLAGS) \
603 $(call gb_LinkTarget_add_libs,$(1),$(2))
605 endef
607 define gb_LinkTarget__use_boost_date_time
608 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
610 endef
612 define gb_LinkTarget__use_boost_filesystem
613 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
615 endef
617 gb_ExternalProject__use_boost_filesystem :=
619 define gb_LinkTarget__use_boost_iostreams
620 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
622 endef
624 gb_ExternalProject__use_boost_iostreams :=
626 define gb_LinkTarget__use_boost_system
627 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
629 endef
631 gb_ExternalProject__use_boost_system :=
633 define gb_LinkTarget__use_boost_headers
634 $(call gb_LinkTarget_set_include,$(1),\
635 $$(INCLUDE) \
636 $(BOOST_CPPFLAGS) \
639 endef
641 gb_ExternalProject__use_boost_headers:=
643 else # !SYSTEM_BOOST
645 define gb_LinkTarget__use_boost_lib
646 $(call gb_LinkTarget_add_defs,$(1),\
647 -DBOOST_ALL_NO_LIB \
650 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
652 endef
654 define gb_LinkTarget__use_boost_date_time
655 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
657 endef
659 define gb_LinkTarget__use_boost_filesystem
660 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
662 endef
664 define gb_ExternalProject__use_boost_filesystem
665 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
666 endef
668 define gb_LinkTarget__use_boost_iostreams
669 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
671 endef
673 define gb_ExternalProject__use_boost_iostreams
674 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
675 endef
677 define gb_LinkTarget__use_boost_system
678 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
680 endef
682 define gb_ExternalProject__use_boost_system
683 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
684 endef
686 define gb_LinkTarget__use_boost_headers
687 $(call gb_LinkTarget_use_unpacked,$(1),boost)
688 $(call gb_LinkTarget_set_include,$(1),\
689 $(BOOST_CPPFLAGS) \
690 $$(INCLUDE) \
693 endef
695 define gb_ExternalProject__use_boost_headers
696 $(call gb_ExternalProject_use_unpacked,$(1),boost)
698 endef
700 endif # SYSTEM_BOOST
703 ifneq ($(SYSTEM_CMIS),)
705 define gb_LinkTarget__use_cmis
706 $(call gb_LinkTarget_set_include,$(1),\
707 $$(INCLUDE) \
708 $(CMIS_CFLAGS) \
710 $(call gb_LinkTarget_add_libs,$(1),$(CMIS_LIBS))
712 endef
714 else # !SYSTEM_CMIS
716 define gb_LinkTarget__use_cmis
717 $(call gb_LinkTarget_set_include,$(1),\
718 -I$(call gb_UnpackedTarball_get_dir,cmis)/src \
719 $$(INCLUDE) \
721 $(call gb_LinkTarget_use_static_libraries,$(1),\
722 cmislib \
725 endef
727 endif # SYSTEM_CMIS
729 ifeq ($(ENABLE_JAVA),TRUE)
731 ifeq ($(OS)$(COM),WNTGCC)
733 define gb_LinkTarget__use_jawt
734 $(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
736 $(call gb_LinkTarget_add_ldflags,$(1),\
737 -L$(call gb_CustomTarget_get_workdir,external/jawt) \
740 $(call gb_LinkTarget_add_libs,$(1),\
741 $(JAWTLIB) \
744 endef
746 else # $(OS)$(COM) != WNTGCC
748 define gb_LinkTarget__use_jawt
749 $(call gb_LinkTarget_add_libs,$(1),\
750 $(JAWTLIB) \
753 endef
755 endif # $(OS)$(COM) = WNTGCC
757 else # !ENABLE_JAVA
759 gb_LinkTarget__use_jawt :=
761 endif # ENABLE_JAVA
763 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
765 define gb_LinkTarget__use_libatomic_ops
766 $(call gb_LinkTarget_set_include,$(1),\
767 $$(INCLUDE) \
768 $(LIBATOMIC_OPS_CFLAGS) \
770 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
772 endef
773 gb_ExternalProject__use_libatomic_ops :=
775 else # !SYSTEM_LIBATOMIC_OPS
777 define gb_LinkTarget__use_libatomic_ops
778 $(call gb_LinkTarget_set_include,$(1),\
779 $(LIBATOMIC_OPS_CFLAGS) \
780 $$(INCLUDE) \
781 $(LIBATOMIC_OPS_CFLAGS) \
783 $(call gb_LinkTarget_use_external_project,$(1),\
784 libatomic_ops \
787 $(call gb_LinkTarget_add_libs,$(1),\
788 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
791 endef
793 define gb_ExternalProject__use_libatomic_ops
794 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
796 endef
798 endif # SYSTEM_LIBATOMIC_OPS
801 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
803 define gb_LinkTarget__use_libexttextcat
804 $(call gb_LinkTarget_set_include,$(1),\
805 $$(INCLUDE) \
806 $(LIBEXTTEXTCAT_CFLAGS) \
808 $(call gb_LinkTarget_add_defs,$(1),\
809 -DSYSTEM_LIBEXTTEXTCAT \
811 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
813 endef
815 else # !SYSTEM_LIBEXTTEXTCAT
817 define gb_LinkTarget__use_libexttextcat
818 $(call gb_LinkTarget_set_include,$(1),\
819 -I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
820 $$(INCLUDE) \
823 ifeq ($(COM),MSC)
824 $(call gb_LinkTarget_use_static_libraries,$(1),\
825 exttextcat \
827 else
828 $(call gb_LinkTarget_add_libs,$(1),\
829 $(call gb_UnpackedTarball_get_dir,exttextcat)/src/.libs/libexttextcat-2.0.a\
831 $(call gb_LinkTarget_use_external_project,$(1),exttextcat)
832 endif
835 endef
837 endif # SYSTEM_LIBEXTTEXTCAT
840 ifneq ($(SYSTEM_LIBXML),)
842 define gb_LinkTarget__use_libxml2
843 $(call gb_LinkTarget_add_defs,$(1),\
844 -DSYSTEM_LIBXML \
846 $(call gb_LinkTarget_set_include,$(1),\
847 $$(INCLUDE) \
848 $(LIBXML_CFLAGS) \
850 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
852 endef
853 gb_ExternalProject__use_libxml2:=
855 else # !SYSTEM_LIBXML
857 $(eval $(call gb_Helper_register_packages_for_install,ure,\
858 xml2 \
861 define gb_LinkTarget__use_libxml2
862 $(call gb_LinkTarget_use_package,$(1),xml2)
863 $(call gb_LinkTarget_set_include,$(1),\
864 $$(INCLUDE) \
865 $(LIBXML_CFLAGS) \
868 $(call gb_LinkTarget_add_libs,$(1),\
869 $(LIBXML_LIBS) \
872 ifeq ($(COM),MSC)
873 $(call gb_LinkTarget_use_external,$(1),icu_headers)
874 endif
876 endef
877 define gb_ExternalProject__use_libxml2
878 $(call gb_ExternalProject_use_package,$(1),xml2)
880 ifeq ($(COM),MSC)
881 $(call gb_ExternalProject_use_external_project,$(1),icu)
882 endif
884 endef
886 endif # SYSTEM_LIBXML
889 ifneq ($(SYSTEM_LIBXSLT),)
891 define gb_LinkTarget__use_libxslt
892 $(call gb_LinkTarget_set_include,$(1),\
893 $$(INCLUDE) \
894 $(LIBXSLT_CFLAGS) \
896 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
898 endef
900 define gb_LinkTarget__use_libexslt
901 $(call gb_LinkTarget_set_include,$(1),\
902 $$(INCLUDE) \
903 $(LIBEXSLT_CFLAGS) \
906 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
908 endef
910 else # !SYSTEM_LIBXSLT
912 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
913 xslt \
916 define gb_LinkTarget__use_libxslt
917 $(call gb_LinkTarget_use_package,$(1),xslt)
918 $(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
920 -I$(call gb_UnpackedTarball_get_dir,xslt) \
923 ifeq ($(COM),MSC)
924 $(call gb_LinkTarget_add_libs,$(1),\
925 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libxslt.lib \
927 else
928 $(call gb_LinkTarget_add_libs,$(1),\
929 -L$(call gb_UnpackedTarball_get_dir,xslt)/libxslt/.libs -lxslt \
931 endif
933 endef
935 define gb_LinkTarget__use_libexslt
936 $(call gb_LinkTarget_use_package,$(1),xslt)
937 $(call gb_LinkTarget_set_include,$(1),\
938 $$(INCLUDE) \
939 -I$(call gb_UnpackedTarball_get_dir,xslt) \
942 ifeq ($(COM),MSC)
943 $(call gb_LinkTarget_add_libs,$(1),\
944 $(call gb_UnpackedTarball_get_dir,xslt)/win32/bin.msvc/libexslt.lib \
946 else
947 $(call gb_LinkTarget_add_libs,$(1),\
948 -L$(call gb_UnpackedTarball_get_dir,xslt)/libexslt/.libs -lexslt \
950 endif
952 endef
954 endif # SYSTEM_LIBXSLT
956 ifeq ($(ENABLE_LIBLANGTAG),TRUE)
958 ifneq ($(SYSTEM_LIBLANGTAG),)
960 define gb_LinkTarget__use_liblangtag
961 $(call gb_LinkTarget_set_include,$(1),\
962 $$(INCLUDE) \
963 $(LIBLANGTAG_CFLAGS) \
966 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
968 endef
970 gb_ExternalProject__use_liblangtag :=
972 else # !SYSTEM_LIBLANGTAG
974 $(eval $(call gb_Helper_register_packages_for_install,ure,\
975 liblangtag_data \
978 ifeq ($(COM),MSC)
980 define gb_LinkTarget__use_liblangtag
981 $(call gb_LinkTarget_set_include,$(1),\
982 $(LIBLANGTAG_CFLAGS) \
983 $$(INCLUDE) \
985 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
986 $(call gb_LinkTarget_use_external_project,$(1),langtag)
988 endef
990 else
992 $(eval $(call gb_Helper_register_packages_for_install,ure,\
993 liblangtag \
996 define gb_LinkTarget__use_liblangtag
997 $(call gb_LinkTarget_set_include,$(1),\
998 $(LIBLANGTAG_CFLAGS) \
999 $$(INCLUDE) \
1001 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1002 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1004 endef
1006 endif # MSC
1008 define gb_ExternalProject__use_liblangtag
1009 $(call gb_ExternalProject_use_external_project,$(1),langtag)
1011 endef
1013 endif # SYSTEM_LIBLANGTAG
1015 else
1017 gb_LinkTarget__use_liblangtag :=
1018 gb_ExternalProject__use_liblangtag :=
1020 endif # ENABLE_LIBLANGTAG
1022 gb_ExternalProject__use_apr :=
1024 ifeq ($(WITH_WEBDAV),serf)
1026 define gb_LinkTarget__use_apr
1027 $(call gb_LinkTarget_set_include,$(1),\
1028 $$(INCLUDE) \
1029 $(APR_CFLAGS) \
1031 $(call gb_LinkTarget_add_libs,$(1),\
1032 $(APR_LIBS) \
1033 $(if $(filter $(OS),LINUX),-lpthread) \
1034 $(if $(filter $(OS),MACOSX),-liconv) \
1037 ifeq ($(SYSTEM_APR),)
1038 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1039 mswsock \
1040 rpcrt4 \
1041 shell32 \
1043 $(call gb_LinkTarget_add_defs,$(1),\
1044 -DAPR_DECLARE_STATIC \
1045 -DAPU_DECLARE_STATIC \
1047 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1048 endif
1050 endef
1052 define gb_ExternalProject__use_apr
1053 ifeq ($(SYSTEM_APR),)
1054 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1055 endif
1057 endef
1059 define gb_LinkTarget__use_serf
1060 $(call gb_LinkTarget_set_include,$(1),\
1061 $(SERF_CFLAGS) \
1062 $$(INCLUDE) \
1064 $(call gb_LinkTarget_add_libs,$(1),\
1065 $(SERF_LIBS) \
1068 ifeq ($(SYSTEM_SERF),)
1069 $(call gb_LinkTarget_use_external_project,$(1),serf)
1070 endif
1072 endef
1074 else ifeq ($(WITH_WEBDAV),neon)
1076 ifneq ($(SYSTEM_NEON),)
1078 define gb_LinkTarget__use_neon
1079 $(call gb_LinkTarget_add_defs,$(1),\
1080 -DNEON_VERSION=0x$(NEON_VERSION) \
1081 -DSYSTEM_NEON \
1083 $(call gb_LinkTarget_set_include,$(1),\
1084 $$(INCLUDE) \
1085 $(NEON_CFLAGS) \
1088 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1090 endef
1092 else # !SYSTEM_NEON
1094 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1095 neon \
1098 define gb_LinkTarget__use_neon
1099 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1100 $(call gb_LinkTarget_set_include,$(1),\
1101 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1102 $$(INCLUDE) \
1104 $(call gb_LinkTarget_use_libraries,$(1),\
1105 neon \
1108 endef
1110 endif # SYSTEM_NEON
1112 endif # WITH_WEBDAV
1114 ifneq ($(SYSTEM_REDLAND),)
1116 define gb_LinkTarget__use_librdf
1117 $(call gb_LinkTarget_add_defs,$(1),\
1118 -DSYSTEM_REDLAND \
1120 $(call gb_LinkTarget_set_include,$(1),\
1121 $$(INCLUDE) \
1122 $(REDLAND_CFLAGS) \
1124 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1126 endef
1128 gb_LinkTarget__use_redland_headers:=
1130 gb_LinkTarget__use_raptor_headers:=
1132 gb_LinkTarget__use_rasqal_headers:=
1134 else # !SYSTEM_REDLAND
1136 define gb_LinkTarget__use_redland_headers
1137 $(call gb_LinkTarget_set_include,$(1),\
1138 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1139 $$(INCLUDE) \
1142 endef
1144 define gb_LinkTarget__use_raptor_headers
1145 $(call gb_LinkTarget_set_include,$(1),\
1146 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1147 $$(INCLUDE) \
1150 endef
1152 define gb_LinkTarget__use_rasqal_headers
1153 $(call gb_LinkTarget_set_include,$(1),\
1154 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1155 $$(INCLUDE) \
1158 endef
1160 ifneq ($(OS),ANDROID)
1162 ifeq ($(COM),MSC)
1163 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1164 raptor2 \
1165 rasqal \
1166 rdf \
1168 else
1169 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1170 raptor \
1171 rasqal \
1172 redland \
1174 endif
1176 define gb_LinkTarget__use_librdf
1177 ifeq ($(COM),MSC)
1178 $(call gb_LinkTarget_use_libraries,$(1),\
1179 raptor2 \
1180 rdf \
1182 else
1183 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1185 $(call gb_LinkTarget_add_libs,$(1),\
1186 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1187 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1189 endif
1191 endef
1193 else # ANDROID
1195 define gb_LinkTarget__use_librdf
1196 $(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
1198 endef
1200 endif # ANDROID
1202 endif # SYSTEM_REDLAND
1205 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1207 ifneq ($(SYSTEM_CAIRO),)
1209 define gb_LinkTarget__use_cairo
1210 $(call gb_LinkTarget_set_include,$(1),\
1211 $$(INCLUDE) \
1212 $(CAIRO_CFLAGS) \
1214 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1215 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1217 endef
1219 else # !SYSTEM_CAIRO
1221 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1222 cairo \
1223 $(if $(filter $(OS),WNT),,pixman) \
1226 define gb_LinkTarget__use_cairo
1227 $(call gb_LinkTarget_use_package,$(1),cairo)
1228 $(call gb_LinkTarget_use_package,$(1),pixman)
1229 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1230 $(call gb_LinkTarget_set_include,$(1),\
1231 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1232 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1233 $$(INCLUDE) \
1235 $(call gb_LinkTarget_add_libs,$(1),\
1236 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1237 $(if $(filter-out MACOSX WNT,$(OS)), \
1238 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1242 endef
1244 endif # SYSTEM_CAIRO
1246 else ifeq ($(OS),ANDROID)
1248 define gb_LinkTarget__use_cairo
1249 $(call gb_LinkTarget_use_package,$(1),cairo)
1250 $(call gb_LinkTarget_use_package,$(1),pixman)
1251 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1252 $(call gb_LinkTarget_set_include,$(1),\
1253 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1254 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1255 $$(INCLUDE) \
1257 $(call gb_LinkTarget_add_libs,$(1),\
1258 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1259 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1262 endef
1264 endif # CAIRO
1266 ifneq ($(SYSTEM_FREETYPE),)
1268 define gb_LinkTarget__use_freetype_headers
1269 $(call gb_LinkTarget_set_include,$(1),\
1270 $$(INCLUDE) \
1271 $(FREETYPE_CFLAGS) \
1274 endef
1276 define gb_LinkTarget__use_freetype
1277 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1278 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1280 endef
1282 gb_ExternalProject__use_freetype :=
1284 else ifeq ($(OS),ANDROID)
1286 define gb_LinkTarget__use_freetype_headers
1287 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1288 $(call gb_LinkTarget_set_include,$(1),\
1289 -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
1290 $$(INCLUDE) \
1293 endef
1295 define gb_LinkTarget__use_freetype
1296 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1297 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1299 endef
1301 define gb_ExternalProject__use_freetype
1302 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1304 endef
1306 endif # SYSTEM_FREETYPE
1308 ifneq ($(SYSTEM_FONTCONFIG),)
1310 define gb_LinkTarget__use_fontconfig
1311 $(call gb_LinkTarget_set_include,$(1),\
1312 $$(INCLUDE) \
1313 $(FONTCONFIG_CFLAGS) \
1316 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1318 endef
1320 else ifeq ($(OS),ANDROID)
1322 define gb_LinkTarget__use_fontconfig
1323 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1324 $(call gb_LinkTarget_set_include,$(1),\
1325 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1326 $$(INCLUDE) \
1329 endef
1331 endif # SYSTEM_FONTCONFIG
1333 ifneq ($(SYSTEM_GRAPHITE),)
1335 define gb_LinkTarget__use_graphite
1336 $(call gb_LinkTarget_set_include,$(1),\
1337 $$(INCLUDE) \
1338 $(GRAPHITE_CFLAGS) \
1340 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1342 endef
1344 gb_ExternalProject__use_graphite:=
1346 else # !SYSTEM_GRAPHITE
1348 define gb_LinkTarget__use_graphite
1349 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1350 $(call gb_LinkTarget_set_include,$(1),\
1351 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1352 $$(INCLUDE) \
1354 $(call gb_LinkTarget_use_static_libraries,$(1),\
1355 graphite \
1358 endef
1360 define gb_ExternalProject__use_graphite
1361 $(call gb_ExternalProject_use_static_libraries,$(1),\
1362 graphite \
1365 endef
1366 endif # SYSTEM_GRAPHITE
1368 ifneq ($(SYSTEM_ICU),)
1370 gb_LinkTarget__use_icu_headers:=
1371 gb_ExternalProject__use_icu:=
1373 define gb_LinkTarget__use_icudata
1374 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1376 endef
1377 define gb_LinkTarget__use_icui18n
1378 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1380 endef
1381 define gb_LinkTarget__use_icuuc
1382 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1384 endef
1386 else # !SYSTEM_ICU
1388 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1389 icu_ure \
1392 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1393 icu \
1396 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1397 gb_ICU_suffix:=lo
1398 else
1399 gb_ICU_suffix:=
1400 endif
1402 define gb_LinkTarget__use_icu_headers
1403 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1404 $(call gb_LinkTarget_set_include,$(1),\
1405 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1406 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1407 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1408 $$(INCLUDE) \
1411 endef
1413 define gb_ExternalProject__use_icu
1414 $(call gb_ExternalProject_use_package,$(1),icu)
1416 endef
1418 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1419 define gb_LinkTarget__use_icudata
1420 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1422 ifeq ($(OS),WNT)
1423 $(call gb_LinkTarget_add_libs,$(1),\
1424 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1426 else
1427 $(call gb_LinkTarget_add_libs,$(1),\
1428 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1430 endif
1432 endef
1434 define gb_LinkTarget__use_icui18n
1435 $(call gb_LinkTarget_use_package,$(1),icu)
1437 ifeq ($(OS),WNT)
1438 $(call gb_LinkTarget_add_libs,$(1),\
1439 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1441 else
1442 $(call gb_LinkTarget_add_libs,$(1),\
1443 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1445 endif
1447 endef
1449 define gb_LinkTarget__use_icuuc
1450 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1452 ifeq ($(OS),WNT)
1453 $(call gb_LinkTarget_add_libs,$(1),\
1454 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1456 else
1457 $(call gb_LinkTarget_add_libs,$(1),\
1458 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1460 endif
1462 endef
1464 endif # SYSTEM_ICU
1466 ifneq ($(SYSTEM_HARFBUZZ),)
1468 define gb_LinkTarget__use_harfbuzz
1469 $(call gb_LinkTarget_set_include,$(1),\
1470 $$(INCLUDE) \
1471 $(HARFBUZZ_CFLAGS) \
1473 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1475 endef
1477 else # SYSTEM_HARFBUZZ != TRUE
1479 define gb_LinkTarget__use_harfbuzz
1480 $(call gb_LinkTarget_set_include,$(1),\
1481 $(HARFBUZZ_CFLAGS) \
1482 $$(INCLUDE) \
1484 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1485 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1487 endef
1489 endif # SYSTEM_HARFBUZZ
1491 ifeq ($(DISABLE_OPENSSL),TRUE)
1493 gb_ExternalProject__use_openssl:=
1494 gb_LinkTarget__use_openssl_headers:=
1495 gb_LinkTarget__use_openssl:=
1497 else # !DISABLE_OPENSSL
1499 ifneq ($(SYSTEM_OPENSSL),)
1501 gb_LinkTarget__use_openssl_headers:=
1502 gb_ExternalProject__use_openssl:=
1504 define gb_LinkTarget__use_openssl
1505 $(call gb_LinkTarget_set_include,$(1),\
1506 $$(INCLUDE) \
1507 $(OPENSSL_CFLAGS) \
1509 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1511 endef
1513 else # !SYSTEM_OPENSSL
1515 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1516 openssl \
1519 define gb_ExternalProject__use_openssl
1520 $(call gb_ExternalProject_use_package,$(1),openssl)
1522 endef
1524 define gb_LinkTarget__use_openssl_headers
1525 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1526 $(call gb_LinkTarget_set_include,$(1),\
1527 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1528 $$(INCLUDE) \
1531 endef
1533 define gb_LinkTarget__use_openssl
1534 $(call gb_LinkTarget_use_package,$(1),openssl)
1535 ifeq ($(OS),WNT)
1536 $(call gb_LinkTarget_add_libs,$(1),\
1537 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1538 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1540 else
1541 $(call gb_LinkTarget_add_libs,$(1),\
1542 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1543 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1545 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1546 ifeq ($(OS),SOLARIS)
1547 $(call gb_LinkTarget_add_libs,$(1),\
1548 -lnsl \
1549 -lsocket \
1551 endif
1552 endif
1554 endef
1556 endif # SYSTEM_OPENSSL
1557 endif # DISABLE_OPENSSL
1560 ifeq ($(DISABLE_OPENSSL),TRUE)
1562 define gb_LinkTarget__use_gnutls
1563 $(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(GNUTLS_CFLAGS) \
1568 $(call gb_LinkTarget_add_defs,$(1),\
1569 -DDISABLE_OPENSSL \
1572 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1574 endef
1576 define gb_LinkTarget__use_libgcrypt
1577 $(call gb_LinkTarget_set_include,$(1),\
1578 $$(INCLUDE) \
1579 $(LIBGCRYPT_CFLAGS) \
1582 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1584 endef
1586 else # !DISABLE_OPENSSL
1588 gb_LinkTarget__use_gnutls:=
1589 gb_LinkTarget__use_libgcrypt:=
1591 endif # DISABLE_OPENSSL
1594 ifneq ($(SYSTEM_CDR),)
1596 define gb_LinkTarget__use_cdr
1597 $(call gb_LinkTarget_set_include,$(1),\
1598 $$(INCLUDE) \
1599 $(CDR_CFLAGS) \
1601 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1603 endef
1605 else # !SYSTEM_CDR
1607 define gb_LinkTarget__use_cdr
1608 $(call gb_LinkTarget_set_include,$(1),\
1609 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1610 $$(INCLUDE) \
1612 $(call gb_LinkTarget_add_libs,$(1),\
1613 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1615 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1616 endef
1618 endif # SYSTEM_CDR
1621 ifneq ($(SYSTEM_EBOOK),)
1623 define gb_LinkTarget__use_ebook
1624 $(call gb_LinkTarget_set_include,$(1),\
1625 $$(INCLUDE) \
1626 $(EBOOK_CFLAGS) \
1628 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1630 endef
1632 gb_ExternalProject__use_ebook :=
1634 else # !SYSTEM_EBOOK
1636 define gb_LinkTarget__use_ebook
1637 $(call gb_LinkTarget_set_include,$(1),\
1638 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1639 $$(INCLUDE) \
1641 $(call gb_LinkTarget_add_libs,$(1),\
1642 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1644 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1646 endef
1648 define gb_ExternalProject__use_ebook
1649 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1651 endef
1653 endif # SYSTEM_EBOOK
1656 ifneq ($(SYSTEM_ETONYEK),)
1658 define gb_LinkTarget__use_etonyek
1659 $(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(ETONYEK_CFLAGS) \
1663 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1665 endef
1667 gb_ExternalProject__use_etonyek :=
1669 else # !SYSTEM_ETONYEK
1671 ifeq ($(COM),MSC)
1673 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1674 etonyek \
1677 define gb_LinkTarget__use_etonyek
1678 $(call gb_LinkTarget_set_include,$(1),\
1679 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1680 $$(INCLUDE) \
1682 $(call gb_LinkTarget_use_libraries,$(1),\
1683 etonyek \
1686 endef
1688 else # !MSC
1690 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1691 libetonyek \
1694 define gb_LinkTarget__use_etonyek
1695 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1697 $(call gb_LinkTarget_set_include,$(1),\
1698 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1699 -DLIBETONYEK_VISIBILITY \
1700 $$(INCLUDE) \
1702 $(call gb_LinkTarget_add_libs,$(1),\
1703 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1705 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1707 endef
1709 define gb_ExternalProject__use_etonyek
1710 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1712 endef
1714 endif
1716 endif # SYSTEM_ETONYEK
1719 ifneq ($(SYSTEM_FREEHAND),)
1721 define gb_LinkTarget__use_freehand
1722 $(call gb_LinkTarget_set_include,$(1),\
1723 $$(INCLUDE) \
1724 $(FREEHAND_CFLAGS) \
1726 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1728 endef
1730 gb_ExternalProject__use_freehand :=
1732 else # !SYSTEM_FREEHAND
1734 define gb_LinkTarget__use_freehand
1735 $(call gb_LinkTarget_set_include,$(1),\
1736 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1737 $$(INCLUDE) \
1739 $(call gb_LinkTarget_add_libs,$(1),\
1740 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1742 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1744 endef
1746 define gb_ExternalProject__use_freehand
1747 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1749 endef
1751 endif # SYSTEM_FREEHAND
1754 ifneq ($(SYSTEM_ODFGEN),)
1756 define gb_LinkTarget__use_odfgen
1757 $(call gb_LinkTarget_set_include,$(1),\
1758 $$(INCLUDE) \
1759 $(ODFGEN_CFLAGS) \
1761 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1763 endef
1765 else # !SYSTEM_ODFGEN
1767 ifeq ($(COM),MSC)
1769 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1770 odfgen \
1773 define gb_LinkTarget__use_odfgen
1774 $(call gb_LinkTarget_set_include,$(1),\
1775 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1776 $$(INCLUDE) \
1778 $(call gb_LinkTarget_use_libraries,$(1),\
1779 odfgen \
1782 endef
1784 else # !MSC
1786 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1787 libodfgen \
1790 define gb_LinkTarget__use_odfgen
1791 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1793 $(call gb_LinkTarget_set_include,$(1),\
1794 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1795 -DLIBODFGEN_VISIBILITY \
1796 $$(INCLUDE) \
1798 $(call gb_LinkTarget_add_libs,$(1),\
1799 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1802 endef
1804 endif
1806 endif # SYSTEM_ODFGEN
1809 ifneq ($(SYSTEM_REVENGE),)
1811 define gb_LinkTarget__use_revenge
1812 $(call gb_LinkTarget_set_include,$(1),\
1813 $$(INCLUDE) \
1814 $(REVENGE_CFLAGS) \
1816 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1818 endef
1820 gb_ExternalProject__use_revenge :=
1822 else # !SYSTEM_REVENGE
1824 ifeq ($(COM),MSC)
1826 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1827 revenge \
1830 define gb_LinkTarget__use_revenge
1831 $(call gb_LinkTarget_set_include,$(1),\
1832 $(REVENGE_CFLAGS) \
1833 $$(INCLUDE) \
1835 $(call gb_LinkTarget_use_libraries,$(1),\
1836 revenge \
1839 endef
1841 define gb_ExternalProject__use_revenge
1842 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1844 endef
1846 else # !MSC
1848 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1849 librevenge \
1852 define gb_LinkTarget__use_revenge
1853 $(call gb_LinkTarget_use_package,$(1),librevenge)
1855 $(call gb_LinkTarget_set_include,$(1),\
1856 $(REVENGE_CFLAGS) \
1857 -DLIBREVENGE_VISIBILITY \
1858 $$(INCLUDE) \
1860 $(call gb_LinkTarget_add_libs,$(1),\
1861 $(REVENGE_LIBS) \
1863 endef
1865 define gb_ExternalProject__use_revenge
1866 $(call gb_ExternalProject_use_package,$(1),librevenge)
1868 endef
1870 endif # MSC
1872 endif # SYSTEM_REVENGE
1875 ifneq ($(SYSTEM_ABW),)
1877 define gb_LinkTarget__use_abw
1878 $(call gb_LinkTarget_set_include,$(1),\
1879 $$(INCLUDE) \
1880 $(ABW_CFLAGS) \
1882 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1884 endef
1885 gb_ExternalProject__use_abw :=
1887 else # !SYSTEM_ABW
1889 define gb_LinkTarget__use_abw
1890 $(call gb_LinkTarget_set_include,$(1),\
1891 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1892 $$(INCLUDE) \
1894 $(call gb_LinkTarget_add_libs,$(1),\
1895 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1897 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1899 endef
1900 define gb_ExternalProject__use_abw
1901 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1903 endef
1905 endif # SYSTEM_ABW
1908 ifneq ($(SYSTEM_MSPUB),)
1910 define gb_LinkTarget__use_mspub
1911 $(call gb_LinkTarget_set_include,$(1),\
1912 $$(INCLUDE) \
1913 $(MSPUB_CFLAGS) \
1915 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
1917 endef
1919 else # !SYSTEM_MSPUB
1921 define gb_LinkTarget__use_mspub
1922 $(call gb_LinkTarget_set_include,$(1),\
1923 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
1924 $$(INCLUDE) \
1926 $(call gb_LinkTarget_add_libs,$(1),\
1927 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
1929 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
1931 endef
1933 endif # SYSTEM_MSPUB
1936 ifneq ($(SYSTEM_PAGEMAKER),)
1938 define gb_LinkTarget__use_pagemaker
1939 $(call gb_LinkTarget_set_include,$(1),\
1940 $$(INCLUDE) \
1941 $(PAGEMAKER_CFLAGS) \
1943 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
1945 endef
1946 gb_ExternalProject__use_pagemaker :=
1948 else # !SYSTEM_PAGEMAKER
1950 define gb_LinkTarget__use_pagemaker
1951 $(call gb_LinkTarget_set_include,$(1),\
1952 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
1953 $$(INCLUDE) \
1955 $(call gb_LinkTarget_add_libs,$(1),\
1956 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
1958 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
1960 endef
1961 define gb_ExternalProject__use_pagemaker
1962 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
1964 endef
1966 endif # SYSTEM_PAGEMAKER
1969 ifneq ($(SYSTEM_ZMF),)
1971 define gb_LinkTarget__use_zmf
1972 $(call gb_LinkTarget_set_include,$(1),\
1973 $$(INCLUDE) \
1974 $(ZMF_CFLAGS) \
1976 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
1978 endef
1979 gb_ExternalProject__use_zmf :=
1981 else # !SYSTEM_ZMF
1983 define gb_LinkTarget__use_zmf
1984 $(call gb_LinkTarget_set_include,$(1),\
1985 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
1986 $$(INCLUDE) \
1988 $(call gb_LinkTarget_add_libs,$(1),\
1989 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
1991 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
1993 endef
1994 define gb_ExternalProject__use_zmf
1995 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
1997 endef
1999 endif # SYSTEM_ZMF
2002 ifneq ($(SYSTEM_VISIO),)
2004 define gb_LinkTarget__use_visio
2005 $(call gb_LinkTarget_set_include,$(1),\
2006 $$(INCLUDE) \
2007 $(VISIO_CFLAGS) \
2009 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2011 endef
2013 else # !SYSTEM_VISIO
2015 define gb_LinkTarget__use_visio
2016 $(call gb_LinkTarget_set_include,$(1),\
2017 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2018 $$(INCLUDE) \
2020 $(call gb_LinkTarget_add_libs,$(1),\
2021 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2023 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2025 endef
2027 endif # SYSTEM_VISIO
2030 ifneq ($(SYSTEM_WPD),)
2032 define gb_LinkTarget__use_wpd
2033 $(call gb_LinkTarget_set_include,$(1),\
2034 $$(INCLUDE) \
2035 $(WPD_CFLAGS) \
2037 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2039 endef
2040 gb_ExternalProject__use_wpd :=
2042 else # !SYSTEM_WPD
2044 ifeq ($(COM),MSC)
2046 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2047 wpd \
2050 define gb_LinkTarget__use_wpd
2051 $(call gb_LinkTarget_set_include,$(1),\
2052 $(WPD_CFLAGS) \
2053 $$(INCLUDE) \
2055 $(call gb_LinkTarget_use_libraries,$(1),\
2056 wpd \
2059 endef
2061 define gb_ExternalProject__use_wpd
2062 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2064 endef
2066 else # !MSC
2068 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2069 libwpd \
2072 define gb_LinkTarget__use_wpd
2073 $(call gb_LinkTarget_use_package,$(1),libwpd)
2075 $(call gb_LinkTarget_set_include,$(1),\
2076 $(WPD_CFLAGS) \
2077 $$(INCLUDE) \
2079 $(call gb_LinkTarget_add_libs,$(1),\
2080 $(WPD_LIBS) \
2083 endef
2085 define gb_ExternalProject__use_wpd
2086 $(call gb_ExternalProject_use_package,$(1),libwpd)
2088 endef
2090 endif # MSC
2092 endif # SYSTEM_WPD
2095 ifneq ($(SYSTEM_WPG),)
2097 define gb_LinkTarget__use_wpg
2098 $(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
2100 $(WPG_CFLAGS) \
2102 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2104 endef
2105 gb_ExternalProject__use_wpg :=
2107 else # !SYSTEM_WPG
2109 ifeq ($(COM),MSC)
2111 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2112 wpg \
2115 define gb_LinkTarget__use_wpg
2116 $(call gb_LinkTarget_set_include,$(1),\
2117 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2118 $$(INCLUDE) \
2120 $(call gb_LinkTarget_use_libraries,$(1),\
2121 wpg \
2124 endef
2126 else # !MSC
2128 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2129 libwpg \
2132 define gb_LinkTarget__use_wpg
2133 $(call gb_LinkTarget_use_package,$(1),libwpg)
2135 $(call gb_LinkTarget_set_include,$(1),\
2136 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2137 $$(INCLUDE) \
2139 $(call gb_LinkTarget_add_libs,$(1),\
2140 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2143 endef
2145 endif # MSC
2147 endif # SYSTEM_WPG
2150 ifneq ($(SYSTEM_WPS),)
2152 define gb_LinkTarget__use_wps
2153 $(call gb_LinkTarget_set_include,$(1),\
2154 $$(INCLUDE) \
2155 $(WPS_CFLAGS) \
2157 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2159 endef
2160 gb_ExternalProject__use_wps :=
2162 else # !SYSTEM_WPS
2164 ifeq ($(COM),MSC)
2166 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2167 wps \
2170 define gb_LinkTarget__use_wps
2171 $(call gb_LinkTarget_set_include,$(1),\
2172 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2173 $$(INCLUDE) \
2176 $(call gb_LinkTarget_use_libraries,$(1),\
2177 wps \
2180 endef
2182 else # !MSC
2184 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2185 libwps \
2188 define gb_LinkTarget__use_wps
2189 $(call gb_LinkTarget_use_package,$(1),libwps)
2191 $(call gb_LinkTarget_set_include,$(1),\
2192 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2193 $$(INCLUDE) \
2195 $(call gb_LinkTarget_add_libs,$(1),\
2196 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2199 endef
2201 endif # MSC
2203 endif # SYSTEM_WPS
2206 ifneq ($(SYSTEM_MWAW),)
2208 define gb_LinkTarget__use_mwaw
2209 $(call gb_LinkTarget_set_include,$(1),\
2210 $$(INCLUDE) \
2211 $(MWAW_CFLAGS) \
2213 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2215 endef
2217 else # !SYSTEM_MWAW
2219 ifeq ($(COM),MSC)
2221 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2222 mwaw \
2225 define gb_LinkTarget__use_mwaw
2226 $(call gb_LinkTarget_set_include,$(1),\
2227 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2228 $$(INCLUDE) \
2231 $(call gb_LinkTarget_use_libraries,$(1),\
2232 mwaw \
2235 endef
2237 else # !MSC
2239 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2240 libmwaw \
2243 define gb_LinkTarget__use_mwaw
2244 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2246 $(call gb_LinkTarget_set_include,$(1),\
2247 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2248 $$(INCLUDE) \
2250 $(call gb_LinkTarget_add_libs,$(1),\
2251 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2254 endef
2256 endif # MSC
2258 endif # SYSTEM_MWAW
2260 ifneq ($(SYSTEM_STAROFFICE),)
2262 define gb_LinkTarget__use_staroffice
2263 $(call gb_LinkTarget_set_include,$(1),\
2264 $$(INCLUDE) \
2265 $(STAROFFICE_CFLAGS) \
2267 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2269 endef
2271 else # !SYSTEM_STAROFFICE
2273 ifeq ($(COM),MSC)
2275 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2276 staroffice \
2279 define gb_LinkTarget__use_staroffice
2280 $(call gb_LinkTarget_set_include,$(1),\
2281 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2282 $$(INCLUDE) \
2285 $(call gb_LinkTarget_use_libraries,$(1),\
2286 staroffice \
2289 endef
2291 else # !MSC
2293 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2294 libstaroffice \
2297 define gb_LinkTarget__use_staroffice
2298 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2300 $(call gb_LinkTarget_set_include,$(1),\
2301 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2302 $$(INCLUDE) \
2304 $(call gb_LinkTarget_add_libs,$(1),\
2305 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2308 endef
2310 endif # MSC
2312 endif # SYSTEM_STAROFFICE
2315 ifneq ($(SYSTEM_LCMS2),)
2317 define gb_LinkTarget__use_lcms2
2318 $(call gb_LinkTarget_set_include,$(1),\
2319 $$(INCLUDE) \
2320 $(LCMS2_CFLAGS) \
2322 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2324 endef
2326 gb_ExternalProject__use_lcms2 :=
2328 else # !SYSTEM_LCMS2
2330 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2331 lcms2 \
2334 define gb_ExternalProject__use_lcms2
2335 $(call gb_ExternalProject_use_package,$(1),lcms2)
2337 endef
2339 ifeq ($(OS),ANDROID)
2341 define gb_LinkTarget__use_lcms2
2342 $(call gb_LinkTarget_use_package,$(1),lcms2)
2343 $(call gb_LinkTarget_set_include,$(1),\
2344 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2345 $$(INCLUDE) \
2348 endef
2350 else
2352 define gb_LinkTarget__use_lcms2
2353 $(call gb_LinkTarget_use_package,$(1),lcms2)
2354 $(call gb_LinkTarget_set_include,$(1),\
2355 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2356 $$(INCLUDE) \
2358 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2360 endef
2362 endif # ANDROID
2363 endif # SYSTEM_LCMS2
2365 ifneq ($(ENABLE_LPSOLVE),)
2367 ifneq ($(SYSTEM_LPSOLVE),)
2369 define gb_LinkTarget__use_lpsolve
2370 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2371 $(call gb_LinkTarget_add_defs,$(1),\
2372 -DSYSTEM_LPSOLVE \
2375 endef
2377 else # !SYSTEM_LPSOLVE
2379 define gb_LinkTarget__use_lpsolve
2380 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2381 ifeq ($(COM),MSC)
2382 $(call gb_LinkTarget_add_libs,$(1),\
2383 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2385 else
2386 $(call gb_LinkTarget_add_libs,$(1),\
2387 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2389 endif
2390 $(call gb_LinkTarget_set_include,$(1),\
2391 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2392 $$(INCLUDE) \
2395 endef
2397 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2398 lpsolve \
2401 endif # SYSTEM_LPSOLVE
2403 else
2405 gb_LinkTarget__use_lpsolve :=
2407 endif # ENABLE_LPSOLVE
2409 ifneq ($(ENABLE_COINMP),)
2411 ifneq ($(SYSTEM_COINMP),TRUE)
2413 define gb_LinkTarget__use_coinmp
2414 $(call gb_LinkTarget_use_package,$(1),coinmp)
2415 ifeq ($(COM),MSC)
2416 $(call gb_LinkTarget_add_libs,$(1),\
2417 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2419 else
2420 $(call gb_LinkTarget_add_libs,$(1),\
2421 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2422 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2423 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2424 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2425 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2426 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2427 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2429 endif
2430 $(call gb_LinkTarget_set_include,$(1),\
2431 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2432 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2433 $$(INCLUDE) \
2436 endef
2438 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2439 coinmp \
2442 else # SYSTEM_COINMP
2444 define gb_LinkTarget__use_coinmp
2445 $(call gb_LinkTarget_set_include,$(1),\
2446 $$(INCLUDE) \
2447 $(COINMP_CFLAGS) \
2449 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2451 endef
2453 endif
2455 else
2457 gb_LinkTarget__use_coinmp :=
2459 endif # ENABLE_COINMP
2461 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2463 define gb_LinkTarget__use_mDNSResponder
2464 $(call gb_LinkTarget_set_include,$(1),\
2465 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2466 $$(INCLUDE) \
2468 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2469 endef
2471 endif # MDNSRESPONDER
2473 ifeq ($(ENABLE_GIO),TRUE)
2475 define gb_LinkTarget__use_gio
2476 $(call gb_LinkTarget_set_include,$(1),\
2477 $$(INCLUDE) \
2478 $(GIO_CFLAGS) \
2481 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2483 endef
2485 else # ENABLE_GIO
2487 define gb_LinkTarget__use_gio
2489 endef
2491 endif # ENABLE_GIO
2493 ifeq ($(ENABLE_AVAHI),TRUE)
2495 define gb_LinkTarget__use_avahi
2496 $(call gb_LinkTarget_set_include,$(1),\
2497 $$(INCLUDE) \
2498 $(AVAHI_CFLAGS) \
2501 $(call gb_LinkTarget_add_defs,$(1),\
2502 -DENABLE_AVAHI \
2505 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2507 endef
2509 else # ENABLE_AVAHI
2511 gb_LinkTarget__use_avahi :=
2513 endif # ENABLE_AVAHI
2516 define gb_LinkTarget__use_gtk
2517 $(call gb_LinkTarget_set_include,$(1),\
2518 $$(INCLUDE) \
2519 $(GTK_CFLAGS) \
2522 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2524 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2526 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2528 $(call gb_LinkTarget_set_include,$(1),\
2529 $$(INCLUDE) \
2530 $(GTK_PRINT_CFLAGS) \
2533 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2535 endif
2537 endef
2539 define gb_LinkTarget__use_gthread
2540 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2541 endef
2543 ifeq ($(ENABLE_CUPS),TRUE)
2545 define gb_LinkTarget__use_cups
2546 $(call gb_LinkTarget_add_defs,$(1),\
2547 -DENABLE_CUPS \
2550 $(call gb_LinkTarget_add_libs,$(1),\
2551 -lcups \
2554 endef
2556 else # ENABLE_CUPS
2558 define gb_LinkTarget__use_cups
2560 endef
2562 endif # ENABLE_DBUS
2564 ifeq ($(ENABLE_DBUS),TRUE)
2566 define gb_LinkTarget__use_dbus
2567 $(call gb_LinkTarget_set_include,$(1),\
2568 $$(INCLUDE) \
2569 $(DBUS_CFLAGS) \
2572 $(call gb_LinkTarget_add_libs,$(1),\
2573 $(DBUS_LIBS) \
2576 endef
2578 else # ENABLE_DBUS
2580 define gb_LinkTarget__use_dbus
2582 endef
2584 endif # ENABLE_DBUS
2587 define gb_LinkTarget__use_dbusmenugtk
2588 $(call gb_LinkTarget_set_include,$(1),\
2589 $$(INCLUDE) \
2590 $(DBUSMENUGTK_CFLAGS) \
2593 $(call gb_LinkTarget_add_libs,$(1),$(DBUSMENUGTK_LIBS))
2595 endef
2598 ifeq ($(ENABLE_TELEPATHY),TRUE)
2600 define gb_LinkTarget__use_telepathy
2601 $(call gb_LinkTarget_set_include,$(1),\
2602 $$(INCLUDE) \
2603 $(TELEPATHY_CFLAGS) \
2606 $(call gb_LinkTarget_add_libs,$(1),\
2607 $(TELEPATHY_LIBS) \
2610 endef
2612 else # !ENABLE_TELEPATHY
2614 gb_LinkTarget__use_telepathy :=
2616 endif # ENABLE_TELEPATHY
2618 ifneq ($(SYSTEM_LIBPNG),)
2620 define gb_LinkTarget__use_png
2621 $(call gb_LinkTarget_set_include,$(1),\
2622 $$(INCLUDE) \
2623 $(LIBPNG_CFLAGS) \
2626 $(call gb_LinkTarget_add_libs,$(1),\
2627 $(LIBPNG_LIBS) \
2630 endef
2632 gb_ExternalProject__use_png :=
2634 else # !SYSTEM_LIBPNG
2636 define gb_LinkTarget__use_png
2637 $(call gb_LinkTarget_set_include,$(1),\
2638 $(LIBPNG_CFLAGS) \
2639 $$(INCLUDE) \
2641 $(call gb_LinkTarget_use_static_libraries,$(1),\
2642 png \
2644 $(call gb_LinkTarget__use_zlib,$(1))
2646 endef
2648 define gb_ExternalProject__use_png
2649 $(call gb_ExternalProject_use_static_libraries,$(1),\
2650 png \
2653 endef
2655 endif # !SYSTEM_LIBPNG
2658 ifneq ($(SYSTEM_CURL),)
2660 define gb_LinkTarget__use_curl
2661 $(call gb_LinkTarget_add_defs,$(1),\
2662 -DSYSTEM_CURL \
2664 $(call gb_LinkTarget_set_include,$(1),\
2665 $$(INCLUDE) \
2666 $(CURL_CFLAGS) \
2668 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2670 endef
2672 else # !SYSTEM_CURL
2674 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2675 curl \
2678 define gb_LinkTarget__use_curl
2679 $(call gb_LinkTarget_use_package,$(1),curl)
2680 $(call gb_LinkTarget_set_include,$(1),\
2681 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2682 $$(INCLUDE) \
2685 ifeq ($(COM),MSC)
2686 $(call gb_LinkTarget_add_libs,$(1),\
2687 $(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 \
2689 else
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2693 endif
2695 endef
2697 endif # SYSTEM_CURL
2699 ifeq ($(ENABLE_VALGRIND),TRUE)
2701 define gb_LinkTarget__use_valgrind
2702 $(call gb_LinkTarget_add_defs,$(1),\
2703 -DHAVE_VALGRIND_HEADERS \
2706 $(call gb_LinkTarget_set_include,$(1),\
2707 $$(INCLUDE) \
2708 $(VALGRIND_CFLAGS) \
2711 endef
2713 else # !ENABLE_VALGRIND
2715 define gb_LinkTarget__use_valgrind
2717 endef
2719 endif # ENABLE_VALGRIND
2721 ifneq ($(SYSTEM_POPPLER),)
2723 define gb_LinkTarget__use_poppler
2724 $(call gb_LinkTarget_set_include,$(1),\
2725 $(POPPLER_CFLAGS) \
2726 $$(INCLUDE) \
2729 $(call gb_LinkTarget_add_libs,$(1),\
2730 $(POPPLER_LIBS) \
2733 endef
2735 else # !SYSTEM_POPPLER
2737 define gb_LinkTarget__use_poppler
2738 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2740 $(call gb_LinkTarget_set_include,$(1),\
2741 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2742 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2743 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2744 $$(INCLUDE) \
2747 $(call gb_LinkTarget_add_libs,$(1),\
2748 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2749 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2750 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2753 $(call gb_LinkTarget_use_external,$(1),jpeg)
2755 ifeq ($(OS),MACOSX)
2756 $(call gb_LinkTarget_add_libs,$(1),\
2757 -lobjc \
2759 else ifeq ($(OS),LINUX)
2760 $(call gb_LinkTarget_add_libs,$(1),\
2761 -pthread \
2763 else ifeq ($(OS),WNT)
2764 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2765 advapi32 \
2766 gdi32 \
2768 endif
2770 endef
2772 endif # SYSTEM_POPPLER
2775 ifneq ($(SYSTEM_CLUCENE),)
2777 define gb_LinkTarget__use_clucene
2778 $(call gb_LinkTarget_add_defs,$(1),\
2779 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2782 $(call gb_LinkTarget_set_include,$(1),\
2783 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2784 $$(INCLUDE) \
2787 $(call gb_LinkTarget_add_libs,$(1),\
2788 $(CLUCENE_LIBS) \
2791 endef
2793 else # !SYSTEM_CLUCENE
2795 define gb_LinkTarget__use_clucene
2796 $(call gb_LinkTarget_set_include,$(1),\
2797 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2798 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2799 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2800 $$(INCLUDE) \
2803 $(call gb_LinkTarget_use_libraries,$(1),\
2804 clucene \
2807 endef
2809 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2810 clucene \
2813 endif # SYSTEM_CLUCENE
2815 define gb_LinkTarget__use_gobject
2816 $(call gb_LinkTarget_add_libs,$(1),\
2817 $(GOBJECT_LIBS) \
2820 $(call gb_LinkTarget_set_include,$(1),\
2821 $$(INCLUDE) \
2822 $(GOBJECT_CFLAGS) \
2824 endef
2826 ifneq ($(SYSTEM_HSQLDB),)
2828 define gb_LinkTarget__use_hsqldb
2830 $(call gb_LinkTarget_add_defs,$(1),\
2831 -DSYSTEM_HSQLDB \
2832 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2835 endef
2837 else # !SYSTEM_HSQLDB
2839 define gb_LinkTarget__use_hsqldb
2841 endef
2843 endif # SYSTEM_HSQLDB
2846 ifneq ($(SYSTEM_OPENLDAP),)
2848 define gb_LinkTarget__use_openldap
2850 $(call gb_LinkTarget_add_libs,$(1),\
2851 -lldap \
2852 -llber \
2855 endef
2857 gb_ExternalProject__use_openldap :=
2859 else # !SYSTEM_OPENLDAP
2861 define gb_LinkTarget__use_openldap
2862 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2863 $(call gb_LinkTarget_set_include,$(1),\
2864 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2865 $$(INCLUDE) \
2867 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2868 $(call gb_LinkTarget_add_libs,$(1), \
2869 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2870 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2873 endef
2875 define gb_ExternalProject__use_openldap
2876 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2878 endef
2880 endif # SYSTEM_OPENLDAP
2882 ifneq ($(SYSTEM_LIBTOMMATH),)
2884 define gb_LinkTarget__use_libtommath
2885 $(call gb_LinkTarget_set_include,$(1),\
2886 $(LIBTOMMATH_CFLAGS) \
2887 $$(INCLUDE) \
2889 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2891 endef
2893 else # !SYSTEM_LIBTOMMATH
2894 define gb_LinkTarget__use_libtommath
2895 $(call gb_LinkTarget_set_include,$(1),\
2896 -I${WORKDIR}/UnpackedTarball/libtommath \
2897 $$(INCLUDE) \
2899 $(call gb_LinkTarget_add_libs,$(1),\
2900 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2902 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2904 endef
2906 endif # SYSTEM_LIBTOMMATH
2908 define gb_ExternalProject__use_libtommath
2909 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2911 endef
2913 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2915 ifneq ($(SYSTEM_FIREBIRD),)
2917 define gb_LinkTarget__use_libfbembed
2918 $(call gb_LinkTarget_set_include,$(1),\
2919 $(FIREBIRD_CFLAGS) \
2920 $$(INCLUDE) \
2922 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2924 endef
2926 else # !SYSTEM_FIREBIRD
2928 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2929 #$(call gb_LinkTarget__use_libtommath,$(1))
2931 define gb_LinkTarget__use_libfbembed
2932 $(call gb_LinkTarget_use_package,$(1),firebird)
2933 $(call gb_LinkTarget_set_include,$(1),\
2934 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2935 $$(INCLUDE) \
2937 ifeq ($(COM),MSC)
2938 $(call gb_LinkTarget_add_libs,$(1),\
2939 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
2941 else
2942 $(call gb_LinkTarget_add_libs,$(1),\
2943 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
2945 endif
2947 endef
2950 # endef
2952 endif # SYSTEM_FIREBIRD
2954 else # !ENABLE_FIREBIRD_SDBC
2956 gb_LinkTarget__use_firebird :=
2957 # gb_LinkTarget__use_atomic_ops :=
2958 # gb_LinkTarget__use_libtommath :=
2960 endif # ENABLE_FIREBIRD_SDBC
2963 ifneq ($(SYSTEM_POSTGRESQL),)
2965 define gb_LinkTarget__use_postgresql
2967 $(call gb_LinkTarget_set_include,$(1),\
2968 $(POSTGRESQL_INC) \
2969 $$(INCLUDE) \
2972 $(call gb_LinkTarget_add_libs,$(1),\
2973 -lpq \
2976 $(call gb_LinkTarget_add_ldflags,$(1),\
2977 $(POSTGRESQL_LIB) \
2980 endef
2982 else # !SYSTEM_POSTGRESQL
2984 define gb_LinkTarget__use_postgresql
2986 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
2988 $(call gb_LinkTarget_set_include,$(1),\
2989 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
2990 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
2991 $$(INCLUDE) \
2994 $(call gb_LinkTarget_add_libs,$(1),\
2995 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
2998 ifeq ($(OS)$(COM),WNTMSC)
2999 $(call gb_LinkTarget_use_external,$(1),openssl)
3001 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3002 secur32 \
3003 ws2_32 \
3006 endif
3008 endef
3010 endif # SYSTEM_POSTGRESQL
3012 ifeq ($(ENABLE_KDE4),TRUE)
3014 define gb_LinkTarget__use_kde4
3015 $(call gb_LinkTarget_set_include,$(1),\
3016 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3017 $$(INCLUDE) \
3020 $(call gb_LinkTarget_add_defs,$(1),\
3021 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3024 $(call gb_LinkTarget_add_libs,$(1),\
3025 $(KDE4_LIBS) \
3028 endef
3030 else # !ENABLE_KDE4
3032 define gb_LinkTarget__use_kde4
3034 endef
3036 endif # ENABLE_KDE4
3039 ifeq ($(ENABLE_TDE),TRUE)
3041 define gb_LinkTarget__use_tde
3042 $(call gb_LinkTarget_add_libs,$(1),\
3043 $(TDE_LIBS) \
3046 $(call gb_LinkTarget_set_include,$(1),\
3047 $$(INCLUDE) \
3048 $(TDE_CFLAGS) \
3050 endef
3052 else # ! ENABLE_TDE
3054 define gb_LinkTarget__use_tde
3056 endef
3058 endif # ENABLE_TDE
3061 # PYTHON
3062 # extra python_headers external because pyuno wrapper must not link python
3063 ifneq ($(SYSTEM_PYTHON),)
3065 define gb_LinkTarget__use_python_headers
3066 $(call gb_LinkTarget_add_defs,$(1),\
3067 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3070 $(call gb_LinkTarget_set_include,$(1),\
3071 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3072 $$(INCLUDE) \
3075 endef
3077 define gb_LinkTarget__use_python
3078 $(call gb_LinkTarget__use_python_headers,$(1))
3080 $(call gb_LinkTarget_add_libs,$(1),\
3081 $(PYTHON_LIBS) \
3084 endef
3086 else # !SYSTEM_PYTHON
3088 $(eval $(call gb_Helper_register_packages_for_install,python,\
3089 python3 \
3092 define gb_LinkTarget__use_python_headers
3093 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3094 $(call gb_LinkTarget_set_include,$(1),\
3095 -I$(call gb_UnpackedTarball_get_dir,python3) \
3096 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3097 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3098 $$(INCLUDE) \
3101 endef
3103 define gb_LinkTarget__use_python
3104 $(call gb_LinkTarget__use_python_headers,$(1))
3105 ifeq ($(OS),MACOSX)
3106 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3107 else
3108 $(call gb_LinkTarget_use_package,$(1),python3)
3109 endif
3111 ifeq ($(OS),WNT)
3112 $(call gb_LinkTarget_add_libs,$(1),\
3113 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild$(if $(filter X86_64,$(CPUNAME)),/amd64)$(if $(filter 140-INTEL,$(VCVER)-$(CPUNAME)),/win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3115 else ifeq ($(OS),MACOSX)
3116 $(call gb_LinkTarget_add_libs,$(1),\
3117 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3119 else
3120 $(call gb_LinkTarget_add_libs,$(1),\
3121 -L$(call gb_UnpackedTarball_get_dir,python3) \
3122 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3124 endif
3126 endef
3128 endif # SYSTEM_PYTHON
3130 # ORCUS
3131 ifeq ($(ENABLE_ORCUS),TRUE)
3133 ifneq ($(SYSTEM_LIBORCUS),)
3135 define gb_LinkTarget__use_orcus
3136 $(call gb_LinkTarget_set_include,$(1),\
3137 $$(INCLUDE) \
3138 $(ORCUS_CFLAGS) \
3140 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3141 endef
3143 define gb_LinkTarget__use_orcus-parser
3145 endef
3147 else # !SYSTEM_LIBORCUS
3149 ifeq ($(COM),MSC)
3151 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3152 orcus \
3153 orcus-parser \
3156 define gb_LinkTarget__use_orcus
3157 $(call gb_LinkTarget_set_include,$(1),\
3158 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3159 $$(INCLUDE) \
3162 $(call gb_LinkTarget_use_libraries,$(1),\
3163 orcus \
3166 endef
3168 define gb_LinkTarget__use_orcus-parser
3169 $(call gb_LinkTarget_set_include,$(1),\
3170 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3171 $$(INCLUDE) \
3174 $(call gb_LinkTarget_use_libraries,$(1),\
3175 orcus-parser \
3178 endef
3180 else # !MSC
3182 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3183 liborcus \
3186 define gb_LinkTarget__use_orcus
3187 $(call gb_LinkTarget_use_package,$(1),liborcus)
3189 $(call gb_LinkTarget_set_include,$(1),\
3190 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3191 $$(INCLUDE) \
3194 $(call gb_LinkTarget_add_libs,$(1),\
3195 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.12 \
3198 $(if $(SYSTEM_BOOST), \
3199 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3200 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3203 endef
3205 define gb_LinkTarget__use_orcus-parser
3206 $(call gb_LinkTarget_use_package,$(1),liborcus)
3208 $(call gb_LinkTarget_set_include,$(1),\
3209 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3210 $$(INCLUDE) \
3213 $(call gb_LinkTarget_add_libs,$(1),\
3214 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.12 \
3217 endef
3219 endif # MSC
3221 endif # SYSTEM_LIBORCUS
3223 else # ENABLE_ORCUS != TRUE
3225 gb_LinkTarget__use_orcus :=
3226 gb_LinkTarget__use_orcus-parser :=
3228 endif
3230 ifeq ($(ENABLE_EOT),TRUE)
3232 ifneq ($(SYSTEM_LIBEOT),)
3234 define gb_LinkTarget__use_libeot
3235 $(call gb_LinkTarget_set_include,$(1),\
3236 $$(INCLUDE) \
3237 $(LIBEOT_CFLAGS) \
3239 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3241 endef
3243 gb_ExternalProject__use_libeot :=
3245 else # !SYSTEM_LIBEOT
3247 define gb_LinkTarget__use_libeot
3248 $(call gb_LinkTarget_set_include,$(1),\
3249 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3250 $$(INCLUDE) \
3252 $(call gb_LinkTarget_add_libs,$(1),\
3253 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3255 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3257 endef
3259 define gb_ExternalProject__use_libeot
3260 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3262 endef
3264 endif # SYSTEM_LIBEOT
3266 else # !ENABLE_EOT
3268 gb_LinkTarget__use_libeot :=
3269 gb_ExternalProject__use_libeot :=
3271 endif # ENABLE_EOT
3273 ### X11 stuff ###
3275 ifeq ($(USING_X11), TRUE)
3277 define gb_LinkTarget__use_Xrandr
3278 $(call gb_LinkTarget_set_include,$(1),\
3279 $$(INCLUDE) \
3280 $(XRANDR_CFLAGS) \
3283 $(call gb_LinkTarget_add_libs,$(1),\
3284 $(XRANDR_LIBS) \
3286 endef
3288 define gb_LinkTarget__use_Xrender
3289 $(call gb_LinkTarget_set_include,$(1),\
3290 $$(INCLUDE) \
3291 $(XRENDER_CFLAGS) \
3294 $(call gb_LinkTarget_add_libs,$(1),\
3295 $(XRENDER_LIBS) \
3297 endef
3299 endif # USING_X11
3302 gb_ExternalProject__use_nss3:=
3304 ifeq ($(OS),ANDROID)
3306 gb_LinkTarget__use_nss3:=
3307 gb_LinkTarget__use_plc4:=
3309 else
3311 ifneq ($(SYSTEM_NSS),)
3313 define gb_LinkTarget__use_nss3
3314 $(call gb_LinkTarget_add_defs,$(1),\
3315 -DSYSTEM_NSS \
3318 $(call gb_LinkTarget_set_include,$(1),\
3319 $$(INCLUDE) \
3320 $(NSS_CFLAGS) \
3323 $(call gb_LinkTarget_add_libs,$(1),\
3324 $(NSS_LIBS) \
3327 endef
3329 define gb_LinkTarget__use_plc4
3330 $(call gb_LinkTarget__use_nss3,$(1))
3332 endef
3334 define gb_LinkTarget__use_ssl3
3335 $(call gb_LinkTarget__use_nss3,$(1))
3337 endef
3339 else # !SYSTEM_NSS
3341 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3342 nss \
3345 define gb_LinkTarget__use_nss3
3346 $(call gb_LinkTarget_use_package,$(1),nss)
3347 $(call gb_LinkTarget_set_include,$(1),\
3348 $$(INCLUDE) \
3349 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3350 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3353 ifeq ($(COM),MSC)
3354 $(call gb_LinkTarget_add_libs,$(1),\
3355 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3356 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3357 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3359 else
3360 $(call gb_LinkTarget_add_libs,$(1),\
3361 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3362 -lnspr4 \
3363 -lnss3 \
3364 -lsmime3 \
3366 endif
3368 endef
3370 define gb_LinkTarget__use_plc4
3371 $(call gb_LinkTarget_use_package,$(1),nss)
3372 ifeq ($(COM),MSC)
3373 $(call gb_LinkTarget_add_libs,$(1),\
3374 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3376 else
3377 $(call gb_LinkTarget_add_libs,$(1),\
3378 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3380 endif
3382 endef
3384 define gb_LinkTarget__use_ssl3
3385 $(call gb_LinkTarget_use_package,$(1),nss)
3386 ifeq ($(COM),MSC)
3387 $(call gb_LinkTarget_add_libs,$(1),\
3388 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3390 else
3391 $(call gb_LinkTarget_add_libs,$(1),\
3392 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3394 endif
3396 endef
3398 define gb_ExternalProject__use_nss3
3399 $(call gb_ExternalProject_use_package,$(1),nss)
3401 endef
3403 endif # SYSTEM_NSS
3405 endif # DESKTOP
3407 ifeq ($(ENABLE_BREAKPAD),TRUE)
3409 define gb_LinkTarget__use_breakpad
3410 $(call gb_LinkTarget_set_include,$(1),\
3411 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3412 $$(INCLUDE) \
3415 ifeq ($(COM),MSC)
3416 $(call gb_LinkTarget_use_static_libraries,$(1),\
3417 breakpad \
3419 else
3420 $(call gb_LinkTarget_add_libs,$(1),\
3421 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3423 endif
3425 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3427 endef
3429 endif # ENABLE_BREAKPAD
3431 ifeq ($(ENABLE_GLTF),TRUE)
3433 ifneq ($(SYSTEM_LIBGLTF),TRUE)
3435 define gb_LinkTarget__use_libgltf
3436 $(call gb_LinkTarget_set_include,$(1),\
3437 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
3438 $$(INCLUDE) \
3441 ifeq ($(COM),MSC)
3442 $(call gb_LinkTarget_add_libs,$(1),\
3443 $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
3445 else
3446 $(call gb_LinkTarget_add_libs,$(1),\
3447 $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
3449 endif
3451 $(call gb_LinkTarget_use_external_project,$(1),libgltf)
3453 endef
3455 else # SYSTEM_LIBGLTF
3457 define gb_LinkTarget__use_libgltf
3458 $(call gb_LinkTarget_set_include,$(1),\
3459 $$(INCLUDE) \
3460 $(LIBGLTF_CFLAGS) \
3462 $(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS))
3464 endef
3466 endif # SYSTEM_LIBGLTF
3468 ifeq ($(ENABLE_COLLADA),TRUE)
3470 ifeq ($(SYSTEM_OPENCOLLADA),TRUE)
3472 define gb_LinkTarget__use_opencollada_parser
3473 $(call gb_LinkTarget_set_include,$(1),\
3474 $$(INCLUDE) \
3475 $(OPENCOLLADA_CFLAGS) \
3478 $(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS))
3480 endef
3482 else # !SYSTEM_OPENCOLLADA
3484 define gb_LinkTarget__use_opencollada_parser
3485 $(call gb_LinkTarget_set_include,$(1),\
3486 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3487 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
3488 -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
3489 -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
3490 $$(INCLUDE) \
3493 $(call gb_LinkTarget_use_static_libraries,$(1),\
3494 opencollada_parser \
3496 endef
3498 endif # SYSTEM_OPENCOLLADA
3500 ifeq ($(SYSTEM_COLLADA2GLTF),TRUE)
3502 define gb_LinkTarget__use_collada2gltf
3503 $(call gb_LinkTarget_set_include,$(1),\
3504 $$(INCLUDE) \
3505 $(COLLADA2GLTF_CFLAGS) \
3508 $(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS))
3510 endef
3512 else # !SYSTEM_COLLADA2GLTF
3514 define gb_LinkTarget__use_collada2gltf
3515 $(call gb_LinkTarget_set_include,$(1),\
3516 -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
3517 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
3518 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
3519 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
3520 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
3521 -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
3522 $$(INCLUDE) \
3525 $(call gb_LinkTarget_use_static_libraries,$(1),\
3526 collada2gltf \
3528 endef
3530 endif # SYSTEM_COLLADA2GLTF
3532 endif # ENABLE_COLLADA
3534 endif # ENABLE_GLTF
3536 define gb_LinkTarget__use_dconf
3537 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3538 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3539 endef
3541 ### Jars ############################################################
3543 ifneq ($(SYSTEM_HSQLDB),)
3545 define gb_Jar__use_hsqldb
3546 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3547 endef
3548 define gb_JunitTest__use_hsqldb
3549 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3550 endef
3552 else # !SYSTEM_HSQLDB
3554 ifeq ($(ENABLE_JAVA),TRUE)
3555 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3556 hsqldb \
3558 endif
3560 define gb_Jar__use_hsqldb
3561 $(call gb_Jar_use_jar,$(1),hsqldb)
3562 endef
3563 define gb_JunitTest__use_hsqldb
3564 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3565 endef
3567 endif # SYSTEM_HSQLDB
3570 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3572 ifneq ($(SYSTEM_BSH),)
3574 define gb_Jar__use_bsh
3575 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3576 endef
3578 else # !SYSTEM_BSH
3580 ifeq ($(ENABLE_JAVA),TRUE)
3581 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3582 bsh \
3584 endif
3586 define gb_Jar__use_bsh
3587 $(call gb_Jar_use_jar,$(1),bsh)
3588 endef
3590 endif # SYSTEM_BSH
3592 endif
3594 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3596 ifneq ($(SYSTEM_RHINO),)
3598 define gb_Jar__use_rhino
3599 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3600 endef
3602 else # !SYSTEM_RHINO
3604 ifeq ($(ENABLE_JAVA),TRUE)
3605 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3606 js \
3608 endif
3610 define gb_Jar__use_rhino
3611 $(call gb_Jar_use_jar,$(1),js)
3612 endef
3614 endif # SYSTEM_RHINO
3616 endif
3618 ifneq ($(SYSTEM_APACHE_COMMONS),)
3620 define gb_Jar__use_commons-logging
3621 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3622 endef
3623 gb_ExternalProject__use_commons-logging :=
3625 else # !SYSTEM_APACHE_COMMONS
3627 ifeq ($(ENABLE_JAVA),TRUE)
3628 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3629 commons-logging-$(COMMONS_LOGGING_VERSION) \
3631 endif
3633 define gb_Jar__use_commons-logging
3634 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3635 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3636 endef
3637 define gb_ExternalProject__use_commons-logging
3638 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3639 endef
3641 endif # SYSTEM_APACHE_COMMONS
3644 ifneq ($(SYSTEM_JFREEREPORT),)
3646 define gb_Jar__use_flow-engine
3647 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3648 endef
3650 define gb_Jar__use_flute
3651 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3652 endef
3654 define gb_Jar__use_libbase
3655 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3656 endef
3658 define gb_Jar__use_libfonts
3659 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3660 endef
3662 define gb_Jar__use_libformula
3663 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3664 endef
3666 define gb_Jar__use_liblayout
3667 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3668 endef
3670 define gb_Jar__use_libloader
3671 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3672 endef
3674 define gb_Jar__use_librepository
3675 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3676 endef
3678 define gb_Jar__use_libserializer
3679 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3680 endef
3682 define gb_Jar__use_libxml
3683 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3684 endef
3686 define gb_Jar__use_sac
3687 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3688 endef
3690 else # !SYSTEM_JFREEREPORT
3692 ifeq ($(ENABLE_JAVA),TRUE)
3693 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3694 flow-engine \
3695 flute-1.1.6 \
3696 libbase-1.1.6 \
3697 libfonts-1.1.6 \
3698 libformula-1.1.7 \
3699 liblayout \
3700 libloader-1.1.6 \
3701 librepository-1.1.6 \
3702 libserializer-1.1.6 \
3703 libxml-1.1.7 \
3704 sac \
3706 endif
3708 define gb_Jar__use_flow-engine
3709 $(call gb_Jar_use_jar,$(1),flow-engine)
3710 endef
3712 define gb_Jar__use_flute
3713 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3714 endef
3716 define gb_Jar__use_libbase
3717 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3718 endef
3720 define gb_Jar__use_libfonts
3721 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3722 endef
3724 define gb_Jar__use_libformula
3725 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3726 endef
3728 define gb_Jar__use_liblayout
3729 $(call gb_Jar_use_jar,$(1),liblayout)
3730 endef
3732 define gb_Jar__use_libloader
3733 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3734 endef
3736 define gb_Jar__use_librepository
3737 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3738 endef
3740 define gb_Jar__use_libserializer
3741 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3742 endef
3744 define gb_Jar__use_libxml
3745 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3746 endef
3748 define gb_Jar__use_sac
3749 $(call gb_Jar_use_jar,$(1),sac)
3750 endef
3752 endif # SYSTEM_JFREEREPORT
3755 # Executables
3757 # FIXME: the library target should be for build too
3758 define gb_Executable__register_bestreversemap
3759 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3760 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3762 endef
3764 # TODO depending on the whole URE might be overkill, but I do not have a
3765 # Windows machine to debug it...
3766 # FIXME: the library target should be for build too
3767 define gb_Executable__register_climaker
3768 $(call gb_Executable_add_runtime_dependencies,climaker,\
3769 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3770 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3771 $(call gb_UnoApi_get_target,udkapi) \
3772 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3774 endef
3776 define gb_Executable__register_cppumaker
3777 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3778 $(if $(filter-out ANDROID,$(OS)),$(call gb_Library_get_target,sal_textenc)) \
3780 endef
3782 # This is used to determine what we need for 'build' platform.
3783 # FIXME: the library target should be for build too
3784 define gb_Executable__register_gengal
3785 $(call gb_Executable_add_runtime_dependencies,gengal,\
3786 $(call gb_AllLangResTarget_get_target,ofa) \
3787 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3788 $(call gb_Package_get_target_for_build,postprocess_images) \
3789 $(call gb_Package_get_target_for_build,postprocess_registry) \
3790 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3791 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3792 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3793 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3794 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3795 $(call gb_UnoApi_get_target,offapi) \
3796 $(call gb_UnoApi_get_target,udkapi) \
3798 endef
3800 ifeq ($(SYSTEM_ICU),)
3802 define gb_Executable__register_gendict
3803 $(call gb_Executable_add_runtime_dependencies,gendict,\
3804 $(call gb_Package_get_target_for_build,icu) \
3805 $(call gb_Package_get_target_for_build,icu_ure) \
3807 endef
3809 endif
3811 define gb_Executable__register_idlc
3812 $(call gb_Executable_add_runtime_dependencies,idlc,\
3813 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3815 endef
3817 define gb_Executable__register_localize
3818 $(call gb_Executable_add_runtime_dependencies,localize,\
3819 $(foreach exec,cfgex helpex propex transex3 treex uiex ulfex xrmex,\
3820 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3823 endef
3825 # FIXME ure/services.rdb needs cleanup
3826 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3827 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3828 # FIXME: the library target should be for build too
3829 define gb_Executable__register_saxparser
3830 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3831 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3832 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3833 $(call gb_Rdb_get_target_for_build,saxparser) \
3834 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3835 $(call gb_UnoApi_get_target,udkapi) \
3837 endef
3839 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3840 # required due to the settings for URE_SERVICES and URE_TYPES in
3841 # cppuhelper/source/unorc
3842 # FIXME: the library target should be for build too
3843 define gb_Executable__register_uno
3844 $(call gb_Executable_add_runtime_dependencies,uno,\
3845 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3846 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3847 $(call gb_UnoApi_get_target,udkapi) \
3849 endef
3852 # External executables
3854 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3856 gb_ExternalExecutable__register_xmllint :=
3858 else # ! SYSTEM_LIBXML_FOR_BUILD
3860 define gb_ExternalExecutable__register_xmllint
3861 $(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)
3862 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3863 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3864 $(call gb_Package_get_target,xml2) \
3867 endef
3869 endif # SYSTEM_LIBXML_FOR_BUILD
3871 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3873 gb_ExternalExecutable__register_xsltproc :=
3875 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3877 define gb_ExternalExecutable__register_xsltproc
3878 $(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)
3879 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3880 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3881 $(call gb_Package_get_target,xml2) \
3882 $(call gb_Package_get_target,xslt) \
3885 endef
3887 endif # SYSTEM_LIBXSLT_FOR_BUILD
3889 ifneq (,$(SYSTEM_UCPP))
3891 gb_ExternalExecutable__register_ucpp :=
3893 else # ! SYSTEM_UCPP
3895 define gb_ExternalExecutable__register_ucpp
3896 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3898 endef
3900 endif # SYSTEM_UCPP
3902 ifeq (,$(PYTHON_FOR_BUILD))
3904 define gb_ExternalExecutable__register_python
3905 ifeq ($(OS),MACOSX)
3907 # use set_external, to avoid having the command added as prerequisite for the
3908 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3909 # matching rule to build that specific file)
3910 $(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))
3911 # the Zip ensures that internal python has been built (cannot use the Package
3912 # target, as that is not used on Mac)
3913 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3915 else
3917 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3918 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
3919 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
3921 endif
3923 endef
3925 else
3927 define gb_ExternalExecutable__register_python
3928 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
3930 endef
3932 endif # PYTHON_FOR_BUILD
3934 ifneq ($(SYSTEM_GENBRK),)
3936 define gb_ExternalExecutable__register_genbrk
3937 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
3939 endef
3941 else # ! SYSTEM_GENBRK
3943 define gb_ExternalExecutable__register_genbrk
3944 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
3945 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3946 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
3947 $(call gb_Package_get_target_for_build,icu) \
3948 $(call gb_Package_get_target_for_build,icu_ure) \
3951 endef
3953 endif
3955 ifneq ($(SYSTEM_GENCCODE),)
3957 define gb_ExternalExecutable__register_genccode
3958 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
3960 endef
3962 else # ! SYSTEM_GENCCODE
3964 define gb_ExternalExecutable__register_genccode
3965 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
3966 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3967 $(call gb_ExternalExecutable_add_dependencies,genccode,\
3968 $(call gb_Package_get_target_for_build,icu) \
3969 $(call gb_Package_get_target_for_build,icu_ure) \
3972 endef
3974 endif
3976 ifneq ($(SYSTEM_GENCMN),)
3978 define gb_ExternalExecutable__register_gencmn
3979 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
3981 endef
3983 else # ! SYSTEM_GENCMN
3985 define gb_ExternalExecutable__register_gencmn
3986 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
3987 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
3988 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
3989 $(call gb_Package_get_target_for_build,icu) \
3990 $(call gb_Package_get_target_for_build,icu_ure) \
3993 endef
3995 endif
3997 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
3999 $(eval $(call gb_Helper_register_jars,OXT,\
4000 owncloud-android-library \
4003 define gb_Jar__use_owncloud_android_lib
4004 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4005 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4006 endef
4007 define gb_ExternalProject__use_owncloud_android_lib
4008 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4009 endef
4011 endif
4013 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4014 ifneq ($(SYSTEM_BZIP2),)
4016 define gb_LinkTarget__use_bzip2
4017 $(call gb_LinkTarget_set_include,$(1),\
4018 $(BZIP2_CFLAGS) \
4019 $$(INCLUDE) \
4021 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4023 endef
4025 gb_ExternalProject__use_bzip2 :=
4027 else # !SYSTEM_BZIP2
4029 define gb_LinkTarget__use_bzip2
4030 $(call gb_LinkTarget_set_include,$(1),\
4031 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4032 $$(INCLUDE) \
4035 ifeq ($(COM),MSC)
4036 $(call gb_LinkTarget_add_libs,$(1),\
4037 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4039 else
4040 $(call gb_LinkTarget_add_libs,$(1),\
4041 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4043 endif
4045 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4046 endef
4048 define gb_ExternalProject__use_bzip2
4049 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4050 endef
4052 endif
4053 endif
4055 define gb_LinkTarget__use_clew
4056 $(call gb_LinkTarget_set_include,$(1), \
4057 -I$(SRCDIR)/external/clew/source/include \
4058 $$(INCLUDE) \
4060 $(call gb_LinkTarget_use_libraries,$(1),clew)
4061 endef
4063 define gb_LinkTarget__use_pdfium
4064 $(call gb_LinkTarget_set_include,$(1),\
4065 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4066 $$(INCLUDE) \
4068 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4069 endef
4070 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4071 pdfium \
4074 # vim: set noet sw=4 ts=4: