Mercurial > 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 |
---|---|
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
1 # bday by meillo@marmaro.de |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
2 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
3 |
16 | 4 VERSION = 0.2 |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
5 |
16 | 6 DOCS=COPYRIGHT COPYING ChangeLog |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
7 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
8 # paths |
16 | 9 PREFIX = /usr/local |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
10 BINDIR = ${PREFIX}/bin |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
11 MANDIR = ${PREFIX}/share/man |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
12 |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
13 CFLAGS=-O2 -Wall |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
14 |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
15 all: build |
16 | 16 build: bday |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
17 |
16 | 18 bday: bday.o |
19 $(CC) $(LDFLAGS) bday.o -o $@ | |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
20 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
21 dist: build changelog |
16 | 22 @mkdir -p bday-${VERSION} |
23 @cp bday bday.c bday.1 Makefile ${DOCS} bday-${VERSION} | |
24 @tar -czhf bday-${VERSION}.tar.gz bday-${VERSION} | |
25 @rm -rf bday-${VERSION} | |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
26 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
27 changelog: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
28 @echo generating changelog from mercurial log |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
29 @hg log -v --style changelog > ChangeLog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
30 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
31 install: |
16 | 32 @echo installing executable file to ${BINDIR} |
33 @mkdir -p ${BINDIR} | |
34 @cp bday ${BINDIR} | |
35 @chmod 755 ${BINDIR}/bday | |
36 @echo installing manual page to ${MANDIR}/man1 | |
37 @mkdir -p ${MANDIR}/man1 | |
38 @sed 's/VERSION/${VERSION}/g' <bday.1 >${MANDIR}/man1/bday.1 | |
39 @chmod 644 ${MANDIR}/man1/bday.1 | |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
40 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
41 uninstall: |
16 | 42 @echo removing executable file from ${BINDIR} |
43 @rm -f ${BINDIR}/bday | |
44 @echo removing manual page from ${MANDIR}/man1 | |
45 @rm -f ${MANDIR}/man1/bday.1 | |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
46 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
47 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
48 clean: |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
49 rm -f *.o |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
50 realclean: clean |
16 | 51 rm -f bday |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
52 distclean: realclean |
16 | 53 @rm -f bday-*.tar.gz ChangeLog |