summaryrefslogtreecommitdiff
path: root/liborcus
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-13 16:22:16 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-13 16:27:19 +0300
commit173214d92046b4ea11f6c0959ca40999d1e0bbd2 (patch)
treef8c1b422472fc4693a0f8ce55bd5b1ebc58b0293 /liborcus
parent6a46db8753e3376e8f7be3b2a9235c17e169e496 (diff)
Fix liborcus build for Android
Also hopefully make the environment variable setting on the configure commmand line saner and working as intended for all platforms where relevant. It doesn't work to set and append to an environment variable in one same command like CPPFLAGS=something CPPFLAGS+=more ./configure ... Change-Id: Ifb3fb6748d59388124b9987a1db3cab15ebaf757
Diffstat (limited to 'liborcus')
-rw-r--r--liborcus/ExternalProject_liborcus.mk41
1 files changed, 33 insertions, 8 deletions
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index daded4dc1288..d379280b997a 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -60,16 +60,41 @@ else
#$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS))
+liborcus_LIBS=
+ifeq ($(SYSTEM_ZLIB),YES)
+liborcus_LIBS+=-lz
+endif
+ifeq ($(OS),ANDROID)
+liborcus_LIBS+=-lgnustl_shared -lm
+endif
+
+liborcus_CPPCLAGS=$(CPPFLAGS)
+ifeq ($(COM),MSC)
+liborcus_CPPFLAGS+=-DBOOST_ALL_NO_LIB
+endif
+ifeq ($(SYSTEM_ZLIB),NO)
+liborcus_CPPFLAGS+=-I$(OUTDIR)/inc/external/zlib
+endif
+ifneq (,$(filter LINUX FREEBSD OPENBSD NETBSD DRAGONFLY ANDROID,$(OS)))
+ifneq (,$(gb_ENABLE_DBGUTIL))
+liborcus_CPPFLAGS+=-I$(OUTDIR)/inc/external/zlib
+endif
+endif
+
+liborcus_CXXFLAGS=$(CXXFLAGS)
+ifeq ($(COM),MSC)
+liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS)
+endif
+ifeq ($(SYSTEM_BOOST),NO)
+liborcus_CXXFLAGS+=-I$(WORKDIR)/UnpackedTarball/boost
+endif
+
$(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
- $(if $(filter ANDROID,$(OS)),LIBS='-lgnustl_shared -lm') \
- $(if $(filter YES,$(SYSTEM_ZLIB)),LIBS+=-lz) \
- $(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") \
- $(if $(filter MSC,$(COM)),CXXFLAGS+=$(BOOST_CXXFLAGS)) \
- $(if $(filter NO,$(SYSTEM_ZLIB)),CPPFLAGS+=-I$(OUTDIR)/inc/external/zlib) \
- $(if $(filter NO,$(SYSTEM_BOOST)),CXXFLAGS+=-I$(WORKDIR)/UnpackedTarball/boost) \
- $(if $(filter YES,$(SYSTEM_BOOST)),LDFLAGS=$(BOOST_LDFLAGS)) \
- $(if $(filter LINUX FREEBSD OPENBSD NETBSD DRAGONFLY ANDROID,$(OS)),$(if $(gb_ENABLE_DBGUTIL),CPPFLAGS+=-D_GLIBCXX_DEBUG)) \
+ $(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
+ $(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
+ $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \
+ $(if $(filter YES,$(SYSTEM_BOOST)),LDFLAGS='$(BOOST_LDFLAGS)') \
./configure \
--with-pic \
--enable-static \