1 # $Id: proto.make,v 1.3 1994/06/24 13:24:02 ceriel Exp $
3 #PARAMS do not remove this line!
5 #MACH_DEFINE do not remove this or the next line!
8 SRC_DIR = $(SRC_HOME)/mach/$(MACH)/cg
9 CDIR=$(SRC_HOME)/mach/proto/cg
10 LIBEM = $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
11 LIBFLT = $(TARGET_HOME)/modules/lib/libflt.$(LIBSUF)
12 CPP = $(UTIL_HOME)/lib.bin/cpp
13 CGG = $(UTIL_HOME)/lib.bin/cgg
15 PREFLAGS=-I$(TARGET_HOME)/h -I$(SRC_HOME)/mach -I$(TARGET_HOME)/modules/h -I$(SRC_DIR) -I. -I$(CDIR) -DNDEBUG
17 CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
18 LDFLAGS=$(PFLAGS) $(LDOPTIONS)
19 LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
20 LIBS=$(LIBEM) $(LIBFLT)
21 CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
22 $(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/main.c $(CDIR)/move.c \
23 $(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c $(CDIR)/salloc.c \
24 $(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
25 OFILES= codegen.$(SUF) compute.$(SUF) equiv.$(SUF) fillem.$(SUF) \
26 gencode.$(SUF) glosym.$(SUF) main.$(SUF) move.$(SUF) nextem.$(SUF) \
27 reg.$(SUF) regvar.$(SUF) salloc.$(SUF) state.$(SUF) subr.$(SUF) \
33 cg: tables.o $(OFILES)
34 $(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
36 tables.$(SUF): tables.c
37 $(CC) -c $(PREFLAGS) tables.c
39 codegen.$(SUF): $(CDIR)/codegen.c
40 $(CC) -c $(CFLAGS) $(CDIR)/codegen.c
41 compute.$(SUF): $(CDIR)/compute.c
42 $(CC) -c $(CFLAGS) $(CDIR)/compute.c
43 equiv.$(SUF): $(CDIR)/equiv.c
44 $(CC) -c $(CFLAGS) $(CDIR)/equiv.c
45 fillem.$(SUF): $(CDIR)/fillem.c
46 $(CC) -c $(CFLAGS) $(CDIR)/fillem.c
47 gencode.$(SUF): $(CDIR)/gencode.c
48 $(CC) -c $(CFLAGS) $(CDIR)/gencode.c
49 glosym.$(SUF): $(CDIR)/glosym.c
50 $(CC) -c $(CFLAGS) $(CDIR)/glosym.c
51 main.$(SUF): $(CDIR)/main.c
52 $(CC) -c $(CFLAGS) $(CDIR)/main.c
53 move.$(SUF): $(CDIR)/move.c
54 $(CC) -c $(CFLAGS) $(CDIR)/move.c
55 nextem.$(SUF): $(CDIR)/nextem.c
56 $(CC) -c $(CFLAGS) $(CDIR)/nextem.c
57 reg.$(SUF): $(CDIR)/reg.c
58 $(CC) -c $(CFLAGS) $(CDIR)/reg.c
59 regvar.$(SUF): $(CDIR)/regvar.c
60 $(CC) -c $(CFLAGS) $(CDIR)/regvar.c
61 salloc.$(SUF): $(CDIR)/salloc.c
62 $(CC) -c $(CFLAGS) $(CDIR)/salloc.c
63 state.$(SUF): $(CDIR)/state.c
64 $(CC) -c $(CFLAGS) $(CDIR)/state.c
65 subr.$(SUF): $(CDIR)/subr.c
66 $(CC) -c $(CFLAGS) $(CDIR)/subr.c
67 var.$(SUF): $(CDIR)/var.c
68 $(CC) -c $(CFLAGS) $(CDIR)/var.c
71 -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
72 cp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
75 -cmp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
77 tables.c: $(SRC_DIR)/table $(CGG)
78 -mv tables.h tables.h.save
79 $(CPP) -P -I$(SRC_DIR) $(SRC_DIR)/table | $(CGG) > debug.out
80 -if cmp -s tables.h.save tables.h; then mv tables.h.save tables.h; else exit 0; fi
81 -if cmp -s /dev/null tables.h; then mv tables.h.save tables.h; else exit 0; fi
84 $(LINT) $(LINTFLAGS) $(CFILES) tables.c
86 rm -f *.$(SUF) tables.c tables.h debug.out cg tables.h.save
88 codegen.$(SUF): $(CDIR)/assert.h
89 codegen.$(SUF): $(CDIR)/data.h
90 codegen.$(SUF): $(CDIR)/equiv.h
91 codegen.$(SUF): $(CDIR)/extern.h
92 codegen.$(SUF): $(CDIR)/param.h
93 codegen.$(SUF): $(CDIR)/result.h
94 codegen.$(SUF): $(CDIR)/state.h
95 codegen.$(SUF): tables.h
96 codegen.$(SUF): $(CDIR)/types.h
97 compute.$(SUF): $(CDIR)/assert.h
98 compute.$(SUF): $(CDIR)/data.h
99 compute.$(SUF): $(CDIR)/extern.h
100 compute.$(SUF): $(CDIR)/glosym.h
101 compute.$(SUF): $(CDIR)/param.h
102 compute.$(SUF): $(CDIR)/result.h
103 compute.$(SUF): tables.h
104 compute.$(SUF): $(CDIR)/types.h
105 equiv.$(SUF): $(CDIR)/assert.h
106 equiv.$(SUF): $(CDIR)/data.h
107 equiv.$(SUF): $(CDIR)/equiv.h
108 equiv.$(SUF): $(CDIR)/extern.h
109 equiv.$(SUF): $(CDIR)/param.h
110 equiv.$(SUF): $(CDIR)/result.h
111 equiv.$(SUF): tables.h
112 equiv.$(SUF): $(CDIR)/types.h
113 fillem.$(SUF): $(CDIR)/assert.h
114 fillem.$(SUF): $(CDIR)/data.h
115 fillem.$(SUF): $(CDIR)/extern.h
116 fillem.$(SUF): $(SRC_DIR)/mach.c
117 fillem.$(SUF): $(SRC_DIR)/mach.h
118 fillem.$(SUF): $(CDIR)/param.h
119 fillem.$(SUF): $(CDIR)/regvar.h
120 fillem.$(SUF): $(CDIR)/result.h
121 fillem.$(SUF): tables.h
122 fillem.$(SUF): $(CDIR)/types.h
123 gencode.$(SUF): $(CDIR)/assert.h
124 gencode.$(SUF): $(CDIR)/data.h
125 gencode.$(SUF): $(CDIR)/extern.h
126 gencode.$(SUF): $(CDIR)/param.h
127 gencode.$(SUF): $(CDIR)/result.h
128 gencode.$(SUF): tables.h
129 gencode.$(SUF): $(CDIR)/types.h
130 glosym.$(SUF): $(CDIR)/glosym.h
131 glosym.$(SUF): $(CDIR)/param.h
132 glosym.$(SUF): tables.h
133 glosym.$(SUF): $(CDIR)/types.h
134 main.$(SUF): $(CDIR)/param.h
135 move.$(SUF): $(CDIR)/assert.h
136 move.$(SUF): $(CDIR)/data.h
137 move.$(SUF): $(CDIR)/extern.h
138 move.$(SUF): $(CDIR)/param.h
139 move.$(SUF): $(CDIR)/result.h
140 move.$(SUF): tables.h
141 move.$(SUF): $(CDIR)/types.h
142 nextem.$(SUF): $(CDIR)/assert.h
143 nextem.$(SUF): $(CDIR)/data.h
144 nextem.$(SUF): $(CDIR)/extern.h
145 nextem.$(SUF): $(CDIR)/param.h
146 nextem.$(SUF): $(CDIR)/result.h
147 nextem.$(SUF): tables.h
148 nextem.$(SUF): $(CDIR)/types.h
149 reg.$(SUF): $(CDIR)/assert.h
150 reg.$(SUF): $(CDIR)/data.h
151 reg.$(SUF): $(CDIR)/extern.h
152 reg.$(SUF): $(CDIR)/param.h
153 reg.$(SUF): $(CDIR)/result.h
155 reg.$(SUF): $(CDIR)/types.h
156 regvar.$(SUF): $(CDIR)/assert.h
157 regvar.$(SUF): $(CDIR)/data.h
158 regvar.$(SUF): $(CDIR)/extern.h
159 regvar.$(SUF): $(CDIR)/param.h
160 regvar.$(SUF): $(CDIR)/regvar.h
161 regvar.$(SUF): $(CDIR)/result.h
162 regvar.$(SUF): tables.h
163 regvar.$(SUF): $(CDIR)/types.h
164 salloc.$(SUF): $(CDIR)/assert.h
165 salloc.$(SUF): $(CDIR)/data.h
166 salloc.$(SUF): $(CDIR)/extern.h
167 salloc.$(SUF): $(CDIR)/param.h
168 salloc.$(SUF): $(CDIR)/result.h
169 salloc.$(SUF): tables.h
170 salloc.$(SUF): $(CDIR)/types.h
171 state.$(SUF): $(CDIR)/assert.h
172 state.$(SUF): $(CDIR)/data.h
173 state.$(SUF): $(CDIR)/extern.h
174 state.$(SUF): $(CDIR)/param.h
175 state.$(SUF): $(CDIR)/result.h
176 state.$(SUF): $(CDIR)/state.h
177 state.$(SUF): tables.h
178 state.$(SUF): $(CDIR)/types.h
179 subr.$(SUF): $(CDIR)/assert.h
180 subr.$(SUF): $(CDIR)/data.h
181 subr.$(SUF): $(CDIR)/extern.h
182 subr.$(SUF): $(CDIR)/param.h
183 subr.$(SUF): $(CDIR)/result.h
184 subr.$(SUF): tables.h
185 subr.$(SUF): $(CDIR)/types.h
186 var.$(SUF): $(CDIR)/data.h
187 var.$(SUF): $(CDIR)/param.h
188 var.$(SUF): $(CDIR)/result.h
190 var.$(SUF): $(CDIR)/types.h