-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile_68000
162 lines (113 loc) · 4.59 KB
/
Makefile_68000
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.SUFFIXES: .o .c .h .run
# to make for another target CPU, redefine PROC to the name of the target
# processor, e.g., 68000
PROC =68000
OBJECTS = y.tab.o actions.o buildStuff1.o buildStuff2.o\
buildStuff3.o builtInFunctions.o builtInFunsSD.o debugPrint.o debugPrintSD.o\
emitBranch.o emitStuff.o errorStuff.o expressionSemantics.o fixups.o\
garbage.o initialize.o lexer.o listing.o lookups.o macrossTables.o main.o\
malloc.o object.o operandStuffSD.o parserMisc.o semanticMisc.o\
statementSemantics.o structSemantics.o tokenStrings.o
SOURCES = macross_$(PROC).y actions_$(PROC).c buildStuff1.c buildStuff2.c\
buildStuff3.c builtInFunctions.c builtInFunsSD_$(PROC).c debugPrint.c\
debugPrintSD_$(PROC).c emitBranch_$(PROC).c emitStuff.c errorStuff.c\
expressionSemantics.c fixups.c garbage.c initialize.c lexer.c listing.c\
lookups.c macrossTables_$(PROC).c main.c malloc.c object.c\
operandStuffSD_$(PROC).c parserMisc.c semanticMisc.c statementSemantics.c\
structSemantics.c tokenStrings_$(PROC).c lexerTables.h macrossGlobals.h\
macrossTypes.h operandDefs_$(PROC).h operandBody_$(PROC).h\
conditionDefs_$(PROC).h driver.c
HEADERS = macrossTypes.h macrossGlobals.h
.c.o:
cc -c -g -DTARGET_CPU=CPU_$(PROC) $*.c
.c.run:
cc -o $* $*.c
macross: $(OBJECTS)
cc -g -o macross $(OBJECTS)
driver: driver.c
cc -o driver driver.c
update: .mark
kessel "(cd /u0/chip/macross; make macross >&errorfyle)" &
install: macross
cp macross /u1/gg/bin/macross_tmp
strip /u1/gg/bin/macross_tmp
mv /u1/gg/bin/macross_$(PROC) /u1/gg/bin/macross_$(PROC).old
mv /u1/gg/bin/macross_tmp /u1/gg/bin/macross_$(PROC)
cp /u1/gg/bin/macross_$(PROC) /net/mycroft/u1/gg/bin
cp /u1/gg/bin/macross_$(PROC) /net/shem/u1/gg/bin
cp /u1/gg/bin/macross_$(PROC) /net/weyr/u1/gg/bin
dinstall: driver
cp driver /u1/gg/bin/driver_tmp
strip /u1/gg/bin/driver_tmp
mv /u1/gg/bin/driver_tmp /u1/gg/bin/driver/macross
cp /u1/gg/bin/driver /net/mycroft/u1/gg/bin/macross
cp /u1/gg/bin/driver /net/shem/u1/gg/bin/macross
cp /u1/gg/bin/driver /net/weyr/u1/gg/bin/macross
change:
rm *.o
rm *.tab.*
cp Makefile_6502 Makefile
move: .mark
.mark: $(SOURCES)
cp $? /net/kessel/u0/chip/macross
cp $? /net/kessel/u0/chip/macross/prof
cp $? opt
date >.mark
date >/net/kessel/u0/chip/macross/.mark
date >/net/kessel/u0/chip/macross/prof/.mark
date >opt/.mark
macrossTypes.h: macrossTypes.h operandDefs_$(PROC).h operandBody_$(PROC).h\
conditionDefs_$(PROC).h
actions.o: actions_$(PROC).c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) actions_$(PROC).c
mv actions_$(PROC).o actions.o
buildStuff1.o: buildStuff1.c $(HEADERS)
buildStuff2.o: buildStuff2.c $(HEADERS)
buildStuff3.o: buildStuff3.c $(HEADERS)
builtInFunctions.o: builtInFunctions.c $(HEADERS)
builtInFunsSD.o: builtInFunsSD_$(PROC).c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) builtInFunsSD_$(PROC).c
mv builtInFunsSD_$(PROC).o builtInFunsSD.o
debugPrint.o: debugPrint.c y.tab.h $(HEADERS)
debugPrintSD.o: debugPrintSD_$(PROC).c y.tab.h $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) debugPrintSD_$(PROC).c
mv debugPrintSD_$(PROC).o debugPrintSD.o
emitBranch.o: emitBranch_$(PROC).c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) emitBranch_$(PROC).c
mv emitBranch_$(PROC).o emitBranch.o
emitStuff.o: emitStuff.c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) emitStuff.c
errorStuff.o: errorStuff.c $(HEADERS)
expressionSemantics.o: expressionSemantics.c y.tab.h $(HEADERS)
fixups.o: fixups.c $(HEADERS)
garbage.o: garbage.c y.tab.h $(HEADERS)
initialize.o: initialize.c $(HEADERS)
lexer.o: lexer.c lexerTables.h y.tab.h $(HEADERS)
listing.o: listing.c $(HEADERS)
lookups.o: lookups.c $(HEADERS)
macrossTables.o: macrossTables_$(PROC).c y.tab.h macrossTypes.h
cc -c -g -DTARGET_CPU=CPU_$(PROC) macrossTables_$(PROC).c
mv macrossTables_$(PROC).o macrossTables.o
malloc.o: malloc.c
main.o: main.c $(HEADERS)
object.o: object.c $(HEADERS)
operandStuffSD.o: operandStuffSD_$(PROC).c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) operandStuffSD_$(PROC).c
mv operandStuffSD_$(PROC).o operandStuffSD.o
parserMisc.o: parserMisc.c y.tab.h $(HEADERS)
semanticMisc.o: semanticMisc.c $(HEADERS)
statementSemantics.o: statementSemantics.c $(HEADERS)
structSemantics.o: structSemantics.c $(HEADERS)
tokenStrings.o: tokenStrings_$(PROC).c $(HEADERS)
cc -c -g -DTARGET_CPU=CPU_$(PROC) tokenStrings_$(PROC).c
mv tokenStrings_$(PROC).o tokenStrings.o
y.tab.o: y.tab.c $(HEADERS)
cc -c -g -DYYDEBUG -DTARGET_CPU=CPU_$(PROC) y.tab.c
y.tab.c y.tab.h: macross_$(PROC).y
yacc -d macross_$(PROC).y
y.output: macross_$(PROC).y
yacc -vd macross_$(PROC).y
cleanup:
/bin/rm -f *.o y.output y.tab.c y.tab.h macross
love:
@echo "Not war?"