Pristine Ack-5.5
[Ack-5.5.git] / util / ncgg / proto.make
1 # Header: Makefile,v 0.8 87/11/16 10:35:32 ceriel Exp $
2
3 #PARAMS         do not remove this line!
4
5 CFILES= cgg.c $(SRC_DIR)/subr.c $(SRC_DIR)/main.c $(SRC_DIR)/coerc.c \
6         enterkeyw.c $(SRC_DIR)/error.c $(SRC_DIR)/emlookup.c $(SRC_DIR)/expr.c \
7         $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c $(SRC_DIR)/lookup.c \
8         $(SRC_DIR)/output.c $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c \
9         $(SRC_DIR)/var.c $(SRC_DIR)/hall.c
10 OFILES= cgg.$(SUF) subr.$(SUF) main.$(SUF) coerc.$(SUF) enterkeyw.$(SUF) \
11         error.$(SUF) emlookup.$(SUF) expr.$(SUF) instruct.$(SUF) iocc.$(SUF) \
12         lookup.$(SUF) set.$(SUF) strlookup.$(SUF) var.$(SUF) hall.$(SUF)
13 SOURCES=$(SRC_DIR)/*.h $(SRC_DIR)/cgg.y $(SRC_DIR)/scan.l \
14         $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords $(SRC_DIR)/coerc.c \
15         $(SRC_DIR)/emlookup.c $(SRC_DIR)/error.c $(SRC_DIR)/expr.c \
16         $(SRC_DIR)/hall.c $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c \
17         $(SRC_DIR)/lookup.c $(SRC_DIR)/main.c $(SRC_DIR)/output.c \
18         $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c $(SRC_DIR)/subr.c \
19         $(SRC_DIR)/var.c
20
21 SRC_DIR=$(SRC_HOME)/util/ncgg
22 EMH=$(TARGET_HOME)/h
23 INCLUDES=-I$(EMH) -I$(TARGET_HOME)/config -I$(SRC_DIR) -I.
24 CFLAGS=$(INCLUDES) $(COPTIONS) -DNDEBUG
25 YFLAGS=-d
26 LDFLAGS=$(LDOPTIONS)
27 LINTFLAGS=$(INCLUDES) $(LINTOPTIONS)
28
29
30 cgg:    cgg.$(SUF) $(OFILES) output.$(SUF)
31         $(CC) $(LDFLAGS) $(OFILES) output.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
32
33 install:        cgg
34         cp cgg $(TARGET_HOME)/lib.bin/ncgg
35         if [ $(DO_MACHINE_INDEP) = y ] ; \
36         then    mk_manpage $(SRC_DIR)/ncgg.6 $(TARGET_HOME) ; \
37         fi
38
39 cmp:    cgg
40         -cmp cgg $(TARGET_HOME)/lib.bin/ncgg
41
42 debugcgg:       cgg.$(SUF) $(OFILES) debugoutput.$(SUF)
43         $(CC) $(LDFLAGS) $(OFILES) debugoutput.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
44
45 cgg.c:  $(SRC_DIR)/cgg.y
46         yacc $(YFLAGS) $(SRC_DIR)/cgg.y && mv y.tab.c cgg.c
47
48 enterkeyw.c:    $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords y.tab.h
49         $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords
50
51 debugoutput.$(SUF):     debugoutput.c
52         $(CC) $(CFLAGS) -DCODEDEBUG -c debugoutput.c
53
54 debugoutput.c:  $(SRC_DIR)/output.c
55         cp $(SRC_DIR)/output.c debugoutput.c
56
57 lint:   $(CFILES)
58         $(LINT) $(LINTFLAGS) $(CFILES)
59
60 clean:
61         rm -f cgg.c scan.c y.output y.tab.h enterkeyw.c debugoutput.c
62         rm -f $(OFILES) output.$(SUF) debugoutput.$(SUF) cgg lint
63
64 scan.c: $(SRC_DIR)/scan.l
65         flex -st $(SRC_DIR)/scan.l > scan.c
66
67 pr:
68         @pr $(SOURCES)
69
70 opr:
71         -make pr|opr
72
73 depend: $(CFILES) scan.c
74         rm_deps Makefile >Makefile.new
75         for i in $(CFILES) ; do \
76                 echo "`basename $$i .c`.$$(SUF):        $$i" >> Makefile.new ; \
77                 echo '  $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
78                 $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF):       /" >> Makefile.new ; \
79         done
80         mv Makefile Makefile.old
81         mv Makefile.new Makefile
82
83 #DEPENDENCIES
84 cgg.$(SUF):     cgg.c
85         $(CC) -c $(CFLAGS) cgg.c
86 cgg.$(SUF):     scan.c
87 cgg.$(SUF):     $(TARGET_HOME)/h/em_reg.h
88 cgg.$(SUF):     $(TARGET_HOME)/h/cgg_cg.h
89 cgg.$(SUF):     $(SRC_DIR)/extern.h
90 cgg.$(SUF):     $(SRC_DIR)/expr.h
91 cgg.$(SUF):     $(SRC_DIR)/cost.h
92 cgg.$(SUF):     $(SRC_DIR)/instruct.h
93 cgg.$(SUF):     $(SRC_DIR)/iocc.h
94 cgg.$(SUF):     $(SRC_DIR)/set.h
95 cgg.$(SUF):     $(SRC_DIR)/lookup.h
96 cgg.$(SUF):     $(SRC_DIR)/varinfo.h
97 cgg.$(SUF):     $(TARGET_HOME)/h/em_spec.h
98 cgg.$(SUF):     $(TARGET_HOME)/config/local.h
99 cgg.$(SUF):     $(SRC_DIR)/param.h
100 subr.$(SUF):    $(SRC_DIR)/subr.c
101         $(CC) -c $(CFLAGS) $(SRC_DIR)/subr.c
102 subr.$(SUF):    $(SRC_DIR)/extern.h
103 subr.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
104 subr.$(SUF):    $(SRC_DIR)/regvar.h
105 subr.$(SUF):    $(SRC_DIR)/token.h
106 subr.$(SUF):    $(SRC_DIR)/cost.h
107 subr.$(SUF):    $(SRC_DIR)/instruct.h
108 subr.$(SUF):    $(SRC_DIR)/varinfo.h
109 subr.$(SUF):    $(SRC_DIR)/set.h
110 subr.$(SUF):    $(SRC_DIR)/expr.h
111 subr.$(SUF):    $(SRC_DIR)/property.h
112 subr.$(SUF):    $(SRC_DIR)/lookup.h
113 subr.$(SUF):    $(SRC_DIR)/reg.h
114 subr.$(SUF):    $(TARGET_HOME)/h/em_spec.h
115 subr.$(SUF):    $(TARGET_HOME)/config/local.h
116 subr.$(SUF):    $(SRC_DIR)/param.h
117 main.$(SUF):    $(SRC_DIR)/main.c
118         $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
119 coerc.$(SUF):   $(SRC_DIR)/coerc.c
120         $(CC) -c $(CFLAGS) $(SRC_DIR)/coerc.c
121 coerc.$(SUF):   $(SRC_DIR)/extern.h
122 coerc.$(SUF):   $(SRC_DIR)/pseudo.h
123 coerc.$(SUF):   $(TARGET_HOME)/h/cgg_cg.h
124 coerc.$(SUF):   $(SRC_DIR)/iocc.h
125 coerc.$(SUF):   $(SRC_DIR)/varinfo.h
126 coerc.$(SUF):   $(SRC_DIR)/cost.h
127 coerc.$(SUF):   $(SRC_DIR)/token.h
128 coerc.$(SUF):   $(SRC_DIR)/reg.h
129 coerc.$(SUF):   $(SRC_DIR)/property.h
130 coerc.$(SUF):   $(SRC_DIR)/set.h
131 coerc.$(SUF):   $(TARGET_HOME)/h/em_spec.h
132 coerc.$(SUF):   $(TARGET_HOME)/config/local.h
133 coerc.$(SUF):   $(SRC_DIR)/param.h
134 coerc.$(SUF):   $(SRC_DIR)/assert.h
135 enterkeyw.$(SUF):       enterkeyw.c
136         $(CC) -c $(CFLAGS) enterkeyw.c
137 enterkeyw.$(SUF):       $(SRC_DIR)/lookup.h
138 error.$(SUF):   $(SRC_DIR)/error.c
139         $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c
140 emlookup.$(SUF):        $(SRC_DIR)/emlookup.c
141         $(CC) -c $(CFLAGS) $(SRC_DIR)/emlookup.c
142 emlookup.$(SUF):        $(TARGET_HOME)/h/em_flag.h
143 emlookup.$(SUF):        $(SRC_DIR)/expr.h
144 emlookup.$(SUF):        $(TARGET_HOME)/h/em_spec.h
145 emlookup.$(SUF):        $(TARGET_HOME)/config/local.h
146 emlookup.$(SUF):        $(SRC_DIR)/param.h
147 expr.$(SUF):    $(SRC_DIR)/expr.c
148         $(CC) -c $(CFLAGS) $(SRC_DIR)/expr.c
149 expr.$(SUF):    $(SRC_DIR)/extern.h
150 expr.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
151 expr.$(SUF):    $(SRC_DIR)/regvar.h
152 expr.$(SUF):    $(SRC_DIR)/expr.h
153 expr.$(SUF):    $(SRC_DIR)/property.h
154 expr.$(SUF):    $(SRC_DIR)/cost.h
155 expr.$(SUF):    $(SRC_DIR)/token.h
156 expr.$(SUF):    $(SRC_DIR)/lookup.h
157 expr.$(SUF):    $(SRC_DIR)/reg.h
158 expr.$(SUF):    $(SRC_DIR)/set.h
159 expr.$(SUF):    $(TARGET_HOME)/h/em_spec.h
160 expr.$(SUF):    $(TARGET_HOME)/config/local.h
161 expr.$(SUF):    $(SRC_DIR)/param.h
162 expr.$(SUF):    $(SRC_DIR)/assert.h
163 instruct.$(SUF):        $(SRC_DIR)/instruct.c
164         $(CC) -c $(CFLAGS) $(SRC_DIR)/instruct.c
165 instruct.$(SUF):        $(SRC_DIR)/extern.h
166 instruct.$(SUF):        $(TARGET_HOME)/h/cgg_cg.h
167 instruct.$(SUF):        $(SRC_DIR)/iocc.h
168 instruct.$(SUF):        $(SRC_DIR)/expr.h
169 instruct.$(SUF):        $(SRC_DIR)/set.h
170 instruct.$(SUF):        $(SRC_DIR)/varinfo.h
171 instruct.$(SUF):        $(SRC_DIR)/pseudo.h
172 instruct.$(SUF):        $(SRC_DIR)/cost.h
173 instruct.$(SUF):        $(SRC_DIR)/instruct.h
174 instruct.$(SUF):        $(TARGET_HOME)/h/em_spec.h
175 instruct.$(SUF):        $(TARGET_HOME)/config/local.h
176 instruct.$(SUF):        $(SRC_DIR)/param.h
177 iocc.$(SUF):    $(SRC_DIR)/iocc.c
178         $(CC) -c $(CFLAGS) $(SRC_DIR)/iocc.c
179 iocc.$(SUF):    $(SRC_DIR)/extern.h
180 iocc.$(SUF):    $(SRC_DIR)/regvar.h
181 iocc.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
182 iocc.$(SUF):    $(SRC_DIR)/iocc.h
183 iocc.$(SUF):    $(SRC_DIR)/property.h
184 iocc.$(SUF):    $(SRC_DIR)/cost.h
185 iocc.$(SUF):    $(SRC_DIR)/token.h
186 iocc.$(SUF):    $(SRC_DIR)/lookup.h
187 iocc.$(SUF):    $(SRC_DIR)/expr.h
188 iocc.$(SUF):    $(SRC_DIR)/set.h
189 iocc.$(SUF):    $(TARGET_HOME)/h/em_spec.h
190 iocc.$(SUF):    $(TARGET_HOME)/config/local.h
191 iocc.$(SUF):    $(SRC_DIR)/param.h
192 iocc.$(SUF):    $(SRC_DIR)/assert.h
193 lookup.$(SUF):  $(SRC_DIR)/lookup.c
194         $(CC) -c $(CFLAGS) $(SRC_DIR)/lookup.c
195 lookup.$(SUF):  $(SRC_DIR)/lookup.h
196 lookup.$(SUF):  $(TARGET_HOME)/h/em_spec.h
197 lookup.$(SUF):  $(TARGET_HOME)/config/local.h
198 lookup.$(SUF):  $(SRC_DIR)/param.h
199 lookup.$(SUF):  $(SRC_DIR)/assert.h
200 output.$(SUF):  $(SRC_DIR)/output.c
201         $(CC) -c $(CFLAGS) $(SRC_DIR)/output.c
202 output.$(SUF):  $(SRC_DIR)/extern.h
203 output.$(SUF):  $(SRC_DIR)/regvar.h
204 output.$(SUF):  $(SRC_DIR)/pseudo.h
205 output.$(SUF):  $(TARGET_HOME)/h/cgg_cg.h
206 output.$(SUF):  $(SRC_DIR)/lookup.h
207 output.$(SUF):  $(SRC_DIR)/instruct.h
208 output.$(SUF):  $(SRC_DIR)/set.h
209 output.$(SUF):  $(SRC_DIR)/cost.h
210 output.$(SUF):  $(SRC_DIR)/token.h
211 output.$(SUF):  $(SRC_DIR)/property.h
212 output.$(SUF):  $(SRC_DIR)/reg.h
213 output.$(SUF):  $(TARGET_HOME)/h/em_spec.h
214 output.$(SUF):  $(TARGET_HOME)/config/local.h
215 output.$(SUF):  $(SRC_DIR)/param.h
216 output.$(SUF):  $(SRC_DIR)/varinfo.h
217 output.$(SUF):  $(SRC_DIR)/assert.h
218 set.$(SUF):     $(SRC_DIR)/set.c
219         $(CC) -c $(CFLAGS) $(SRC_DIR)/set.c
220 set.$(SUF):     $(SRC_DIR)/extern.h
221 set.$(SUF):     $(TARGET_HOME)/h/cgg_cg.h
222 set.$(SUF):     $(SRC_DIR)/reg.h
223 set.$(SUF):     $(SRC_DIR)/lookup.h
224 set.$(SUF):     $(SRC_DIR)/cost.h
225 set.$(SUF):     $(SRC_DIR)/token.h
226 set.$(SUF):     $(SRC_DIR)/set.h
227 set.$(SUF):     $(SRC_DIR)/property.h
228 set.$(SUF):     $(TARGET_HOME)/h/em_spec.h
229 set.$(SUF):     $(TARGET_HOME)/config/local.h
230 set.$(SUF):     $(SRC_DIR)/param.h
231 strlookup.$(SUF):       $(SRC_DIR)/strlookup.c
232         $(CC) -c $(CFLAGS) $(SRC_DIR)/strlookup.c
233 strlookup.$(SUF):       $(TARGET_HOME)/h/em_spec.h
234 strlookup.$(SUF):       $(TARGET_HOME)/config/local.h
235 strlookup.$(SUF):       $(SRC_DIR)/param.h
236 var.$(SUF):     $(SRC_DIR)/var.c
237         $(CC) -c $(CFLAGS) $(SRC_DIR)/var.c
238 var.$(SUF):     $(TARGET_HOME)/h/cgg_cg.h
239 var.$(SUF):     $(SRC_DIR)/lookup.h
240 var.$(SUF):     $(SRC_DIR)/instruct.h
241 var.$(SUF):     $(SRC_DIR)/set.h
242 var.$(SUF):     $(SRC_DIR)/cost.h
243 var.$(SUF):     $(SRC_DIR)/token.h
244 var.$(SUF):     $(SRC_DIR)/property.h
245 var.$(SUF):     $(SRC_DIR)/reg.h
246 var.$(SUF):     $(TARGET_HOME)/h/em_spec.h
247 var.$(SUF):     $(TARGET_HOME)/config/local.h
248 var.$(SUF):     $(SRC_DIR)/param.h
249 hall.$(SUF):    $(SRC_DIR)/hall.c
250         $(CC) -c $(CFLAGS) $(SRC_DIR)/hall.c
251 hall.$(SUF):    $(SRC_DIR)/set.h
252 hall.$(SUF):    $(TARGET_HOME)/h/em_spec.h
253 hall.$(SUF):    $(TARGET_HOME)/config/local.h
254 hall.$(SUF):    $(SRC_DIR)/param.h
255 hall.$(SUF):    $(SRC_DIR)/assert.h