Replace all other lxpanel_image_* calls with new ones to make code simpler.
[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         -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 cpufreq_la_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
87
88 # deskno
89 deskno_la_SOURCES = deskno/deskno.c
90
91 # indicator
92 indicator_la_SOURCES = indicator/indicator.c
93 indicator_la_CFLAGS = \
94         -DINDICATOR_DIR=\""$(INDICATORDIR)"\" \
95         -DINDICATOR_ICONS_DIR=\""$(INDICATORICONSDIR)"\" \
96         $(APPLET_CFLAGS)
97 indicator_la_LIBADD = $(APPLET_LIBS)
98
99 # kbled
100 kbled_la_SOURCES = kbled/kbled.c
101 kbled_la_LIBADD = $(X11_LIBS)
102
103 # monitors
104 monitors_la_SOURCES = monitors/monitors.c
105
106 # netstat
107 netstat_la_SOURCES = \
108         netstat/netstat.c \
109         netstat/devproc.c \
110         netstat/statusicon.c \
111         netstat/wireless.c \
112         netstat/lxnm_client.c \
113         netstat/passwd_gui.c
114 netstat_la_CFLAGS = \
115         -I$(srcdir)/netstat \
116         -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\"
117 netstat_la_LIBADD = -liw
118
119 # netstatus
120 netstatus_la_SOURCES = \
121         netstatus/netstatus.c \
122         netstatus/netstatus-dialog.c \
123         netstatus/netstatus-enums.c \
124         netstatus/netstatus-icon.c \
125         netstatus/netstatus-iface.c \
126         netstatus/netstatus-sysdeps.c \
127         netstatus/netstatus-util.c
128 netstatus_la_CFLAGS = \
129         -I$(srcdir)/netstatus \
130         -DPACKAGE_DATA_DIR=\""$(datadir)/lxpanel"\" \
131         -DPACKAGE_UI_DIR=\""$(datadir)/lxpanel/ui"\"
132
133 # thermal
134 thermal_la_SOURCES = thermal/thermal.c
135
136 # volume (OSS)
137 volume_la_SOURCES = \
138         volume/volume-impl.c \
139         volume/volume.c
140 volume_la_CFLAGS = -I$(srcdir)/volume
141
142 # volumealsa
143 volumealsa_la_SOURCES = volumealsa/volumealsa.c
144 volumealsa_la_LIBADD = -lasound
145
146 # weather
147 weather_la_SOURCES = \
148         weather/logutil.c          \
149         weather/httputil.c         \
150         weather/yahooutil.c        \
151         weather/location.c         \
152         weather/forecast.c         \
153         weather/weatherwidget.c    \
154         weather/weather.c
155 weather_la_CFLAGS = \
156         -I$(srcdir)/weather \
157         $(LIBXML2_CFLAGS)
158 weather_la_LIBADD = $(LIBXML2_LIBS)
159
160 # xkb
161 xkb_la_CFLAGS = \
162         -I$(srcdir)/xkb \
163         -DFLAGSDIR=\"$(datadir)/lxpanel/images/xkb-flags\" \
164         -DFLAGSCUSTDIR=\"$(datadir)/lxpanel/images/xkb-flags-cust\" \
165         -DXKBCONFDIR=\"$(datadir)/lxpanel/xkeyboardconfig\"
166 xkb_la_SOURCES = \
167         xkb/xkb-plugin.c \
168         xkb/xkb.c
169 xkb_la_LIBADD = $(X11_LIBS)
170
171 xkeyboardconfigdir=$(datadir)/lxpanel/xkeyboardconfig
172 xkeyboardconfig_DATA = \
173         xkb/xkeyboardconfig/models.cfg \
174         xkb/xkeyboardconfig/layouts.cfg \
175         xkb/xkeyboardconfig/toggle.cfg
176
177 flagsdir=$(datadir)/lxpanel/images/xkb-flags
178 flags_DATA= \
179         xkb/flags/ad.png \
180         xkb/flags/ae.png \
181         xkb/flags/af.png \
182         xkb/flags/al.png \
183         xkb/flags/am.png \
184         xkb/flags/ar.png \
185         xkb/flags/ara.png \
186         xkb/flags/at.png \
187         xkb/flags/az.png \
188         xkb/flags/ba.png \
189         xkb/flags/bd.png \
190         xkb/flags/be.png \
191         xkb/flags/ben.png \
192         xkb/flags/bg.png \
193         xkb/flags/bh.png \
194         xkb/flags/br.png \
195         xkb/flags/brai.png \
196         xkb/flags/bt.png \
197         xkb/flags/bw.png \
198         xkb/flags/by.png \
199         xkb/flags/ca.png \
200         xkb/flags/cd.png \
201         xkb/flags/ch.png \
202         xkb/flags/cm.png \
203         xkb/flags/cn.png \
204         xkb/flags/cu.png \
205         xkb/flags/cz.png \
206         xkb/flags/de.png \
207         xkb/flags/dev.png \
208         xkb/flags/dj.png \
209         xkb/flags/dk.png \
210         xkb/flags/dvorak.png \
211         xkb/flags/dz.png \
212         xkb/flags/ee.png \
213         xkb/flags/eg.png \
214         xkb/flags/epo.png \
215         xkb/flags/es.png \
216         xkb/flags/et.png \
217         xkb/flags/eu.png \
218         xkb/flags/fi.png \
219         xkb/flags/fo.png \
220         xkb/flags/fr.png \
221         xkb/flags/gb.png \
222         xkb/flags/ge.png \
223         xkb/flags/gh.png \
224         xkb/flags/gn.png \
225         xkb/flags/gr.png \
226         xkb/flags/hr.png \
227         xkb/flags/hu.png \
228         xkb/flags/ie.png \
229         xkb/flags/il.png \
230         xkb/flags/in.png \
231         xkb/flags/iq.png \
232         xkb/flags/ir.png \
233         xkb/flags/is.png \
234         xkb/flags/it.png \
235         xkb/flags/jo.png \
236         xkb/flags/jp.png \
237         xkb/flags/ke.png \
238         xkb/flags/kg.png \
239         xkb/flags/kh.png \
240         xkb/flags/km.png \
241         xkb/flags/kp.png \
242         xkb/flags/kr.png \
243         xkb/flags/kw.png \
244         xkb/flags/kz.png \
245         xkb/flags/la.png \
246         xkb/flags/latam.png \
247         xkb/flags/lb.png \
248         xkb/flags/lk.png \
249         xkb/flags/lt.png \
250         xkb/flags/lv.png \
251         xkb/flags/ly.png \
252         xkb/flags/ma.png \
253         xkb/flags/mao.png \
254         xkb/flags/me.png \
255         xkb/flags/mk.png \
256         xkb/flags/ml.png \
257         xkb/flags/mm.png \
258         xkb/flags/mn.png \
259         xkb/flags/mt.png \
260         xkb/flags/mv.png \
261         xkb/flags/mx.png \
262         xkb/flags/nec_vndr-jp.png \
263         xkb/flags/ng.png \
264         xkb/flags/nl.png \
265         xkb/flags/no.png \
266         xkb/flags/np.png \
267         xkb/flags/om.png \
268         xkb/flags/ph.png \
269         xkb/flags/pk.png \
270         xkb/flags/pl.png \
271         xkb/flags/ps.png \
272         xkb/flags/pt.png \
273         xkb/flags/qa.png \
274         xkb/flags/qc.png \
275         xkb/flags/ro.png \
276         xkb/flags/rs.png \
277         xkb/flags/ru.png \
278         xkb/flags/sa.png \
279         xkb/flags/sd.png \
280         xkb/flags/se.png \
281         xkb/flags/si.png \
282         xkb/flags/sk.png \
283         xkb/flags/sn.png \
284         xkb/flags/so.png \
285         xkb/flags/sr.png \
286         xkb/flags/sy.png \
287         xkb/flags/th.png \
288         xkb/flags/tj.png \
289         xkb/flags/tm.png \
290         xkb/flags/tn.png \
291         xkb/flags/tr.png \
292         xkb/flags/tw.png \
293         xkb/flags/tz.png \
294         xkb/flags/ua.png \
295         xkb/flags/uk.png \
296         xkb/flags/us.png \
297         xkb/flags/un.png \
298         xkb/flags/uy.png \
299         xkb/flags/uz.png \
300         xkb/flags/vn.png \
301         xkb/flags/ye.png \
302         xkb/flags/yu.png \
303         xkb/flags/za.png
304
305 EXTRA_DIST = \
306         batt/batt_sys.h \
307         netstat/netstat.h \
308         netstat/nsconfig.h \
309         netstat/devproc.h \
310         netstat/statusicon.h \
311         netstat/wireless.h \
312         netstat/lxnm_client.h \
313         netstat/passwd_gui.h \
314         netstatus/COPYING \
315         netstatus/netstatus-dialog.h \
316         netstatus/netstatus-enums.h \
317         netstatus/netstatus-fallback-pixbuf.h \
318         netstatus/netstatus-icon.h \
319         netstatus/netstatus-iface.h \
320         netstatus/netstatus-sysdeps.h \
321         netstatus/netstatus-util.h \
322         volume/volume_xpm.h \
323         volume/volume-impl.h \
324         weather/logutil.h \
325         weather/httputil.h \
326         weather/yahooutil.h \
327         weather/location.h \
328         weather/forecast.h \
329         weather/weatherwidget.h \
330         xkb/xkb.h \
331         $(flags_DATA) \
332         $(xkeyboardconfig_DATA) \
333         icon.xpm
334
335 install-exec-hook:
336         rm -f $(DESTDIR)$(libdir)/lxpanel/plugins/*.la
337
338 if BUILD_PLUGIN_LOADER
339 DYNAMIC_PLUGINS_INSTALLED = $(DYNAMIC_PLUGINS:.la=.so)
340 uninstall-hook:
341         cd $(DESTDIR)$(libdir)/lxpanel/plugins && rm -f $(DYNAMIC_PLUGINS_INSTALLED) || true
342 endif