2013-03-14 20:21:28 -05:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_Library,$(gb_CPPU_ENV)_uno))
|
2013-03-14 20:21:28 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
ifeq ($(OS)-$(CPUNAME),AIX-POWERPC)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_aix_powerpc
|
|
|
|
bridge_exception_objects := except
|
|
|
|
bridge_cxx_objects := cpp2uno uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(CPUNAME),ARM)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
ifeq ($(OS),IOS)
|
2013-04-06 11:30:16 -05:00
|
|
|
$(eval $(call gb_Library_use_sdk_api,gcc3_uno))
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_ios_arm
|
|
|
|
bridge_asm_objects := helper
|
2013-11-17 03:44:23 -06:00
|
|
|
bridge_exception_objects := cpp2uno cpp2uno-arm cpp2uno-arm64 cpp2uno-i386 except uno2cpp uno2cpp-arm uno2cpp-arm64 uno2cpp-i386
|
2013-03-14 20:21:28 -05:00
|
|
|
$(eval $(call gb_Library_use_custom_headers,gcc3_uno,\
|
|
|
|
bridges/source/cpp_uno/gcc3_ios_arm \
|
|
|
|
))
|
|
|
|
else ifneq ($(filter LINUX ANDROID,$(OS)),)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_arm
|
|
|
|
bridge_noopt_objects := cpp2uno except uno2cpp
|
|
|
|
# HACK
|
2013-09-16 05:13:02 -05:00
|
|
|
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
|
2013-03-14 20:21:28 -05:00
|
|
|
$(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
|
2013-09-16 05:13:02 -05:00
|
|
|
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
|
2013-03-14 20:21:28 -05:00
|
|
|
EXTRAOBJECTLISTS += $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
|
2013-03-19 03:05:35 -05:00
|
|
|
endif
|
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-AXP)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_alpha
|
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-HPPA)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_hppa
|
2014-04-20 17:19:47 -05:00
|
|
|
bridge_noopt_objects := call cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-IA64)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_ia64
|
|
|
|
bridge_asm_objects := call
|
|
|
|
bridge_exception_objects := except
|
|
|
|
bridge_noopt_objects := cpp2uno uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(CPUNAME),INTEL)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_intel
|
|
|
|
bridge_asm_objects := call
|
2013-05-29 03:58:34 -05:00
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
|
|
|
bridge_noncallexception_objects := callvirtualmethod
|
2013-03-14 20:21:28 -05:00
|
|
|
else ifeq ($(OS),MACOSX)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_macosx_intel
|
|
|
|
bridge_asm_objects := call
|
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
|
|
|
else ifeq ($(COM),MSC)
|
|
|
|
bridges_SELECTED_BRIDGE := msvc_win32_intel
|
|
|
|
bridge_exception_objects := cpp2uno dllinit uno2cpp
|
|
|
|
bridge_noopt_objects := except
|
2013-03-19 03:07:11 -05:00
|
|
|
else ifeq ($(OS)$(COM),WNTGCC)
|
|
|
|
bridges_SELECTED_BRIDGE := mingw_intel
|
2013-03-19 07:57:08 -05:00
|
|
|
bridge_asm_objects := call
|
2013-03-19 03:07:11 -05:00
|
|
|
bridge_noopt_objects := uno2cpp
|
|
|
|
bridge_exception_objects := callvirtualmethod cpp2uno dllinit except smallstruct
|
2013-03-19 03:05:35 -05:00
|
|
|
endif
|
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-M68K)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_m68k
|
|
|
|
bridge_noopt_objects := cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(CPUNAME),GODSON)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
ifneq ($(filter ANDROID LINUX,$(OS)),)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_mips
|
|
|
|
bridge_noopt_objects := cpp2uno uno2cpp
|
|
|
|
bridge_exception_objects := except
|
2013-03-19 03:05:35 -05:00
|
|
|
endif
|
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-POWERPC)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_powerpc
|
|
|
|
bridge_noopt_objects := uno2cpp
|
|
|
|
bridge_exception_objects := cpp2uno except
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-POWERPC64)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_powerpc64
|
|
|
|
bridge_noopt_objects := cpp2uno uno2cpp
|
|
|
|
bridge_exception_objects := except
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-S390)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_s390
|
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-S390X)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_s390x
|
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),LINUX-SPARC)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_sparc
|
|
|
|
bridge_asm_objects := call
|
|
|
|
bridge_noopt_objects := except
|
|
|
|
bridge_exception_objects := cpp2uno uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(CPUNAME),X86_64)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_linux_x86-64
|
|
|
|
bridge_asm_objects := call
|
2013-05-29 03:58:34 -05:00
|
|
|
bridge_noncallexception_noopt_objects := callvirtualmethod
|
2013-03-24 09:20:09 -05:00
|
|
|
bridge_exception_objects := abi cpp2uno except uno2cpp
|
2013-03-14 20:21:28 -05:00
|
|
|
else ifeq ($(OS),MACOSX)
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_macosx_x86-64
|
2013-04-08 16:39:41 -05:00
|
|
|
bridge_exception_objects := abi call cpp2uno except uno2cpp
|
2013-05-29 03:58:34 -05:00
|
|
|
bridge_noncallexception_noopt_objects := callvirtualmethod
|
2013-03-14 20:21:28 -05:00
|
|
|
else ifeq ($(COM),MSC)
|
|
|
|
bridges_SELECTED_BRIDGE := msvc_win32_x86-64
|
|
|
|
bridge_exception_objects := cpp2uno dllinit uno2cpp
|
|
|
|
bridge_noopt_objects := except
|
|
|
|
bridge_asm_objects := call
|
2013-06-04 07:20:53 -05:00
|
|
|
else ifeq ($(OS)$(COM),WNTGCC)
|
|
|
|
bridges_SELECTED_BRIDGE := mingw_x86-64
|
2013-06-04 08:14:57 -05:00
|
|
|
bridge_asm_objects := call
|
|
|
|
bridge_noncallexception_noopt_objects := callvirtualmethod
|
|
|
|
bridge_exception_objects := abi cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
endif
|
|
|
|
|
2014-02-23 13:30:15 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),MACOSX-POWERPC)
|
|
|
|
|
|
|
|
bridges_SELECTED_BRIDGE := gcc3_macosx_powerpc
|
|
|
|
bridge_noopt_objects := uno2cpp
|
|
|
|
bridge_exception_objects := cpp2uno except
|
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),SOLARIS-INTEL)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_solaris_intel
|
|
|
|
bridge_exception_objects := cpp2uno except uno2cpp
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-11-06 11:59:45 -06:00
|
|
|
else ifeq ($(OS)-$(CPUNAME),SOLARIS-SPARC)
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges_SELECTED_BRIDGE := gcc3_solaris_sparc
|
|
|
|
bridge_noopt_objects := cpp2uno uno2cpp
|
|
|
|
bridge_exception_objects := except
|
2013-03-19 03:05:35 -05:00
|
|
|
|
2013-03-14 20:21:28 -05:00
|
|
|
endif
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_use_external,$(gb_CPPU_ENV)_uno,boost_headers))
|
2013-03-14 20:21:28 -05:00
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_use_internal_comprehensive_api,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
udkapi \
|
|
|
|
))
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_set_include,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
-I$(SRCDIR)/bridges/inc \
|
|
|
|
$$(INCLUDE) \
|
|
|
|
))
|
|
|
|
|
|
|
|
ifeq ($(HAVE_POSIX_FALLOCATE),YES)
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
-DHAVE_POSIX_FALLOCATE \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
ifeq ($(OS),WNT)
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
$(if $(filter GCC,$(COM)),\
|
|
|
|
$(if $(filter sjlj,$(EXCEPTIONS)),\
|
|
|
|
-DBROKEN_ALLOCA \
|
|
|
|
), \
|
|
|
|
$(if $(cppu_no_leak)$(bndchk),,\
|
|
|
|
-DLEAK_STATIC_DATA \
|
|
|
|
)) \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# In case someone enabled the non-standard -fomit-frame-pointer which does not
|
|
|
|
# work with the .cxx sources of this library.
|
|
|
|
# LTO causes crashes when enabled for this library
|
|
|
|
# In case the compiler supports AVX this code segfaults so specifically turn
|
|
|
|
# it off.
|
|
|
|
ifeq ($(COM),GCC)
|
|
|
|
$(eval $(call gb_Library_add_cxxflags,gcc3_uno,\
|
|
|
|
-fno-omit-frame-pointer \
|
|
|
|
-fno-strict-aliasing \
|
|
|
|
$(if $(filter TRUE,$(ENABLE_LTO)),-fno-lto) \
|
2013-03-21 06:50:07 -05:00
|
|
|
$(if $(filter TRUE,$(HAVE_GCC_AVX)),-mno-avx) \
|
2013-03-14 20:21:28 -05:00
|
|
|
))
|
|
|
|
|
2014-06-10 11:32:51 -05:00
|
|
|
ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX,$(OS)),)
|
2013-03-14 20:21:28 -05:00
|
|
|
$(eval $(call gb_Library_add_libs,gcc3_uno,\
|
|
|
|
-ldl \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-05-29 03:58:34 -05:00
|
|
|
ifeq ($(COM),GCC)
|
|
|
|
ifneq ($(COM_GCC_IS_CLANG),TRUE)
|
|
|
|
bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_use_libraries,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
cppu \
|
|
|
|
sal \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(foreach obj,$(bridge_exception_objects),\
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
|
|
|
|
)
|
2013-05-29 03:58:34 -05:00
|
|
|
$(foreach obj,$(bridge_noncallexception_objects),\
|
|
|
|
$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
|
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
|
|
|
|
, $(bridges_NON_CALL_EXCEPTIONS_FLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS))) \
|
|
|
|
)
|
2013-03-14 20:21:28 -05:00
|
|
|
$(foreach obj,$(bridge_noopt_objects),\
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
|
|
|
|
, $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS))) \
|
|
|
|
)
|
2013-05-29 03:58:34 -05:00
|
|
|
$(foreach obj,$(bridge_noncallexception_noopt_objects),\
|
|
|
|
$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
|
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
|
|
|
|
, $(gb_COMPILERNOOPTFLAGS) $(bridges_NON_CALL_EXCEPTIONS_FLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS))) \
|
|
|
|
)
|
2013-03-14 20:21:28 -05:00
|
|
|
$(foreach obj,$(bridge_cxx_objects),\
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
|
|
|
|
)
|
|
|
|
$(foreach obj,$(bridge_asm_objects),\
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_asmobjects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
|
|
|
|
)
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/shared/bridge \
|
|
|
|
bridges/source/cpp_uno/shared/component \
|
|
|
|
bridges/source/cpp_uno/shared/types \
|
|
|
|
bridges/source/cpp_uno/shared/unointerfaceproxy \
|
|
|
|
bridges/source/cpp_uno/shared/vtablefactory \
|
|
|
|
bridges/source/cpp_uno/shared/vtables \
|
|
|
|
))
|
|
|
|
|
2013-04-09 13:28:27 -05:00
|
|
|
$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
|
2013-03-14 20:21:28 -05:00
|
|
|
bridges/source/cpp_uno/shared/cppinterfaceproxy \
|
|
|
|
, $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
|
|
|
|
))
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|