ef0f66c29ab7cf874f002946bbfef993d58df8b0
[mikachu/openbox.git] / Makefile.am
1 SUBDIRS = m4 po
2
3 themedir        = $(datadir)/themes
4 localedir       = $(datadir)/locale
5 configdir       = $(sysconfdir)/xdg
6 rcdir           = $(configdir)/openbox
7 desktopfilesdir = $(datadir)/gnome/wm-properties
8 pkgconfigdir    = $(libdir)/pkgconfig
9 pubincludedir   = $(includedir)/openbox/@OB_VERSION@/openbox
10 pixmapdir       = $(datadir)/pixmaps
11 xsddir          = $(datadir)/openbox
12 userscriptdir   = $(datadir)/openbox
13
14 theme = TheBear
15
16 AUTOMAKE_OPTIONS = subdir-objects foreign
17
18 ACLOCAL_AMFLAGS = -I m4
19
20 INCLUDES = -I.
21
22 noinst_PROGRAMS = \
23         render/rendertest
24
25 lib_LTLIBRARIES = \
26         parser/libobparser.la \
27         render/libobrender.la
28
29 bin_PROGRAMS = \
30         openbox/openbox \
31         tools/kdetrayproxy/kdetrayproxy \
32         tools/gnome-panel-control/gnome-panel-control
33
34 ## render ##
35
36 render_rendertest_CPPFLAGS = \
37         $(XFT_CFLAGS) \
38         $(GLIB_CFLAGS) \
39         -DG_LOG_DOMAIN=\"RenderTest\"
40 render_rendertest_LDADD = render/libobrender.la
41 render_rendertest_SOURCES = render/test.c
42
43 render_libobrender_la_CPPFLAGS = \
44         $(X_CFLAGS) \
45         $(XFT_CFLAGS) \
46         $(GLIB_CFLAGS) \
47         $(XML_CFLAGS) \
48         -DG_LOG_DOMAIN=\"ObRender\" \
49         -DDEFAULT_THEME=\"$(theme)\"
50 render_libobrender_la_LIBADD = \
51         $(X_LIBS) \
52         $(XFT_LIBS) \
53         $(GLIB_LIBS) \
54         parser/libobparser.la
55 render_libobrender_la_LDFLAGS = \
56         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
57 render_libobrender_la_SOURCES = \
58         gettext.h \
59         render/color.h \
60         render/color.c \
61         render/font.h \
62         render/font.c \
63         render/geom.h \
64         render/gradient.h \
65         render/gradient.c \
66         render/icon.h \
67         render/image.h \
68         render/image.c \
69         render/instance.h \
70         render/instance.c \
71         render/mask.h \
72         render/mask.c \
73         render/render.h \
74         render/render.c \
75         render/theme.h \
76         render/theme.c
77
78 ## parser ##
79
80 parser_libobparser_la_CPPFLAGS = \
81         $(GLIB_CFLAGS) \
82         $(XML_CFLAGS) \
83         -DG_LOG_DOMAIN=\"ObParser\" \
84         -DLOCALEDIR=\"$(localedir)\" \
85         -DDATADIR=\"$(datadir)\" \
86         -DCONFIGDIR=\"$(configdir)\"
87 parser_libobparser_la_LIBADD = \
88         $(GLIB_LIBS) \
89         $(XML_LIBS)
90 parser_libobparser_la_LDFLAGS = \
91         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
92 parser_libobparser_la_SOURCES = \
93         parser/parse.h \
94         parser/parse.c
95
96 ## openbox ##
97
98 openbox_openbox_CPPFLAGS = \
99         $(X_CFLAGS) \
100         $(SM_CFLAGS) \
101         $(XFT_CFLAGS) \
102         $(GLIB_CFLAGS) \
103         $(LIBSN_CFLAGS) \
104         $(XML_CFLAGS) \
105         -DLOCALEDIR=\"$(localedir)\" \
106         -DDATADIR=\"$(datadir)\" \
107         -DCONFIGDIR=\"$(configdir)\" \
108         -DG_LOG_DOMAIN=\"Openbox\"
109 openbox_openbox_LDADD = \
110         $(SM_LIBS) \
111         $(XINERAMA_LIBS) \
112         $(XKB_LIBS) \
113         $(XRANDR_LIBS) \
114         $(VIDMODE_LIBS) \
115         $(XSHAPE_LIBS) \
116         $(GLIB_LIBS) \
117         $(LIBSN_LIBS) \
118         $(XML_LIBS) \
119         $(EFENCE_LIBS) \
120         $(LIBINTL) \
121         render/libobrender.la \
122         parser/libobparser.la
123 openbox_openbox_LDFLAGS = -export-dynamic
124 openbox_openbox_SOURCES = \
125         gettext.h \
126         openbox/action.c \
127         openbox/action.h \
128         openbox/client.c \
129         openbox/client.h \
130         openbox/client_list_menu.c \
131         openbox/client_list_menu.h \
132         openbox/client_menu.c \
133         openbox/client_menu.h \
134         openbox/config.c \
135         openbox/config.h \
136         openbox/debug.c \
137         openbox/debug.h \
138         openbox/dock.c \
139         openbox/dock.h \
140         openbox/event.c \
141         openbox/event.h \
142         openbox/extensions.c \
143         openbox/extensions.h \
144         openbox/focus.c \
145         openbox/focus.h \
146         openbox/frame.c \
147         openbox/frame.h \
148         openbox/framerender.c \
149         openbox/framerender.h \
150         openbox/geom.h \
151         openbox/grab.c \
152         openbox/grab.h \
153         openbox/group.c \
154         openbox/group.h \
155         openbox/keyboard.c \
156         openbox/keyboard.h \
157         openbox/keytree.c \
158         openbox/keytree.h \
159         openbox/mainloop.c \
160         openbox/mainloop.h \
161         openbox/menuframe.c \
162         openbox/menuframe.h \
163         openbox/menu.c \
164         openbox/menu.h \
165         openbox/misc.h \
166         openbox/mouse.c \
167         openbox/mouse.h \
168         openbox/moveresize.c \
169         openbox/moveresize.h \
170         openbox/mwm.h \
171         openbox/openbox.c \
172         openbox/openbox.h \
173         openbox/place.c \
174         openbox/place.h \
175         openbox/popup.c \
176         openbox/popup.h \
177         openbox/prop.c \
178         openbox/prop.h \
179         openbox/resist.c \
180         openbox/resist.h \
181         openbox/screen.c \
182         openbox/screen.h \
183         openbox/session.c \
184         openbox/session.h \
185         openbox/stacking.c \
186         openbox/stacking.h \
187         openbox/startupnotify.c \
188         openbox/startupnotify.h \
189         openbox/translate.c \
190         openbox/translate.h \
191         openbox/window.c \
192         openbox/window.h \
193         openbox/xerror.c \
194         openbox/xerror.h
195
196
197 ## kdetrayproxy ##
198
199 tools_kdetrayproxy_kdetrayproxy_CPPFLAGS = \
200         $(X_CFLAGS)
201 tools_kdetrayproxy_kdetrayproxy_LDADD = \
202         $(X_LIBS)
203 tools_kdetrayproxy_kdetrayproxy_SOURCES = \
204         tools/kdetrayproxy/kdetrayproxy.c
205
206
207 ## gnome-panel-control ##
208
209 tools_gnome_panel_control_gnome_panel_control_CPPFLAGS = \
210         $(X_CFLAGS)
211 tools_gnome_panel_control_gnome_panel_control_LDADD = \
212         $(X_LIBS)
213 tools_gnome_panel_control_gnome_panel_control_SOURCES = \
214         tools/gnome-panel-control/gnome-panel-control.c
215
216
217 ## themes ##
218
219 allegro_themedir = $(themedir)/Allegro/openbox-3
220 dist_allegro_theme_DATA = \
221         themes/Allegro/openbox-3/themerc \
222         themes/Allegro/openbox-3/bullet.xbm
223
224 artwiz_themedir = $(themedir)/Artwiz/openbox-3
225 dist_artwiz_theme_DATA = \
226         themes/Artwiz/openbox-3/themerc
227
228 blah41_themedir = $(themedir)/Blah41/openbox-3
229 dist_blah41_theme_DATA = \
230         themes/Blah41/openbox-3/themerc
231
232 om4ob_themedir = $(themedir)/Om4Ob/openbox-3
233 dist_om4ob_theme_DATA = \
234         themes/Om4Ob/openbox-3/themerc \
235         themes/Om4Ob/openbox-3/close_hover.xbm \
236         themes/Om4Ob/openbox-3/close.xbm \
237         themes/Om4Ob/openbox-3/desk_hover.xbm \
238         themes/Om4Ob/openbox-3/desk_toggled.xbm \
239         themes/Om4Ob/openbox-3/desk.xbm \
240         themes/Om4Ob/openbox-3/iconify_hover.xbm \
241         themes/Om4Ob/openbox-3/iconify_pressed.xbm \
242         themes/Om4Ob/openbox-3/iconify.xbm \
243         themes/Om4Ob/openbox-3/max_disabled.xbm \
244         themes/Om4Ob/openbox-3/max_hover.xbm \
245         themes/Om4Ob/openbox-3/max_pressed.xbm \
246         themes/Om4Ob/openbox-3/max_toggled.xbm \
247         themes/Om4Ob/openbox-3/max.xbm \
248         themes/Om4Ob/openbox-3/shade_disabled.xbm \
249         themes/Om4Ob/openbox-3/shade_hover.xbm \
250         themes/Om4Ob/openbox-3/shade_toggled.xbm \
251         themes/Om4Ob/openbox-3/shade.xbm
252
253 thebear_themedir = $(themedir)/TheBear/openbox-3
254 dist_thebear_theme_DATA = \
255         themes/TheBear/openbox-3/themerc
256
257
258 ## public headers ##
259
260 pubinclude_HEADERS = \
261         render/render.h \
262         render/theme.h \
263         parser/parse.h
264
265 nodist_pkgconfig_DATA = \
266         render/obrender-3.0.pc \
267         parser/obparser-3.0.pc
268
269 ## data ##
270
271 dist_pixmap_DATA = \
272         data/openbox.png
273
274 nodist_rc_DATA = \
275         data/rc.xml \
276         data/menu.xml
277
278 dist_xsd_DATA = \
279         data/rc.xsd \
280         data/menu.xsd
281
282 edit = $(SED) \
283         -e 's!@version\@!$(VERSION)!' \
284         -e 's!@xsddir\@!$(xsddir)!'
285
286 data/rc.xml: Makefile $(srcdir)/data/rc.xml.in data
287         @echo make: creating $@
288         @rm -f $@
289         @mkdir data 2>/dev/null || true
290         @$(edit) $(srcdir)/data/rc.xml.in >$@
291
292 data/menu.xml: Makefile $(srcdir)/data/menu.xml.in data
293         @echo make: creating $@
294         @rm -f $@
295         @mkdir data 2>/dev/null || true
296         @$(edit) $(srcdir)/data/menu.xml.in >$@
297
298 dist_userscript_DATA = \
299         tools/themeupdate/themeupdate.py
300
301 install-data-hook:
302         chmod +x $(DESTDIR)$(userscriptdir)/themeupdate.py
303
304 dist_desktopfiles_DATA = \
305         data/openbox.desktop
306
307 dist_noinst_DATA = \
308         data/rc.xml.in \
309         data/menu.xml.in \
310         render/obrender-3.0.pc.in \
311         parser/obparser-3.0.pc.in
312
313 EXTRA_DIST = \
314         config.rpath \
315         mkinstalldirs \
316         README \
317         COPYING \
318         AUTHORS
319
320 CLEANFILES = \
321         data/rc.xml \
322         data/menu.xml
323
324 #doc:
325 #       $(MAKE) -$(MAKEFLAGS) -C doc/doxygen doc
326
327 distclean-local:
328         for d in . m4 po render; do \
329                 for p in core core.* gmon.out *\~ *.orig *.rej .\#*; do \
330                         rm -f "$$d/$$p"; \
331                 done \
332         done
333
334 .PHONY: doc