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 # UNIX (default) 41 # 42 CC=cc 43 ANTLR=${WORKSPACE}/Tools/bin/antlr 44 DLG=${WORKSPACE}/Tools/bin/dlg 45 OBJ_EXT=o 46 OUT_OBJ = -o 47 ANSI=-ansi 48 AOTHER= 49 CFLAGS= -O0 -g -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) $(ANSI) -DZZLEXBUFSIZE=32000 50 # 51 # SGI Users, use this CFLAGS 52 # 53 #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -woff 3262 54 55 OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \ 56 globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o $(OBJOTHER) 57 58 antlr : $(OBJ) $(SRC) 59 $(CC) $(CFLAGS) -o antlr $(OBJ) 60 mv antlr ${WORKSPACE}/Tools/bin 61 62 # what files does PCCTS generate (both ANTLR and DLG) 63 PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h 64 65 SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \ 66 hash.c lex.c main.c misc.c $(SET)/set.c pred.c egman.c mrhoist.c fcache.c 67 68 # 69 # Don't worry about the ambiguity messages coming from antlr 70 # for making antlr.c etc... [should be 10 of them, I think] 71 # 72 antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g 73 $(ANTLR) -gh antlr.g $(AOTHER) 74 75 antlr.o : antlr.c mode.h tokens.h 76 77 scan.o : scan.c mode.h tokens.h 78 79 scan.c mode.h: parser.dlg 80 $(DLG) -C2 parser.dlg scan.c 81 82 set.o : $(SET)/set.c 83 $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c 84 85 86 # 87 # ****** These next targets are common to UNIX and PC world ******** 88 # 89 90 #clean up all the intermediate files 91 clean: 92 rm -f *.$(OBJ_EXT) core 93 94 #remove everything in clean plus the PCCTS files generated 95 scrub: 96 rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core 97