diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 92e1d26..eeef70a 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -1,9 +1,9 @@ -plugindir = $(libexecdir)/xfce4/panel-plugins -plugin_PROGRAMS = xfce4-netload-plugin +plugindir = $(libdir)/xfce4/panel-plugins +plugin_LTLIBRARIES = libnetload.la LIBS = @LIBS@ @SOLLIBS@ -xfce4_netload_plugin_SOURCES = \ +libnetload_la_SOURCES = \ netload.c \ monitor-label.c \ monitor-label.h \ @@ -16,14 +16,21 @@ xfce4_netload_plugin_SOURCES = \ global.h \ slurm.h -xfce4_netload_plugin_CFLAGS = \ +libnetload_la_CFLAGS = \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ - @LIBXFCE4PANEL_CFLAGS@ \ + @LIBXFCE4PANEL_CFLAGS@ \ @LIBXFCE4UI_CFLAGS@ -xfce4_netload_plugin_LDADD = \ - @SOLLIBS@ \ - @LIBXFCE4PANEL_LIBS@ \ +libnetload_la_LDFLAGS = \ + -avoid-version \ + -module \ + -no-undefined \ + -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \ + $(PLATFORM_LDFLAGS) + +libnetload_la_LIBADD = \ + @SOLLIBS@ \ + @LIBXFCE4PANEL_LIBS@ \ @LIBXFCE4UI_LIBS@ # .desktop file diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 0ec0148..79d6bdb 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -1271,4 +1271,4 @@ static void netload_construct (XfcePanelPlugin *plugin) run_update( global ); } -XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (netload_construct); +XFCE_PANEL_PLUGIN_REGISTER (netload_construct); diff --git a/panel-plugin/netload.desktop.in.in b/panel-plugin/netload.desktop.in.in index 6e5e57f..3a461f2 100644 --- a/panel-plugin/netload.desktop.in.in +++ b/panel-plugin/netload.desktop.in.in @@ -4,5 +4,6 @@ Encoding=UTF-8 _Name=Network Monitor _Comment=Show network traffic Icon=xfce4-netload-plugin -X-XFCE-Exec=@PLUGIN_PATH@/xfce4-netload-plugin +X-XFCE-Module=netload +X-XFCE-Internal=FALSE