set version to devel
[awesome.git] / Makefile
blobae3b0c9c2b607a791c11159509db40ae85a836a8
1 # awesome
2 # © 2007 Julien Danjou <julien@danjou.info>
4 include config.mk
6 SRC = client.c draw.c event.c layout.c awesome.c tag.c util.c config.c screen.c statusbar.c
7 OBJ = ${SRC:.c=.o} ${LAYOUTS:.c=.o}
9 all: options awesome
11 options:
12 @echo awesome build options:
13 @echo "LAYOUTS = ${LAYOUTS}"
14 @echo "CFLAGS = ${CFLAGS}"
15 @echo "LDFLAGS = ${LDFLAGS}"
16 @echo "CC = ${CC}"
18 .c.o:
19 @echo -e \\t\(CC\) $<
20 @${CC} -c ${CFLAGS} $< -o $@
22 ${OBJ}: awesome.h config.mk
24 awesome: ${OBJ}
25 @echo -e \\t\(CC\) ${OBJ} -o $@
26 @${CC} -o $@ ${OBJ} ${LDFLAGS}
28 clean:
29 @echo cleaning
30 @rm -f awesome ${OBJ} awesome-${VERSION}.tar.gz
31 @rm -rf doc
33 dist: clean
34 @echo creating dist tarball
35 @mkdir awesome-${VERSION}
36 @mkdir awesome-${VERSION}/layouts
37 @cp -R LICENSE AUTHORS Makefile README config.mk \
38 awesome.1 ${SRC} ${SRC:.c=.h} awesome-${VERSION}
39 @cp -R ${LAYOUTS} ${LAYOUTS:.c=.h} awesome-${VERSION}/layouts
40 @tar -cf awesome-${VERSION}.tar awesome-${VERSION}
41 @gzip -9 awesome-${VERSION}.tar
42 @rm -rf awesome-${VERSION}
44 install: all
45 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
46 @mkdir -p ${DESTDIR}${PREFIX}/bin
47 @cp -f awesome ${DESTDIR}${PREFIX}/bin
48 @chmod 755 ${DESTDIR}${PREFIX}/bin/awesome
49 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
50 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
51 @sed "s/VERSION/${VERSION}/g" < awesome.1 > ${DESTDIR}${MANPREFIX}/man1/awesome.1
52 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/awesome.1
54 uninstall:
55 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
56 @rm -f ${DESTDIR}${PREFIX}/bin/awesome
57 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
58 @rm -f ${DESTDIR}${MANPREFIX}/man1/awesome.1
60 doc:
61 @echo generating documentation
62 @doxygen awesome.doxygen
64 .PHONY: all options clean dist install uninstall doc