Merging upstream version 0.8.1.
[debian/lxpanel.git] / plugins / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 ## common flags for all plugins
4 AM_CPPFLAGS = \
5         -I$(top_srcdir) \
6         -I$(top_srcdir)/src \
7         $(PACKAGE_CFLAGS) \
8         $(G_CAST_CHECKS)
9
10 AM_LDFLAGS = \
11         -module -avoid-version -shared -export-dynamic \
12         -no-undefined -rpath $(libdir)/lxpanel/plugins \
13         $(top_builddir)/src/liblxpanel.la \
14         $(PACKAGE_LIBS)
15
16 BUILT_SOURCES = $(top_builddir)/src/liblxpanel.la
17
18 $(top_builddir)/src/liblxpanel.la:
19         cd $(top_builddir)/src && $(MAKE) liblxpanel.la
20
21 ## built-in plugins
22 noinst_LIBRARIES = libbuiltin_plugins.a
23
24 libbuiltin_plugins_a_CFLAGS = \
25         -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
26         -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\" \
27         -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
28
29 if ENABLE_MENU_CACHE
30 MENU_SOURCES = \
31         menu.c
32 endif
33
34 PLUGINS_SOURCES = \
35         dclock.c \
36         dirmenu.c \
37         launchtaskbar.c \
38         pager.c \
39         separator.c \
40         space.c \
41         tray.c \
42         wincmd.c \
43         $(MENU_SOURCES)
44
45 libbuiltin_plugins_a_SOURCES = \
46         $(PLUGINS_SOURCES)
47
48 libbuiltin_plugins_a_LIBADD =
49
50
51 ## loadable plugins
52 if BUILD_PLUGIN_LOADER
53 DYNAMIC_PLUGINS = \
54         $(PLUGINS_LIST)
55 endif
56
57 pkglib_LTLIBRARIES = $(DYNAMIC_PLUGINS)
58
59 EXTRA_LTLIBRARIES = \
60         batt.la \
61         cpu.la \
62         cpufreq.la \
63         deskno.la \
64         indicator.la \
65         kbled.la \
66         monitors.la \
67         netstat.la \
68         netstatus.la \
69         thermal.la \
70         volume.la \
71         volumealsa.la \
72         weather.la \
73         xkb.la
74
75 pkglibdir = $(libdir)/lxpanel/plugins
76
77 # batt
78 batt_la_SOURCES = \
79         batt/batt.c \
80         batt/batt_sys.c
81 batt_la_CFLAGS = -I$(srcdir)/batt
82
83 # cpu
84 cpu_la_SOURCES = cpu/cpu.c
85
86 # cpufreq
87 cpufreq_la_SOURCES = cpufreq/cpufreq.c
88
89 # deskno
90 deskno_la_SOURCES = deskno/deskno.c
91
92 # indicator
93 indicator_la_SOURCES = indicator/indicator.c
94 indicator_la_CFLAGS = \
95         -DINDICATOR_DIR=\""$(INDICATORDIR)"\" \
96         -DINDICATOR_ICONS_DIR=\""$(INDICATORICONSDIR)"\" \
97         $(APPLET_CFLAGS)
98 indicator_la_LIBADD = $(APPLET_LIBS)
99
100 # kbled
101 kbled_la_SOURCES = kbled/kbled.c
102 kbled_la_LIBADD = $(X11_LIBS)
103
104 # monitors
105 monitors_la_SOURCES = monitors/monitors.c
106
107 # netstat
108 netstat_la_SOURCES = \
109         netstat/netstat.c \
110         netstat/devproc.c \
111         netstat/statusicon.c \
112         netstat/wireless.c \
113         netstat/lxnm_client.c \
114         netstat/passwd_gui.c
115 netstat_la_CFLAGS = -I$(srcdir)/netstat
116 netstat_la_LIBADD = -liw
117
118 # netstatus
119 netstatus_la_SOURCES = \
120         netstatus/netstatus.c \
121         netstatus/netstatus-dialog.c \
122         netstatus/netstatus-enums.c \
123         netstatus/netstatus-icon.c \
124         netstatus/netstatus-iface.c \
125         netstatus/netstatus-sysdeps.c \
126         netstatus/netstatus-util.c
127 netstatus_la_CFLAGS = \
128         -I$(srcdir)/netstatus \
129         -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\"
130
131 # thermal
132 thermal_la_SOURCES = thermal/thermal.c
133
134 # volume (OSS)
135 volume_la_SOURCES = \
136         volume/volume-impl.c \
137         volume/volume.c
138 volume_la_CFLAGS = -I$(srcdir)/volume
139
140 # volumealsa
141 volumealsa_la_SOURCES = volumealsa/volumealsa.c
142 volumealsa_la_LIBADD = -lasound
143
144 # weather
145 weather_la_SOURCES = \
146         weather/logutil.c          \
147         weather/httputil.c         \
148         weather/yahooutil.c        \
149         weather/location.c         \
150         weather/forecast.c         \
151         weather/weatherwidget.c    \
152         weather/weather.c
153 weather_la_CFLAGS = \
154         -I$(srcdir)/weather \
155         $(LIBXML2_CFLAGS)
156 weather_la_LIBADD = $(LIBXML2_LIBS)
157
158 # xkb
159 xkb_la_CFLAGS = \
160         -I$(srcdir)/xkb \
161         -DFLAGSDIR=\"$(datadir)/lxpanel/images/xkb-flags\" \
162         -DFLAGSCUSTDIR=\"$(datadir)/lxpanel/images/xkb-flags-cust\" \
163         -DXKBCONFDIR=\"$(datadir)/lxpanel/xkeyboardconfig\"
164 xkb_la_SOURCES = \
165         xkb/xkb-plugin.c \
166         xkb/xkb.c
167 xkb_la_LIBADD = $(X11_LIBS)
168
169 xkeyboardconfigdir=$(datadir)/lxpanel/xkeyboardconfig
170 xkeyboardconfig_DATA = \
171         xkb/xkeyboardconfig/models.cfg \
172         xkb/xkeyboardconfig/layouts.cfg \
173         xkb/xkeyboardconfig/toggle.cfg
174
175 flagsdir=$(datadir)/lxpanel/images/xkb-flags
176 flags_DATA= \
177         xkb/flags/ad.png \
178         xkb/flags/ae.png \
179         xkb/flags/af.png \
180         xkb/flags/al.png \
181         xkb/flags/am.png \
182         xkb/flags/ar.png \
183         xkb/flags/ara.png \
184         xkb/flags/at.png \
185         xkb/flags/az.png \
186         xkb/flags/ba.png \
187         xkb/flags/bd.png \
188         xkb/flags/be.png \
189         xkb/flags/ben.png \
190         xkb/flags/bg.png \
191         xkb/flags/bh.png \
192         xkb/flags/br.png \
193         xkb/flags/brai.png \
194         xkb/flags/bt.png \
195         xkb/flags/bw.png \
196         xkb/flags/by.png \
197         xkb/flags/ca.png \
198         xkb/flags/cd.png \
199         xkb/flags/ch.png \
200         xkb/flags/cm.png \
201         xkb/flags/cn.png \
202         xkb/flags/cu.png \
203         xkb/flags/cz.png \
204         xkb/flags/de.png \
205         xkb/flags/dev.png \
206         xkb/flags/dj.png \
207         xkb/flags/dk.png \
208         xkb/flags/dvorak.png \
209         xkb/flags/dz.png \
210         xkb/flags/ee.png \
211         xkb/flags/eg.png \
212         xkb/flags/epo.png \
213         xkb/flags/es.png \
214         xkb/flags/et.png \
215         xkb/flags/eu.png \
216         xkb/flags/fi.png \
217         xkb/flags/fo.png \
218         xkb/flags/fr.png \
219         xkb/flags/gb.png \
220         xkb/flags/ge.png \
221         xkb/flags/gh.png \
222         xkb/flags/gn.png \
223         xkb/flags/gr.png \
224         xkb/flags/hr.png \
225         xkb/flags/hu.png \
226         xkb/flags/ie.png \
227         xkb/flags/il.png \
228         xkb/flags/in.png \
229         xkb/flags/iq.png \
230         xkb/flags/ir.png \
231         xkb/flags/is.png \
232         xkb/flags/it.png \
233         xkb/flags/jo.png \
234         xkb/flags/jp.png \
235         xkb/flags/ke.png \
236         xkb/flags/kg.png \
237         xkb/flags/kh.png \
238         xkb/flags/km.png \
239         xkb/flags/kp.png \
240         xkb/flags/kr.png \
241         xkb/flags/kw.png \
242         xkb/flags/kz.png \
243         xkb/flags/la.png \
244         xkb/flags/latam.png \
245         xkb/flags/lb.png \
246         xkb/flags/lk.png \
247         xkb/flags/lt.png \
248         xkb/flags/lv.png \
249         xkb/flags/ly.png \
250         xkb/flags/ma.png \
251         xkb/flags/mao.png \
252         xkb/flags/me.png \
253         xkb/flags/mk.png \
254         xkb/flags/ml.png \
255         xkb/flags/mm.png \
256         xkb/flags/mn.png \
257         xkb/flags/mt.png \
258         xkb/flags/mv.png \
259         xkb/flags/mx.png \
260         xkb/flags/nec_vndr-jp.png \
261         xkb/flags/ng.png \
262         xkb/flags/nl.png \
263         xkb/flags/no.png \
264         xkb/flags/np.png \
265         xkb/flags/om.png \
266         xkb/flags/ph.png \
267         xkb/flags/pk.png \
268         xkb/flags/pl.png \
269         xkb/flags/ps.png \
270         xkb/flags/pt.png \
271         xkb/flags/qa.png \
272         xkb/flags/qc.png \
273         xkb/flags/ro.png \
274         xkb/flags/rs.png \
275         xkb/flags/ru.png \
276         xkb/flags/sa.png \
277         xkb/flags/sd.png \
278         xkb/flags/se.png \
279         xkb/flags/si.png \
280         xkb/flags/sk.png \
281         xkb/flags/sn.png \
282         xkb/flags/so.png \
283         xkb/flags/sr.png \
284         xkb/flags/sy.png \
285         xkb/flags/th.png \
286         xkb/flags/tj.png \
287         xkb/flags/tm.png \
288         xkb/flags/tn.png \
289         xkb/flags/tr.png \
290         xkb/flags/tw.png \
291         xkb/flags/tz.png \
292         xkb/flags/ua.png \
293         xkb/flags/uk.png \
294         xkb/flags/us.png \
295         xkb/flags/un.png \
296         xkb/flags/uy.png \
297         xkb/flags/uz.png \
298         xkb/flags/vn.png \
299         xkb/flags/ye.png \
300         xkb/flags/yu.png \
301         xkb/flags/za.png
302
303 EXTRA_DIST = \
304         batt/batt_sys.h \
305         netstat/netstat.h \
306         netstat/nsconfig.h \
307         netstat/devproc.h \
308         netstat/statusicon.h \
309         netstat/wireless.h \
310         netstat/lxnm_client.h \
311         netstat/passwd_gui.h \
312         netstatus/COPYING \
313         netstatus/netstatus-dialog.h \
314         netstatus/netstatus-enums.h \
315         netstatus/netstatus-fallback-pixbuf.h \
316         netstatus/netstatus-icon.h \
317         netstatus/netstatus-iface.h \
318         netstatus/netstatus-sysdeps.h \
319         netstatus/netstatus-util.h \
320         volume/volume_xpm.h \
321         volume/volume-impl.h \
322         weather/logutil.h \
323         weather/httputil.h \
324         weather/yahooutil.h \
325         weather/location.h \
326         weather/forecast.h \
327         weather/weatherwidget.h \
328         xkb/xkb.h \
329         $(flags_DATA) \
330         $(xkeyboardconfig_DATA) \
331         icon.xpm
332
333 install-exec-hook:
334         rm -f $(DESTDIR)$(libdir)/lxpanel/plugins/*.la
335
336 if BUILD_PLUGIN_LOADER
337 DYNAMIC_PLUGINS_INSTALLED = $(DYNAMIC_PLUGINS:.la=.so)
338 uninstall-hook:
339         cd $(DESTDIR)$(libdir)/lxpanel/plugins && rm -f $(DYNAMIC_PLUGINS_INSTALLED) || true
340 endif