simple.cc - generated code example
[prop.git] / configure-dir / Makefile.prop-src.old
blob3fdc0b944344eb6622b0226f7286fbdecbde8035
1 ###############################################################################
3 #  Makefile for compiling Prop 2.2.x 
5 ###############################################################################
6 PROP            = prop
7 CC              = g++
8 CC_INCLUDE      = -I../include
9 CC_OPTS         = $(CC_INCLUDE) -O6 
10 LD_OPTS         = -L../lib -lprop -lg++ $(gcc-iostream-lib) -lm
11 PROP_OPTS_BASIC = -s $(CC_INCLUDE) -S -r -v2
12 PROP_OPTS       = $(PROP_OPTS_BASIC) -O15
14 H_SRC=  ir.h ast.h basics.h parsegen.h bitfield.h keywords.h parser.h \
15         collection.h setl-ast.h dataflow.h setlgen.h matchcom.h timespace.h \
16         env.h funmap.h metasyntax.h constraint.h logicgen.h \
17         wam.h pat.h list.h grsgen.h graphtype.h graphedges.h
18 C_SRC=  instgen.cc matchcom.cc matchgen.cc rwgen.cc infgen.cc type.cc \
19         printing.cc datagen.cc codegen.cc \
20         compiler.cc indexing.cc printgen.cc constr.cc parsegen.cc lexeme.cc \
21         bitfield.cc lexer.cc rwgen2.cc lawgen.cc parser-util.cc parser.cc \
22         setl-ast.cc dataflow.cc documentation.cc collection.cc setlgen.cc \
23         setltype.cc timespace.cc env.cc topdown.cc funmap.cc metasyntax.cc \
24         constraint.cc logicgen.cc wam.cc pat.cc rwgen3.cc grsgen.cc \
25         graphtype.cc graphrep.cc graphops.cc graphreport.cc \
26         visualize.cc classdef.cc prop-main.cc
28 SRC=    $(H_SRC) $(C_SRC)
30 OBJ =   constr.o rwgen.o printgen.o infgen.o indexing.o datagen.o instgen.o \
31         compiler.o prop-main.o process.o patenv.o codegen.o textbuf.o \
32         labelgen.o matchcom.o matchgen.o printing.o type.o hashtab.o \
33         parsegen.o lexeme.o bitfield.o rwgen2.o rwgen3.o lawgen.o lexer.o \
34         parser-util.o parser.o frontend.o setl-ast.o dataflow.o \
35         documentation.o collection.o env.o setltype.o setlgen.o options.o \
36         timespace.o topdown.o funmap.o metasyntax.o constraint.o logicgen.o \
37         wam.o pat.o graphtype.o graphrep.o graphops.o graphreport.o \
38         grsgen.o visualize.o classdef.o patchlev.o
40 prop:   $(SRC) $(OBJ)
41         $(CC) $(OBJ) -o $(PROP) $(LD_OPTS)
42         strip $(PROP)
44 build-prop:
45         $(CC) $(OBJ) -o $(PROP) $(LD_OPTS)
46         strip $(PROP)
48 src:    $(SRC)
50 debug:  $(SRC) $(OBJ)
51         $(CC) $(OBJ) -g -o $(PROP) $(LD_OPTS)
53 profile:        $(SRC) $(OBJ)
54         $(CC) $(OBJ) -pg -g -o $(PROP) $(LD_OPTS)
56 tar:    
57         tar -cvf - [a-z]*.h [a-z]*.cc [a-z]*.[ply]* *.tex \
58           banner testprop testprop2 Makefile README \
59           | gzip >prop-2.1.tar.gz
60 clean:
61         rm -f *.o
63 spotless: clean
64         rm -f $(SRC)    
66 classes:
67         @awk 'BEGIN { printf "Number of classes = "; }' </dev/null
68         @grep "^class " *.h | grep -v ";" | wc -l
70 test:   test1 
72 test1:
73         ./testprop
74 test2:
75         ./testprop2
77 wc:
78         wc [a-z]*.pcc [a-z]*.ph
79 genwc:
80         wc $(SRC)
82 basics.h:       basics.ph 
83 list.h:         basics.ph list.ph
84 ir.h:           basics.ph ir.ph 
85 ast.h:          basics.ph ast.ph ir.ph 
86 parsegen.h:     basics.ph ast.ph ir.ph parsegen.ph
87 bitfield.h:     basics.ph ir.ph bitfield.ph
88 matchcom.h:     basics.ph ir.ph matchcom.ph
89 keywords.h:     basics.ph keywords.ph
90 parser.h:       basics.ph parser.ph
91 setl-ast.h:     basics.ph setl-ast.ph
92 dataflow.h:     basics.ph dataflow.ph
93 setlgen.h:      basics.ph setlgen.ph 
94 timespace.h:    basics.ph timespace.ph
95 env.h:          basics.ph env.ph 
96 funmap.h:       basics.ph funmap.ph
97 metasyntax.h:   basics.ph metasyntax.ph
98 constraint.h:   basics.ph ir.ph constraint.ph
99 logicgen.h:     basics.ph ir.ph logicgen.ph
100 wam.h:          basics.ph 
101 pat.h:          basics.ph ir.ph matchcom.ph pat.ph
102 grsgen.h:       basics.ph ir.ph ast.ph 
103 graphtype.h:    basics.ph ir.ph ast.ph 
104 graphedges.h:   basics.ph ir.ph ast.ph 
106 type.cc:        type.pcc basics.ph ast.ph ir.ph collection.ph
107 codegen.cc:     codegen.pcc basics.ph ast.ph ir.ph 
108 matchcom.cc:    matchcom.pcc basics.ph ast.ph ir.ph matchcom.ph
109 matchgen.cc:    matchgen.pcc basics.ph ast.ph ir.ph matchcom.ph
110 rwgen.cc:       rwgen.pcc basics.ph ast.ph ir.ph matchcom.ph funmap.ph
111 rwgen2.cc:      rwgen2.pcc basics.ph ast.ph ir.ph funmap.ph
112 rwgen3.cc:      rwgen3.pcc basics.ph ast.ph ir.ph funmap.ph
113 topdown.cc:     topdown.pcc basics.ph ast.ph ir.ph matchcom.ph funmap.ph
114 funmap.cc:      funmap.pcc basics.ph ast.ph ir.ph matchcom.ph funmap.ph
115 infgen.cc:      infgen.pcc basics.ph ast.ph ir.ph 
116 datagen.cc:     datagen.pcc basics.ph ast.ph ir.ph
117 printing.cc:    printing.pcc basics.ph ast.ph ir.ph matchcom.ph
118 compiler.cc:    compiler.pcc basics.ph ast.ph ir.ph dataflow.ph 
119 visualize.cc:   visualize.pcc basics.ph ast.ph ir.ph dataflow.ph 
120 instgen.cc:     instgen.pcc basics.ph ast.ph ir.ph 
121 indexing.cc:    indexing.pcc basics.ph ast.ph ir.ph matchcom.ph
122 printgen.cc:    printgen.pcc basics.ph ast.ph ir.ph 
123 parser.tab.cc:  parser.tab.pcc basics.ph ast.ph ir.ph parsegen.ph bitfield.ph
124 constr.cc:      constr.pcc basics.ph ast.ph ir.ph matchcom.ph
125 parsegen.cc:    parsegen.pcc parsegen.ph basics.ph ast.ph ir.ph
126 lexeme.cc:      lexeme.pcc basics.ph ir.ph
127 bitfield.cc:    bitfield.pcc bitfield.ph basics.ph ir.ph ast.ph
128 lexer.cc:       lexer.pcc basics.ph parser.ph keywords.ph
129 lawgen.cc:      lawgen.pcc basics.ph ir.ph ast.ph
130 parser.cc:      parser.pcc parser.ph basics.ph ir.ph ast.ph parsegen.ph \
131                 bitfield.ph keywords.ph setl-ast.ph timespace.ph \
132                 constraint.ph dataflow.ph wam.ph grsgen.ph
133 parser-util.cc: parser-util.pcc parser.ph basics.ph ir.ph ast.ph parsegen.ph \
134                 bitfield.ph keywords.ph setl-ast.ph config.h
135 setl-ast.cc:    setl-ast.pcc setl-ast.ph basics.ph ir.ph ast.ph
136 dataflow.cc:    dataflow.pcc dataflow.ph basics.ph ir.ph
137 documentation.cc:       documentation.pcc parser.ph ir.ph ast.ph
138 collection.cc:  collection.pcc collection.ph basics.ph 
139 setlgen.cc:     setlgen.pcc setlgen.ph basics.ph setl-ast.ph ir.ph ast.ph 
140 setltype.cc:    setltype.pcc setlgen.ph basics.ph setl-ast.ph ir.ph ast.ph 
141 timespace.cc:   timespace.pcc timespace.ph basics.ph 
142 env.cc:         env.pcc 
143 metasyntax.cc:  metasyntax.pcc metasyntax.ph parsegen.ph basics.ph ast.ph ir.ph
144 constraint.cc:  constraint.pcc constraint.ph basics.ph ir.ph ast.ph wam.ph \
145                 list.ph
146 logicgen.cc:    logicgen.pcc constraint.ph basics.ph ir.ph ast.ph wam.ph \
147                 logicgen.ph list.ph
148 wam.cc:         wam.pcc wam.ph ir.ph
149 pat.cc:         pat.pcc basics.ph ir.ph matchcom.ph pat.ph
150 grsgen.cc:      grsgen.pcc grsgen.ph basics.ph ir.ph ast.ph 
151 graphtype.cc:   graphtype.pcc graphtype.ph graphedges.ph basics.ph ir.ph ast.ph 
152 graphrep.cc:    graphrep.pcc graphtype.ph graphedges.ph basics.ph ir.ph ast.ph 
153 graphreport.cc: graphreport.pcc graphtype.ph graphedges.ph basics.ph ir.ph ast.ph 
154 classdef.cc:    classdef.pcc classdef.h basics.ph ir.ph ast.ph 
156 hashtab.o:      hashtab.h
157 textbuf.o:      textbuf.cc textbuf.h
158 matchcom.o:     matchcom.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
159                 labelgen.h hashtab.h options.h dataflow.h 
160 indexing.o:     indexing.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
161                 labelgen.h hashtab.h
162 matchgen.o:     matchgen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
163                 labelgen.h hashtab.h options.h
164 codegen.o:      codegen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
165                 labelgen.h matchcom.h options.h dataflow.h
166 rwgen.o:        rwgen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
167                 rwgen.h labelgen.h hashtab.h datagen.h options.h funmap.h \
168                 classdef.h
169 funmap.o:       funmap.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
170                 rwgen.h labelgen.h hashtab.h datagen.h options.h funmap.h
171 rwgen2.o:       rwgen2.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
172                 rwgen.h labelgen.h hashtab.h datagen.h funmap.h
173 rwgen3.o:       rwgen3.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
174                 rwgen.h labelgen.h hashtab.h datagen.h funmap.h
175 topdown.o:      topdown.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
176                 rwgen.h labelgen.h hashtab.h datagen.h options.h funmap.h
177 infgen.o:       infgen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
178                 infgen.h labelgen.h hashtab.h rwgen.h datagen.h classdef.h
179 datagen.o:      datagen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
180                 datagen.h labelgen.h options.h
181 printing.o:     printing.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
182                 labelgen.h options.h
183 type.o:         type.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
184                 labelgen.h hashtab.h options.h collection.h
185 compiler.o:     compiler.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
186                 compiler.h labelgen.h rwgen.h infgen.h datagen.h parsegen.h \
187                 bitfield.h setlgen.h options.h dataflow.h constraint.h \
188                 textbuf.h metasyntax.h grsgen.h classdef.h 
189 visualize.o:    visualize.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
190                 compiler.h labelgen.h rwgen.h infgen.h datagen.h parsegen.h \
191                 bitfield.h setlgen.h options.h dataflow.h constraint.h \
192                 textbuf.h metasyntax.h grsgen.h
193 parsegen.o:     parsegen.cc basics.h ir.h ast.h type.h patenv.h parsegen.h \
194                 options.h  classdef.h
195 prop-main.o:    prop-main.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
196                 compiler.h labelgen.h config.h rwgen.h infgen.h \
197                 datagen.h parsegen.h author.h bitfield.h setlgen.h options.h \
198                 dataflow.h constraint.h textbuf.h metasyntax.h \
199                 grsgen.h classdef.h 
200 process.o:      process.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
201                 compiler.h labelgen.h config.h rwgen.h infgen.h \
202                 datagen.h parsegen.h author.h bitfield.h setlgen.h options.h \
203                 dataflow.h constraint.h textbuf.h metasyntax.h \
204                 grsgen.h classdef.h 
205 patenv.o:       patenv.cc patenv.h ir.h ast.h options.h
206 patenv.o:       patenv.cc patenv.h ir.h ast.h options.h
207 labelgen.o:     labelgen.cc labelgen.h 
208 instgen.o:      instgen.cc matchcom.h basics.h ir.h ast.h type.h patenv.h \
209                 datagen.h labelgen.h hashtab.h options.h
210 printgen.o:     printgen.cc basics.h ir.h ast.h type.h datagen.h 
211 constr.o:       constr.cc basics.ph ast.ph ir.ph
212 lexeme.o:       lexeme.cc basics.h ir.h type.h hashtab.h
213 bitfield.o:     bitfield.cc bitfield.h basics.h ir.h ast.h type.h hashtab.h
214 lawgen.o:       lawgen.cc basics.h ir.h ast.h datagen.h type.h
215 lexer.o:        lexer.cc basics.h parser.h keywords.h type.h textbuf.h
216 parser-util.o:  parser-util.cc basics.h parser.h keywords.h type.h setl-ast.h \
217                 options.h textbuf.h
218 parser.o:       parser.cc basics.h parser.h keywords.h type.h setl-ast.h \
219                 options.h constraint.h compiler.h dataflow.h datagen.h \
220                 matchcom.h parsegen.h wam.h textbuf.h metasyntax.h \
221                 graphtype.h graphedges.h grsgen.h classdef.h rwgen.h
222 frontend.o:     frontend.cc basics.h parser.h keywords.h type.h textbuf.h
223 setl-ast.o:     setl-ast.cc basics.h ir.h ast.h setl-ast.h 
224 dataflow.o:     dataflow.cc dataflow.h ir.h ast.h basics.h type.h
225 documentation.o: documentation.cc parser.h ir.h ast.h textbuf.h
226 collection.o:   collection.cc collection.h basics.h type.h ir.h 
227 setlgen.o:      setlgen.cc setlgen.h basics.h setl-ast.h ir.h ast.h type.h \
228                 matchcom.h codegen.h 
229 setltype.o:     setltype.cc setlgen.h basics.h setl-ast.h ir.h ast.h type.h \
230                 matchcom.h codegen.h env.h
231 env.o:          env.cc env.h basics.h type.h ir.h
232 options.o:      options.cc options.h config.h
233 timespace.o:    timespace.cc timespace.h basics.h 
234 metasyntax.o:   metasyntax.cc metasyntax.h \
235                 basics.h ir.h ast.h type.h patenv.h parsegen.h \
236                 options.h
237 constraint.o:   constraint.cc constraint.h basics.h ir.h ast.h type.h \
238                 matchcom.h setlgen.h wam.h list.h datagen.h
239 logicgen.o:     logicgen.cc constraint.h basics.h ir.h ast.h type.h \
240                 logicgen.h matchcom.h setlgen.h wam.h list.h datagen.h \
241                 pat.h 
242 wam.o:          wam.cc wam.h basics.h type.h ir.h 
243 pat.o:          pat.cc basics.h ir.h matchcom.h pat.h type.h
244 grsgen.o:       grsgen.cc grsgen.h basics.h ir.h ast.h matchcom.h codegen.h \
245                 type.h pat.h 
246 graphtype.o:    graphtype.cc graphtype.h basics.h ir.h ast.h matchcom.h \
247                 codegen.h type.h pat.h classdef.h
248 graphrep.o:     graphrep.cc graphedges.h \
249                 graphtype.h basics.h ir.h ast.h matchcom.h \
250                 codegen.h type.h pat.h classdef.h
251 graphops.o:     graphops.cc graphedges.h \
252                 graphtype.h basics.h ir.h ast.h matchcom.h \
253                 codegen.h type.h pat.h classdef.h
254 graphreport.o:  graphreport.cc graphedges.h \
255                 graphtype.h basics.h \
256                 codegen.h type.h classdef.h
257 classdef.o:     classdef.cc classdef.h basics.h ir.h ast.h codegen.h 
259 T%.cc:  T%.pcc $(PROP)
260         $(PROP) $(PROP_OPTS_BASIC) $(@:.cc=.pcc)
261 %.h:    %.ph
262         $(PROP) $(PROP_OPTS) $(@:.h=.ph)
263 %.cc:   %.pcc
264         $(PROP) $(PROP_OPTS) $(@:.cc=.pcc)
265 %.o:    %.cc
266         $(CC) -c $(CC_OPTS) $(@:.o=.cc)
268 T%:     T%.cc 
269         $(CC) $@.cc -o $@ -O6 $(CC_OPTS) $(LD_OPTS)