2 # Makefile for ANTLR 1.33
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.
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
26 # Parr Research Corporation
27 # with Purdue University
28 # and AHPCRC, University of Minnesota
31 # Ported to Borland C++, IBM C-Set/2 and Microsoft 6.0 by
33 # Micro Data Base Systems
40 ## Uncomment the appropriate section to build
41 ## (both targets and 'make' variable definitions)
42 ## Note that UNIX is the default
46 # OS/2 & DOS 16 bit using MSC 6.0
51 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /AL /Za /W3 -DPC -DUSER_ZZSYN
53 #LIBS=/NOD:LLIBCE LLIBCEP
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
65 #$(DEF_FILE) $(LFLAGS) ;
67 # bind $@ c:\os2\doscalls.lib
77 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -ml -ff- -w- -DPC -DUSER_ZZSYN
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
90 #$(DEF_FILE) $(LFLAGS) ;
99 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /Sa /W3 -DUSER_ZZSYN -D__STDC__
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
115 #$(DEF_FILE) $(LFLAGS) ;
121 # Borland C++ for OS/2
124 #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -w- -v -DUSER_ZZSYN
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
144 # *********** Target list of PC machines ***********
146 # Don't worry about the ambiguity messages coming from antlr
147 # for making antlr.c etc... [should be 10 of them, I think]
149 #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
152 #antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
154 #scan.$(OBJ_EXT): scan.c mode.h tokens.h
156 #scan.c mode.h: parser.dlg
157 # $(DLG) -C2 parser.dlg scan.c
159 #set.$(OBJ_EXT): $(SET)/set.c
160 # $(CC) $(CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c
172 CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN
174 # SGI Users, use this CFLAGS
176 #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -woff 3262
177 OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \
178 globals.o hash.o lex.o main.o misc.o set.o pred.o
180 antlr : $(OBJ) $(SRC)
181 $(CC) $(CFLAGS) -o antlr $(OBJ)
184 # what files does PCCTS generate (both ANTLR and DLG)
185 PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
187 SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \
188 hash.c lex.c main.c misc.c $(SET)/set.c pred.c
191 # Don't worry about the ambiguity messages coming from antlr
192 # for making antlr.c etc... [should be 10 of them, I think]
194 #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
195 # $(ANTLR) -gh antlr.g
197 antlr.o : antlr.c mode.h tokens.h
199 scan.o : scan.c mode.h tokens.h
201 #scan.c mode.h: parser.dlg
202 # $(DLG) -C2 parser.dlg scan.c
205 $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c
209 # ****** These next targets are common to UNIX and PC world ********
212 #clean up all the intermediate files
214 rm -f *.$(OBJ_EXT) core
216 #remove everything in clean plus the PCCTS files generated
218 rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core