Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / libmspub / ExternalProject_libmspub.mk
blob8fa5166ddeeb20ff758d0d6720e5d35c3c3b28a2
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,libmspub))
12 $(eval $(call gb_ExternalProject_use_unpacked,libmspub,mspub))
14 $(eval $(call gb_ExternalProject_register_targets,libmspub,\
15 build \
18 $(eval $(call gb_ExternalProject_use_externals,libmspub,\
19 boost_headers \
20 wpd \
21 wpg \
24 ifeq ($(OS)$(COM),WNTMSC)
26 ifeq ($(VCVER),90)
27 $(call gb_ExternalProject_get_state_target,libmspub,build) :
28 cd $(EXTERNAL_WORKDIR)/build/win32 \
29 && export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
30 && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
31 && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
32 && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
33 && export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
34 && $(COMPATH)/vcpackages/vcbuild.exe libmspub.vcproj "Release|Win32" \
35 && touch $@
36 else ifeq ($(VCVER),100)
37 $(call gb_ExternalProject_get_state_target,libmspub,build) :
38 cd $(EXTERNAL_WORKDIR)/build/win32 \
39 && export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
40 && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
41 && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
42 && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
43 && export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
44 && msbuild.exe libmspub.vcxproj /p:Configuration=Release \
45 && touch $@
46 else
47 $(call gb_ExternalProject_get_state_target,libmspub,build) :
48 cd $(EXTERNAL_WORKDIR)/build/win32 \
49 && export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
50 && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
51 && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
52 && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
53 && export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
54 && msbuild.exe libmspub.vcxproj /p:PlatformToolset=v110 /p:VisualStudioVersion=11.0 /p:Configuration=Release \
55 && touch $@
56 endif
58 else
60 $(call gb_ExternalProject_get_state_target,libmspub,build) :
61 cd $(EXTERNAL_WORKDIR) \
62 && export PKG_CONFIG="" \
63 && export ICU_LIBS=" " && export ICU_CFLAGS="-I$(OUTDIR)/inc/external" \
64 && export LIBMSPUB_CFLAGS="$(WPG_CFLAGS) $(WPD_CFLAGS)" \
65 && export LIBMSPUB_LIBS="$(WPG_LIBS) $(WPD_LIBS)" \
66 && ./configure \
67 --with-pic \
68 --enable-static \
69 --disable-shared \
70 --without-docs \
71 --disable-debug \
72 --disable-werror \
73 --disable-weffc \
74 $(if $(filter NO,$(SYSTEM_BOOST)),CXXFLAGS=-I$(OUTDIR)/inc/external) \
75 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
76 && (cd $(EXTERNAL_WORKDIR)/src/lib && $(MAKE)) \
77 && touch $@
79 endif
81 # vim: set noet sw=4 ts=4: