| •1 |
INSTALL = install |
| 2 |
DESTDIR = |
| 3 |
BINDIR = /usr/bin |
| 4 |
MAN1DIR = /usr/share/man/man1 |
| 5 |
|
| 6 |
CC = gcc |
| 7 |
#CFLAGS = -g -DDEBUG |
| •8 |
CFLAGS += -O -Wall |
| 9 |
|
| 10 |
VERSION = 1.2.2 |
| 11 |
|
| 12 |
PAGER = less |
| 13 |
|
| 14 |
FILES = Makefile Onetime.sln Onetime.vcproj README log.txt md5.c \ |
| 15 |
md5.h otp.1 otp.c otp.exe random.c test.bat test.mas test.sh |
| 16 |
|
| 17 |
otp: otp.o md5.o random.o |
| •18 |
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) otp.o md5.o random.o -o otp |
| 19 |
|
| 20 |
manpage: |
| 21 |
nroff -man otp.1 | $(PAGER) |
| 22 |
|
| 23 |
printman: |
| 24 |
groff -man otp.1 | lp |
| 25 |
|
| 26 |
otp.man: otp.1 |
| 27 |
nroff -man otp.1 | col -b >otp.man |
| 28 |
|
| •29 |
install: otp |
| 30 |
$(INSTALL) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MAN1DIR) |
| 31 |
$(INSTALL) otp $(DESTDIR)$(BINDIR) |
| 32 |
$(INSTALL) otp.1 $(DESTDIR)$(MAN1DIR) |
| 33 |
|
| 34 |
dist: clean |
| 35 |
mkdir otp-$(VERSION) |
| 36 |
cp -p $(FILES) otp-$(VERSION) |
| 37 |
tar cfv otp-$(VERSION).tar otp-$(VERSION) |
| 38 |
rm -f otp-$(VERSION).tar.gz |
| 39 |
gzip otp-$(VERSION).tar |
| 40 |
rm -rf otp-$(VERSION) |
| 41 |
|
| 42 |
check: otp |
| 43 |
chmod u+x test.bat |
| 44 |
./test.sh |
| 45 |
diff test.mas test.out |
| 46 |
|
| 47 |
clean: |
| 48 |
rm -f *.bak *.o otp test.out *.shar core core.* \ |
| 49 |
*.obj *.pdb *.sbr *.bsc *.vcw *.bin t?*.md5 \ |
| 50 |
*.gz *.tar |
| 51 |
rm -rf otp-$(VERSION) |
| •52 |
$(RM) test |
| 53 |
distclean: clean |
| 54 |
$(RM) otp otp.exe |