Adding upstream version 0.9.0.
[debian/lxpanel.git] / plugins / Makefile.am
index 5424fbd..497dbea 100644 (file)
@@ -8,8 +8,15 @@ AM_CPPFLAGS = \
        $(G_CAST_CHECKS)
 
 AM_LDFLAGS = \
+       -module -avoid-version -shared -export-dynamic \
+       -no-undefined -rpath $(libdir)/lxpanel/plugins \
+       $(top_builddir)/src/liblxpanel.la \
        $(PACKAGE_LIBS)
 
+BUILT_SOURCES = $(top_builddir)/src/liblxpanel.la
+
+$(top_builddir)/src/liblxpanel.la:
+       cd $(top_builddir)/src && $(MAKE) liblxpanel.la
 
 ## built-in plugins
 noinst_LIBRARIES = libbuiltin_plugins.a
@@ -28,9 +35,10 @@ PLUGINS_SOURCES = \
        dclock.c \
        dirmenu.c \
        launchtaskbar.c \
+       task-button.c \
+       launch-button.c \
        pager.c \
        separator.c \
-       space.c \
        tray.c \
        wincmd.c \
        $(MENU_SOURCES)
@@ -61,7 +69,6 @@ EXTRA_LTLIBRARIES = \
        netstatus.la \
        thermal.la \
        volume.la \
-       volumealsa.la \
        weather.la \
        xkb.la
 
@@ -72,20 +79,15 @@ batt_la_SOURCES = \
        batt/batt.c \
        batt/batt_sys.c
 batt_la_CFLAGS = -I$(srcdir)/batt
-batt_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # cpu
 cpu_la_SOURCES = cpu/cpu.c
-cpu_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # cpufreq
 cpufreq_la_SOURCES = cpufreq/cpufreq.c
-cpufreq_la_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
-cpufreq_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # deskno
 deskno_la_SOURCES = deskno/deskno.c
-deskno_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # indicator
 indicator_la_SOURCES = indicator/indicator.c
@@ -93,16 +95,14 @@ indicator_la_CFLAGS = \
        -DINDICATOR_DIR=\""$(INDICATORDIR)"\" \
        -DINDICATOR_ICONS_DIR=\""$(INDICATORICONSDIR)"\" \
        $(APPLET_CFLAGS)
-indicator_la_LDFLAGS = -module @LXPANEL_MODULE@ $(APPLET_LIBS)
+indicator_la_LIBADD = $(APPLET_LIBS)
 
 # kbled
 kbled_la_SOURCES = kbled/kbled.c
-kbled_la_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
-kbled_la_LDFLAGS = -module @LXPANEL_MODULE@
+kbled_la_LIBADD = $(X11_LIBS)
 
 # monitors
 monitors_la_SOURCES = monitors/monitors.c
-monitors_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # netstat
 netstat_la_SOURCES = \
@@ -112,10 +112,8 @@ netstat_la_SOURCES = \
        netstat/wireless.c \
        netstat/lxnm_client.c \
        netstat/passwd_gui.c
-netstat_la_CFLAGS = \
-       -I$(srcdir)/netstat \
-       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
-netstat_la_LDFLAGS = -module @LXPANEL_MODULE@ -liw
+netstat_la_CFLAGS = -I$(srcdir)/netstat
+netstat_la_LIBADD = -liw
 
 # netstatus
 netstatus_la_SOURCES = \
@@ -128,25 +126,16 @@ netstatus_la_SOURCES = \
        netstatus/netstatus-util.c
 netstatus_la_CFLAGS = \
        -I$(srcdir)/netstatus \
-       -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
        -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\"
-netstatus_la_LDFLAGS = -module @LXPANEL_MODULE@
 
 # thermal
 thermal_la_SOURCES = thermal/thermal.c
-thermal_la_LDFLAGS = -module @LXPANEL_MODULE@
 
-# volume (OSS)
-volume_la_SOURCES = \
-       volume/volume-impl.c \
-       volume/volume.c
-volume_la_CFLAGS = -I$(srcdir)/volume
-volume_la_LDFLAGS = -module @LXPANEL_MODULE@
-
-# volumealsa
-volumealsa_la_SOURCES = volumealsa/volumealsa.c
-volumealsa_la_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
-volumealsa_la_LDFLAGS = -module @LXPANEL_MODULE@ -lasound
+# volume
+volume_la_SOURCES = volumealsa/volumealsa.c
+if BUILD_ALSA_PLUGINS
+volume_la_LIBADD = -lasound
+endif
 
 # weather
 weather_la_SOURCES = \
@@ -160,7 +149,7 @@ weather_la_SOURCES = \
 weather_la_CFLAGS = \
        -I$(srcdir)/weather \
        $(LIBXML2_CFLAGS)
-weather_la_LDFLAGS = -module @LXPANEL_MODULE@ $(LIBXML2_LIBS)
+weather_la_LIBADD = $(LIBXML2_LIBS)
 
 # xkb
 xkb_la_CFLAGS = \
@@ -171,7 +160,7 @@ xkb_la_CFLAGS = \
 xkb_la_SOURCES = \
        xkb/xkb-plugin.c \
        xkb/xkb.c
-xkb_la_LDFLAGS = -module @LXPANEL_MODULE@
+xkb_la_LIBADD = $(X11_LIBS)
 
 xkeyboardconfigdir=$(datadir)/lxpanel/xkeyboardconfig
 xkeyboardconfig_DATA = \
@@ -324,8 +313,6 @@ EXTRA_DIST = \
        netstatus/netstatus-iface.h \
        netstatus/netstatus-sysdeps.h \
        netstatus/netstatus-util.h \
-       volume/volume_xpm.h \
-       volume/volume-impl.h \
        weather/logutil.h \
        weather/httputil.h \
        weather/yahooutil.h \
@@ -335,12 +322,12 @@ EXTRA_DIST = \
        xkb/xkb.h \
        $(flags_DATA) \
        $(xkeyboardconfig_DATA) \
+       task-button.h \
+       launch-button.h \
        icon.xpm
 
 install-exec-hook:
        rm -f $(DESTDIR)$(libdir)/lxpanel/plugins/*.la
-       rm -f $(DESTDIR)$(libdir)/lxpanel/plugins/*.a
-       rm -f $(DESTDIR)$(libdir)/lxpanel/plugins/*.
 
 if BUILD_PLUGIN_LOADER
 DYNAMIC_PLUGINS_INSTALLED = $(DYNAMIC_PLUGINS:.la=.so)