Pristine Ack-5.5
[Ack-5.5.git] / mach / proto / ncg / proto.make
1 # $Id: proto.make,v 1.5 1994/06/24 13:27:50 ceriel Exp $
2
3 #PARAMS         do not remove this line!
4
5 #MACH_DEFINE    do not remove this or the next line!
6 MACH = 
7
8 #TABLE_DEFINE   do not remove this or the next line!
9 TABLE_DIR = $(SRC_HOME)/mach/$(MACH)/ncg
10
11 SRC_DIR = $(SRC_HOME)/mach/$(MACH)/ncg
12 CDIR = $(SRC_HOME)/mach/proto/ncg
13 LIBEM = $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
14 LIBFLT = $(TARGET_HOME)/modules/lib/libflt.$(LIBSUF)
15 CPP = $(UTIL_HOME)/lib.bin/cpp
16 CGG = $(UTIL_HOME)/lib.bin/ncgg
17
18 #preprocessor flags for table
19 TABLEFLAGS=
20 #cgg options
21 CGGFLAGS=
22
23 PREFLAGS=-I$(TARGET_HOME)/h -I$(SRC_HOME)/mach -I$(TARGET_HOME)/modules/h -I$(SRC_DIR) -I$(TABLE_DIR) -I. -I$(CDIR) -DNDEBUG
24 PFLAGS=
25 CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
26 LDFLAGS=$(PFLAGS) $(LDOPTIONS)
27 LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
28 LIBS=$(LIBEM) $(LIBFLT)
29 CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
30        $(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/label.c $(CDIR)/main.c \
31        $(CDIR)/move.c $(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c \
32        $(CDIR)/salloc.c $(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
33 OFILES= codegen.$(SUF) compute.$(SUF) equiv.$(SUF) fillem.$(SUF) \
34         gencode.$(SUF) glosym.$(SUF) label.$(SUF) \
35         main.$(SUF) move.$(SUF) nextem.$(SUF) reg.$(SUF) regvar.$(SUF) \
36         salloc.$(SUF) state.$(SUF) subr.$(SUF) var.$(SUF)
37
38 all:    tables.c
39         make cg
40
41 cg: tables.$(SUF) $(OFILES)
42         $(CC) $(LDFLAGS) $(OFILES) tables.$(SUF) $(LIBS) -o cg
43
44 tables.$(SUF): tables.c
45         $(CC) -c $(PREFLAGS) tables.c
46
47 codegen.$(SUF): $(CDIR)/codegen.c
48         $(CC) -c $(CFLAGS) $(CDIR)/codegen.c
49 compute.$(SUF): $(CDIR)/compute.c
50         $(CC) -c $(CFLAGS) $(CDIR)/compute.c
51 equiv.$(SUF): $(CDIR)/equiv.c
52         $(CC) -c $(CFLAGS) $(CDIR)/equiv.c
53 fillem.$(SUF): $(CDIR)/fillem.c
54         $(CC) -c $(CFLAGS) $(CDIR)/fillem.c
55 gencode.$(SUF): $(CDIR)/gencode.c
56         $(CC) -c $(CFLAGS) $(CDIR)/gencode.c
57 glosym.$(SUF): $(CDIR)/glosym.c
58         $(CC) -c $(CFLAGS) $(CDIR)/glosym.c
59 label.$(SUF): $(CDIR)/label.c
60         $(CC) -c $(CFLAGS) $(CDIR)/label.c
61 main.$(SUF): $(CDIR)/main.c
62         $(CC) -c $(CFLAGS) $(CDIR)/main.c
63 move.$(SUF): $(CDIR)/move.c
64         $(CC) -c $(CFLAGS) $(CDIR)/move.c
65 nextem.$(SUF): $(CDIR)/nextem.c
66         $(CC) -c $(CFLAGS) $(CDIR)/nextem.c
67 reg.$(SUF): $(CDIR)/reg.c
68         $(CC) -c $(CFLAGS) $(CDIR)/reg.c
69 regvar.$(SUF): $(CDIR)/regvar.c
70         $(CC) -c $(CFLAGS) $(CDIR)/regvar.c
71 salloc.$(SUF): $(CDIR)/salloc.c
72         $(CC) -c $(CFLAGS) $(CDIR)/salloc.c
73 state.$(SUF): $(CDIR)/state.c
74         $(CC) -c $(CFLAGS) $(CDIR)/state.c
75 subr.$(SUF): $(CDIR)/subr.c
76         $(CC) -c $(CFLAGS) $(CDIR)/subr.c
77 var.$(SUF): $(CDIR)/var.c
78         $(CC) -c $(CFLAGS) $(CDIR)/var.c
79
80 install: all
81         -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
82         cp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
83
84 cmp:     all
85         -cmp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
86
87 tables.c: $(TABLE_DIR)/table $(CGG)
88         $(CPP) -I$(SRC_DIR) -I$(TABLE_DIR) $(TABLEFLAGS) $(TABLE_DIR)/table | $(CGG) $(CGGFLAGS)
89         -cmp tables.h tables.H || cp tables.H tables.h
90
91 lint:   tables.c
92         $(LINT) $(LINTFLAGS) $(CFILES) tables.c
93 clean:
94         rm -f *.$(SUF) tables.c tables.h debug.out cg tables.H
95
96 codegen.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
97 codegen.$(SUF): $(CDIR)/data.h
98 codegen.$(SUF): $(CDIR)/equiv.h
99 codegen.$(SUF): $(CDIR)/extern.h
100 codegen.$(SUF): $(CDIR)/param.h
101 codegen.$(SUF): $(CDIR)/result.h
102 codegen.$(SUF): $(CDIR)/state.h
103 codegen.$(SUF): tables.h
104 codegen.$(SUF): $(CDIR)/types.h
105 compute.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
106 compute.$(SUF): $(CDIR)/data.h
107 compute.$(SUF): $(CDIR)/extern.h
108 compute.$(SUF): $(CDIR)/glosym.h
109 compute.$(SUF): $(CDIR)/label.h
110 compute.$(SUF): $(CDIR)/param.h
111 compute.$(SUF): $(CDIR)/result.h
112 compute.$(SUF): tables.h
113 compute.$(SUF): $(CDIR)/types.h
114 equiv.$(SUF):   $(CDIR)/assert.h
115 equiv.$(SUF):   $(CDIR)/data.h $(TARGET_HOME)/h/cgg_cg.h
116 equiv.$(SUF):   $(CDIR)/equiv.h
117 equiv.$(SUF):   $(CDIR)/extern.h
118 equiv.$(SUF):   $(CDIR)/param.h
119 equiv.$(SUF):   $(CDIR)/result.h
120 equiv.$(SUF):   tables.h
121 equiv.$(SUF):   $(CDIR)/types.h
122 fillem.$(SUF):  $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
123 fillem.$(SUF):  $(CDIR)/data.h
124 fillem.$(SUF):  $(CDIR)/extern.h
125 fillem.$(SUF):  $(TABLE_DIR)/mach.c
126 fillem.$(SUF):  $(TABLE_DIR)/mach.h
127 fillem.$(SUF):  $(CDIR)/param.h
128 fillem.$(SUF):  $(CDIR)/regvar.h
129 fillem.$(SUF):  $(CDIR)/result.h
130 fillem.$(SUF):  tables.h
131 fillem.$(SUF):  $(CDIR)/types.h
132 gencode.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
133 gencode.$(SUF): $(CDIR)/data.h
134 gencode.$(SUF): $(CDIR)/extern.h
135 gencode.$(SUF): $(CDIR)/param.h
136 gencode.$(SUF): $(CDIR)/result.h
137 gencode.$(SUF): tables.h
138 gencode.$(SUF): $(CDIR)/types.h
139 glosym.$(SUF):  $(CDIR)/glosym.h
140 glosym.$(SUF):  $(CDIR)/param.h
141 glosym.$(SUF):  tables.h
142 glosym.$(SUF):  $(CDIR)/types.h
143 label.$(SUF):   $(CDIR)/label.h
144 label.$(SUF):   $(CDIR)/param.h
145 label.$(SUF):   tables.h
146 label.$(SUF):   $(CDIR)/types.h
147 main.$(SUF):            $(CDIR)/param.h
148 main.$(SUF):            tables.h
149 move.$(SUF):            $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
150 move.$(SUF):            $(CDIR)/data.h
151 move.$(SUF):            $(CDIR)/extern.h
152 move.$(SUF):            $(CDIR)/param.h
153 move.$(SUF):            $(CDIR)/result.h
154 move.$(SUF):            tables.h
155 move.$(SUF):            $(CDIR)/types.h
156 nextem.$(SUF):  $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
157 nextem.$(SUF):  $(CDIR)/data.h
158 nextem.$(SUF):  $(CDIR)/extern.h
159 nextem.$(SUF):  $(CDIR)/param.h
160 nextem.$(SUF):  $(CDIR)/result.h
161 nextem.$(SUF):  tables.h
162 nextem.$(SUF):  $(CDIR)/types.h
163 reg.$(SUF):             $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
164 reg.$(SUF):             $(CDIR)/data.h
165 reg.$(SUF):             $(CDIR)/extern.h
166 reg.$(SUF):             $(CDIR)/param.h
167 reg.$(SUF):             $(CDIR)/result.h
168 reg.$(SUF):             tables.h
169 reg.$(SUF):             $(CDIR)/types.h
170 regvar.$(SUF):  $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
171 regvar.$(SUF):  $(CDIR)/data.h
172 regvar.$(SUF):  $(CDIR)/extern.h
173 regvar.$(SUF):  $(CDIR)/param.h
174 regvar.$(SUF):  $(CDIR)/regvar.h
175 regvar.$(SUF):  $(CDIR)/result.h
176 regvar.$(SUF):  tables.h
177 regvar.$(SUF):  $(CDIR)/types.h
178 salloc.$(SUF):  $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
179 salloc.$(SUF):  $(CDIR)/data.h
180 salloc.$(SUF):  $(CDIR)/extern.h
181 salloc.$(SUF):  $(CDIR)/param.h
182 salloc.$(SUF):  $(CDIR)/result.h
183 salloc.$(SUF):  tables.h
184 salloc.$(SUF):  $(CDIR)/types.h
185 state.$(SUF):   $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
186 state.$(SUF):   $(CDIR)/data.h
187 state.$(SUF):   $(CDIR)/extern.h
188 state.$(SUF):   $(CDIR)/param.h
189 state.$(SUF):   $(CDIR)/result.h
190 state.$(SUF):   $(CDIR)/state.h
191 state.$(SUF):   tables.h
192 state.$(SUF):   $(CDIR)/types.h
193 subr.$(SUF):            $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
194 subr.$(SUF):            $(CDIR)/data.h
195 subr.$(SUF):            $(CDIR)/extern.h
196 subr.$(SUF):            $(CDIR)/param.h
197 subr.$(SUF):            $(CDIR)/result.h
198 subr.$(SUF):            tables.h
199 subr.$(SUF):            $(CDIR)/types.h
200 var.$(SUF):             $(CDIR)/data.h $(TARGET_HOME)/h/cgg_cg.h
201 var.$(SUF):             $(CDIR)/param.h
202 var.$(SUF):             $(CDIR)/result.h
203 var.$(SUF):             tables.h
204 var.$(SUF):             $(CDIR)/types.h