summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-05-30 15:35:48 +0200
committerDavid Tardon <dtardon@redhat.com>2014-05-30 20:04:22 +0200
commitf85d10fdf651d131ecb0c3622326b3b076205e80 (patch)
tree8349c21713b365b38d2b38ffcce736da8125f9af /external
parent79211c1abe382e428611df1b81150106cbcb9197 (diff)
build libwps as shared lib
Change-Id: Ic30d54461f799b745d0887b830445f00efeb6faa
Diffstat (limited to 'external')
-rw-r--r--external/libwps/ExternalPackage_libwps.mk22
-rw-r--r--external/libwps/ExternalProject_libwps.mk8
-rw-r--r--external/libwps/Library_wps.mk69
-rw-r--r--external/libwps/Module_libwps.mk16
4 files changed, 112 insertions, 3 deletions
diff --git a/external/libwps/ExternalPackage_libwps.mk b/external/libwps/ExternalPackage_libwps.mk
new file mode 100644
index 000000000000..0c12b028c6ee
--- /dev/null
+++ b/external/libwps/ExternalPackage_libwps.mk
@@ -0,0 +1,22 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,libwps,libwps))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libwps,libwps))
+
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.3.dylib,src/lib/.libs/libwps-0.3.dylib))
+else ifeq ($(OS),WNT)
+$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.dll,src/lib/.libs/libwps-0.3.dll))
+else ifeq ($(filter IOS ANDROID,$(OS)),)
+$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.3.so.3,src/lib/.libs/libwps-0.3.so.3.0.0))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwps/ExternalProject_libwps.mk b/external/libwps/ExternalProject_libwps.mk
index f21c70d9933d..004c91287305 100644
--- a/external/libwps/ExternalProject_libwps.mk
+++ b/external/libwps/ExternalProject_libwps.mk
@@ -25,8 +25,11 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
export PKG_CONFIG="" \
&& ./configure \
--with-pic \
- --enable-static \
- --disable-shared \
+ $(if $(DISABLE_DYNLOADING), \
+ --enable-static --disable-shared \
+ , \
+ --enable-shared --disable-static \
+ ) \
--without-docs \
--disable-tools \
--disable-debug \
@@ -34,6 +37,7 @@ $(call gb_ExternalProject_get_state_target,libwps,build) :
$(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \
CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
&& $(MAKE) \
)
diff --git a/external/libwps/Library_wps.mk b/external/libwps/Library_wps.mk
new file mode 100644
index 000000000000..be9f3c663c27
--- /dev/null
+++ b/external/libwps/Library_wps.mk
@@ -0,0 +1,69 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Library_Library,wps))
+
+$(eval $(call gb_Library_use_unpacked,wps,libwps))
+
+$(eval $(call gb_Library_use_externals,wps,\
+ boost_headers \
+ revenge \
+))
+
+$(eval $(call gb_Library_set_warnings_not_errors,wps))
+
+$(eval $(call gb_Library_set_include,wps,\
+ -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_add_defs,wps,\
+ -DBOOST_ALL_NO_LIB \
+ -DBUILD_WPS\
+ -DDLL_EXPORT \
+ -DNDEBUG \
+))
+
+$(eval $(call gb_Library_set_generated_cxx_suffix,wps,cpp))
+
+$(eval $(call gb_Library_add_generated_exception_objects,wps,\
+ UnpackedTarball/libwps/src/lib/WKS4 \
+ UnpackedTarball/libwps/src/lib/WKS4Spreadsheet \
+ UnpackedTarball/libwps/src/lib/WKSContentListener \
+ UnpackedTarball/libwps/src/lib/WKSParser \
+ UnpackedTarball/libwps/src/lib/WKSSubDocument \
+ UnpackedTarball/libwps/src/lib/WPS4 \
+ UnpackedTarball/libwps/src/lib/WPS4Graph \
+ UnpackedTarball/libwps/src/lib/WPS4Text \
+ UnpackedTarball/libwps/src/lib/WPS8 \
+ UnpackedTarball/libwps/src/lib/WPS8Graph \
+ UnpackedTarball/libwps/src/lib/WPS8Struct \
+ UnpackedTarball/libwps/src/lib/WPS8Table \
+ UnpackedTarball/libwps/src/lib/WPS8Text \
+ UnpackedTarball/libwps/src/lib/WPS8TextStyle \
+ UnpackedTarball/libwps/src/lib/WPSCell \
+ UnpackedTarball/libwps/src/lib/WPSContentListener \
+ UnpackedTarball/libwps/src/lib/WPSDebug \
+ UnpackedTarball/libwps/src/lib/WPSDocument \
+ UnpackedTarball/libwps/src/lib/WPSFont \
+ UnpackedTarball/libwps/src/lib/WPSHeader \
+ UnpackedTarball/libwps/src/lib/WPSList \
+ UnpackedTarball/libwps/src/lib/WPSOLEParser \
+ UnpackedTarball/libwps/src/lib/WPSPageSpan \
+ UnpackedTarball/libwps/src/lib/WPSParagraph \
+ UnpackedTarball/libwps/src/lib/WPSParser \
+ UnpackedTarball/libwps/src/lib/WPSSubDocument \
+ UnpackedTarball/libwps/src/lib/WPSTable \
+ UnpackedTarball/libwps/src/lib/WPSTextParser \
+ UnpackedTarball/libwps/src/lib/WPSTextSubDocument \
+ UnpackedTarball/libwps/src/lib/libwps_internal \
+ UnpackedTarball/libwps/src/lib/libwps_tools_win \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwps/Module_libwps.mk b/external/libwps/Module_libwps.mk
index a6870faa9a08..2b52c4acb4bd 100644
--- a/external/libwps/Module_libwps.mk
+++ b/external/libwps/Module_libwps.mk
@@ -10,8 +10,22 @@
$(eval $(call gb_Module_Module,libwps))
$(eval $(call gb_Module_add_targets,libwps,\
- ExternalProject_libwps \
UnpackedTarball_libwps \
))
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Module_add_targets,libwps,\
+ Library_wps \
+))
+
+else
+
+$(eval $(call gb_Module_add_targets,libwps,\
+ ExternalPackage_libwps \
+ ExternalProject_libwps \
+))
+
+endif
+
# vim: set noet sw=4 ts=4: