]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile.cygwin
Check In tool source code based on Build tool project revision r1655.
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / Pccts / antlr / makefile.cygwin
1 #
2 # Makefile for ANTLR 1.33
3 #
4 # SOFTWARE RIGHTS
5 #
6 # We reserve no LEGAL rights to the Purdue Compiler Construction Tool
7 # Set (PCCTS) -- PCCTS is in the public domain. An individual or
8 # company may do whatever they wish with source code distributed with
9 # PCCTS or the code generated by PCCTS, including the incorporation of
10 # PCCTS, or its output, into commerical software.
11 #
12 # We encourage users to develop software with PCCTS. However, we do ask
13 # that credit is given to us for developing PCCTS. By "credit",
14 # we mean that if you incorporate our source code into one of your
15 # programs (commercial product, research project, or otherwise) that you
16 # acknowledge this fact somewhere in the documentation, research report,
17 # etc... If you like PCCTS and have developed a nice tool with the
18 # output, please mention that you developed it using PCCTS. In
19 # addition, we ask that this header remain intact in our source code.
20 # As long as these guidelines are kept, we expect to continue enhancing
21 # this system and expect to make other tools available as they are
22 # completed.
23 #
24 # ANTLR 1.33
25 # Terence Parr
26 # Parr Research Corporation
27 # with Purdue University
28 # and AHPCRC, University of Minnesota
29 # 1989-1995
30 #
31 # Ported to Borland C++, IBM C-Set/2 and Microsoft 6.0 by
32 # Ed Harfmann
33 # Micro Data Base Systems
34 # Lafayette, Indiana
35 #
36 SET=../support/set
37 PCCTS_H=../h
38
39 ##
40 ## Uncomment the appropriate section to build
41 ## (both targets and 'make' variable definitions)
42 ## Note that UNIX is the default
43 ##
44
45 #
46 # OS/2 & DOS 16 bit using MSC 6.0
47 #
48 #CC=cl
49 #ANTLR=..\bin\antlr
50 #DLG=..\bin\dlg
51 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /AL /Za /W3 -DPC -DUSER_ZZSYN
52 #OUT_OBJ = -Fo
53 #LIBS=/NOD:LLIBCE LLIBCEP
54 #OBJ_EXT = obj
55 #
56 #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
57 # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
58 # misc.obj set.obj pred.obj egamn.obj
59 # link @<<
60 #$** /NOI
61 #$@ /STACK:14336
62 #
63 #$(LIBS: = +^
64 #)
65 #$(DEF_FILE) $(LFLAGS) ;
66 #<<
67 # bind $@ c:\os2\doscalls.lib
68 # copy *.exe ..\bin
69 #
70
71 #
72 # Borland C++ for DOS
73 #
74 #CC=bcc
75 #ANTLR=..\bin\antlr
76 #DLG=..\bin\dlg
77 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -ml -ff- -w- -DPC -DUSER_ZZSYN
78 #OUT_OBJ = -o
79 #LIBS= emu mathl cl
80 #OBJ_EXT = obj
81 #
82 #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
83 # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
84 # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj
85 # tlink @&&|
86 #C0L $**
87 #$@ /Tde /c
88 #
89 #$(LIBS)
90 #$(DEF_FILE) $(LFLAGS) ;
91 #|
92 # copy *.exe ..\bin
93 #
94
95 #
96 # C-Set/2 for OS/2
97 #
98 #CC=icc
99 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /Sa /W3 -DUSER_ZZSYN -D__STDC__
100 #OUT_OBJ = -Fo
101 #LIBS=
102 #ANTLR=..\bin\antlr
103 #DLG=..\bin\dlg
104 #OBJ_EXT = obj
105 #
106 #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
107 # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
108 # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj
109 # link386 @<<
110 #$** /NOI
111 #$@ /STACK:32768
112 #
113 #$(LIBS: = +^
114 #)
115 #$(DEF_FILE) $(LFLAGS) ;
116 #<<
117 # copy *.exe ..\bin
118 #
119
120 #
121 # Borland C++ for OS/2
122 #
123 #CC=bcc
124 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -w- -v -DUSER_ZZSYN
125 #OUT_OBJ = -o
126 #LIBS= c2 os2
127 #
128 #ANTLR=..\bin\antlr
129 #DLG=..\bin\dlg
130 #OBJ_EXT = obj
131 #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
132 # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
133 # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj
134 # tlink @&&|
135 #c02 $** -c -v
136 #antlr.exe
137 #
138 #C2 os2
139 #
140 #|
141 # copy *.exe ..\bin
142 #
143
144 # *********** Target list of PC machines ***********
145 #
146 # Don't worry about the ambiguity messages coming from antlr
147 # for making antlr.c etc... [should be 10 of them, I think]
148 #
149 #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
150 # $(ANTLR) antlr.g
151 #
152 #antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
153 #
154 #scan.$(OBJ_EXT): scan.c mode.h tokens.h
155 #
156 #scan.c mode.h: parser.dlg
157 # $(DLG) -C2 parser.dlg scan.c
158 #
159 #set.$(OBJ_EXT): $(SET)/set.c
160 # $(CC) $(CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c
161
162
163
164 #
165 # UNIX (default)
166 #
167 BIN_DIR=../../../../bin
168 CC=gcc
169 COPT=-O
170 ANTLR=$(BIN_DIR)/antlr.exe
171 DLG=${BIN_DIR}/dlg.exe
172 OBJ_EXT=o
173 OUT_OBJ = -o
174 CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) -DZZLEXBUFSIZE=65536
175 #
176 # SGI Users, use this CFLAGS
177 #
178 #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -woff 3262
179 OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \
180 globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o
181
182 antlr : $(OBJ) $(SRC)
183 $(CC) $(CFLAGS) -o $(BIN_DIR)/antlr.exe $(OBJ)
184
185 # what files does PCCTS generate (both ANTLR and DLG)
186 PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
187
188 SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \
189 hash.c lex.c main.c misc.c $(SET)/set.c pred.c egman.c mrhoist.c fcache.c
190
191 #
192 # Don't worry about the ambiguity messages coming from antlr
193 # for making antlr.c etc... [should be 10 of them, I think]
194 #
195 #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
196 # $(ANTLR) -gh antlr.g
197
198 antlr.o : antlr.c mode.h tokens.h
199
200 scan.o : scan.c mode.h tokens.h
201
202 #scan.c mode.h: parser.dlg
203 # $(DLG) -C2 parser.dlg scan.c
204
205 set.o : $(SET)/set.c
206 $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c
207
208
209 #
210 # ****** These next targets are common to UNIX and PC world ********
211 #
212
213 #clean up all the intermediate files
214 clean:
215 rm -f *.$(OBJ_EXT) core
216
217 #remove everything in clean plus the PCCTS files generated
218 scrub:
219 rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core