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