]>
Commit | Line | Data |
---|---|---|
87fa79e5 | 1 | #\r |
2 | # splint Makefile for GNU Make on OS/2 systems\r | |
3 | #\r | |
4 | # Derived from original Unix makefile by Herbert\r | |
5 | #\r | |
6 | \r | |
7 | SHELL = /usr/bin/ksh\r | |
8 | \r | |
9 | include ../os2/make.vars\r | |
10 | binDir = ../bin\r | |
11 | \r | |
12 | \r | |
13 | .SUFFIXES = \r | |
14 | .SUFFIXES = .c .h $O $(EXEEXT) .l .check\r | |
15 | \r | |
16 | # Some preferences\r | |
17 | ### We use the no-lines option to prevent confusion with splint flag settings.\r | |
18 | ### Should fix splint to avoid this...\r | |
19 | YFLAGS = -v -t -d --debug --no-lines\r | |
20 | LFLAGS = -L\r | |
21 | \r | |
22 | BISON_SRC = cgrammar.y llgrammar.y mtgrammar.y signature.y\r | |
23 | \r | |
24 | \r | |
25 | ## We only build Splint\r | |
26 | bin_PROGRAMS = splint$(EXEEXT)\r | |
27 | \r | |
28 | ## This is a fake program, so we can easily substitute in the extra LCL objects\r | |
29 | EXTRA_PROGRAMS = lcl\r | |
30 | \r | |
31 | AM_CPPFLAGS = -IHeaders\r | |
32 | \r | |
33 | ## The main sources\r | |
34 | \r | |
35 | SETSRC = globSet.c intSet.c typeIdSet.c guardSet.c usymIdSet.c sRefSet.c\r | |
36 | \r | |
37 | LISTSRC = clauseStack.c filelocStack.c \\r | |
38 | cstringList.c cstringSList.c sRefSetList.c ctypeList.c \\r | |
39 | enumNameList.c enumNameSList.c exprNodeList.c exprNodeSList.c \\r | |
40 | uentryList.c fileIdList.c filelocList.c qualList.c sRefList.c \\r | |
41 | flagMarkerList.c idDeclList.c flagSpec.c\r | |
42 | \r | |
43 | CPPSRC = cppmain.c cpplib.c cppexp.c cpphash.c cpperror.c\r | |
44 | \r | |
45 | CSRC = uentry.c cprim.c macrocache.c qual.c qtype.c stateClause.c \\r | |
46 | stateClauseList.c ctype.c cvar.c clabstract.c idDecl.c clause.c \\r | |
47 | globalsClause.c modifiesClause.c warnClause.c functionClause.c \\r | |
48 | functionClauseList.c metaStateConstraint.c metaStateConstraintList.c \\r | |
49 | metaStateExpression.c metaStateSpecifier.c functionConstraint.c\r | |
50 | \r | |
51 | SPLINTSRC = exprNode.c exprChecks.c llmain.c\r | |
52 | CHECKSRC = structNames.c transferChecks.c varKinds.c nameChecks.c\r | |
53 | \r | |
54 | GLOBSRC = context.c globals.c flags.c general.c osd.c reader.c mtreader.c\r | |
55 | \r | |
56 | GRAMSRC = cgrammar.c cscanner.c mtscanner.c mtgrammar.c llgrammar.c signature.c\r | |
57 | \r | |
58 | OVERFLOWCHSRC = constraintGeneration.c constraintTerm.c \\r | |
59 | constraintExprData.c constraintExpr.c constraint.c \\r | |
60 | constraintList.c constraintResolve.c \\r | |
61 | constraintOutput.c loopHeuristics.c \r | |
62 | \r | |
63 | GENERALSRC = exprData.c cstring.c fileloc.c message.c inputStream.c \\r | |
64 | fileTable.c cstringTable.c valueTable.c stateValue.c \\r | |
65 | llerror.c messageLog.c flagMarker.c aliasTable.c ynm.c \\r | |
66 | sRefTable.c genericTable.c ekind.c usymtab.c multiVal.c \\r | |
67 | lltok.c sRef.c lcllib.c randomNumbers.c fileLib.c\r | |
68 | \r | |
69 | METASTATESRC = stateInfo.c stateCombinationTable.c metaStateTable.c \\r | |
70 | metaStateInfo.c annotationTable.c annotationInfo.c mttok.c \\r | |
71 | mtDeclarationNode.c mtDeclarationPieces.c mtDeclarationPiece.c \\r | |
72 | mtContextNode.c mtValuesNode.c mtDefaultsNode.c \\r | |
73 | mtAnnotationsNode.c mtMergeNode.c mtAnnotationList.c \\r | |
74 | mtAnnotationDecl.c mtTransferClauseList.c mtTransferClause.c \\r | |
75 | mtTransferAction.c mtLoseReferenceList.c mtLoseReference.c \\r | |
76 | mtDefaultsDeclList.c mtDefaultsDecl.c mtMergeItem.c \\r | |
77 | mtMergeClause.c mtMergeClauseList.c\r | |
78 | \r | |
79 | ## These are only used if LCL is enabled\r | |
80 | \r | |
81 | LCLONLYSRC = usymtab_interface.c abstract.c ltoken.c lclscanline.c \\r | |
82 | lclsyntable.c lcltokentable.c sort.c symtable.c lclinit.c \\r | |
83 | shift.c lclscan.c lsymbol.c mapping.c\r | |
84 | \r | |
85 | LSLSRC = tokentable.c scan.c scanline.c lslparse.c \\r | |
86 | lh.c checking.c lclctypes.c imports.c lslinit.c syntable.c \r | |
87 | \r | |
88 | LCLSETSRC = lsymbolSet.c sigNodeSet.c lslOpSet.c sortSet.c\r | |
89 | \r | |
90 | LCLLISTSRC = initDeclNodeList.c sortList.c declaratorInvNodeList.c \\r | |
91 | interfaceNodeList.c sortSetList.c declaratorNodeList.c \\r | |
92 | letDeclNodeList.c stDeclNodeList.c storeRefNodeList.c \\r | |
93 | lslOpList.c lsymbolList.c termNodeList.c ltokenList.c \\r | |
94 | traitRefNodeList.c pairNodeList.c typeNameNodeList.c \\r | |
95 | fcnNodeList.c paramNodeList.c programNodeList.c \\r | |
96 | varDeclarationNodeList.c varNodeList.c quantifierNodeList.c \\r | |
97 | replaceNodeList.c importNodeList.c\r | |
98 | \r | |
99 | IFILES = ctbase.i cttable.i exprDataQuite.i\r | |
100 | \r | |
101 | \r | |
102 | #Files that are used on systems that do not have bison or yacc\r | |
103 | DER_BISON_FILES = signature.c.der cgrammar.c.der mtgrammar.c.der \\r | |
104 | llgrammar.c.der \r | |
105 | DER_FILES = $(DER_BISON_FILES)\r | |
106 | \r | |
107 | \r | |
108 | COMMONSRC = $(OVERFLOWCHSRC) $(CPPSRC) $(CSRC) $(CHECKSRC) $(GENERALSRC) \\r | |
109 | $(GLOBSRC) $(IFACESRC) $(LISTSRC) $(SETSRC) $(METASTATESRC)\r | |
110 | \r | |
111 | ALLSRC = $(GRAMSRC) $(COMMONSRC) $(SPLINTSRC) $(DER_FILES) \r | |
112 | \r | |
113 | #files to run Splint on\r | |
114 | LINTSRC = $(COMMONSRC) $(SPLINTSRC)\r | |
115 | \r | |
116 | LCLSRC = $(LCLSETSRC) $(LCLLISTSRC) $(LSLSRC) $(CMNSRC) $(LCLONLYSRC) \r | |
117 | lcl_SOURCES = $(LCLSRC)\r | |
118 | CONFIG_HEADER = $(top_builddir)/config.h\r | |
119 | \r | |
120 | splint_SOURCES = $(ALLSRC)\r | |
121 | \r | |
122 | lcl_OBJECTS = lsymbolSet$O sigNodeSet$O \\r | |
123 | lslOpSet$O sortSet$O initDeclNodeList$O \\r | |
124 | sortList$O declaratorInvNodeList$O \\r | |
125 | interfaceNodeList$O sortSetList$O \\r | |
126 | declaratorNodeList$O letDeclNodeList$O \\r | |
127 | stDeclNodeList$O storeRefNodeList$O \\r | |
128 | lslOpList$O lsymbolList$O \\r | |
129 | termNodeList$O ltokenList$O \\r | |
130 | traitRefNodeList$O pairNodeList$O \\r | |
131 | typeNameNodeList$O fcnNodeList$O \\r | |
132 | paramNodeList$O programNodeList$O \\r | |
133 | varDeclarationNodeList$O varNodeList$O \\r | |
134 | quantifierNodeList$O replaceNodeList$O \\r | |
135 | importNodeList$O tokentable$O scan$O \\r | |
136 | scanline$O lslparse$O lh$O \\r | |
137 | checking$O lclctypes$O imports$O \\r | |
138 | lslinit$O syntable$O \\r | |
139 | usymtab_interface$O abstract$O ltoken$O \\r | |
140 | lclscanline$O lclsyntable$O \\r | |
141 | lcltokentable$O sort$O symtable$O \\r | |
142 | lclinit$O shift$O lclscan$O \\r | |
143 | lsymbol$O mapping$O\r | |
144 | \r | |
145 | splint_OBJECTS = cgrammar$O cscanner$O \\r | |
146 | mtscanner$O mtgrammar$O llgrammar$O \\r | |
147 | signature$O constraintGeneration$O \\r | |
148 | constraintTerm$O constraintExprData$O \\r | |
149 | constraintExpr$O constraint$O \\r | |
150 | constraintList$O constraintResolve$O \\r | |
151 | constraintOutput$O loopHeuristics$O \\r | |
152 | cppmain$O cpplib$O cppexp$O \\r | |
153 | cpphash$O cpperror$O uentry$O \\r | |
154 | cprim$O macrocache$O qual$O \\r | |
155 | qtype$O stateClause$O stateClauseList$O \\r | |
156 | ctype$O cvar$O clabstract$O \\r | |
157 | idDecl$O clause$O globalsClause$O \\r | |
158 | modifiesClause$O warnClause$O \\r | |
159 | functionClause$O functionClauseList$O \\r | |
160 | metaStateConstraint$O metaStateConstraintList$O \\r | |
161 | metaStateExpression$O metaStateSpecifier$O \\r | |
162 | functionConstraint$O structNames$O \\r | |
163 | transferChecks$O varKinds$O \\r | |
164 | nameChecks$O exprData$O cstring$O \\r | |
165 | fileloc$O message$O inputStream$O \\r | |
166 | fileTable$O cstringTable$O valueTable$O \\r | |
167 | stateValue$O llerror$O messageLog$O \\r | |
168 | flagMarker$O aliasTable$O ynm$O \\r | |
169 | sRefTable$O genericTable$O ekind$O \\r | |
170 | usymtab$O multiVal$O lltok$O \\r | |
171 | sRef$O lcllib$O randomNumbers$O \\r | |
172 | fileLib$O context$O globals$O \\r | |
173 | flags$O general$O osd$O \\r | |
174 | reader$O mtreader$O clauseStack$O \\r | |
175 | filelocStack$O cstringList$O \\r | |
176 | cstringSList$O sRefSetList$O \\r | |
177 | ctypeList$O enumNameList$O \\r | |
178 | enumNameSList$O exprNodeList$O \\r | |
179 | exprNodeSList$O uentryList$O \\r | |
180 | fileIdList$O filelocList$O qualList$O \\r | |
181 | sRefList$O flagMarkerList$O \\r | |
182 | idDeclList$O flagSpec$O globSet$O \\r | |
183 | intSet$O typeIdSet$O guardSet$O \\r | |
184 | usymIdSet$O sRefSet$O stateInfo$O \\r | |
185 | stateCombinationTable$O metaStateTable$O \\r | |
186 | metaStateInfo$O annotationTable$O \\r | |
187 | annotationInfo$O mttok$O \\r | |
188 | mtDeclarationNode$O mtDeclarationPieces$O \\r | |
189 | mtDeclarationPiece$O mtContextNode$O \\r | |
190 | mtValuesNode$O mtDefaultsNode$O \\r | |
191 | mtAnnotationsNode$O mtMergeNode$O \\r | |
192 | mtAnnotationList$O mtAnnotationDecl$O \\r | |
193 | mtTransferClauseList$O mtTransferClause$O \\r | |
194 | mtTransferAction$O mtLoseReferenceList$O \\r | |
195 | mtLoseReference$O mtDefaultsDeclList$O \\r | |
196 | mtDefaultsDecl$O mtMergeItem$O \\r | |
197 | mtMergeClause$O mtMergeClauseList$O \\r | |
198 | exprNode$O exprChecks$O llmain$O\r | |
199 | \r | |
200 | # Keep it fake\r | |
201 | .PHONY: lcl$(EXEEXT)\r | |
202 | \r | |
203 | DEFS = -DHAVE_CONFIG_H\r | |
204 | DEFAULT_INCLUDES = -I. -I..\r | |
205 | LDADD = $(lcl_OBJECTS) \r | |
206 | \r | |
207 | ## Sources that need to be built\r | |
208 | BUILT_SOURCES = Headers/signature_gen.h Headers/cgrammar_tokens.h \\r | |
209 | Headers/llgrammar_gen.h Headers/llgrammar_gen2.h \\r | |
210 | Headers/mtgrammar_tokens.h signature.c cgrammar.c \\r | |
211 | llgrammar.c mtgrammar.c Headers/flag_codes.gen \\r | |
212 | $(DER_FILES)\r | |
213 | \r | |
214 | all: $(BUILT_SOURCES) splint$(EXEEXT) $(binDir)/splint$(EXEEXT)\r | |
215 | \r | |
216 | Headers/signature_gen.h signature.c: signature.c.der signature.y\r | |
217 | ifndef BISON\r | |
218 | $(CP) signature.c.der signature.c\r | |
219 | else \r | |
220 | echo "Making signature.c"\r | |
221 | $(BISON) $(YFLAGS) -p lsl signature.y\r | |
222 | $(CAT) bison.head signature.tab.c bison.reset >signature.c\r | |
223 | $(CP) signature.c signature.c.der\r | |
224 | -$(MV) Headers/signature_gen.h Headers/signature_gen.bak\r | |
225 | $(CAT) bison.head signature.tab.h bison.reset >Headers/signature_gen.h\r | |
226 | $(RM) signature.tab.c signature.tab.h\r | |
227 | endif\r | |
228 | \r | |
229 | ## 11/29/001 drl added copy so that the file cgrammar.c.der is created\r | |
230 | \r | |
231 | Headers/cgrammar_tokens.h cgrammar.c: cgrammar.c.der cgrammar.y\r | |
232 | ifndef BISON\r | |
233 | $(CP) cgrammar.c.der cgrammar.c\r | |
234 | else \r | |
235 | @echo "Making cgrammar.c"\r | |
236 | @echo "Expect 141 shift/reduce conflicts and 111 reduce/reduce conflicts."\r | |
237 | @echo "(see cgrammar.y for explanation)"\r | |
238 | $(BISON) $(YFLAGS) cgrammar.y\r | |
239 | $(CAT) bison.head cgrammar.tab.c bison.reset >cgrammar.c\r | |
240 | $(CP) cgrammar.c cgrammar.c.der\r | |
241 | -$(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak\r | |
242 | $(CAT) bison.head cgrammar.tab.h bison.reset >Headers/cgrammar_tokens.h\r | |
243 | $(RM) cgrammar.tab.c cgrammar.tab.h\r | |
244 | endif\r | |
245 | \r | |
246 | ## 10/16/001 drl added copy so that the file mtgrammar.c.der is created\r | |
247 | ## also removed the dependency for this file on mtgrammary.c \r | |
248 | \r | |
249 | Headers/mtgrammar_tokens.h mtgrammar.c: mtgrammar.y\r | |
250 | ifndef BISON\r | |
251 | $(CP) mtgrammar.c.der mtgrammar.c\r | |
252 | else \r | |
253 | @echo "Making mtgrammar.c"\r | |
254 | @echo "Expect 11 shift/reduce conflicts."\r | |
255 | $(BISON) $(YFLAGS) -p mt mtgrammar.y\r | |
256 | $(CAT) bison.head mtgrammar.tab.c bison.reset >mtgrammar.c\r | |
257 | $(CP) mtgrammar.c mtgrammar.c.der\r | |
258 | -$(MV) Headers/mtgrammar_tokens.h Headers/mtgrammar_tokens.bak\r | |
259 | $(CAT) bison.head mtgrammar.tab.h bison.reset >Headers/mtgrammar_tokens.h\r | |
260 | $(RM) mtgrammar.tab.c mtgrammar.tab.h\r | |
261 | endif\r | |
262 | \r | |
263 | Headers/llgrammar_gen.h Headers/llgrammar_gen2.h llgrammar.c: llgrammar.c.der llgrammar.y\r | |
264 | ifndef BISON\r | |
265 | $(CP) llgrammar.c.der llgrammar.c\r | |
266 | else \r | |
267 | @echo "Making llgrammar.c"\r | |
268 | @echo "Expect 2 shift/reduce conflicts"\r | |
269 | $(BISON) $(YFLAGS) -p yl llgrammar.y\r | |
270 | $(CAT) bison.head llgrammar.tab.c bison.reset >llgrammar.c\r | |
271 | $(CP) llgrammar.c llgrammar.c.der\r | |
272 | -$(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak\r | |
273 | -$(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak\r | |
274 | $(CAT) bison.head llgrammar.tab.h bison.reset >Headers/llgrammar_gen2.h\r | |
275 | $(CAT) bison.head llgrammar.tab.h bison.reset >Headers/llgrammar_gen.h\r | |
276 | $(RM) llgrammar.tab.c llgrammar.tab.h\r | |
277 | endif\r | |
278 | \r | |
279 | cscanner.c: cscanner.l\r | |
280 | $(FLEX) $(LFLAGS) cscanner.l \r | |
281 | $(CAT) flex.head lexyy.c flex.reset > cscanner.c\r | |
282 | \r | |
283 | Headers/flag_codes.gen: flags.def\r | |
284 | grep "FLG_" flags.def > Headers/flag_codes.gen\r | |
285 | $(MAKE)\r | |
286 | cd ../lib; $(MAKE)\r | |
287 | \r | |
288 | $(binDir)/splint$(EXEEXT): splint$(EXEEXT)\r | |
289 | -$(RM) -f $(binDir)/splint$(EXEEXT)\r | |
290 | $(CP) splint$(EXEEXT) $(binDir)/splint$(EXEEXT)\r | |
291 | \r | |
292 | up: clean\r | |
293 | rm -f cgrammar.c llgrammar.c mtgrammar.c signature.c cscanner.c\r | |
294 | \r | |
295 | \r | |
296 | clean: \r | |
297 | -rm -f $(splint_OBJECTS) core *.core *~ \r | |
298 | \r | |
299 | \r | |
300 | CLEANFILES = splint$(EXEEXT) $(binDir)/splint$(EXEEXT)\r | |
301 | \r | |
302 | %$O: %.c\r | |
303 | $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) -c $<\r | |
304 | \r | |
305 | splint$(EXEEXT) : $(splint_OBJECTS) $(lcl_OBJECTS)\r | |
306 | $(CC) $(OFLAG)$@ $^ $(LDFLAGS)\r | |
307 | \r | |
308 | list:\r | |
309 | @echo "$(splint_OBJECTS)"\r |