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