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