]>
Commit | Line | Data |
---|---|---|
1 | #\r | |
2 | # Makefile for ANTLR 1.33\r | |
3 | #\r | |
4 | # SOFTWARE RIGHTS\r | |
5 | #\r | |
6 | # We reserve no LEGAL rights to the Purdue Compiler Construction Tool\r | |
7 | # Set (PCCTS) -- PCCTS is in the public domain. An individual or\r | |
8 | # company may do whatever they wish with source code distributed with\r | |
9 | # PCCTS or the code generated by PCCTS, including the incorporation of\r | |
10 | # PCCTS, or its output, into commerical software.\r | |
11 | # \r | |
12 | # We encourage users to develop software with PCCTS. However, we do ask\r | |
13 | # that credit is given to us for developing PCCTS. By "credit",\r | |
14 | # we mean that if you incorporate our source code into one of your\r | |
15 | # programs (commercial product, research project, or otherwise) that you\r | |
16 | # acknowledge this fact somewhere in the documentation, research report,\r | |
17 | # etc... If you like PCCTS and have developed a nice tool with the\r | |
18 | # output, please mention that you developed it using PCCTS. In\r | |
19 | # addition, we ask that this header remain intact in our source code.\r | |
20 | # As long as these guidelines are kept, we expect to continue enhancing\r | |
21 | # this system and expect to make other tools available as they are\r | |
22 | # completed.\r | |
23 | #\r | |
24 | # ANTLR 1.33\r | |
25 | # Terence Parr\r | |
26 | # Parr Research Corporation\r | |
27 | # with Purdue University\r | |
28 | # and AHPCRC, University of Minnesota\r | |
29 | # 1989-1995\r | |
30 | #\r | |
31 | # Ported to Borland C++, IBM C-Set/2 and Microsoft 6.0 by\r | |
32 | # Ed Harfmann\r | |
33 | # Micro Data Base Systems\r | |
34 | # Lafayette, Indiana\r | |
35 | #\r | |
36 | SET=../support/set\r | |
37 | PCCTS_H=../h\r | |
38 | \r | |
39 | #\r | |
40 | # UNIX (default)\r | |
41 | #\r | |
42 | CC=cc\r | |
43 | ANTLR=${WORKSPACE}/Tools/bin/antlr\r | |
44 | DLG=${WORKSPACE}/Tools/bin/dlg\r | |
45 | OBJ_EXT=o\r | |
46 | OUT_OBJ = -o\r | |
47 | ANSI=-ansi\r | |
48 | AOTHER=\r | |
49 | CFLAGS= -O0 -g -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) $(ANSI) -DZZLEXBUFSIZE=32000\r | |
50 | #\r | |
51 | # SGI Users, use this CFLAGS\r | |
52 | #\r | |
53 | #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -woff 3262\r | |
54 | \r | |
55 | OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \\r | |
56 | globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o $(OBJOTHER)\r | |
57 | \r | |
58 | antlr : $(OBJ) $(SRC)\r | |
59 | $(CC) $(CFLAGS) -o antlr $(OBJ)\r | |
60 | mv antlr ${WORKSPACE}/Tools/bin\r | |
61 | \r | |
62 | # what files does PCCTS generate (both ANTLR and DLG)\r | |
63 | PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h\r | |
64 | \r | |
65 | SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \\r | |
66 | hash.c lex.c main.c misc.c $(SET)/set.c pred.c egman.c mrhoist.c fcache.c\r | |
67 | \r | |
68 | #\r | |
69 | # Don't worry about the ambiguity messages coming from antlr\r | |
70 | # for making antlr.c etc... [should be 10 of them, I think]\r | |
71 | #\r | |
72 | antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g\r | |
73 | $(ANTLR) -gh antlr.g $(AOTHER)\r | |
74 | \r | |
75 | antlr.o : antlr.c mode.h tokens.h\r | |
76 | \r | |
77 | scan.o : scan.c mode.h tokens.h\r | |
78 | \r | |
79 | scan.c mode.h: parser.dlg\r | |
80 | $(DLG) -C2 parser.dlg scan.c\r | |
81 | \r | |
82 | set.o : $(SET)/set.c\r | |
83 | $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c\r | |
84 | \r | |
85 | \r | |
86 | #\r | |
87 | # ****** These next targets are common to UNIX and PC world ********\r | |
88 | #\r | |
89 | \r | |
90 | #clean up all the intermediate files\r | |
91 | clean:\r | |
92 | rm -f *.$(OBJ_EXT) core\r | |
93 | \r | |
94 | #remove everything in clean plus the PCCTS files generated\r | |
95 | scrub:\r | |
96 | rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core\r |