Lucas
2fe090286d
Split along multiple files, produce TAP output, rely on Perl's prove for running them. Improves clarity and hopefully makes it easier to add new tests in the future.
50 lines
990 B
Makefile
50 lines
990 B
Makefile
# otpcli - command-line interface for HOTP and TOTP
|
|
#
|
|
# Written in 2020-2021 by Lucas
|
|
#
|
|
# To the extent possible under law, the author(s) have dedicated all
|
|
# copyright and related and neighboring rights to this software to the
|
|
# public domain worldwide. This software is distributed without any
|
|
# warranty.
|
|
#
|
|
# You should have received a copy of the CC0 Public Domain Dedication
|
|
# along with this software. If not, see
|
|
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
.POSIX:
|
|
.SUFFIXES:
|
|
.SUFFIXES: .c .o
|
|
|
|
P = otpcli
|
|
V = 0.0
|
|
|
|
HDR = base32.h err.h strtonum.h otp.h
|
|
OBJ = cli.o ${HDR:.h=.o}
|
|
SRC = ${OBJ:.o=.c}
|
|
|
|
LIBS = -lcrypto
|
|
|
|
DIST = COPYING Makefile ${HDR} ${SRC}
|
|
|
|
all: otpcli
|
|
|
|
clean:
|
|
rm -f otpcli ${OBJ} ${P}-${V}.tgz
|
|
|
|
test: all
|
|
prove
|
|
|
|
dist: clean
|
|
pax -w -s ',^,$P-$V/,' ${DIST} | gzip >$P-$V.tgz
|
|
|
|
install: all
|
|
mkdir -p ${PREFIX}/bin
|
|
cp -f ${BIN} ${PREFIX}/bin
|
|
|
|
uninstall:
|
|
cd ${PREFIX}/bin && rm -f ${BIN}
|
|
|
|
${OBJ}: ${HDR}
|
|
|
|
otpcli: ${OBJ}
|
|
${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
|