• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1March 95
2Version 1.32 of pccts
3
4At the moment this file is available via anonymous FTP at
5
6        Node: marvin.ecn.purdue.edu
7        File: pub/pccts/1.32/NOTES.BCC
8
9Mail corrections or additions to David Seidel <71333.1575@compuserve.com>
10===============================================================================
11Notes on Building PCCTS 1.32 with Borland C++
12
13David Seidel, Innovative Data Concepts Incorporated
14CompuServe: 71333,1575
15Internet:   71333.1575@compuserve.com
16            dseidel@delphi.com
17
18I have gotten ANTLR and DLG to succesfully build with BCC 4.0, but have found
19from experience that ANTLR, in particular, is likely to run out of memory
20with grammars over a certain size, or with larger values for the -k and -ck
21options.  Now that BCC 4.02 and the new Borland Power Pack for DOS is now
22available, I feel that there is no excuse not to build these tools as
2332-bit executables, as they ought to be.
24
25For people without the Power Pack, the makefiles below should be fairly easily
26modified to build 16-bit real-mode executables, but I don't really recommend
27it.  As an alternative, you might consider the highly regarded DJGPP compiler
28(a DOS port of the Gnu GCC compiler, with a DOS extender included).  Hopefully
29some other PCCTS who has DJGPP can provode whatever advice is necessary.  The
30Watcom compiler is also an excellent possibility (albeit a commercial one),
31and I hope to make available Watcom makefiles in the near future.
32
33Here are the makefiles I am using.  Both makefiles use a compiler configuration
34file that contains compiler switches such as optimization settings.  I call
35this file bor32.cfg and keep a copy in both the ANTLR and DLG subdirectories.
36
37==== File: bor32.cfg (cut here) ===============================================
38-w-
39-RT-
40-x-
41-N-
42-k-
43-d
44-O2-e-l
45-Z
46-D__STDC__=1
47==== End of file bor32.cfg (cut here) =========================================
48
49==== File: antlr\bor32.mak (cut here) =========================================
50#
51#  ANTLR 1.32 Makefile for Borland C++ 4.02 with DPMI 32-bit DOS extender by
52#  David Seidel
53#  Innovative Data Concepts Incorporated
54#  71333.1575@compuserve.com (or) dseidel@delphi.com
55#
56#  Notes:   1. Compiler switches (optimization etc.) are contained in the
57#              file bor32.cfg.
58#           2. This makefile requires Borland C++ 4.02 or greater with
59#              the DOS Power Pack add-on package.
60#           3. Change the BCCDIR macro below to the topmost directory in
61#              which BCC is installed on your system.
62#
63
64BCCDIR   =  d:\bc4
65CC       =  bcc32
66SET      =  ..\support\set
67PCCTS_H  =  ..\h
68ANTLR    =  ..\bin\antlr
69DLG      =  ..\bin\dlg
70CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
71 +bor32.cfg
72LIBS     =  dpmi32 cw32
73OBJ_EXT  =  obj
74OBJS     =  antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj fset.obj \
75 gen.obj globals.obj hash.obj lex.obj main.obj misc.obj pred.obj dialog.obj \
76 set.obj
77
78.c.obj:
79      $(CC) -c $(CFLAGS) {$&.c }
80
81antlr.exe: $(OBJS)
82   tlink32 @&&|
83-Tpe -ax -c -s -L$(BCCDIR)\lib +
84$(BCCDIR)\lib\c0x32 $**
85$@
86
87$(LIBS)
88;
89|
90   copy *.exe ..\bin
91
92
93# *********** Target list of PC machines ***********
94#
95# Don't worry about the ambiguity messages coming from antlr
96# for making antlr.c etc...  [should be 10 of them, I think]
97#
98
99# leave this commented out for initial build!
100#antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
101#   $(ANTLR) antlr.g
102
103antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
104
105scan.$(OBJ_EXT): scan.c mode.h tokens.h
106
107# leave this commented out for initial build!
108#scan.c mode.h: parser.dlg
109#   $(DLG) -C2 parser.dlg scan.c
110
111set.$(OBJ_EXT): $(SET)\set.c
112   $(CC) -c $(CFLAGS) $(SET)\set.c
113
114==== End of file antlr\bor32.mak (cut here) ===================================
115
116==== File: dlg\bor32.mak (cut here) ===========================================
117#
118#  DLG 1.32 Makefile for Borland C++ 4.02 with DPMI 32-bit DOS extender by
119#  David Seidel
120#  Innovative Data Concepts Incorporated
121#  71333.1575@compuserve.com (or) dseidel@delphi.com
122#
123#  Notes:   1. Compiler switches (optimization etc.) are contained in the
124#              file bor32.cfg.
125#           2. This makefile requires Borland C++ 4.02 or greater with
126#              the DOS Power Pack add-on package.
127#           3. Change the BCCDIR macro below to the topmost directory in
128#              which BCC is installed on your system.
129#
130
131
132BCCDIR   =  d:\bc4
133CC       =  bcc32
134SET      =  ..\support\set
135PCCTS_H  =  ..\h
136ANTLR    =  ..\bin\antlr
137DLG      =  ..\bin\dlg
138CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
139 +bor32.cfg
140LIBS     =  dpmi32 cw32
141OBJ_EXT  =  obj
142OBJS     =  dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
143 output.obj relabel.obj automata.obj set.obj
144
145.c.obj:
146      $(CC) -c $(CFLAGS) {$&.c }
147
148dlg.exe : $(OBJS)
149   tlink32 @&&|
150-Tpe -ax -c -s -L$(BCCDIR)\lib +
151c0x32 $**
152$@
153
154$(LIBS)
155;
156|
157   copy *.exe ..\bin
158
159dlg_p.obj:  dlg_p.c
160
161dlg_a.obj:  dlg_a.c
162
163main.obj:   main.c
164
165err.obj:    err.c
166
167support.obj:   support.c
168
169output.obj: output.c
170
171relabel.obj:   relabel.c
172
173automata.obj:  automata.c
174
175set.$(OBJ_EXT): $(SET)\set.c
176   $(CC) -c $(CFLAGS) $(SET)\set.c
177
178==== End of file dlg\bor32.mak (cut here) =====================================
179
180
181
182
183
184
185