8 iconsdir = $(pkgdatadir)/icons
10 iconslayoutsdir = $(iconsdir)/layouts
11 dist_iconslayouts_DATA =
15 LAYOUTS += layouts/tile.c
16 LAYOUTS += layouts/tile.h
18 LAYOUTS += layouts/floating.c
19 LAYOUTS += layouts/floating.h
21 LAYOUTS += layouts/max.c
22 LAYOUTS += layouts/max.h
24 LAYOUTS += layouts/fibonacci.c
25 LAYOUTS += layouts/fibonacci.h
29 WIDGETS += widgets/taglist.c
30 WIDGETS += widgets/layoutinfo.c
31 WIDGETS += widgets/textbox.c
32 WIDGETS += widgets/iconbox.c
33 WIDGETS += widgets/focusicon.c
34 WIDGETS += widgets/progressbar.c
35 WIDGETS += widgets/tasklist.c
36 WIDGETS += widgets/graph.c
37 WIDGETS += widgets/common.c
52 EXTRA_DIST += awesomerc.in
53 CLEANFILES += awesomerc
54 BUILT_SOURCES += awesomerc
56 awesomerc: $(srcdir)/awesomerc.in
57 $(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|;s|[@]iconsdir@|$(iconsdir)|" \
58 < $(srcdir)/awesomerc.in > awesomerc
60 CLEANFILES += defconfig.h
61 BUILT_SOURCES += defconfig.h
62 defconfig.h: awesomerc
63 @echo "generating defconfig.h from awesomerc"
64 @echo "static const char *AWESOME_DEFAULT_CONFIG = " > defconfig.h
65 @echo -n "\"" >> defconfig.h
66 @$(SED) 's,\\,\\\\,g;s/$$/\\n\\/;s/"/\\"/g' "awesomerc" >> defconfig.h
67 @echo "\";" >> defconfig.h
69 CLEANFILES += uicbgen.h
70 BUILT_SOURCES += uicbgen.h
71 EXTRA_DIST += build-utils/uicbgen.sh
72 uicbgen.h: $(awesome_SOURCES)
73 @echo "generating uicbgen.h from headers file"
74 $(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h
76 CLEANFILES += layoutgen.h
77 BUILT_SOURCES += layoutgen.h
78 EXTRA_DIST += build-utils/layoutgen.sh
79 layoutgen.h: $(awesome_SOURCES)
80 @echo "generating layoutgen.h from layouts headers file"
81 $(top_srcdir)/build-utils/layoutgen.sh "$(top_srcdir)" > layoutgen.h
83 CLEANFILES += widgetgen.h
84 BUILT_SOURCES += widgetgen.h
85 EXTRA_DIST += build-utils/widgetgen.sh
87 @echo "generating widgetgen.h from widget.h"
88 $(top_srcdir)/build-utils/widgetgen.sh "$(top_srcdir)" > widgetgen.h
90 A_V = awesome-version-internal
91 CLEANFILES += $(A_V).h
92 BUILT_SOURCES += $(A_V).h.stamp
94 @current_ver=`$(SHELL) $(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
95 { echo '#ifndef AWESOME_VERSION_INTERNAL'; \
96 echo "#define AWESOME_VERSION_INTERNAL \"$${current_ver}\""; \
97 echo "#endif"; } > "$(A_V).h.new"
98 @if test -f "$(A_V).h" \
99 && cmp "$(A_V).h.new" "$(A_V).h"; then :; \
100 else cat "$(A_V).h.new" > "$(A_V).h"; fi; \
104 # If you are using gcc, and want to deactivate this default set of
105 # compile flags, run make with AWESOME_CFLAGS="".
106 AWESOME_CFLAGS = -std=gnu99 -pipe \
108 -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
109 -Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
110 -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn
112 AM_CPPFLAGS = $(X_CFLAGS) $(pangocairo_CFLAGS) $(confuse_CFLAGS) $(xrandr_CFLAGS) $(xinerama_CFLAGS) $(AWESOME_CFLAGS) $(imlib2_CFLAGS)
114 bin_PROGRAMS += awesome
116 common/socket.c common/socket.h \
117 common/swindow.c common/swindow.h \
118 common/version.c common/version.h \
119 common/util.c common/util.h \
120 common/xutil.c common/xutil.h \
121 common/configopts.h common/configopts.c \
122 common/xscreen.h common/xscreen.c \
126 titlebar.c titlebar.h \
127 placement.c placement.h \
129 common/draw.c common/draw.h \
132 awesome.c awesome.h \
136 statusbar.c statusbar.h \
143 awesome_SOURCES += $(LAYOUTS)
144 awesome_SOURCES += $(WIDGETS)
145 awesome_LDADD = $(X_LIBS) $(pangocairo_LIBS) $(confuse_LIBS) $(xrandr_LIBS) $(xinerama_LIBS) $(imlib2_LIBS)
147 bin_PROGRAMS += awesome-client
148 awesome_client_SOURCES = \
150 common/socket.c common/socket.h \
151 common/version.c common/version.h \
152 common/util.c common/util.h
154 bin_PROGRAMS += awesome-message
155 awesome_message_SOURCES = \
156 common/swindow.c common/swindow.h \
157 common/draw.c common/draw.h \
158 common/util.h common/util.c \
159 common/version.h common/version.c \
160 common/configopts.h common/configopts.c \
161 common/xscreen.h common/xscreen.c \
164 awesome_message_LDADD = $(X_LIBS) $(pangocairo_LIBS) $(confuse_LIBS) $(xinerama_LIBS) $(imlib2_LIBS)
166 bin_PROGRAMS += awesome-menu
167 awesome_menu_SOURCES = \
168 common/swindow.c common/swindow.h \
169 common/draw.c common/draw.h \
170 common/util.h common/util.c \
171 common/version.h common/version.c \
172 common/configopts.h common/configopts.c \
173 common/xutil.h common/xutil.c \
176 awesome_menu_LDADD = $(X_LIBS) $(pangocairo_LIBS) $(confuse_LIBS) $(xinerama_LIBS) $(imlib2_LIBS)
181 man_MANS += awesome.1
182 man_MANS += awesome-client.1
183 man_MANS += awesome-message.1
184 man_MANS += awesome-menu.1
185 man_MANS += awesomerc.5
190 EXTRA_DIST += awesome.1.txt
191 EXTRA_DIST += awesome-client.1.txt
192 EXTRA_DIST += awesome-message.1.txt
193 EXTRA_DIST += awesome-menu.1.txt
194 EXTRA_DIST += awesomerc.5.txt
196 dist_icons_DATA += icons/awesome16.png
197 dist_icons_DATA += icons/awesome32.png
198 dist_icons_DATA += icons/awesome48.png
199 dist_icons_DATA += icons/awesome64.png
200 dist_iconslayouts_DATA += icons/layouts/dwindle.png
201 dist_iconslayouts_DATA += icons/layouts/dwindlew.png
202 dist_iconslayouts_DATA += icons/layouts/floating.png
203 dist_iconslayouts_DATA += icons/layouts/floatingw.png
204 dist_iconslayouts_DATA += icons/layouts/max.png
205 dist_iconslayouts_DATA += icons/layouts/maxw.png
206 dist_iconslayouts_DATA += icons/layouts/spiral.png
207 dist_iconslayouts_DATA += icons/layouts/spiralw.png
208 dist_iconslayouts_DATA += icons/layouts/tile.png
209 dist_iconslayouts_DATA += icons/layouts/tilebottom.png
210 dist_iconslayouts_DATA += icons/layouts/tilebottomw.png
211 dist_iconslayouts_DATA += icons/layouts/tileleft.png
212 dist_iconslayouts_DATA += icons/layouts/tileleftw.png
213 dist_iconslayouts_DATA += icons/layouts/tiletop.png
214 dist_iconslayouts_DATA += icons/layouts/tiletopw.png
215 dist_iconslayouts_DATA += icons/layouts/tilew.png
218 rm -f awesome*.1 awesome*.1.xml awesome*.5 awesome*.5.xml
220 SUFFIXES += .1.xml .1
221 SUFFIXES += .5.xml .5
229 SUFFIXES += .1.txt .1.xml
230 SUFFIXES += .5.txt .5.xml
233 $(ASCIIDOC) -d manpage -b docbook -o $@ $<
235 $(ASCIIDOC) -d manpage -b docbook -o $@ $<
239 # Check that package version matches git version before creating dist tarballs
240 dist-hook: git-version-check
241 distcheck-hook: git-version-check
243 # Note: We cannot run autogen.sh from here, because we would need some way to
244 # restart the whole dist process from the start and there is none.
245 EXTRA_DIST += build-utils/package-version
247 @git_ver=`$(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
248 if test "x$${git_ver}" = "x$(PACKAGE_VERSION)"; then :; else \
249 echo "ERROR: PACKAGE_VERSION and 'git describe' version do not match:"; \
250 echo " current 'git describe' version: $${git_ver}"; \
251 echo " current PACKAGE_VERSION: $(PACKAGE_VERSION)"; \
252 echo "Update PACKAGE_VERSION by running $(top_srcdir)/autogen.sh."; \
256 # Version stamp files can only exist in tarball source trees.
258 # So there is no need to generate them anywhere else or to clean them
261 echo "$(PACKAGE_VERSION)" > "$(distdir)/version-stamp"
263 EXTRA_DIST += awesome.doxygen.in
265 # Workaround for buggy pre-1.5.3 doxygen.
267 # Some pre-1.5.3 versions of doxygen segfault on reading these lines.
268 # Call make with DOXYGEN_SEGFAULT=-segfault as a workaround.
269 CLEANFILES += awesome.doxygen-segfault
270 awesome.doxygen-segfault: awesome.doxygen
271 $(SED) '/^QT_AUTOBRIEF/d; /^EXTRACT_ANON_NSPACES/d; /^HTML_DYNAMIC_SECTIONS/d' \
272 < awesome.doxygen > awesome.doxygen-segfault
275 doc: doc/html/index.html
277 doc/html/index.html: awesome.doxygen$(DOXYGEN_SEGFAULT) $(awesome_SOURCES) $(awesome_client_SOURCES)
278 $(DOXYGEN) awesome.doxygen$(DOXYGEN_SEGFAULT)
282 # Presuming we are running awesome on this screen, and this is screen 0, ...
283 # ...we replace the running awesome instance by a freshly compiled one.
284 restart-uninstalled: awesome awesome-client
285 screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
286 echo "$${screen}" exec "$${PWD}/awesome" | "$${PWD}/awesome-client"
288 # ...we replace the running awesome instance by the last installed one.
290 screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
291 echo "$${screen}" exec "$(DESTDIR)$(bindir)/awesome" | "$(DESTDIR)$(bindir)/awesome-client"