]> andersk Git - splint.git/blob - src/Makefile.os2
Initial revision
[splint.git] / src / Makefile.os2
1 ##################################################
2 ###                                         
3 ### Makefile for OS/2 version of LCLint                     
4 ###                                         
5 ### designed for use with gmake (GNU make)
6 ###
7 ### based on David Evans' original makefile for Unix systems
8 ###
9 ### This file should not need to be edited. 
10 ###
11 ### configuration is set by top-level makefile and written to file
12 ###  config.inc included by this file.
13 ###
14 ### Commands:
15 ###
16 ### make all 
17 ###    builds a release version of lclint from scratch using optimizations
18 ###
19
20 O=.o
21 E=
22
23
24 include ../config.inc
25
26 .SUFFIXES:
27 .SUFFIXES: $E $O .h .c .l .check
28
29 ###
30 ### object files needed for building lclint:
31 ###  note that there is no dependency checking done!
32 ###
33 OBJ=abstract$O aliasChecks$O aliasTable$O cgrammar$O checking$O \
34     clabstract$O clause$O clauseStack$O context$O cprim$O cscanner$O \
35     cstring$O cstringSList$O ctype$O ctypeList$O cvar$O \
36     declaratorInvNodeList$O declaratorNodeList$O ekind$O enumNameList$O \
37     enumNameSList$O exprChecks$O exprNode$O exprNodeList$O \
38     exprNodeSList$O fcnNodeList$O fileIdList$O fileStack$O fileTable$O \
39     fileloc$O filelocList$O filelocStack$O flagMarker$O flagMarkerList$O \
40     flags$O general$O globSet$O globals$O guardSet$O hashTable$O \
41     idDecl$O idDeclList$O importNodeList$O imports$O indxMap$O \
42     initDeclNodeList$O intSet$O interfaceNodeList$O lclctypes$O lclinit$O \
43     lcllib$O lclscan$O lclscanline$O lclsyntable$O lcltokentable$O \
44     letDeclNodeList$O lh$O llerror$O llgrammar$O llmain$O lltok$O \
45     lslOpList$O lslOpSet$O lslinit$O lslparse$O lsymbol$O lsymbolList$O \
46     lsymbolSet$O ltoken$O ltokenList$O macrocache$O mapping$O message$O \
47     messageLog$O multiVal$O nameChecks$O osd$O out$O pairNodeList$O \
48     paramNodeList$O pcpp$O programNodeList$O qtype$O qual$O qualList$O \
49     quantifierNodeList$O replaceNodeList$O sRef$O sRefSet$O sRefSetList$O \
50     sRefTable$O scan$O scanline$O shift$O sigNodeSet$O signature$O \
51     sort$O sortList$O sortSet$O sortSetList$O source$O specialClauses$O \
52     stDeclNodeList$O storeRefNodeList$O structNames$O symtable$O  \
53     syntable$O termNodeList$O tokentable$O traitRefNodeList$O typeIdSet$O \
54     typeNameNodeList$O uentry$O uentryList$O usymIdSet$O usymtab$O \
55     usymtab_interface$O varDeclarationNodeList$O varKinds$O varNodeList$O \
56     ynm$O 
57
58
59 ###
60 ### main (and only) target: lclint with all optimizations.
61 ###
62
63 all : lclint$E
64 lclint$E : $(OBJ) 
65         $(CC) $(OFLAG) $(OBJ) $(LINKFLAGS)
66
67 ###
68 ### subtarget: local constants header file.
69 ###
70
71 localconstants:
72         cmd /c if exist Headers\local_constants.last del Headers\local_constants.last
73         cmd /c if exist Headers\local_constants.h ren Headers\local_constants.h local_constants.last
74         echo /* local_constants.h - created automatically by gmake localconstants */ > Headers\local_constants.h
75         echo /*@constant observer char *DEFAULT_CPPCMD;@*/ >> Headers\local_constants.h 
76         echo # define DEFAULT_CPPCMD $(DEFAULT_CPPCMD) >> Headers\local_constants.h
77         echo /*@constant observer char *SYSTEM_LIBDIR;@*/ >> Headers\local_constants.h 
78         echo # define SYSTEM_LIBDIR $(SYSTEM_LIBDIR) >> Headers\local_constants.h 
79         echo /*@constant observer char *DEFAULT_LARCHPATH;@*/ >> Headers\local_constants.h 
80         echo # define DEFAULT_LARCHPATH $(DEFAULT_LARCHPATH) >> Headers\local_constants.h 
81         echo /*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/ >> Headers\local_constants.h 
82         echo # define DEFAULT_LCLIMPORTDIR $(DEFAULT_LCLIMPORTDIR) >> Headers\local_constants.h 
83
84 ###
85 ### grammars
86 ###
87
88 ###
89 ### -p xx flag to bison renames yyparse ==> xxparse, xxlex ==> xxlex
90 ### this is probably NOT compatible with yacc.
91 ###
92
93 signature.c : signature.c.der signature.y
94 ifdef BISON
95         $(BISON) $(YFLAGS) -p lsl signature.y
96         $(CAT) bison.head signature.tab.c > signature.c
97         $(MV) Headers\signature_gen.h Headers\signature_gen.bak
98         $(CAT) bison.head signature.tab.h > Headers\signature_gen.h
99 else
100         (CP) signature.c.der signature.c
101 endif
102
103 cgrammar.c : cgrammar.c.der cgrammar.y
104 ifdef BISON
105         $(BISON) $(YFLAGS) cgrammar.y
106         $(CAT) bison.head cgrammar.tab.c > cgrammar.c
107         $(MV) Headers\cgrammar_tokens.h Headers\cgrammar_tokens.bak
108         $(CAT) bison.head cgrammar.tab.h > Headers\cgrammar_tokens.h
109 else
110         $(CP) cgrammar.c.der cgrammar.c
111 endif
112
113 ### llgrammar2.h is necessary so +singleinclude may be used
114
115 llgrammar.c  : llgrammar.c.der llgrammar.y
116 ifdef BISON
117         $(BISON) $(YFLAGS) -p yl llgrammar.y
118         $(CAT) bison.head llgrammar.tab.c > llgrammar.c
119         $(MV) Headers\llgrammar_gen2.h Headers\llgrammar_gen2.bak
120         $(CAT) bison.head llgrammar.tab.h > Headers\llgrammar_gen2.h
121         $(MV) Headers\llgrammar_gen.h Headers\llgrammar_gen.bak
122         $(CAT) bison.head llgrammar.tab.h > Headers\llgrammar_gen.h
123 else
124         $(CP) llgrammar.c.der llgrammar.c
125 endif
126
127 cscanner.c : cscanner.c.der cscanner.l
128 ifdef FLEX                              
129         $(FLEX) $(LFLAGS) -olex.yy.c cscanner.l  
130         $(CAT) flex.head lex.yy.c > cscanner.c
131 else
132         $(CP) cscanner.c.der cscanner.c
133 endif
134
135 ###
136 ### header files dependant on grammars
137 ###
138
139 Headers\signature2.h : signature.c
140 Headers\cgrammar2.h : cgrammar.c
141 Headers\llgrammar.h : llgrammar.c
142
143 ###
144 ### defaults
145 ###
146
147 ### Flags for checking a single file
148 SINGLEFLAGS = +neverinclude -supcounts +partial -showsummary -load lclint.lcd
149
150 .c$O:
151         $(CC) $(CPPFLAGS) -c $*.c 
152
153 ###
154 ### cleaning
155 ###
156 ### Standard entries to remove files from the directories
157 ###    up       --- remove .o files and grammar derivatives
158 ###    tidy     --- eliminate unwanted files
159 ###    clean    --- delete derived files, except for spec-derived files
160 ###    pristine --- delete all derived files
161 ###
162
163 pristine: clean
164         -$(RM) -f *.lcs *.lslo
165
166 clean: tidy
167         -$(RM) core lclint 
168         -$(RM) *.out *.output *.bib *.dvi *.idx *.log *$O *.toc
169         -$(RM) cgrammar.c cscanner.c
170
171 tidy:
172         -$(RM) ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~
173
174 up: 
175         -$(RM) cgrammar.c llgrammar.c signature.c cscanner.c 
176         -$(RM) *$O
177
178 ###
179 ### other flags are in .lclintrc file
180 ### 
181
182 lint: 
183         $(LCLINT) -f lclint.lclintrc $(CPPFLAGS) +singleinclude $(ALLSRC) -dump lclint
184
185
186
187
This page took 0.050359 seconds and 5 git commands to generate.