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