Revert "lok: sc: make hi-dpi/zoom compatible with retrieving cell cursor"
[LibreOffice.git] / bridges / Library_cpp_uno.mk
blob277c54cf79dcbebe794b2b66a28b045169ad5059
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,$(gb_CPPU_ENV)_uno))
12 ifeq ($(CPUNAME),ARM)
14 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
15 bridges_SELECTED_BRIDGE := gcc3_linux_arm
16 bridge_noopt_objects := cpp2uno except uno2cpp
17 # HACK
18 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
19 $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
20 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
21 EXTRAOBJECTLISTS += $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
22 endif
24 else ifeq ($(CPUNAME),ARM64)
25 bridges_SELECTED_BRIDGE := gcc3_ios
26 bridge_noopt_objects := cpp2uno except uno2cpp
27 bridge_asm_objects := ios64_helper
29 else ifeq ($(CPUNAME),AARCH64)
31 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
32 bridges_SELECTED_BRIDGE := gcc3_linux_aarch64
33 bridge_exception_objects := abi uno2cpp
35 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno, \
36 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/callvirtualfunction, \
37 $(if $(HAVE_GCC_STACK_CLASH_PROTECTION),-fno-stack-clash-protection) \
40 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno, \
41 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/cpp2uno, \
42 -fstack-protector \
44 endif
46 else ifeq ($(CPUNAME),AXP)
48 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
49 bridges_SELECTED_BRIDGE := gcc3_linux_alpha
50 bridge_exception_objects := cpp2uno except uno2cpp
51 endif
53 else ifeq ($(CPUNAME),HPPA)
55 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
56 bridges_SELECTED_BRIDGE := gcc3_linux_hppa
57 bridge_noopt_objects := call cpp2uno except uno2cpp
58 endif
60 else ifeq ($(CPUNAME),IA64)
62 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
63 bridges_SELECTED_BRIDGE := gcc3_linux_ia64
64 bridge_asm_objects := call
65 bridge_exception_objects := except
66 bridge_noopt_objects := cpp2uno uno2cpp
67 endif
69 else ifeq ($(CPUNAME),INTEL)
71 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
72 bridges_SELECTED_BRIDGE := gcc3_linux_intel
73 bridge_asm_objects := call
74 bridge_exception_objects := cpp2uno except uno2cpp
75 bridge_noncallexception_objects := callvirtualmethod
76 else ifeq ($(OS),SOLARIS)
77 bridges_SELECTED_BRIDGE := gcc3_solaris_intel
78 bridge_exception_objects := cpp2uno except uno2cpp
79 bridge_noncallexception_objects := callvirtualmethod
80 else ifeq ($(COM),MSC)
81 bridges_SELECTED_BRIDGE := msvc_win32_intel
82 bridge_exception_objects := cpp2uno dllinit uno2cpp
83 bridge_noopt_objects := except
84 endif
86 else ifeq ($(CPUNAME),M68K)
88 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
89 bridges_SELECTED_BRIDGE := gcc3_linux_m68k
90 bridge_noopt_objects := cpp2uno except uno2cpp
91 endif
93 else ifeq ($(CPUNAME),GODSON)
95 ifneq ($(filter LINUX,$(OS)),)
96 bridges_SELECTED_BRIDGE := gcc3_linux_mips
97 bridge_noopt_objects := cpp2uno uno2cpp
98 bridge_exception_objects := except
99 endif
101 else ifeq ($(CPUNAME),GODSON64)
103 ifneq ($(filter LINUX,$(OS)),)
104 bridges_SELECTED_BRIDGE := gcc3_linux_mips64
105 bridge_asm_objects := call
106 bridge_noopt_objects := cpp2uno uno2cpp
107 bridge_exception_objects := except
108 endif
110 else ifeq ($(CPUNAME),POWERPC)
112 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
113 bridges_SELECTED_BRIDGE := gcc3_linux_powerpc
114 bridge_noopt_objects := uno2cpp
115 bridge_exception_objects := cpp2uno except
116 else ifeq ($(OS),AIX)
117 bridges_SELECTED_BRIDGE := gcc3_aix_powerpc
118 bridge_exception_objects := except
119 bridge_cxx_objects := cpp2uno uno2cpp
120 endif
122 else ifeq ($(CPUNAME),POWERPC64)
124 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
125 bridges_SELECTED_BRIDGE := gcc3_linux_powerpc64
126 bridge_noopt_objects := cpp2uno uno2cpp
127 bridge_exception_objects := except
128 endif
130 else ifeq ($(CPUNAME),S390)
132 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
133 bridges_SELECTED_BRIDGE := gcc3_linux_s390
134 bridge_exception_objects := cpp2uno except uno2cpp
135 endif
137 else ifeq ($(CPUNAME),S390X)
139 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
140 bridges_SELECTED_BRIDGE := gcc3_linux_s390x
141 bridge_exception_objects := cpp2uno except uno2cpp
142 endif
144 else ifeq ($(CPUNAME),SPARC)
146 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
147 bridges_SELECTED_BRIDGE := gcc3_linux_sparc
148 bridge_asm_objects := call
149 bridge_noopt_objects := except
150 bridge_exception_objects := cpp2uno uno2cpp
151 else ifeq ($(OS),SOLARIS)
152 bridges_SELECTED_BRIDGE := gcc3_solaris_sparc
153 bridge_noopt_objects := cpp2uno uno2cpp
154 bridge_exception_objects := except
155 endif
157 else ifeq ($(OS)-$(CPUNAME),LINUX-SPARC64)
159 bridges_SELECTED_BRIDGE := gcc3_linux_sparc64
160 bridge_asm_objects := call
161 bridge_noopt_objects := cpp2uno uno2cpp
162 bridge_exception_objects := except
164 else ifeq ($(CPUNAME),X86_64)
166 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
167 bridges_SELECTED_BRIDGE := gcc3_linux_x86-64
168 bridge_asm_objects := call
169 bridge_noncallexception_noopt_objects := callvirtualmethod
170 bridge_exception_objects := abi cpp2uno except rtti uno2cpp
171 else ifneq ($(filter MACOSX iOS,$(OS)),)
172 bridges_SELECTED_BRIDGE := gcc3_macosx_x86-64
173 bridge_exception_objects := abi call cpp2uno except uno2cpp
174 bridge_noncallexception_noopt_objects := callvirtualmethod
175 else ifeq ($(COM),MSC)
176 bridges_SELECTED_BRIDGE := msvc_win32_x86-64
177 bridge_exception_objects := cpp2uno dllinit uno2cpp
178 bridge_noopt_objects := except
179 bridge_asm_objects := call
180 endif
182 endif
184 $(eval $(call gb_Library_use_internal_comprehensive_api,$(gb_CPPU_ENV)_uno,\
185 udkapi \
188 $(eval $(call gb_Library_set_include,$(gb_CPPU_ENV)_uno,\
189 -I$(SRCDIR)/bridges/inc \
190 $$(INCLUDE) \
193 ifeq ($(HAVE_POSIX_FALLOCATE),YES)
194 $(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
195 -DHAVE_POSIX_FALLOCATE \
197 endif
199 # In case someone enabled the non-standard -fomit-frame-pointer which does not
200 # work with the .cxx sources of this library.
201 # LTO causes crashes when enabled for this library
202 # In case the compiler supports AVX this code segfaults so specifically turn
203 # it off.
204 ifeq ($(COM),GCC)
205 $(eval $(call gb_Library_add_cxxflags,gcc3_uno,\
206 $(if $(filter armeabi-v7a,$(ANDROID_APP_ABI)),-I$(ANDROID_BINUTILS_PREBUILT_ROOT)/lib/gcc/arm-linux-androideabi/4.9.x/include) \
207 -fno-omit-frame-pointer \
208 -fno-strict-aliasing \
209 $(if $(filter TRUE,$(ENABLE_LTO)),-fno-lto) \
210 $(if $(filter TRUE,$(HAVE_GCC_AVX)),-mno-avx) \
213 ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX iOS HAIKU,$(OS)),)
214 $(eval $(call gb_Library_add_libs,gcc3_uno,\
215 -ldl \
217 endif
218 endif
220 ifeq ($(COM),GCC)
221 ifneq ($(COM_IS_CLANG),TRUE)
222 bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
223 endif
224 endif
226 $(eval $(call gb_Library_use_libraries,$(gb_CPPU_ENV)_uno,\
227 cppu \
228 sal \
231 $(foreach obj,$(bridge_exception_objects),\
232 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
233 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
235 $(foreach obj,$(bridge_noncallexception_objects),\
236 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
237 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
238 , $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
240 $(foreach obj,$(bridge_noopt_objects),\
241 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
242 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
243 , $(gb_COMPILERNOOPTFLAGS))) \
245 $(foreach obj,$(bridge_noncallexception_noopt_objects),\
246 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
247 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
248 , $(gb_COMPILERNOOPTFLAGS) $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
250 $(foreach obj,$(bridge_cxx_objects),\
251 $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
252 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
254 $(foreach obj,$(bridge_asm_objects),\
255 $(eval $(call gb_Library_add_asmobjects,$(gb_CPPU_ENV)_uno,\
256 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
259 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
260 bridges/source/cpp_uno/shared/bridge \
261 bridges/source/cpp_uno/shared/component \
262 bridges/source/cpp_uno/shared/types \
263 bridges/source/cpp_uno/shared/unointerfaceproxy \
264 bridges/source/cpp_uno/shared/vtablefactory \
265 bridges/source/cpp_uno/shared/vtables \
268 $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
269 bridges/source/cpp_uno/shared/cppinterfaceproxy \
270 , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
273 # vim: set noet sw=4 ts=4: