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