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 ($(OS
)$(CPU
),AIXP
)
14 bridges_SELECTED_BRIDGE
:= gcc3_aix_powerpc
15 bridge_exception_objects
:= except
16 bridge_cxx_objects
:= cpp2uno uno2cpp
21 $(eval
$(call gb_Library_use_sdk_api
,gcc3_uno
))
22 bridges_SELECTED_BRIDGE
:= gcc3_ios_arm
23 bridge_asm_objects
:= helper
24 bridge_exception_objects
:= cpp2uno cpp2uno-arm cpp2uno-i386 except uno2cpp uno2cpp-arm uno2cpp-i386
25 $(eval
$(call gb_Library_use_custom_headers
,gcc3_uno
,\
26 bridges
/source
/cpp_uno
/gcc3_ios_arm \
28 else ifneq ($(filter LINUX ANDROID
,$(OS
)),)
29 bridges_SELECTED_BRIDGE
:= gcc3_linux_arm
30 bridge_noopt_objects
:= cpp2uno except uno2cpp
32 $(call gb_LinkTarget_get_target
,$(call gb_Library_get_linktargetname
,gcc3_uno
)) : \
33 $(call gb_CustomTarget_get_workdir
,bridges
/source
/cpp_uno
/gcc3_linux_arm
)/armhelper.objectlist
34 $(call gb_LinkTarget_get_target
,$(call gb_Library_get_linktargetname
,gcc3_uno
)) : \
35 EXTRAOBJECTLISTS
+= $(call gb_CustomTarget_get_workdir
,bridges
/source
/cpp_uno
/gcc3_linux_arm
)/armhelper.objectlist
38 else ifeq ($(OS
)$(CPU
),LINUXL
)
40 bridges_SELECTED_BRIDGE
:= gcc3_linux_alpha
41 bridge_exception_objects
:= cpp2uno except uno2cpp
43 else ifeq ($(OS
)$(CPU
),LINUXH
)
45 bridges_SELECTED_BRIDGE
:= gcc3_linux_hppa
46 bridge_asm_objects
:= call
47 bridge_noopt_objects
:= cpp2uno except uno2cpp
49 else ifeq ($(OS
)$(CPU
),LINUXA
)
51 bridges_SELECTED_BRIDGE
:= gcc3_linux_ia64
52 bridge_asm_objects
:= call
53 bridge_exception_objects
:= except
54 bridge_noopt_objects
:= cpp2uno uno2cpp
58 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
59 bridges_SELECTED_BRIDGE
:= gcc3_linux_intel
60 bridge_asm_objects
:= call
61 bridge_exception_objects
:= callvirtualmethod cpp2uno except uno2cpp
62 else ifeq ($(OS
),MACOSX
)
63 bridges_SELECTED_BRIDGE
:= gcc3_macosx_intel
64 bridge_asm_objects
:= call
65 bridge_exception_objects
:= cpp2uno except uno2cpp
66 else ifeq ($(COM
),MSC
)
67 bridges_SELECTED_BRIDGE
:= msvc_win32_intel
68 bridge_exception_objects
:= cpp2uno dllinit uno2cpp
69 bridge_noopt_objects
:= except
70 else ifeq ($(OS
)$(COM
),WNTGCC
)
71 bridges_SELECTED_BRIDGE
:= mingw_intel
72 bridge_asm_objects
:= call
73 bridge_noopt_objects
:= uno2cpp
74 bridge_exception_objects
:= callvirtualmethod cpp2uno dllinit except smallstruct
77 else ifeq ($(OS
)$(CPU
),LINUX6
)
79 bridges_SELECTED_BRIDGE
:= gcc3_linux_m68k
80 bridge_noopt_objects
:= cpp2uno except uno2cpp
84 ifneq ($(filter ANDROID LINUX
,$(OS
)),)
85 bridges_SELECTED_BRIDGE
:= gcc3_linux_mips
86 bridge_noopt_objects
:= cpp2uno uno2cpp
87 bridge_exception_objects
:= except
90 else ifeq ($(OS
)$(CPUNAME
),LINUXPOWERPC
)
92 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc
93 bridge_noopt_objects
:= uno2cpp
94 bridge_exception_objects
:= cpp2uno except
96 else ifeq ($(OS
)$(CPUNAME
),LINUXPOWERPC64
)
98 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc64
99 bridge_noopt_objects
:= cpp2uno uno2cpp
100 bridge_exception_objects
:= except
102 else ifeq ($(OS
)$(CPUNAME
),LINUXS390
)
104 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390
105 bridge_exception_objects
:= cpp2uno except uno2cpp
107 else ifeq ($(OS
)$(CPUNAME
),LINUXS390X
)
109 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390x
110 bridge_exception_objects
:= cpp2uno except uno2cpp
112 else ifeq ($(OS
)$(CPU
),LINUXS
)
114 bridges_SELECTED_BRIDGE
:= gcc3_linux_sparc
115 bridge_asm_objects
:= call
116 bridge_noopt_objects
:= except
117 bridge_exception_objects
:= cpp2uno uno2cpp
121 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
122 bridges_SELECTED_BRIDGE
:= gcc3_linux_x86-64
123 bridge_asm_objects
:= call
124 bridge_noopt_objects
:= callvirtualmethod
125 bridge_exception_objects
:= abi cpp2uno except uno2cpp
126 else ifeq ($(OS
),MACOSX
)
127 bridges_SELECTED_BRIDGE
:= gcc3_macosx_x86-64
128 bridge_exception_objects
:= abi call cpp2uno except uno2cpp
129 bridge_noopt_objects
:= callvirtualmethod
130 else ifeq ($(COM
),MSC
)
131 bridges_SELECTED_BRIDGE
:= msvc_win32_x86-64
132 bridge_exception_objects
:= cpp2uno dllinit uno2cpp
133 bridge_noopt_objects
:= except
134 bridge_asm_objects
:= call
137 else ifeq ($(OS
)$(CPU
),SOLARISI
)
139 bridges_SELECTED_BRIDGE
:= gcc3_solaris_intel
140 bridge_exception_objects
:= cpp2uno except uno2cpp
142 else ifeq ($(OS
)$(CPU
),SOLARISS
)
144 bridges_SELECTED_BRIDGE
:= gcc3_solaris_sparc
145 bridge_noopt_objects
:= cpp2uno uno2cpp
146 bridge_exception_objects
:= except
150 $(eval
$(call gb_Library_use_external
,$(gb_CPPU_ENV
)_uno
,boost_headers
))
152 $(eval
$(call gb_Library_use_internal_comprehensive_api
,$(gb_CPPU_ENV
)_uno
,\
156 $(eval
$(call gb_Library_set_include
,$(gb_CPPU_ENV
)_uno
,\
157 -I
$(SRCDIR
)/bridges
/inc \
161 ifeq ($(HAVE_POSIX_FALLOCATE
),YES
)
162 $(eval
$(call gb_Library_add_defs
,$(gb_CPPU_ENV
)_uno
,\
163 -DHAVE_POSIX_FALLOCATE \
167 $(eval
$(call gb_Library_add_defs
,$(gb_CPPU_ENV
)_uno
,\
168 $(if
$(filter GCC
,$(COM
)),\
169 $(if
$(filter sjlj
,$(EXCEPTIONS
)),\
172 $(if
$(cppu_no_leak
)$(bndchk
),,\
178 # In case someone enabled the non-standard -fomit-frame-pointer which does not
179 # work with the .cxx sources of this library.
180 # LTO causes crashes when enabled for this library
181 # In case the compiler supports AVX this code segfaults so specifically turn
184 $(eval
$(call gb_Library_add_cxxflags
,gcc3_uno
,\
185 -fno-omit-frame-pointer \
186 -fno-strict-aliasing \
187 $(if
$(filter TRUE
,$(ENABLE_LTO
)),-fno-lto
) \
188 $(if
$(filter TRUE
,$(HAVE_GCC_AVX
)),-mno-avx
) \
191 ifeq ($(filter ANDROID WNT
,$(OS
)),)
192 $(eval
$(call gb_Library_add_libs
,gcc3_uno
,\
198 $(eval
$(call gb_Library_use_libraries
,$(gb_CPPU_ENV
)_uno
,\
203 $(foreach obj
,$(bridge_exception_objects
),\
204 $(eval
$(call gb_Library_add_exception_objects
,$(gb_CPPU_ENV
)_uno
,\
205 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
208 $(foreach obj
,$(bridge_noopt_objects
),\
209 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
210 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
211 , $(gb_COMPILERNOOPTFLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
))) \
213 $(foreach obj
,$(bridge_cxx_objects
),\
214 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
215 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
217 $(foreach obj
,$(bridge_asm_objects
),\
218 $(eval
$(call gb_Library_add_asmobjects
,$(gb_CPPU_ENV
)_uno
,\
219 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
222 $(eval
$(call gb_Library_add_exception_objects
,$(gb_CPPU_ENV
)_uno
,\
223 bridges
/source
/cpp_uno
/shared
/bridge \
224 bridges
/source
/cpp_uno
/shared
/component \
225 bridges
/source
/cpp_uno
/shared
/types \
226 bridges
/source
/cpp_uno
/shared
/unointerfaceproxy \
227 bridges
/source
/cpp_uno
/shared
/vtablefactory \
228 bridges
/source
/cpp_uno
/shared
/vtables \
231 $(eval
$(call gb_Library_add_cxxobjects
,$(gb_CPPU_ENV
)_uno
,\
232 bridges
/source
/cpp_uno
/shared
/cppinterfaceproxy \
233 , $(gb_COMPILERNOOPTFLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) \
236 # vim: set noet sw=4 ts=4: