Home | History | Annotate | Download | only in Pccts
      1 March 95
      2 Version 1.32 of pccts
      3  
      4 At 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  
      9 Mail corrections or additions to David Seidel <71333.1575 (a] compuserve.com>
     10 ===============================================================================
     11 Notes on Building PCCTS 1.32 with Borland C++
     12  
     13 David Seidel, Innovative Data Concepts Incorporated
     14 CompuServe: 71333,1575
     15 Internet:   71333.1575 (a] compuserve.com
     16             dseidel (a] delphi.com
     17  
     18 I have gotten ANTLR and DLG to succesfully build with BCC 4.0, but have found
     19 from experience that ANTLR, in particular, is likely to run out of memory
     20 with grammars over a certain size, or with larger values for the -k and -ck
     21 options.  Now that BCC 4.02 and the new Borland Power Pack for DOS is now
     22 available, I feel that there is no excuse not to build these tools as
     23 32-bit executables, as they ought to be.
     24  
     25 For people without the Power Pack, the makefiles below should be fairly easily
     26 modified to build 16-bit real-mode executables, but I don't really recommend
     27 it.  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
     29 some other PCCTS who has DJGPP can provode whatever advice is necessary.  The
     30 Watcom compiler is also an excellent possibility (albeit a commercial one),
     31 and I hope to make available Watcom makefiles in the near future.
     32  
     33 Here are the makefiles I am using.  Both makefiles use a compiler configuration
     34 file that contains compiler switches such as optimization settings.  I call
     35 this 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 (a] compuserve.com (or) dseidel (a] 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  
     64 BCCDIR   =  d:\bc4
     65 CC       =  bcc32
     66 SET      =  ..\support\set
     67 PCCTS_H  =  ..\h
     68 ANTLR    =  ..\bin\antlr
     69 DLG      =  ..\bin\dlg
     70 CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
     71  +bor32.cfg
     72 LIBS     =  dpmi32 cw32
     73 OBJ_EXT  =  obj
     74 OBJS     =  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  
     81 antlr.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  
    103 antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
    104  
    105 scan.$(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  
    111 set.$(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 (a] compuserve.com (or) dseidel (a] 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  
    132 BCCDIR   =  d:\bc4
    133 CC       =  bcc32
    134 SET      =  ..\support\set
    135 PCCTS_H  =  ..\h
    136 ANTLR    =  ..\bin\antlr
    137 DLG      =  ..\bin\dlg
    138 CFLAGS   =  -I$(BCCDIR)\include -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN \
    139  +bor32.cfg
    140 LIBS     =  dpmi32 cw32
    141 OBJ_EXT  =  obj
    142 OBJS     =  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  
    148 dlg.exe : $(OBJS)
    149    tlink32 @&&|
    150 -Tpe -ax -c -s -L$(BCCDIR)\lib +
    151 c0x32 $**
    152 $@
    153  
    154 $(LIBS)
    155 ;
    156 |
    157    copy *.exe ..\bin
    158  
    159 dlg_p.obj:  dlg_p.c
    160  
    161 dlg_a.obj:  dlg_a.c
    162  
    163 main.obj:   main.c
    164  
    165 err.obj:    err.c
    166  
    167 support.obj:   support.c
    168  
    169 output.obj: output.c
    170  
    171 relabel.obj:   relabel.c
    172  
    173 automata.obj:  automata.c
    174  
    175 set.$(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