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
|
From Tom Zougas, zougas@civ.utoronto.ca
These are the changes I had to make to get ANTLR to compile under Watcom C
10.0 32-bit mode. I'm including the makefiles for antlr and dlg:
[Warning from T. Parr: I think that I may have expanded the tabs by
mistake in this file. You might have to convert them back to
tabs to have this file work correctly.]
antlr.mak:
-----------------------------------------------------------------------
SET=..\support\set
PCCTS_H=..\h
#
# Watcom
#
CC=wcl386
ANTLR=..\bin\antlr
DLG=..\bin\dlg
CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DPC
OUT_OBJ = -o
OBJ_EXT = obj
LINK = wcl386
.c.obj :
$(CC) -c $[* $(CFLAGS)
antlr.exe: 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 set.obj pred.obj
$(LINK) -fe=antlr.exe *.obj -k14336
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]
#
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
scan.c mode.h: parser.dlg
$(DLG) -C2 parser.dlg scan.c
set.$(OBJ_EXT): $(SET)\set.c
$(CC) $(CFLAGS) -c set.$(OBJ_EXT) $(SET)\set.c
#
# ****** These next targets are common to UNIX and PC world ********
#
#clean up all the intermediate files
clean:
del *.obj
#remove everything in clean plus the PCCTS files generated
scrub:
del $(PCCTS_GEN)
del *.$(OBJ_EXT)
---------------------------------------------------------------------
dlg.mak:
---------------------------------------------------------------------
SET=..\support\set
PCCTS_H=..\h
#
# Watcom
#
CC=wcl386
ANTLR=..\bin\antlr
DLG=..\bin\dlg
CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DPC
LIBS=
OBJ_EXT = obj
LINK = wcl386
.c.obj :
$(CC) -c $[* $(CFLAGS)
dlg.exe : dlg_p.obj dlg_a.obj main.obj err.obj set.obj support.obj &
output.obj relabel.obj automata.obj
$(LINK) -fe=dlg.exe *.obj -k14336
copy *.exe ..\bin
SRC = dlg_p.c dlg_a.c main.c err.c $(SET)\set.c support.c output.c &
relabel.c automata.c
dlg_p.c parser.dlg err.c tokens.h : dlg_p.g
$(ANTLR) dlg_p.g
dlg_a.c mode.h : parser.dlg
$(DLG) -C2 parser.dlg dlg_a.c
dlg_p.$(OBJ_EXT) : dlg_p.c dlg.h tokens.h mode.h
$(CC) $(CFLAGS) -c dlg_p.c
dlg_a.$(OBJ_EXT) : dlg_a.c dlg.h tokens.h mode.h
$(CC) $(CFLAGS) -c dlg_a.c
main.$(OBJ_EXT) : main.c dlg.h
$(CC) $(CFLAGS) -c main.c
set.$(OBJ_EXT) : $(SET)\set.c
$(CC) -c $(CFLAGS) $(SET)\set.c
#clean up all the intermediate files
clean:
del *.$(OBJ_EXT)
|