Makefile: Simplify and link zlib properly

Without this, online doesn't link, atleast for me. The problem seems to
be because in presence of target specific _LDFLAGS, AM_LDFLAGS is
ignored and it is only the latter where we are specifying ZLIB_LIBS.

Further, since the LDFLAGS values are same for all targets, we can
simplify here and rather use AM_LDFLAGS and remove all target specific
LDFLAGS.

Change-Id: I2f1c30c7f34b32c638a4ac60fab709b32f1e6c9a
Reviewed-on: https://gerrit.libreoffice.org/35959
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
This commit is contained in:
Pranav Kant 2017-03-31 14:42:10 +05:30 committed by pranavk
parent 4b7904036a
commit 453a452ff9
2 changed files with 4 additions and 13 deletions

View file

@ -26,20 +26,11 @@ AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
-DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
-DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
${include_paths}
AM_LDFLAGS = -pthread -Wl,-E $(ZLIB_LIBS)
loolforkit_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
loolforkit_nocaps_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
loolmount_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
loolnb_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
loolwsd_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
loolwsd_fuzzer_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
AM_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib $(ZLIB_LIBS)
if ENABLE_SSL
loolforkit_LDFLAGS += -lssl -lcrypto
loolforkit_nocaps_LDFLAGS += -lssl -lcrypto
loolnb_LDFLAGS += -lssl -lcrypto
loolwsd_LDFLAGS += -lssl -lcrypto
loolwsd_fuzzer_LDFLAGS += -lssl -lcrypto
AM_LDFLAGS += -lssl -lcrypto
endif
loolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 -DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)

View file

@ -20,7 +20,7 @@ noinst_LTLIBRARIES = \
unit-minsocketbuffersize.la
MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION)
AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS)
# We work around some of the mess of using the same sources both on
# the server side and here in unit tests with conditional compilation