bday

annotate makefile @ 23:4abebbc5eb7e

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