
CC = gcc
#CFLAGS = -g -DDEBUG
CFLAGS = -O -Wall

PAGER = less

otp:	otp.o md5.o random.o
	$(CC) $(CFLAGS) otp.o md5.o random.o -o otp

manpage:
	nroff -man otp.1 | $(PAGER)

printman:
	groff -man otp.1 | lp

otp.man: otp.1
	nroff -man otp.1 | col -b >otp.man

tar:	clean
	tar cfv /tmp/otp.tar . 
	rm -f /tmp/otp.tar.gz
	gzip /tmp/otp.tar

check:	otp
	chmod u+x test.bat
	./test.sh
	diff test.mas test.out

clean:
	rm -f *.bak *.o otp test.out *.shar core core.* \
	      *.obj *.pdb *.sbr *.bsc *.vcw *.bin t?*.md5
