fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / liborcus / ExternalProject_liborcus.mk
blob6808ec3e39b2b1a6c521dcccc062f9cd4bbcf10b
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,liborcus))
12 $(eval $(call gb_ExternalProject_use_autoconf,liborcus,build))
14 $(eval $(call gb_ExternalProject_use_externals,liborcus, \
15 boost_headers \
16 zlib \
19 $(eval $(call gb_ExternalProject_register_targets,liborcus,\
20 build \
23 # Must be built with debug GNU C++ library if --enable-dbgutil has
24 # caused the LO code to be built thusly.
26 # The LIBS setting for Android is needed to get the orcus-xml-dump
27 # executable to build successfully. We obviously don't actually need
28 # that executable on Android, but we don't want to bother with
29 # patching out building it for Android.
31 #$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS))
33 liborcus_LIBS=
34 ifeq ($(SYSTEM_ZLIB),YES)
35 liborcus_LIBS+=-lz
36 endif
37 ifeq ($(SYSTEM_BOOST),YES)
38 liborcus_LIBS+=$(BOOST_SYSTEM_LIB)
39 endif
40 ifeq ($(OS),ANDROID)
41 liborcus_LIBS+=-lgnustl_shared -lm
42 endif
44 liborcus_CPPCLAGS=$(CPPFLAGS)
45 ifeq ($(COM),MSC)
46 liborcus_CPPFLAGS+=-DBOOST_ALL_NO_LIB
47 endif
48 ifeq ($(SYSTEM_ZLIB),NO)
49 liborcus_CPPFLAGS+=$(ZLIB_CFLAGS)
50 endif
52 # OSes that use the GNU C++ library need to use -D_GLIBCXX_DEBUG in
53 # sync with the rest of LibreOffice, i.e. depending on
54 # --enable-dbgutil. Note that although Android doesn't use the GNU C
55 # library (glibc), the NDK does offer the GNU C++ library as one of
56 # the C++ libraries available, and we use it.
58 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)))
59 ifneq (,$(gb_ENABLE_DBGUTIL))
60 liborcus_CPPFLAGS+=-D_GLIBCXX_DEBUG
61 endif
62 endif
64 liborcus_CXXFLAGS=$(CXXFLAGS)
65 liborcus_LDFLAGS=$(LDFLAGS)
66 ifeq ($(COM),MSC)
67 liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS)
68 endif
69 ifeq ($(SYSTEM_BOOST),NO)
70 liborcus_CXXFLAGS+=-I$(WORKDIR)/UnpackedTarball/boost
71 else
72 liborcus_LDFLAGS+=$(BOOST_LDFLAGS)
73 endif
74 ifneq (,$(PTHREAD_LIBS))
75 liborcus_LDFLAGS+=$(PTHREAD_LIBS)
76 endif
78 $(call gb_ExternalProject_get_state_target,liborcus,build) :
79 $(call gb_ExternalProject_run,build,\
80 $(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
81 $(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
82 $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \
83 $(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
84 ./configure \
85 --with-pic \
86 --enable-static \
87 --disable-shared \
88 --disable-debug \
89 --disable-spreadsheet-model \
90 --disable-werror \
91 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
92 && $(MAKE) \
95 # vim: set noet sw=4 ts=4: