summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/VfrCompile/Pccts/NOTES.bcc
blob: 1ac05b17c57b1e27fbcd28b841b5ec7a5bca0023 (plain)
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
March 95
Version 1.32 of pccts
 
At the moment this file is available via anonymous FTP at
 
        Node: marvin.ecn.purdue.edu
        File: pub/pccts/1.32/NOTES.BCC
 
Mail corrections or additions to David Seidel <71333.1575@compuserve.com>
===============================================================================
Notes on Building PCCTS 1.32 with Borland C++
 
David Seidel, Innovative Data Concepts Incorporated
CompuServe: 71333,1575
Internet:   71333.1575@compuserve.com
            dseidel@delphi.com
 
I have gotten ANTLR and DLG to succesfully build with BCC 4.0, but have found
from experience that ANTLR, in particular, is likely to run out of memory
with grammars over a certain size, or with larger values for the -k and -ck
options.  Now that BCC 4.02 and the new Borland Power Pack for DOS is now
available, I feel that there is no excuse not to build these tools as
32-bit executables, as they ought to be.
 
For people without the Power Pack, the makefiles below should be fairly easily
modified to build 16-bit real-mode executables, but I don't really recommend
it.  As an alternative, you might consider the highly regarded DJGPP compiler
(a DOS port of the Gnu GCC compiler, with a DOS extender included).  Hopefully
some other PCCTS who has DJGPP can provode whatever advice is necessary.  The
Watcom compiler is also an excellent possibility (albeit a commercial one),
and I hope to make available Watcom makefiles in the near future.
 
Here are the makefiles I am using.  Both makefiles use a compiler configuration
file that contains compiler switches such as optimization settings.  I call
this file bor32.cfg and keep a copy in both the ANTLR and DLG subdirectories.
 
==== File: bor32.cfg (cut here) ===============================================
-w-
-RT-
-x-
-N-
-k-
-d
-O2-e-l
-Z
-D__STDC__=1
==== End of file bor32.cfg (cut here) =========================================
 
==== File: antlr\bor32.mak (cut here) =========================================
#
#  ANTLR 1.32 Makefile for Borland C++ 4.02 with DPMI 32-bit DOS extender by
#  David Seidel
#  Innovative Data Concepts Incorporated
#  71333.1575@compuserve.com (or) dseidel@delphi.com
#
#  Notes:   1. Compiler switches (optimization etc.) are contained in the
#              file bor32.cfg.
#           2. This makefile requires Borland C++ 4.02 or greater with
#              the DOS Power Pack add-on package.
#           3. Change the BCCDIR macro below to the topmost directory in
#              which BCC is installed on your system.
#
 
BCCDIR   =  d:\bc4
CC       =  bcc32
SET      =  ..\support\set
PCCTS_H  =  ..\h
ANTLR    =  ..\bin\antlr
DLG      =  ..\bin\dlg
CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
 +bor32.cfg
LIBS     =  dpmi32 cw32
OBJ_EXT  =  obj
OBJS     =  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 pred.obj dialog.obj \
 set.obj
 
.c.obj:
      $(CC) -c $(CFLAGS) {$&.c }
 
antlr.exe: $(OBJS)
   tlink32 @&&|
-Tpe -ax -c -s -L$(BCCDIR)\lib +
$(BCCDIR)\lib\c0x32 $**
$@
 
$(LIBS)
;
|
   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]
#
 
# leave this commented out for initial build!
#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
 
# leave this commented out for initial build!
#scan.c mode.h: parser.dlg
#   $(DLG) -C2 parser.dlg scan.c
 
set.$(OBJ_EXT): $(SET)\set.c
   $(CC) -c $(CFLAGS) $(SET)\set.c
 
==== End of file antlr\bor32.mak (cut here) ===================================
 
==== File: dlg\bor32.mak (cut here) ===========================================
#
#  DLG 1.32 Makefile for Borland C++ 4.02 with DPMI 32-bit DOS extender by
#  David Seidel
#  Innovative Data Concepts Incorporated
#  71333.1575@compuserve.com (or) dseidel@delphi.com
#
#  Notes:   1. Compiler switches (optimization etc.) are contained in the
#              file bor32.cfg.
#           2. This makefile requires Borland C++ 4.02 or greater with
#              the DOS Power Pack add-on package.
#           3. Change the BCCDIR macro below to the topmost directory in
#              which BCC is installed on your system.
#
 
 
BCCDIR   =  d:\bc4
CC       =  bcc32
SET      =  ..\support\set
PCCTS_H  =  ..\h
ANTLR    =  ..\bin\antlr
DLG      =  ..\bin\dlg
CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
 +bor32.cfg
LIBS     =  dpmi32 cw32
OBJ_EXT  =  obj
OBJS     =  dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
 output.obj relabel.obj automata.obj set.obj
 
.c.obj:
      $(CC) -c $(CFLAGS) {$&.c }
 
dlg.exe : $(OBJS)
   tlink32 @&&|
-Tpe -ax -c -s -L$(BCCDIR)\lib +
c0x32 $**
$@
 
$(LIBS)
;
|
   copy *.exe ..\bin
 
dlg_p.obj:  dlg_p.c
 
dlg_a.obj:  dlg_a.c
 
main.obj:   main.c
 
err.obj:    err.c
 
support.obj:   support.c
 
output.obj: output.c
 
relabel.obj:   relabel.c
 
automata.obj:  automata.c
 
set.$(OBJ_EXT): $(SET)\set.c
   $(CC) -c $(CFLAGS) $(SET)\set.c
 
==== End of file dlg\bor32.mak (cut here) =====================================