]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
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 | ## Uncomment the appropriate section to build\r | |
41 | ## (both targets and 'make' variable definitions)\r | |
42 | ## Note that UNIX is the default\r | |
43 | ##\r | |
44 | \r | |
45 | #\r | |
46 | # OS/2 & DOS 16 bit using MSC 6.0\r | |
47 | #\r | |
48 | #CC=cl\r | |
49 | #ANTLR=..\bin\antlr\r | |
50 | #DLG=..\bin\dlg\r | |
51 | #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /AL /Za /W3 -DPC -DUSER_ZZSYN\r | |
52 | #OUT_OBJ = -Fo\r | |
53 | #LIBS=/NOD:LLIBCE LLIBCEP\r | |
54 | #OBJ_EXT = obj\r | |
55 | #\r | |
56 | #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \\r | |
57 | # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \\r | |
58 | # misc.obj set.obj pred.obj egamn.obj\r | |
59 | # link @<<\r | |
60 | #$** /NOI\r | |
61 | #$@ /STACK:14336\r | |
62 | #\r | |
63 | #$(LIBS: = +^\r | |
64 | #)\r | |
65 | #$(DEF_FILE) $(LFLAGS) ;\r | |
66 | #<<\r | |
67 | # bind $@ c:\os2\doscalls.lib\r | |
68 | # copy *.exe ..\bin\r | |
69 | #\r | |
70 | \r | |
71 | #\r | |
72 | # Borland C++ for DOS\r | |
73 | #\r | |
74 | #CC=bcc\r | |
75 | #ANTLR=..\bin\antlr\r | |
76 | #DLG=..\bin\dlg\r | |
77 | #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -ml -ff- -w- -DPC -DUSER_ZZSYN\r | |
78 | #OUT_OBJ = -o\r | |
79 | #LIBS= emu mathl cl\r | |
80 | #OBJ_EXT = obj\r | |
81 | #\r | |
82 | #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \\r | |
83 | # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \\r | |
84 | # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj\r | |
85 | # tlink @&&|\r | |
86 | #C0L $**\r | |
87 | #$@ /Tde /c\r | |
88 | #\r | |
89 | #$(LIBS)\r | |
90 | #$(DEF_FILE) $(LFLAGS) ;\r | |
91 | #|\r | |
92 | # copy *.exe ..\bin\r | |
93 | #\r | |
94 | \r | |
95 | #\r | |
96 | # C-Set/2 for OS/2\r | |
97 | #\r | |
98 | #CC=icc\r | |
99 | #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /Sa /W3 -DUSER_ZZSYN -D__STDC__\r | |
100 | #OUT_OBJ = -Fo\r | |
101 | #LIBS=\r | |
102 | #ANTLR=..\bin\antlr\r | |
103 | #DLG=..\bin\dlg\r | |
104 | #OBJ_EXT = obj\r | |
105 | #\r | |
106 | #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \\r | |
107 | # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \\r | |
108 | # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj\r | |
109 | # link386 @<<\r | |
110 | #$** /NOI\r | |
111 | #$@ /STACK:32768\r | |
112 | #\r | |
113 | #$(LIBS: = +^\r | |
114 | #)\r | |
115 | #$(DEF_FILE) $(LFLAGS) ;\r | |
116 | #<<\r | |
117 | # copy *.exe ..\bin\r | |
118 | #\r | |
119 | \r | |
120 | #\r | |
121 | # Borland C++ for OS/2\r | |
122 | #\r | |
123 | #CC=bcc\r | |
124 | #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -w- -v -DUSER_ZZSYN\r | |
125 | #OUT_OBJ = -o\r | |
126 | #LIBS= c2 os2\r | |
127 | #\r | |
128 | #ANTLR=..\bin\antlr\r | |
129 | #DLG=..\bin\dlg\r | |
130 | #OBJ_EXT = obj\r | |
131 | #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \\r | |
132 | # fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \\r | |
133 | # misc.obj set.obj pred.obj egman.obj mrhoist.obj fcache.obj\r | |
134 | # tlink @&&|\r | |
135 | #c02 $** -c -v\r | |
136 | #antlr.exe\r | |
137 | #\r | |
138 | #C2 os2\r | |
139 | #\r | |
140 | #|\r | |
141 | # copy *.exe ..\bin\r | |
142 | #\r | |
143 | \r | |
144 | # *********** Target list of PC machines ***********\r | |
145 | #\r | |
146 | # Don't worry about the ambiguity messages coming from antlr\r | |
147 | # for making antlr.c etc... [should be 10 of them, I think]\r | |
148 | #\r | |
149 | #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g\r | |
150 | # $(ANTLR) antlr.g\r | |
151 | #\r | |
152 | #antlr.$(OBJ_EXT): antlr.c mode.h tokens.h\r | |
153 | #\r | |
154 | #scan.$(OBJ_EXT): scan.c mode.h tokens.h\r | |
155 | #\r | |
156 | #scan.c mode.h: parser.dlg\r | |
157 | # $(DLG) -C2 parser.dlg scan.c\r | |
158 | #\r | |
159 | #set.$(OBJ_EXT): $(SET)/set.c\r | |
4ac14cea | 160 | # $(BUILD_CC) $(BUILD_CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c\r |
30fdf114 LG |
161 | \r |
162 | \r | |
163 | \r | |
164 | #\r | |
165 | # UNIX (default)\r | |
166 | #\r | |
02539e90 ZL |
167 | ifeq ($(CXX), llvm)\r |
168 | BUILD_CC?=$(CLANG_BIN)clang\r | |
169 | else\r | |
4ac14cea | 170 | BUILD_CC?=gcc\r |
02539e90 | 171 | endif\r |
30fdf114 LG |
172 | COPT=-O\r |
173 | ANTLR=${BIN_DIR}/antlr\r | |
174 | DLG=${BIN_DIR}/dlg\r | |
175 | OBJ_EXT=o\r | |
176 | OUT_OBJ = -o\r | |
4ac14cea LG |
177 | BUILD_CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) -DZZLEXBUFSIZE=65536\r |
178 | BUILD_CPPFLAGS=\r | |
30fdf114 LG |
179 | #\r |
180 | # SGI Users, use this CFLAGS\r | |
181 | #\r | |
182 | #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -woff 3262\r | |
183 | OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \\r | |
184 | globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o\r | |
185 | \r | |
186 | $(BIN_DIR)/antlr : $(OBJ) $(SRC)\r | |
4ac14cea | 187 | $(BUILD_CC) $(BUILD_CFLAGS) -o $(BIN_DIR)/antlr $(OBJ)\r |
30fdf114 LG |
188 | \r |
189 | # what files does PCCTS generate (both ANTLR and DLG)\r | |
190 | PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h\r | |
191 | \r | |
192 | SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \\r | |
193 | hash.c lex.c main.c misc.c $(SET)/set.c pred.c egman.c mrhoist.c fcache.c\r | |
194 | \r | |
195 | #\r | |
196 | # Don't worry about the ambiguity messages coming from antlr\r | |
197 | # for making antlr.c etc... [should be 10 of them, I think]\r | |
198 | #\r | |
199 | #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g\r | |
200 | # $(ANTLR) -gh antlr.g\r | |
201 | \r | |
202 | antlr.o : antlr.c mode.h tokens.h\r | |
203 | \r | |
204 | scan.o : scan.c mode.h tokens.h\r | |
205 | \r | |
206 | #scan.c mode.h: parser.dlg\r | |
207 | # $(DLG) -C2 parser.dlg scan.c\r | |
208 | \r | |
209 | set.o : $(SET)/set.c\r | |
4ac14cea | 210 | $(BUILD_CC) $(BUILD_CFLAGS) -c -o set.o $(SET)/set.c\r |
30fdf114 | 211 | \r |
4ac14cea LG |
212 | %.o : %.c \r |
213 | $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@\r | |
30fdf114 LG |
214 | \r |
215 | #\r | |
216 | # ****** These next targets are common to UNIX and PC world ********\r | |
217 | #\r | |
218 | \r | |
219 | #clean up all the intermediate files\r | |
220 | clean:\r | |
221 | rm -f $(BIN_DIR)/antlr *.$(OBJ_EXT) core\r | |
222 | \r | |
223 | #remove everything in clean plus the PCCTS files generated\r | |
224 | scrub:\r | |
225 | rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core\r |