Build plugin as a module

master
Mike Massonnet 2014-11-02 16:26:08 +01:00
parent e751508043
commit 1a73b511b8
3 changed files with 18 additions and 10 deletions

View File

@ -1,9 +1,9 @@
plugindir = $(libexecdir)/xfce4/panel-plugins plugindir = $(libdir)/xfce4/panel-plugins
plugin_PROGRAMS = xfce4-netload-plugin plugin_LTLIBRARIES = libnetload.la
LIBS = @LIBS@ @SOLLIBS@ LIBS = @LIBS@ @SOLLIBS@
xfce4_netload_plugin_SOURCES = \ libnetload_la_SOURCES = \
netload.c \ netload.c \
monitor-label.c \ monitor-label.c \
monitor-label.h \ monitor-label.h \
@ -16,14 +16,21 @@ xfce4_netload_plugin_SOURCES = \
global.h \ global.h \
slurm.h slurm.h
xfce4_netload_plugin_CFLAGS = \ libnetload_la_CFLAGS = \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
@LIBXFCE4PANEL_CFLAGS@ \ @LIBXFCE4PANEL_CFLAGS@ \
@LIBXFCE4UI_CFLAGS@ @LIBXFCE4UI_CFLAGS@
xfce4_netload_plugin_LDADD = \ libnetload_la_LDFLAGS = \
@SOLLIBS@ \ -avoid-version \
@LIBXFCE4PANEL_LIBS@ \ -module \
-no-undefined \
-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
$(PLATFORM_LDFLAGS)
libnetload_la_LIBADD = \
@SOLLIBS@ \
@LIBXFCE4PANEL_LIBS@ \
@LIBXFCE4UI_LIBS@ @LIBXFCE4UI_LIBS@
# .desktop file # .desktop file

View File

@ -1271,4 +1271,4 @@ static void netload_construct (XfcePanelPlugin *plugin)
run_update( global ); run_update( global );
} }
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (netload_construct); XFCE_PANEL_PLUGIN_REGISTER (netload_construct);

View File

@ -4,5 +4,6 @@ Encoding=UTF-8
_Name=Network Monitor _Name=Network Monitor
_Comment=Show network traffic _Comment=Show network traffic
Icon=xfce4-netload-plugin Icon=xfce4-netload-plugin
X-XFCE-Exec=@PLUGIN_PATH@/xfce4-netload-plugin X-XFCE-Module=netload
X-XFCE-Internal=FALSE