2012-11-25 16:37:40 -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-05-06 23:46:30 +02:00
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,cppunit))
|
2012-11-25 16:37:40 -05:00
|
|
|
|
|
|
|
$(eval $(call gb_ExternalProject_register_targets,cppunit,\
|
|
|
|
build \
|
|
|
|
))
|
|
|
|
|
Remove MinGW support
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW. Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux. That attempt can be considered abandoned, and
the relevant code rotting.
Due to this heritage, there are now three kinds of MinGW-specific code in LO:
* Code from the original OOo native Windows effort that is no longer relevant
for the LO cross-compilation effort, but has never been removed properly.
* Code from the original OOo native Windows effort that is re-purposed for the
LO cross-compilation effort.
* Code that has been added specifially for the LO cross-compilation effort.
All three kinds of code are removed.
(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)
Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10 14:05:21 +01:00
|
|
|
ifeq ($(OS),WNT)
|
2012-11-25 16:37:40 -05:00
|
|
|
$(call gb_ExternalProject_get_state_target,cppunit,build) :
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
2014-05-26 11:39:06 +02:00
|
|
|
PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
|
2014-08-10 14:04:53 +02:00
|
|
|
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
|
2016-11-23 23:53:55 +01:00
|
|
|
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
|
|
|
|
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
|
2017-02-21 23:08:19 +01:00
|
|
|
$(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
|
2014-05-24 13:39:59 +01:00
|
|
|
&& msbuild.exe cppunit_dll.vcxproj /p:Configuration=$${PROFILEFLAGS} \
|
2013-02-21 08:15:39 -06:00
|
|
|
&& cd ../DllPlugInTester \
|
2014-05-24 13:39:59 +01:00
|
|
|
&& msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$${PROFILEFLAGS} \
|
2013-02-21 08:15:39 -06:00
|
|
|
,src/cppunit)
|
2012-11-25 16:37:40 -05:00
|
|
|
else
|
2013-04-16 13:31:15 +03:00
|
|
|
|
|
|
|
cppunit_CXXFLAGS=$(CXXFLAGS)
|
|
|
|
|
2013-04-18 08:38:06 +02:00
|
|
|
ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
|
2013-04-16 13:31:15 +03:00
|
|
|
ifneq (,$(gb_ENABLE_DBGUTIL))
|
|
|
|
cppunit_CXXFLAGS+=-D_GLIBCXX_DEBUG
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(debug))
|
|
|
|
cppunit_CXXFLAGS+=-g
|
|
|
|
endif
|
|
|
|
|
2012-11-25 16:37:40 -05:00
|
|
|
$(call gb_ExternalProject_get_state_target,cppunit,build) :
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
./configure \
|
|
|
|
--disable-dependency-tracking \
|
|
|
|
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
|
|
|
|
--disable-doxygen \
|
|
|
|
--disable-html-docs \
|
|
|
|
--disable-latex-docs \
|
2017-07-14 21:15:12 +01:00
|
|
|
--disable-werror \
|
2014-02-27 16:19:43 +01:00
|
|
|
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
2013-10-22 00:32:12 +02:00
|
|
|
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________NONE) \
|
2013-02-21 08:15:39 -06:00
|
|
|
$(if $(filter WNT,$(OS)),LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
|
|
|
|
$(if $(filter SOLARIS,$(OS)),LIBS="-lm") \
|
|
|
|
$(if $(filter ANDROID,$(OS)),LIBS="-lgnustl_shared -lm") \
|
2013-04-16 13:31:15 +03:00
|
|
|
CXXFLAGS="$(cppunit_CXXFLAGS)" \
|
2013-02-21 08:15:39 -06:00
|
|
|
&& cd src \
|
|
|
|
&& $(MAKE) \
|
|
|
|
)
|
2012-11-25 16:37:40 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|