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
,libwps
))
12 $(eval
$(call gb_ExternalProject_use_autoconf
,libwps
,build
))
14 $(eval
$(call gb_ExternalProject_register_targets
,libwps
,\
18 $(eval
$(call gb_ExternalProject_use_externals
,libwps
,\
22 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD
,$(OS
)))
23 ifneq (,$(gb_ENABLE_DBGUTIL
))
24 libwps_CPPFLAGS
+=-D_GLIBCXX_DEBUG
28 $(call gb_ExternalProject_get_state_target
,libwps
,build
) :
29 $(call gb_ExternalProject_run
,build
,\
30 export PKG_CONFIG
="" \
33 $(if
$(DISABLE_DYNLOADING
), \
34 --enable-static
--disable-shared \
36 --enable-shared
--disable-static \
38 --with-sharedptr
=c
++11 \
41 $(if
$(ENABLE_DEBUG
),--enable-debug
,--disable-debug
) \
43 $(if
$(verbose
),--disable-silent-rules
,--enable-silent-rules
) \
44 CXXFLAGS
="$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
45 $(if
$(libwps_CPPFLAGS
),CPPFLAGS
='$(libwps_CPPFLAGS)') \
46 $(if
$(filter LINUX
,$(OS
)),$(if
$(SYSTEM_REVENGE
),, \
47 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
48 -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
49 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
50 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________OOO
) \
52 $(if
$(filter MACOSX
,$(OS
)),\
53 && $(PERL
) $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl OOO \
54 $(EXTERNAL_WORKDIR
)/src
/lib
/.libs
/libwps-0.4
.4.dylib \
58 # vim: set noet sw=4 ts=4: