aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-11-01 20:22:32 +0000
committerJoão Valverde <j@v6e.pt>2017-11-19 20:16:50 +0000
commit262a84c384353b2a88a6e81cdc499ab94a8316c2 (patch)
tree759ed52d7d81ce9e5ef21e338d235f94f53d77b0 /Makefile.am
parent61bd626d5d10a7cd0e2dac667bbb262452fe906f (diff)
Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support libraries only. Before the patch: Static plugins don't work with CMake and autotools. autotools static build is broken, and most likely will always be, as building Wireshark all-static is difficult and time-consuming. After the patch: For CMake Wireshark will be built with static or shared libraries and dynamic plugins. Everything just works. CMake apparently doesn't want you building static and shared libraries at the same time. For autotools Wireshark will be built with shared libraries by default. --disable-shared and --enable-static options work as usual. Dlopened plugins are not built if --disable-shared is given to configure (to disable shared libraries). This is a limitations imposed by libtool. Tested on Linux. This removes broken support for building plugins statically. Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c Reviewed-on: https://code.wireshark.org/review/24241 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am36
1 files changed, 8 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 6b9bfc5ba9..9f4e08fada 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -351,22 +351,6 @@ dist_wimaxasncp_DATA = \
wimaxasncp/dictionary.xml \
wimaxasncp/dictionary.dtd
-if HAVE_PLUGINS
--include plugins/Custom.make
-plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
- -dlopen plugins/docsis/docsis.la \
- -dlopen plugins/ethercat/ethercat.la \
- -dlopen plugins/gryphon/gryphon.la \
- -dlopen plugins/irda/irda.la \
- -dlopen plugins/mate/mate.la \
- -dlopen plugins/opcua/opcua.la \
- -dlopen plugins/profinet/profinet.la \
- -dlopen plugins/stats_tree/stats_tree.la \
- -dlopen plugins/unistim/unistim.la \
- -dlopen plugins/wimax/wimax.la \
- -dlopen plugins/wimaxmacphy/wimaxmacphy.la
-endif
-
# "BUILT_SOURCES" are built before any "make all" or "make check" targets.
BUILT_HEADER_FILES = \
version.h
@@ -412,12 +396,6 @@ if HAVE_EXTCAP
SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
endif
-if ENABLE_STATIC
-EXTRALINKFLAGS = -Wl,-static -all-static
-else
-EXTRALINKFLAGS = -export-dynamic
-endif
-
EPAN_EXTRA_LIBS = \
@C_ARES_LIBS@ \
@KRB5_LIBS@ \
@@ -449,7 +427,7 @@ wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
-wireshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS) $(Qt_LDFLAGS)
+wireshark_LDFLAGS = $(AM_LDFLAGS) $(Qt_LDFLAGS)
wireshark_LDADD = \
ui/qt/libqtui.a \
@@ -467,7 +445,7 @@ wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
-wireshark_gtk_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+wireshark_gtk_LDFLAGS = $(AM_LDFLAGS)
wireshark_gtk_LDADD = \
ui/gtk/libgtkui.a \
@@ -484,7 +462,7 @@ tshark_SOURCES = \
tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
-tshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+tshark_LDFLAGS = $(AM_LDFLAGS)
# Libraries and plugin flags with which to link tshark.
tshark_LDADD = \
@@ -507,7 +485,7 @@ tfshark_SOURCES = \
tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
-tfshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+tfshark_LDFLAGS = $(AM_LDFLAGS)
# Libraries and plugin flags with which to link tfshark.
tfshark_LDADD = \
@@ -528,7 +506,7 @@ rawshark_SOURCES = \
rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
-rawshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+rawshark_LDFLAGS = $(AM_LDFLAGS)
# Libraries and plugin flags with which to link rawshark.
rawshark_LDADD = \
@@ -556,7 +534,7 @@ if HAVE_SPEEXDSP
sharkd_CPPFLAGS += $(SPEEXDSP_CFLAGS)
endif
-sharkd_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+sharkd_LDFLAGS = $(AM_LDFLAGS)
# Libraries and plugin flags with which to link sharkd.
sharkd_LDADD = \
@@ -845,8 +823,10 @@ endif
if HAVE_PLUGINS
+if !ENABLE_STATIC
plugins_subdir = plugins
endif
+endif
if HAVE_EXTCAP
extcap_subdir = extcap