Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / jurt / Library_jpipe.mk
blob3ddac8cd14d4896dd968fe7385e942c91d7478a7
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/.
10 $(eval $(call gb_Library_Library,jpipe))
12 $(eval $(call gb_Library_use_libraries,jpipe,\
13 $(gb_UWINAPI) \
16 ifeq ($(OS),WNT)
18 # The real library is called jpipx on Windows. We build only a wrapper
19 # for it here.
20 $(eval $(call gb_Library_add_cobjects,jpipe,\
21 jurt/source/pipe/wrapper/wrapper \
24 else
26 ifeq ($(COM_IS_CLANG),TRUE)
27 ifneq ($(filter -fsanitize=%,$(gb_CC)),)
28 Library_jpipe__staticsalhack = TRUE
29 endif
30 endif
32 ifeq ($(Library_jpipe__staticsalhack),)
34 $(eval $(call gb_Library_use_libraries,jpipe,\
35 sal \
38 $(eval $(call gb_Library_add_cobjects,jpipe,\
39 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
42 else
44 # HACK for Clang -fsanitize=address etc. to build libjpipe.so (dlopen'ed from
45 # java executable) without dependence on __asan_* etc. symbols (expected to be
46 # provided by the executable), incl. statically linking in the relevant parts of
47 # sal:
49 $(eval $(call gb_Library_add_cobjects,jpipe, \
50 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
53 $(eval $(call gb_Library_add_exception_objects,jpipe, \
54 jurt/source/pipe/staticsalhack \
57 $(eval $(call gb_Library_add_defs,jpipe, \
58 -DRTL_OS="\"$(RTL_OS)"\" \
59 -DRTL_ARCH="\"$(RTL_ARCH)"\" \
62 $(eval $(call gb_Library_set_include,jpipe, \
63 $$(INCLUDE) \
64 -I$(SRCDIR) \
65 -I$(SRCDIR)/sal/inc \
66 -I$(SRCDIR)/sal/osl/unx \
67 -I$(SRCDIR)/sal/rtl \
68 -I$(SRCDIR)/sal/textenc \
71 $(eval $(call gb_Library_use_externals,jpipe, \
72 boost_headers \
75 $(eval $(call gb_Library_add_libs,jpipe, \
76 $(if $(filter-out $(OS),ANDROID),-lpthread) \
79 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
80 gb_CC := $(filter-out -fsanitize=%,$(gb_CC))
81 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
82 gb_CXX := $(filter-out -fsanitize=%,$(gb_CXX))
84 endif
85 endif
87 # vim:set noet sw=4 ts=4: