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
, \
23 $(eval
$(call gb_ExternalProject_register_targets
,liborcus
,\
27 # Must be built with debug GNU C++ library if --enable-dbgutil has
28 # caused the LO code to be built thus.
30 # The LIBS setting for Android is needed to get the orcus-xml-dump
31 # executable to build successfully. We obviously don't actually need
32 # that executable on Android, but we don't want to bother with
33 # patching out building it for Android.
35 #$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS))
38 ifneq ($(SYSTEM_ZLIB
),)
41 ifneq ($(SYSTEM_BOOST
),)
42 liborcus_LIBS
+=$(BOOST_SYSTEM_LIB
) $(BOOST_IOSTREAMS_LIB
) $(BOOST_FILESYSTEM_LIB
)
44 liborcus_LIBS
+=-L
$(gb_StaticLibrary_WORKDIR
) -lboost_system
-lboost_iostreams
-lboost_filesystem
47 liborcus_LIBS
+=$(gb_STDLIBS
)
50 liborcus_CPPFLAGS
=$(CPPFLAGS
)
51 ifeq ($(SYSTEM_ZLIB
),)
52 liborcus_CPPFLAGS
+=$(ZLIB_CFLAGS
)
55 # OSes that use the GNU C++ library need to use -D_GLIBCXX_DEBUG in
56 # sync with the rest of LibreOffice, i.e. depending on
57 # --enable-dbgutil. Note that although Android doesn't use the GNU C
58 # library (glibc), the NDK does offer the GNU C++ library as one of
59 # the C++ libraries available, and we use it.
61 liborcus_CPPFLAGS
+=$(gb_COMPILERDEFS_STDLIB_DEBUG
)
63 liborcus_CXXFLAGS
=$(CXXFLAGS
) $(gb_VISIBILITY_FLAGS
) $(gb_VISIBILITY_FLAGS_CXX
) $(CXXFLAGS_CXX11
) -DBOOST_SYSTEM_NO_DEPRECATED
64 liborcus_LDFLAGS
=$(LDFLAGS
) $(gb_LTOFLAGS
)
65 liborcus_CXXFLAGS
+=$(call gb_ExternalProject_get_build_flags
,liborcus
)
66 liborcus_LDFLAGS
+=$(call gb_ExternalProject_get_link_flags
,liborcus
)
68 liborcus_CXXFLAGS
+=$(BOOST_CXXFLAGS
)
70 ifeq ($(SYSTEM_BOOST
),)
71 liborcus_CXXFLAGS
+=${BOOST_CPPFLAGS}
73 liborcus_LDFLAGS
+=$(BOOST_LDFLAGS
)
75 ifneq (,$(PTHREAD_LIBS
))
76 liborcus_LDFLAGS
+=$(PTHREAD_LIBS
)
80 liborcus_LDFLAGS
+=-Wl
,-z
,origin -Wl
,-rpath
,\
$$$$ORIGIN
83 $(call gb_ExternalProject_get_state_target
,liborcus
,build
) :
84 $(call gb_Trace_StartRange
,liborcus
,EXTERNAL
)
85 $(call gb_ExternalProject_run
,build
,\
86 $(if
$(liborcus_LIBS
),LIBS
='$(liborcus_LIBS)') \
87 $(if
$(liborcus_CXXFLAGS
),CXXFLAGS
='$(liborcus_CXXFLAGS)') \
88 $(if
$(liborcus_CPPFLAGS
),CPPFLAGS
='$(liborcus_CPPFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)') \
89 $(if
$(liborcus_LDFLAGS
),LDFLAGS
='$(liborcus_LDFLAGS)') \
90 MDDS_CFLAGS
='$(MDDS_CFLAGS)' \
92 MAKE
=$(MAKE
) $(gb_RUN_CONFIGURE
) .
/configure \
94 $(if
$(DISABLE_DYNLOADING
), \
95 --enable-static
--disable-shared \
97 --enable-shared
--disable-static \
99 $(if
$(ENABLE_DEBUG
),--enable-debug
,--disable-debug
) \
100 --disable-spreadsheet-model \
102 --without-benchmark \
103 --without-doc-example \
106 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________OOO
) \
107 $(if
$(SYSTEM_BOOST
),,\
108 --with-boost
=$(WORKDIR
)/UnpackedTarball
/boost \
109 boost_cv_lib_iostreams
=yes \
110 boost_cv_lib_system
=yes \
111 boost_cv_lib_filesystem
=yes \
113 $(gb_CONFIGURE_PLATFORMS
) \
114 && $(if
$(verbose
),V
=1) \
116 $(if
$(filter MACOSX
,$(OS
)),\
117 && $(PERL
) $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl OOO \
118 $(EXTERNAL_WORKDIR
)/src
/liborcus
/.libs
/liborcus-0.18
.0.dylib \
119 $(EXTERNAL_WORKDIR
)/src
/parser
/.libs
/liborcus-parser-0.18
.0.dylib \
122 $(call gb_Trace_EndRange
,liborcus
,EXTERNAL
)
124 # vim: set noet sw=4 ts=4: