8 iconslayoutsdir = $(pkgdatadir)/icons/layouts
9 dist_iconslayouts_DATA =
13 LAYOUTS += layouts/tile.c
14 LAYOUTS += layouts/tile.h
16 LAYOUTS += layouts/floating.c
17 LAYOUTS += layouts/floating.h
19 LAYOUTS += layouts/max.c
20 LAYOUTS += layouts/max.h
22 LAYOUTS += layouts/fibonacci.c
23 LAYOUTS += layouts/fibonacci.h
27 WIDGETS += widgets/taglist.c
28 WIDGETS += widgets/layoutinfo.c
29 WIDGETS += widgets/textbox.c
30 WIDGETS += widgets/iconbox.c
31 WIDGETS += widgets/focusicon.c
32 WIDGETS += widgets/progressbar.c
33 WIDGETS += widgets/tasklist.c
34 WIDGETS += widgets/graph.c
49 EXTRA_DIST += awesomerc.in
50 CLEANFILES += awesomerc
51 BUILT_SOURCES += awesomerc
53 awesomerc: $(srcdir)/awesomerc.in
54 $(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|" \
55 < $(srcdir)/awesomerc.in > awesomerc
58 CLEANFILES += defconfig.h
59 BUILT_SOURCES += defconfig.h
60 defconfig.h: awesomerc
61 @echo "generating defconfig.h from awesomerc"
62 @echo "static const char *AWESOME_DEFAULT_CONFIG = " > defconfig.h
63 @echo -n "\"" >> defconfig.h
64 @$(SED) 's,\\,\\\\,g;s/$$/\\n\\/;s/"/\\"/g' "awesomerc" >> defconfig.h
65 @echo "\";" >> defconfig.h
67 CLEANFILES += uicbgen.h
68 BUILT_SOURCES += uicbgen.h
69 EXTRA_DIST += build-utils/uicbgen.sh
70 uicbgen.h: $(awesome_SOURCES)
71 @echo "generating uicbgen.h from headers file"
72 $(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h
74 CLEANFILES += layoutgen.h
75 BUILT_SOURCES += layoutgen.h
76 EXTRA_DIST += build-utils/layoutgen.sh
77 layoutgen.h: $(awesome_SOURCES)
78 @echo "generating layoutgen.h from layouts headers file"
79 $(top_srcdir)/build-utils/layoutgen.sh "$(top_srcdir)" > layoutgen.h
81 CLEANFILES += widgetgen.h
82 BUILT_SOURCES += widgetgen.h
83 EXTRA_DIST += build-utils/widgetgen.sh
85 @echo "generating widgetgen.h from widget.h"
86 $(top_srcdir)/build-utils/widgetgen.sh "$(top_srcdir)" > widgetgen.h
88 A_V = awesome-version-internal
89 CLEANFILES += $(A_V).h
90 BUILT_SOURCES += $(A_V).h.stamp
92 @current_ver=`$(SHELL) $(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
93 { echo '#ifndef AWESOME_VERSION_INTERNAL'; \
94 echo "#define AWESOME_VERSION_INTERNAL \"$${current_ver}\""; \
95 echo "#endif"; } > "$(A_V).h.new"
96 @if test -f "$(A_V).h" \
97 && cmp "$(A_V).h.new" "$(A_V).h"; then :; \
98 else cat "$(A_V).h.new" > "$(A_V).h"; fi; \
102 # If you are using gcc, and want to deactivate this default set of
103 # compile flags, run make with AWESOME_CFLAGS="".
104 AWESOME_CFLAGS = -std=gnu99 -pipe \
106 -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
107 -Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
108 -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn
110 AM_CPPFLAGS = $(XFT_CFLAGS) $(X_CFLAGS) $(CAIRO_CFLAGS) $(CONFUSE_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(AWESOME_CFLAGS)
112 bin_PROGRAMS += awesome
115 placement.c placement.h \
116 common/version.c common/version.h \
118 common/draw.c common/draw.h \
121 awesome.c awesome.h \
123 common/util.c common/util.h \
124 common/xutil.c common/xutil.h \
127 statusbar.c statusbar.h \
132 common/socket.c common/socket.h \
133 common/swindow.c common/swindow.h \
136 common/list.h structs.h \
137 common/configopts.h common/configopts.c
138 awesome_SOURCES += $(LAYOUTS)
139 awesome_SOURCES += $(WIDGETS)
140 awesome_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) $(XRANDR_LIBS) $(XINERAMA_LIBS)
142 bin_PROGRAMS += awesome-client
143 awesome_client_SOURCES = \
145 common/socket.c common/socket.h \
146 common/version.c common/version.h \
147 common/util.c common/util.h
149 bin_PROGRAMS += awesome-message
150 awesome_message_SOURCES = \
151 common/swindow.c common/swindow.h \
152 common/draw.c common/draw.h \
153 common/util.h common/util.c \
154 common/version.h common/version.c \
155 common/configopts.h common/configopts.c \
158 awesome_message_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS)
160 bin_PROGRAMS += awesome-menu
161 awesome_menu_SOURCES = \
162 common/swindow.c common/swindow.h \
163 common/draw.c common/draw.h \
164 common/util.h common/util.c \
165 common/version.h common/version.c \
166 common/configopts.h common/configopts.c \
167 common/xutil.h common/xutil.c \
170 awesome_menu_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS)
175 man_MANS += awesome.1
176 man_MANS += awesome-client.1
177 man_MANS += awesome-message.1
178 man_MANS += awesomerc.5
183 EXTRA_DIST += awesome.1.txt
184 EXTRA_DIST += awesome-client.1.txt
185 EXTRA_DIST += awesome-message.1.txt
186 EXTRA_DIST += awesomerc.5.txt
188 dist_iconslayouts_DATA += icons/layouts/dwindle.png
189 dist_iconslayouts_DATA += icons/layouts/dwindlew.png
190 dist_iconslayouts_DATA += icons/layouts/floating.png
191 dist_iconslayouts_DATA += icons/layouts/floatingw.png
192 dist_iconslayouts_DATA += icons/layouts/max.png
193 dist_iconslayouts_DATA += icons/layouts/maxw.png
194 dist_iconslayouts_DATA += icons/layouts/spiral.png
195 dist_iconslayouts_DATA += icons/layouts/spiralw.png
196 dist_iconslayouts_DATA += icons/layouts/tile.png
197 dist_iconslayouts_DATA += icons/layouts/tilebottom.png
198 dist_iconslayouts_DATA += icons/layouts/tilebottomw.png
199 dist_iconslayouts_DATA += icons/layouts/tileleft.png
200 dist_iconslayouts_DATA += icons/layouts/tileleftw.png
201 dist_iconslayouts_DATA += icons/layouts/tiletop.png
202 dist_iconslayouts_DATA += icons/layouts/tiletopw.png
203 dist_iconslayouts_DATA += icons/layouts/tilew.png
206 rm -f awesome*.1 awesome*.1.xml awesome*.5 awesome*.5.xml
208 SUFFIXES += .1.xml .1
209 SUFFIXES += .5.xml .5
217 SUFFIXES += .1.txt .1.xml
218 SUFFIXES += .5.txt .5.xml
221 $(ASCIIDOC) -d manpage -b docbook -o $@ $<
223 $(ASCIIDOC) -d manpage -b docbook -o $@ $<
227 # Check that package version matches git version before creating dist tarballs
228 dist-hook: git-version-check
229 distcheck-hook: git-version-check
231 # Note: We cannot run autogen.sh from here, because we would need some way to
232 # restart the whole dist process from the start and there is none.
233 EXTRA_DIST += build-utils/package-version
235 @git_ver=`$(top_srcdir)/build-utils/package-version $(top_srcdir) version-stamp`; \
236 if test "x$${git_ver}" = "x$(PACKAGE_VERSION)"; then :; else \
237 echo "ERROR: PACKAGE_VERSION and 'git describe' version do not match:"; \
238 echo " current 'git describe' version: $${git_ver}"; \
239 echo " current PACKAGE_VERSION: $(PACKAGE_VERSION)"; \
240 echo "Update PACKAGE_VERSION by running $(top_srcdir)/autogen.sh."; \
244 # Version stamp files can only exist in tarball source trees.
246 # So there is no need to generate them anywhere else or to clean them
249 echo "$(PACKAGE_VERSION)" > "$(distdir)/version-stamp"
251 EXTRA_DIST += awesome.doxygen.in
253 # Workaround for buggy pre-1.5.3 doxygen.
255 # Some pre-1.5.3 versions of doxygen segfault on reading these lines.
256 # Call make with DOXYGEN_SEGFAULT=-segfault as a workaround.
257 CLEANFILES += awesome.doxygen-segfault
258 awesome.doxygen-segfault: awesome.doxygen
259 $(SED) '/^QT_AUTOBRIEF/d; /^EXTRACT_ANON_NSPACES/d; /^HTML_DYNAMIC_SECTIONS/d' \
260 < awesome.doxygen > awesome.doxygen-segfault
263 doc: doc/html/index.html
265 doc/html/index.html: awesome.doxygen$(DOXYGEN_SEGFAULT) $(awesome_SOURCES) $(awesome_client_SOURCES)
266 $(DOXYGEN) awesome.doxygen$(DOXYGEN_SEGFAULT)
270 # Presuming we are running awesome on this screen, and this is screen 0, ...
271 # ...we replace the running awesome instance by a freshly compiled one.
272 restart-uninstalled: awesome awesome-client
273 screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
274 echo "$${screen}" exec "$${PWD}/awesome" | "$${PWD}/awesome-client"
276 # ...we replace the running awesome instance by the last installed one.
278 screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
279 echo "$${screen}" exec "$(DESTDIR)$(bindir)/awesome" | "$(DESTDIR)$(bindir)/awesome-client"