-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
100 lines (73 loc) · 2.16 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
# Makefile for MMIXware
#
# Be sure that CWEB version 3.0 or greater is installed before proceeding!
# In fact, CWEB 3.61 is recommended for making hardcopy or PDF documentation.
# If you prefer optimization to debugging, change -g to something like -O:
CFLAGS = -g
# Uncomment the second line if you use pdftex to bypass .dvi files:
PDFTEX = dvipdfm
#PDFTEX = pdftex
.SUFFIXES: .dvi .tex .w .ps .pdf .mmo .mmb .mms
.tex.dvi:
tex $*.tex
.dvi.ps:
dvips $* -o $*.ps
.w.c:
if test -r $*.ch; then ctangle $*.w $*.ch; else ctangle $*.w; fi
.w.tex:
if test -r $*.ch; then cweave $*.w $*.ch; else cweave $*.w; fi
.w.o:
make $*.c
make $*.o
.w:
make $*.c
make $*
.w.dvi:
make $*.tex
make $*.dvi
.w.ps:
make $*.dvi
make $*.ps
.w.pdf:
make $*.tex
case "$(PDFTEX)" in \
dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \
pdftex ) pdftex $* ;; \
esac
.mmo.mmb:
mmix -D$*.mmb $*.mmo
.mms.mmo:
mmixal -x -b 250 -l $*.mml $*.mms
WEBFILES = abstime.w boilerplate.w mmix-arith.w mmix-config.w mmix-doc.w \
mmix-io.w mmix-mem.w mmix-pipe.w mmix-sim.w mmixal.w mmmix.w mmotype.w
CHANGEFILES =
TESTFILES = *.mms silly.run silly.out *.mmconfig *.mmix
MISCFILES = Makefile makefile.dos README mmix.mp mmix.1
ALL = $(WEBFILES) $(TESTFILES) $(MISCFILES)
basic: mmixal mmix
doc: mmix-doc.ps mmixal.dvi mmix-sim.dvi
dvips -pp 0-13 mmixal.dvi -o mmixal-intro.ps
dvips -pp 0-8 mmix-sim.dvi -o mmix-sim-intro.ps
all: mmixal mmix mmotype mmmix
clean:
rm -f *~ *.o *.c *.h *.tex *.log *.dvi *.toc *.idx *.scn *.ps core
mmix-pipe.o: mmix-pipe.c abstime
./abstime > abstime.h
$(CC) $(CFLAGS) -c mmix-pipe.c
rm abstime.h
mmix-config.o: mmix-pipe.o
mmmix: mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o mmmix.c
$(CC) $(CFLAGS) mmmix.c \
mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o -o mmmix
mmixal: mmix-arith.o mmixal.c
$(CC) $(CFLAGS) mmixal.c mmix-arith.o -o mmixal
mmix: mmix-arith.o mmix-io.o mmix-sim.c abstime
./abstime > abstime.h
$(CC) $(CFLAGS) mmix-sim.c mmix-arith.o mmix-io.o -o mmix
rm abstime.h
mmotype: mmotype.c
$(CC) $(CFLAGS) mmotype.c -o mmotype
tarfile: $(ALL)
tar cvf /tmp/mmix.tar $(ALL)
gzip -9 /tmp/mmix.tar