aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 21:37:34 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 21:37:34 +0100
commit3568412f8f230774d0d11d7ed1c897424f95d3ef (patch)
tree77223792d8c925a9b1fc32b3f4341e943b5f8209 /Makefile
parent67e1b5e6e6a2c917a2fe58a37a1382c982b1e5c5 (diff)
downloadnissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.tar.gz
nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.zip
Rewritten from scratch. Welocme nissy 2.0!
Diffstat (limited to '')
-rw-r--r--Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dcaf16f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,54 @@
1# See LICENSE file for copyright and license details.
2
3VERSION = 2.0beta1
4
5PREFIX = /usr/local
6MANPREFIX = ${PREFIX}/share/man
7
8CPPFLAGS = -DVERSION=\"${VERSION}\"
9CFLAGS = -pedantic -Wall -Wextra -Wno-unused-parameter -O3 ${CPPFLAGS}
10DBGFLAGS = -pedantic -Wall -Wextra -Wno-unused-parameter -g ${CPPFLAGS}
11
12CC = cc
13
14
15all: options nissy
16
17options:
18 @echo nissy build options:
19 @echo "CFLAGS = ${CFLAGS}"
20 @echo "CC = ${CC}"
21
22nissy:
23 ${CC} ${CFLAGS} -o nissy.o src/*.c
24
25debug:
26 ${CC} ${DBGFLAGS} -o nissy.o src/*.c
27
28clean:
29 rm -rf nissy.o nissy-${VERSION}.tar.gz
30
31dist: clean
32 mkdir -p nissy-${VERSION}
33 cp -R LICENSE Makefile INSTALL doc src nissy-${VERSION}
34 groff -Tpdf -mandoc doc/nissy.1 > nissy-${VERSION}/doc/nissy.pdf
35 groff -Thtml -mandoc doc/nissy.1 > nissy-${VERSION}/doc/nissy.html
36 tar -cf nissy-${VERSION}.tar nissy-${VERSION}
37 gzip nissy-${VERSION}.tar
38 rm -rf nissy-${VERSION}
39
40install: nissy
41 mkdir -p ${DESTDIR}${PREFIX}/bin
42 cp -f nissy.o ${DESTDIR}${PREFIX}/bin/nissy
43 chmod 755 ${DESTDIR}${PREFIX}/bin/nissy
44 mkdir -p ${DESTDIR}${MANPREFIX}/man1
45 sed "s/VERSION/${VERSION}/g" < doc/nissy.1 \
46 > ${DESTDIR}${MANPREFIX}/man1/nissy.1
47 chmod 644 ${DESTDIR}${MANPREFIX}/man1/nissy.1
48
49uninstall:
50 rm -rf ${DESTDIR}${PREFIX}/bin/nissy ${DESTDIR}${MANPREFIX}/man1/nissy.1
51 for s in ${SCRIPTS}; do rm -rf ${DESTDIR}${PREFIX}/bin/$$s; done
52
53.PHONY: all options nissy debug clean dist install uninstall
54

Generated with cgit - Back to sebastiano.tronto.net