Command-line interface for HOTP and TOTP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
988 B

# 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}