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_ExternalProject_ExternalProject
,cppunit
))
12 $(eval
$(call gb_ExternalProject_register_targets
,cppunit
,\
17 ifeq ($(OS
)$(COM
),WNTMSC
)
19 $(call gb_ExternalProject_get_state_target
,cppunit
,build
) :
20 $(call gb_ExternalProject_run
,build
,\
21 $(COMPATH
)/vcpackages
/vcbuild.exe cppunit_dll.vcproj
"$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)|Win32" \
22 && cd ..
/DllPlugInTester \
23 && $(COMPATH
)/vcpackages
/vcbuild.exe DllPlugInTester.vcproj
"$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)|Win32" \
26 $(call gb_ExternalProject_get_state_target
,cppunit
,build
) :
27 $(call gb_ExternalProject_run
,build
,\
28 msbuild.exe cppunit_dll.vcxproj
/p
:Configuration
=$(if
$(MSVC_USE_DEBUG_RUNTIME
),Debug
,Release
) \
29 $(if
$(filter 110,$(VCVER
)),/p
:PlatformToolset
=v110
/p
:VisualStudioVersion
=11.0) \
30 && cd ..
/DllPlugInTester \
31 && msbuild.exe DllPlugInTester.vcxproj
/p
:Configuration
=$(if
$(MSVC_USE_DEBUG_RUNTIME
),Debug
,Release
) \
32 $(if
$(filter 110,$(VCVER
)),/p
:PlatformToolset
=v110
/p
:VisualStudioVersion
=11.0) \
37 cppunit_CXXFLAGS
=$(CXXFLAGS
)
39 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD
,$(OS
)))
40 ifneq (,$(gb_ENABLE_DBGUTIL
))
41 cppunit_CXXFLAGS
+=-D_GLIBCXX_DEBUG
45 ifeq ($(OS
)-$(COM
),WNT-GCC
)
46 cppunit_CXXFLAGS
+=-mthreads
53 $(call gb_ExternalProject_get_state_target
,cppunit
,build
) :
54 $(call gb_ExternalProject_run
,build
,\
56 --disable-dependency-tracking \
57 $(if
$(filter TRUE
,$(DISABLE_DYNLOADING
)),--disable-shared
,--disable-static
) \
60 --disable-latex-docs \
61 $(if
$(filter YES
,$(CROSS_COMPILING
)),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
62 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________NONE
) \
63 $(if
$(filter WNT
,$(OS
)),LDFLAGS
="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
64 $(if
$(filter SOLARIS
,$(OS
)),LIBS
="-lm") \
65 $(if
$(filter ANDROID
,$(OS
)),LIBS
="-lgnustl_shared -lm") \
66 CXXFLAGS
="$(cppunit_CXXFLAGS)" \
72 # vim: set noet sw=4 ts=4: