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