2 f9880dd5 2022-10-20 op DISTNAME= plass-${VERSION}
3 f9880dd5 2022-10-20 op PROGS= plass totp
4 f9880dd5 2022-10-20 op MANS= plass.1 totp.1
5 f9880dd5 2022-10-20 op EXTRA= README.md Makefile totp.c
7 f9880dd5 2022-10-20 op CFLAGS= -Wall -Wextra
8 f9880dd5 2022-10-20 op LDFLAGS= -lcrypto
10 70db4263 2022-06-29 op INSTALL= install
11 1f0d29ac 2022-10-01 op INSTALL_DATA= ${INSTALL} -m 0644
12 70db4263 2022-06-29 op INSTALL_MAN= ${INSTALL} -m 0444
13 70db4263 2022-06-29 op INSTALL_PROGRAM=${INSTALL} -m 0555
15 70db4263 2022-06-29 op PREFIX= /usr/local
16 fef65d3c 2022-10-01 op BINDIR= ${PREFIX}/bin
17 70db4263 2022-06-29 op MANDIR= ${PREFIX}/man
19 24534853 2022-10-20 op .PHONY: all clean dist install-local install lint mans
24 f9880dd5 2022-10-20 op rm -f *.o totp
27 f9880dd5 2022-10-20 op ${CC} -o $@ totp.o ${LDFLAGS}
29 f9880dd5 2022-10-20 op install-local: ${PROGS}
30 f9880dd5 2022-10-20 op ${INSTALL_PROGRAM} ${PROGS} ${HOME}/bin
32 f9880dd5 2022-10-20 op install: ${PROGS}
33 fef65d3c 2022-10-01 op mkdir -p ${DESTDIR}${BINDIR}
34 fef65d3c 2022-10-01 op mkdir -p ${DESTDIR}${MANDIR}/man1
35 f9880dd5 2022-10-20 op ${INSTALL_PROGRAM} ${PROGS} ${DESTDIR}${BINDIR}
36 f9880dd5 2022-10-20 op ${INSTALL_MAN} ${MANS} ${DESTDIR}${MANDIR}/man1/
39 f9880dd5 2022-10-20 op man -Tlint -l ${MANS}
41 4aaaa57b 2022-10-01 op plass.1.html: plass.1
42 4aaaa57b 2022-10-01 op man -Thtml -Ostyle=mandoc.css -l plass.1 > $@
44 24534853 2022-10-20 op totp.1.html: totp.1
45 24534853 2022-10-20 op man -Thtml -Ostyle=mandoc.css -l totp.1 > $@
47 24534853 2022-10-20 op mans: plass.1.html totp.1.html
49 1f0d29ac 2022-10-01 op dist: ${DISTNAME}.sha256
51 1f0d29ac 2022-10-01 op ${DISTNAME}.sha256: ${DISTNAME}.tar.gz
52 1f0d29ac 2022-10-01 op sha256 ${DISTNAME}.tar.gz > $@
54 f9880dd5 2022-10-20 op ${DISTNAME}.tar.gz: ${PROGS} ${MANS} ${EXTRA}
55 1f0d29ac 2022-10-01 op mkdir -p .dist/${DISTNAME}
56 f9880dd5 2022-10-20 op ${INSTALL_DATA} ${MANS} ${EXTRA} .dist/${DISTNAME}
57 f9880dd5 2022-10-20 op ${INSTALL_PROGRAM} plass .dist/${DISTNAME}
58 1f0d29ac 2022-10-01 op cd .dist && tar zcf ../$@ ${DISTNAME}