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
))
14 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
15 bridges_SELECTED_BRIDGE
:= gcc3_linux_arm
16 bridge_noopt_objects
:= cpp2uno except uno2cpp
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
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 callvirtualfunction uno2cpp
35 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
, \
36 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/cpp2uno
, \
37 $(gb_LinkTarget_EXCEPTIONFLAGS
) \
38 $(call gb_LinkTarget__get_cxxflags
,$(gb_CPPU_ENV
)_uno
) -fstack-protector \
42 else ifeq ($(CPUNAME
),AXP
)
44 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
45 bridges_SELECTED_BRIDGE
:= gcc3_linux_alpha
46 bridge_exception_objects
:= cpp2uno except uno2cpp
49 else ifeq ($(CPUNAME
),HPPA
)
51 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
52 bridges_SELECTED_BRIDGE
:= gcc3_linux_hppa
53 bridge_noopt_objects
:= call cpp2uno except uno2cpp
56 else ifeq ($(CPUNAME
),IA64
)
58 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
59 bridges_SELECTED_BRIDGE
:= gcc3_linux_ia64
60 bridge_asm_objects
:= call
61 bridge_exception_objects
:= except
62 bridge_noopt_objects
:= cpp2uno uno2cpp
65 else ifeq ($(CPUNAME
),INTEL
)
67 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU
,$(OS
)),)
68 bridges_SELECTED_BRIDGE
:= gcc3_linux_intel
69 bridge_asm_objects
:= call
70 bridge_exception_objects
:= cpp2uno except uno2cpp
71 bridge_noncallexception_objects
:= callvirtualmethod
72 else ifeq ($(OS
),SOLARIS
)
73 bridges_SELECTED_BRIDGE
:= gcc3_solaris_intel
74 bridge_exception_objects
:= cpp2uno except uno2cpp
75 bridge_noncallexception_objects
:= callvirtualmethod
76 else ifeq ($(COM
),MSC
)
77 bridges_SELECTED_BRIDGE
:= msvc_win32_intel
78 bridge_exception_objects
:= cpp2uno dllinit uno2cpp
79 bridge_noopt_objects
:= except
82 else ifeq ($(CPUNAME
),M68K
)
84 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
85 bridges_SELECTED_BRIDGE
:= gcc3_linux_m68k
86 bridge_noopt_objects
:= cpp2uno except uno2cpp
89 else ifeq ($(CPUNAME
),GODSON
)
91 ifneq ($(filter ANDROID LINUX
,$(OS
)),)
92 bridges_SELECTED_BRIDGE
:= gcc3_linux_mips
93 bridge_noopt_objects
:= cpp2uno uno2cpp
94 bridge_exception_objects
:= except
97 else ifeq ($(CPUNAME
),GODSON64
)
99 ifneq ($(filter ANDROID LINUX
,$(OS
)),)
100 bridges_SELECTED_BRIDGE
:= gcc3_linux_mips64
101 bridge_asm_objects
:= call
102 bridge_noopt_objects
:= cpp2uno uno2cpp
103 bridge_exception_objects
:= except
106 else ifeq ($(CPUNAME
),POWERPC
)
108 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
109 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc
110 bridge_noopt_objects
:= uno2cpp
111 bridge_exception_objects
:= cpp2uno except
112 else ifeq ($(OS
),AIX
)
113 bridges_SELECTED_BRIDGE
:= gcc3_aix_powerpc
114 bridge_exception_objects
:= except
115 bridge_cxx_objects
:= cpp2uno uno2cpp
118 else ifeq ($(CPUNAME
),POWERPC64
)
120 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
121 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc64
122 bridge_noopt_objects
:= cpp2uno uno2cpp
123 bridge_exception_objects
:= except
126 else ifeq ($(CPUNAME
),S390
)
128 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
129 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390
130 bridge_exception_objects
:= cpp2uno except uno2cpp
133 else ifeq ($(CPUNAME
),S390X
)
135 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
136 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390x
137 bridge_exception_objects
:= cpp2uno except uno2cpp
140 else ifeq ($(CPUNAME
),SPARC
)
142 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
143 bridges_SELECTED_BRIDGE
:= gcc3_linux_sparc
144 bridge_asm_objects
:= call
145 bridge_noopt_objects
:= except
146 bridge_exception_objects
:= cpp2uno uno2cpp
147 else ifeq ($(OS
),SOLARIS
)
148 bridges_SELECTED_BRIDGE
:= gcc3_solaris_sparc
149 bridge_noopt_objects
:= cpp2uno uno2cpp
150 bridge_exception_objects
:= except
153 else ifeq ($(OS
)-$(CPUNAME
),LINUX-SPARC64
)
155 bridges_SELECTED_BRIDGE
:= gcc3_linux_sparc64
156 bridge_asm_objects
:= call
157 bridge_noopt_objects
:= cpp2uno uno2cpp
158 bridge_exception_objects
:= except
160 else ifeq ($(CPUNAME
),X86_64
)
162 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU
,$(OS
)),)
163 bridges_SELECTED_BRIDGE
:= gcc3_linux_x86-64
164 bridge_asm_objects
:= call
165 bridge_noncallexception_noopt_objects
:= callvirtualmethod
166 bridge_exception_objects
:= abi cpp2uno except rtti uno2cpp
167 else ifneq ($(filter MACOSX iOS
,$(OS
)),)
168 bridges_SELECTED_BRIDGE
:= gcc3_macosx_x86-64
169 bridge_exception_objects
:= abi call cpp2uno except uno2cpp
170 bridge_noncallexception_noopt_objects
:= callvirtualmethod
171 else ifeq ($(COM
),MSC
)
172 bridges_SELECTED_BRIDGE
:= msvc_win32_x86-64
173 bridge_exception_objects
:= cpp2uno dllinit uno2cpp
174 bridge_noopt_objects
:= except
175 bridge_asm_objects
:= call
180 $(eval
$(call gb_Library_use_internal_comprehensive_api
,$(gb_CPPU_ENV
)_uno
,\
184 $(eval
$(call gb_Library_set_include
,$(gb_CPPU_ENV
)_uno
,\
185 -I
$(SRCDIR
)/bridges
/inc \
189 ifeq ($(HAVE_POSIX_FALLOCATE
),YES
)
190 $(eval
$(call gb_Library_add_defs
,$(gb_CPPU_ENV
)_uno
,\
191 -DHAVE_POSIX_FALLOCATE \
195 # In case someone enabled the non-standard -fomit-frame-pointer which does not
196 # work with the .cxx sources of this library.
197 # LTO causes crashes when enabled for this library
198 # In case the compiler supports AVX this code segfaults so specifically turn
201 $(eval
$(call gb_Library_add_cxxflags
,gcc3_uno
,\
202 $(if
$(filter armeabi-v7a
,$(ANDROID_APP_ABI
)),-I
$(ANDROID_BINUTILS_PREBUILT_ROOT
)/lib
/gcc
/arm-linux-androideabi
/4.9.x
/include) \
203 -fno-omit-frame-pointer \
204 -fno-strict-aliasing \
205 $(if
$(filter TRUE
,$(ENABLE_LTO
)),-fno-lto
) \
206 $(if
$(filter TRUE
,$(HAVE_GCC_AVX
)),-mno-avx
) \
209 ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX iOS HAIKU
,$(OS
)),)
210 $(eval
$(call gb_Library_add_libs
,gcc3_uno
,\
217 ifneq ($(COM_IS_CLANG
),TRUE
)
218 bridges_NON_CALL_EXCEPTIONS_FLAGS
:= -fnon-call-exceptions
222 bridges_DEBUGINFO_FLAGS
:= $(if
$(call gb_LinkTarget__symbols_enabled
,Library_
$(gb_CPPU_ENV
)_uno
),$(gb_DEBUGINFO_FLAGS
))
224 $(eval
$(call gb_Library_use_libraries
,$(gb_CPPU_ENV
)_uno
,\
229 $(foreach obj
,$(bridge_exception_objects
),\
230 $(eval
$(call gb_Library_add_exception_objects
,$(gb_CPPU_ENV
)_uno
,\
231 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
233 $(foreach obj
,$(bridge_noncallexception_objects
),\
234 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
235 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
236 , $(bridges_NON_CALL_EXCEPTIONS_FLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) $(bridges_DEBUGINFO_FLAGS
))) \
238 $(foreach obj
,$(bridge_noopt_objects
),\
239 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
240 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
241 , $(gb_COMPILERNOOPTFLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) $(bridges_DEBUGINFO_FLAGS
))) \
243 $(foreach obj
,$(bridge_noncallexception_noopt_objects
),\
244 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
245 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
246 , $(gb_COMPILERNOOPTFLAGS
) $(bridges_NON_CALL_EXCEPTIONS_FLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) $(bridges_DEBUGINFO_FLAGS
))) \
248 $(foreach obj
,$(bridge_cxx_objects
),\
249 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
250 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
252 $(foreach obj
,$(bridge_asm_objects
),\
253 $(eval
$(call gb_Library_add_asmobjects
,$(gb_CPPU_ENV
)_uno
,\
254 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
257 $(eval
$(call gb_Library_add_exception_objects
,$(gb_CPPU_ENV
)_uno
,\
258 bridges
/source
/cpp_uno
/shared
/bridge \
259 bridges
/source
/cpp_uno
/shared
/component \
260 bridges
/source
/cpp_uno
/shared
/types \
261 bridges
/source
/cpp_uno
/shared
/unointerfaceproxy \
262 bridges
/source
/cpp_uno
/shared
/vtablefactory \
263 bridges
/source
/cpp_uno
/shared
/vtables \
266 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
267 bridges
/source
/cpp_uno
/shared
/cppinterfaceproxy \
268 , $(gb_COMPILERNOOPTFLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) \
271 # vim: set noet sw=4 ts=4: