-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
79 lines (56 loc) · 1.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
DBGFLAGS = -g -O0
CFLAGS = $(DBGFLAGS) -W -Wall
LIBS = -lcurses -ltermcap -lm
# Object files for for the workbench.
cbreq = pword.o lpair.o approx.o \
eclass.o cipher.o char-io.o \
tritab.o autotri.o pqueue.o \
webster.o user.o gblock.o dblock.o dbsaux.o banner.o \
cblocks.o stats.o parser.o knit.o \
pgate.o perm.o terminal.o \
keylib.o windowlib.o dline.o screen.o
all: cbw zeecode enigma bd sd approx stats tri
# The main program.
cbw: start.o $(cbreq)
$(CC) $(CFLAGS) start.o $(cbreq) \
-o cbw $(LIBS)
# Program to decrypt files after they have been broken by CBW.
zeecode: zeecode.o
$(CC) $(CFLAGS) zeecode.o -o zeecode
# Program to encrypt files, this is identical to the
# Unix crypt function based on a two rotor enigma.
enigma: enigma.o
$(CC) $(CFLAGS) enigma.o -o enigma
#
# The remaining files are test drivers.
#
bd: bdriver.o $(cbreq)
$(CC) $(CFLAGS) bdriver.o $(cbreq) -lm \
-o bd $(LIBS)
sd: sdriver.o $(cbreq)
$(CC) $(CFLAGS) sdriver.o $(cbreq) \
-o sd $(LIBS)
approx: approx.c
$(CC) $(CFLAGS) -DAPPROX_STANDALONE -o approx approx.c -lm
stats: stats.c char-io.o approx.o
$(CC) $(CFLAGS) -DSTATS_STANDALONE -o stats stats.c char-io.o approx.o -lm
tri: tdriver.o $(cbreq)
$(CC) $(CFLAGS) tdriver.o $(cbreq) -lm \
-o tri $(LIBS)
ectreq = edriver.o eclass.o cipher.o char-io.o \
webster.o user.o gblock.o dblock.o dbsaux.o banner.o \
cblocks.o stats.o parser.o knit.o \
pgate.o perm.o \
keylib.o windowlib.o dline.o screen.o
# trigram.o triglist.o
ect: $(ectreq)
$(CC) $(CFLAGS) $(ectreq) -lm \
-o ect
ptt: char-io.o probtab.o
$(CC) $(CFLAGS) char-io.o probtab.o -lm -o ptt
dt: disptest.o keylib.o windowlib.o screen.o
$(CC) $(CFLAGS) disptest.o keylib.o windowlib.o screen.o -o dt
#triplace: triplace.o
.PHONY: clean
clean:
rm -f cbw start.o $(cbreq) zeecode zeecode.o enigma enigma.o bd bdriver.o sd sdriver.o approx stats tri tdriver.o ect $(ectreq) ptt probtab.o dt disptest.o *~