diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
| commit | 3568412f8f230774d0d11d7ed1c897424f95d3ef (patch) | |
| tree | 77223792d8c925a9b1fc32b3f4341e943b5f8209 /Makefile | |
| parent | 67e1b5e6e6a2c917a2fe58a37a1382c982b1e5c5 (diff) | |
| download | nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.tar.gz nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.zip | |
Rewritten from scratch. Welocme nissy 2.0!
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 54 |
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 | |||
| 3 | VERSION = 2.0beta1 | ||
| 4 | |||
| 5 | PREFIX = /usr/local | ||
| 6 | MANPREFIX = ${PREFIX}/share/man | ||
| 7 | |||
| 8 | CPPFLAGS = -DVERSION=\"${VERSION}\" | ||
| 9 | CFLAGS = -pedantic -Wall -Wextra -Wno-unused-parameter -O3 ${CPPFLAGS} | ||
| 10 | DBGFLAGS = -pedantic -Wall -Wextra -Wno-unused-parameter -g ${CPPFLAGS} | ||
| 11 | |||
| 12 | CC = cc | ||
| 13 | |||
| 14 | |||
| 15 | all: options nissy | ||
| 16 | |||
| 17 | options: | ||
| 18 | @echo nissy build options: | ||
| 19 | @echo "CFLAGS = ${CFLAGS}" | ||
| 20 | @echo "CC = ${CC}" | ||
| 21 | |||
| 22 | nissy: | ||
| 23 | ${CC} ${CFLAGS} -o nissy.o src/*.c | ||
| 24 | |||
| 25 | debug: | ||
| 26 | ${CC} ${DBGFLAGS} -o nissy.o src/*.c | ||
| 27 | |||
| 28 | clean: | ||
| 29 | rm -rf nissy.o nissy-${VERSION}.tar.gz | ||
| 30 | |||
| 31 | dist: 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 | |||
| 40 | install: 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 | |||
| 49 | uninstall: | ||
| 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 | |||
