home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pccts1.zip / ANTLR / MAKEFILE < prev    next >
Text File  |  1993-09-02  |  4KB  |  191 lines

  1. #
  2. # Makefile for ANTLR 1.10
  3. # Terence Parr
  4. # Purdue University
  5. # 1989-1993
  6. #
  7. # Ported to Borland C++, IBM C-Set/2 and Microsoft 6.0 by
  8. # Ed Harfmann
  9. # Micro Data Base Systems
  10. # Lafayette, Indiana
  11. #
  12. SET=../support/set
  13. PCCTS_H=../h
  14.  
  15. ##
  16. ## Uncomment the appropriate section to build
  17. ## (both targets and 'make' variable definitions)
  18. ## Note that UNIX is the default
  19. ##
  20.  
  21. #
  22. #   OS/2 & DOS 16 bit using MSC 6.0
  23. #
  24. CC=cl
  25. ANTLR=..\bin\antlr
  26. DLG=..\bin\dlg
  27. CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /AL /Za /W3 -DPC -DUSER_ZZSYN
  28. OUT_OBJ = -Fo
  29. LIBS=/NOD:LLIBCE LLIBCEP
  30. OBJ_EXT = obj
  31.  
  32. antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  33.         fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  34.         misc.obj set.obj pred.obj dialog.obj
  35.        link @<<
  36. $** /NOI
  37. $@ /STACK:14336
  38.  
  39. $(LIBS: = +^
  40. )
  41. $(DEF_FILE) $(LFLAGS) ;
  42. <<
  43.         bind $@ c:\os2\doscalls.lib
  44.         copy *.exe ..\bin
  45.  
  46.  
  47. #
  48. #   Borland C++ for DOS
  49. #
  50. #CC=bcc
  51. #ANTLR=..\bin\antlr
  52. #DLG=..\bin\dlg
  53. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -ml -ff- -w- -DPC -DUSER_ZZSYN
  54. #OUT_OBJ = -o
  55. #LIBS= emu mathl cl
  56. #OBJ_EXT = obj
  57. #
  58. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  59. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  60. #        misc.obj set.obj pred.obj dialog.obj
  61. #       tlink @&&|
  62. #C0L $**
  63. #$@ /Tde /c
  64. #
  65. #$(LIBS)
  66. #$(DEF_FILE) $(LFLAGS) ;
  67. #|
  68. #        copy *.exe ..\bin
  69. #
  70.  
  71. #
  72. # C-Set/2 for OS/2
  73. #
  74. #CC=icc
  75. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /Sa /W3 -DUSER_ZZSYN
  76. #OUT_OBJ = -Fo
  77. #LIBS=
  78. #ANTLR=..\bin\antlr
  79. #DLG=..\bin\dlg
  80. #OBJ_EXT = obj
  81. #
  82. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  83. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  84. #        misc.obj set.obj pred.obj dialog.obj
  85. #        link386 @<<
  86. #$** /NOI
  87. #$@ /STACK:32768
  88. #
  89. #$(LIBS: = +^
  90. #)
  91. #$(DEF_FILE) $(LFLAGS) ;
  92. #<<
  93. #        copy *.exe ..\bin
  94. #
  95.  
  96. #
  97. # Borland C++ for OS/2
  98. #
  99. #CC=bcc
  100. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -w- -v -DUSER_ZZSYN
  101. #OUT_OBJ = -o
  102. #LIBS= c2 os2
  103. #
  104. #ANTLR=..\bin\antlr
  105. #DLG=..\bin\dlg
  106. #OBJ_EXT = obj
  107. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  108. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  109. #        misc.obj set.obj pred.obj dialog.obj
  110. #        tlink @&&|
  111. #c02 $** -c -v
  112. #antlr.exe
  113. #
  114. #C2 os2
  115. #
  116. #|
  117. #        copy *.exe ..\bin
  118. #
  119.  
  120. # *********** Target list of PC machines ***********
  121. #
  122. # Don't worry about the ambiguity messages coming from antlr
  123. # for making antlr.c etc...  [should be 10 of them, I think]
  124. #
  125. antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
  126.        $(ANTLR) antlr.g
  127.  
  128. antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
  129.  
  130. scan.$(OBJ_EXT): scan.c mode.h tokens.h
  131.  
  132. scan.c mode.h: parser.dlg
  133.        $(DLG) -C2 parser.dlg scan.c
  134.  
  135. set.$(OBJ_EXT): $(SET)/set.c
  136.        $(CC) $(CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c
  137.  
  138.  
  139.  
  140. #
  141. #   UNIX  (default)
  142. #
  143. #CC=cc
  144. #ANTLR=../bin/antlr
  145. #DLG=../bin/dlg
  146. #OBJ_EXT=o
  147. #OUT_OBJ = -o
  148. #CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN
  149. #OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o  \
  150. #        globals.o hash.o lex.o main.o misc.o set.o pred.o dialog.o
  151. #
  152. #antlr : $(OBJ) $(SRC)
  153. #                $(CC) $(CFLAGS) -o antlr $(OBJ)
  154. #                mv antlr ../bin
  155. #
  156. # what files does PCCTS generate (both ANTLR and DLG)
  157. PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
  158.  
  159. SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \
  160.     hash.c lex.c main.c misc.c $(SET)/set.c pred.c dialog.c
  161.  
  162. #
  163. # Don't worry about the ambiguity messages coming from antlr
  164. # for making antlr.c etc...  [should be 10 of them, I think]
  165. #
  166. antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
  167.     $(ANTLR) antlr.g
  168.  
  169. antlr.o : antlr.c mode.h tokens.h
  170.  
  171. scan.o : scan.c mode.h tokens.h
  172.  
  173. scan.c mode.h: parser.dlg
  174.     $(DLG) -C2 parser.dlg scan.c
  175.  
  176. set.o : $(SET)/set.c
  177.     $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c
  178.  
  179.  
  180. #
  181. # ****** These next targets are common to UNIX and PC world ********
  182. #
  183.  
  184. #clean up all the intermediate files
  185. clean:
  186.     rm -f *.$(OBJ_EXT) core
  187.  
  188. #remove everything in clean plus the PCCTS files generated
  189. scrub:
  190.     rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core
  191.