bday

annotate Makefile @ 16:79d22407a6be

a lot of refactoring
author markus schnalke <meillo@marmaro.de>
date Mon, 24 Feb 2014 21:11:38 +0100
parents dc220ec8248d
children
rev   line source
meillo@3 1 # bday by meillo@marmaro.de
meillo@0 2
meillo@0 3
meillo@16 4 VERSION = 0.2
meillo@3 5
meillo@16 6 DOCS=COPYRIGHT COPYING ChangeLog
meillo@3 7
meillo@3 8 # paths
meillo@16 9 PREFIX = /usr/local
meillo@3 10 BINDIR = ${PREFIX}/bin
meillo@3 11 MANDIR = ${PREFIX}/share/man
meillo@3 12
meillo@5 13 CFLAGS=-O2 -Wall
meillo@0 14
meillo@5 15 all: build
meillo@16 16 build: bday
meillo@0 17
meillo@16 18 bday: bday.o
meillo@16 19 $(CC) $(LDFLAGS) bday.o -o $@
meillo@5 20
meillo@3 21 dist: build changelog
meillo@16 22 @mkdir -p bday-${VERSION}
meillo@16 23 @cp bday bday.c bday.1 Makefile ${DOCS} bday-${VERSION}
meillo@16 24 @tar -czhf bday-${VERSION}.tar.gz bday-${VERSION}
meillo@16 25 @rm -rf bday-${VERSION}
meillo@3 26
meillo@3 27 changelog:
meillo@3 28 @echo generating changelog from mercurial log
meillo@3 29 @hg log -v --style changelog > ChangeLog
meillo@3 30
meillo@3 31 install:
meillo@16 32 @echo installing executable file to ${BINDIR}
meillo@16 33 @mkdir -p ${BINDIR}
meillo@16 34 @cp bday ${BINDIR}
meillo@16 35 @chmod 755 ${BINDIR}/bday
meillo@16 36 @echo installing manual page to ${MANDIR}/man1
meillo@16 37 @mkdir -p ${MANDIR}/man1
meillo@16 38 @sed 's/VERSION/${VERSION}/g' <bday.1 >${MANDIR}/man1/bday.1
meillo@16 39 @chmod 644 ${MANDIR}/man1/bday.1
meillo@3 40
meillo@3 41 uninstall:
meillo@16 42 @echo removing executable file from ${BINDIR}
meillo@16 43 @rm -f ${BINDIR}/bday
meillo@16 44 @echo removing manual page from ${MANDIR}/man1
meillo@16 45 @rm -f ${MANDIR}/man1/bday.1
meillo@0 46
meillo@0 47
meillo@0 48 clean:
meillo@0 49 rm -f *.o
meillo@0 50 realclean: clean
meillo@16 51 rm -f bday
meillo@3 52 distclean: realclean
meillo@16 53 @rm -f bday-*.tar.gz ChangeLog