bday
diff makefile @ 22:44e4ee39c478
lowercase Makefile for easier typing
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Mon, 24 Feb 2014 21:39:31 +0100 |
parents | Makefile@79d22407a6be |
children | 4abebbc5eb7e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/makefile Mon Feb 24 21:39:31 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +# bday by meillo@marmaro.de 1.5 + 1.6 + 1.7 +VERSION = 0.2 1.8 + 1.9 +DOCS=COPYRIGHT COPYING ChangeLog 1.10 + 1.11 +# paths 1.12 +PREFIX = /usr/local 1.13 +BINDIR = ${PREFIX}/bin 1.14 +MANDIR = ${PREFIX}/share/man 1.15 + 1.16 +CFLAGS=-O2 -Wall 1.17 + 1.18 +all: build 1.19 +build: bday 1.20 + 1.21 +bday: bday.o 1.22 + $(CC) $(LDFLAGS) bday.o -o $@ 1.23 + 1.24 +dist: build changelog 1.25 + @mkdir -p bday-${VERSION} 1.26 + @cp bday bday.c bday.1 Makefile ${DOCS} bday-${VERSION} 1.27 + @tar -czhf bday-${VERSION}.tar.gz bday-${VERSION} 1.28 + @rm -rf bday-${VERSION} 1.29 + 1.30 +changelog: 1.31 + @echo generating changelog from mercurial log 1.32 + @hg log -v --style changelog > ChangeLog 1.33 + 1.34 +install: 1.35 + @echo installing executable file to ${BINDIR} 1.36 + @mkdir -p ${BINDIR} 1.37 + @cp bday ${BINDIR} 1.38 + @chmod 755 ${BINDIR}/bday 1.39 + @echo installing manual page to ${MANDIR}/man1 1.40 + @mkdir -p ${MANDIR}/man1 1.41 + @sed 's/VERSION/${VERSION}/g' <bday.1 >${MANDIR}/man1/bday.1 1.42 + @chmod 644 ${MANDIR}/man1/bday.1 1.43 + 1.44 +uninstall: 1.45 + @echo removing executable file from ${BINDIR} 1.46 + @rm -f ${BINDIR}/bday 1.47 + @echo removing manual page from ${MANDIR}/man1 1.48 + @rm -f ${MANDIR}/man1/bday.1 1.49 + 1.50 + 1.51 +clean: 1.52 + rm -f *.o 1.53 +realclean: clean 1.54 + rm -f bday 1.55 +distclean: realclean 1.56 + @rm -f bday-*.tar.gz ChangeLog