bday
view Makefile @ 4:5326c222cd4e
removed MESSAGE; code beautifing
workaround for MESSAGE: use an event with warn 0 (message=yyyy-mm-dd w 0)
author | meillo@marmaro.de |
---|---|
date | Mon, 17 Dec 2007 12:14:41 +0100 |
parents | 8534f0e3a0db |
children | 5af6bf2cb271 |
line source
1 # bday by meillo@marmaro.de
4 NAME=bday
5 VERSION = 0.1
6 NV=${NAME}-${VERSION}
8 DOCS=COPYRIGHT ChangeLog TODO
10 # paths
11 PREFIX = /usr
12 BINDIR = ${PREFIX}/bin
13 MANDIR = ${PREFIX}/share/man
15 SRC=birthday.c bdengine.c
16 OBJ=$(SRC:.c=.o)
18 CFLAGS=-O2 -Wall -Wstrict-prototypes
20 all:
21 @echo usage: make [un]install
23 build: ${NAME}
25 ${NAME}: $(OBJ)
26 $(CC) $(LDFLAGS) $(OBJ) -o $@
28 dist: build changelog
29 @mkdir -p ${NV}
30 @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV}
31 @tar -czhof ${NV}.tar.gz ${NV}
32 @rm -rf ${NV}
34 deb: dist
35 @mkdir -p Packages
36 @cp ${NV}.tar.gz Packages/
37 @( \
38 cd Packages/ ;\
39 tar -xzf ${NV}.tar.gz ;\
40 mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
41 cd ${NV}/ ;\
42 cp -r ../../debian/ . ;\
43 debuild ;\
44 )
46 changelog:
47 @echo generating changelog from mercurial log
48 @hg log -v --style changelog > ChangeLog
50 install:
51 @echo installing executable file to ${DESTDIR}${BINDIR}
52 @mkdir -p ${DESTDIR}${BINDIR}
53 @cp ${NAME} ${DESTDIR}${BINDIR}
54 @chmod 755 ${DESTDIR}${BINDIR}/${NAME}
55 @echo installing manual page to ${DESTDIR}${MANDIR}/man1
56 @mkdir -p ${DESTDIR}${MANDIR}/man1
57 @sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1
58 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1
60 uninstall:
61 @echo removing executable file from ${DESTDIR}${BINDIR}
62 @rm -f ${DESTDIR}${BINDIR}/${NAME}
63 @echo removing manual page from ${DESTDIR}${MANDIR}/man1
64 @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
67 clean:
68 rm -f *.o
70 realclean: clean
71 rm -f ${NAME}
73 distclean: realclean
74 @rm -f ${NAME}-*.tar.gz ChangeLog
76 debclean: distclean
77 @cd Packages/${NV}/ ; debuild clean ;
80 .PHONY: all dist deb changelog clean distclean debclean build install uninstall