home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pccts.zip / pccts / antlr / makefile < prev    next >
Makefile  |  1994-03-31  |  5KB  |  214 lines

  1. #
  2. # Makefile for ANTLR 1.20
  3. #
  4. # SOFTWARE RIGHTS
  5. #
  6. # We reserve no LEGAL rights to the Purdue Compiler Construction Tool
  7. # Set (PCCTS) -- PCCTS is in the public domain.  An individual or
  8. # company may do whatever they wish with source code distributed with
  9. # PCCTS or the code generated by PCCTS, including the incorporation of
  10. # PCCTS, or its output, into commerical software.
  11. # We encourage users to develop software with PCCTS.  However, we do ask
  12. # that credit is given to us for developing PCCTS.  By "credit",
  13. # we mean that if you incorporate our source code into one of your
  14. # programs (commercial product, research project, or otherwise) that you
  15. # acknowledge this fact somewhere in the documentation, research report,
  16. # etc...  If you like PCCTS and have developed a nice tool with the
  17. # output, please mention that you developed it using PCCTS.  In
  18. # addition, we ask that this header remain intact in our source code.
  19. # As long as these guidelines are kept, we expect to continue enhancing
  20. # this system and expect to make other tools available as they are
  21. # completed.
  22. #
  23. # ANTLR 1.20
  24. # Terence Parr
  25. # Purdue University
  26. # With AHPCRC, University of Minnesota
  27. # 1989-1994
  28. #
  29. # Ported to Borland C++, IBM C-Set/2 and Microsoft 6.0 by
  30. # Ed Harfmann
  31. # Micro Data Base Systems
  32. # Lafayette, Indiana
  33. #
  34. SET=../support/set
  35. PCCTS_H=../h
  36.  
  37. ##
  38. ## Uncomment the appropriate section to build
  39. ## (both targets and 'make' variable definitions)
  40. ## Note that UNIX is the default
  41. ##
  42.  
  43. #
  44. #   OS/2 & DOS 16 bit using MSC 6.0
  45. #
  46. #CC=cl
  47. #ANTLR=..\bin\antlr
  48. #DLG=..\bin\dlg
  49. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /AL /Za /W3 -DPC -DUSER_ZZSYN
  50. #OUT_OBJ = -Fo
  51. #LIBS=/NOD:LLIBCE LLIBCEP
  52. #OBJ_EXT = obj
  53. #
  54. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  55. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  56. #        misc.obj set.obj pred.obj dialog.obj
  57. #       link @<<
  58. #$** /NOI
  59. #$@ /STACK:14336
  60. #
  61. #$(LIBS: = +^
  62. #)
  63. #$(DEF_FILE) $(LFLAGS) ;
  64. #<<
  65. #        bind $@ c:\os2\doscalls.lib
  66. #        copy *.exe ..\bin
  67. #
  68.  
  69. #
  70. #   Borland C++ for DOS
  71. #
  72. #CC=bcc
  73. #ANTLR=..\bin\antlr
  74. #DLG=..\bin\dlg
  75. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -ml -ff- -w- -DPC -DUSER_ZZSYN
  76. #OUT_OBJ = -o
  77. #LIBS= emu mathl cl
  78. #OBJ_EXT = obj
  79. #
  80. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  81. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  82. #        misc.obj set.obj pred.obj dialog.obj
  83. #       tlink @&&|
  84. #C0L $**
  85. #$@ /Tde /c
  86. #
  87. #$(LIBS)
  88. #$(DEF_FILE) $(LFLAGS) ;
  89. #|
  90. #        copy *.exe ..\bin
  91. #
  92.  
  93. #
  94. # C-Set/2 for OS/2
  95. #
  96. #CC=icc
  97. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) /Sa /W3 -DUSER_ZZSYN -D__STDC__
  98. #OUT_OBJ = -Fo
  99. #LIBS=
  100. #ANTLR=..\bin\antlr
  101. #DLG=..\bin\dlg
  102. #OBJ_EXT = obj
  103. #
  104. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  105. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  106. #        misc.obj set.obj pred.obj dialog.obj
  107. #        link386 @<<
  108. #$** /NOI
  109. #$@ /STACK:32768
  110. #
  111. #$(LIBS: = +^
  112. #)
  113. #$(DEF_FILE) $(LFLAGS) ;
  114. #<<
  115. #        copy *.exe ..\bin
  116. #
  117.  
  118. #
  119. # Borland C++ for OS/2
  120. #
  121. #CC=bcc
  122. #CFLAGS= -I. -I$(SET) -I$(PCCTS_H) -w- -v -DUSER_ZZSYN
  123. #OUT_OBJ = -o
  124. #LIBS= c2 os2
  125. #
  126. #ANTLR=..\bin\antlr
  127. #DLG=..\bin\dlg
  128. #OBJ_EXT = obj
  129. #antlr.exe: antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
  130. #        fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
  131. #        misc.obj set.obj pred.obj dialog.obj
  132. #        tlink @&&|
  133. #c02 $** -c -v
  134. #antlr.exe
  135. #
  136. #C2 os2
  137. #
  138. #|
  139. #        copy *.exe ..\bin
  140. #
  141.  
  142. # *********** Target list of PC machines ***********
  143. #
  144. # Don't worry about the ambiguity messages coming from antlr
  145. # for making antlr.c etc...  [should be 10 of them, I think]
  146. #
  147. #antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
  148. #    $(ANTLR) antlr.g
  149. #
  150. #antlr.$(OBJ_EXT): antlr.c mode.h tokens.h
  151. #
  152. #scan.$(OBJ_EXT): scan.c mode.h tokens.h
  153. #
  154. #scan.c mode.h: parser.dlg
  155. #    $(DLG) -C2 parser.dlg scan.c
  156. #
  157. #set.$(OBJ_EXT): $(SET)/set.c
  158. #    $(CC) $(CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c
  159.  
  160.  
  161.  
  162. #
  163. #   UNIX  (default)
  164. #
  165. CC=cc
  166. ANTLR=../bin/antlr
  167. DLG=../bin/dlg
  168. OBJ_EXT=o
  169. OUT_OBJ = -o
  170. CFLAGS= -O -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN
  171. OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o  \
  172.         globals.o hash.o lex.o main.o misc.o set.o pred.o dialog.o
  173.  
  174. antlr : $(OBJ) $(SRC)
  175.         $(CC) $(CFLAGS) -o antlr $(OBJ)
  176.         mv antlr ../bin
  177.  
  178. # what files does PCCTS generate (both ANTLR and DLG)
  179. PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
  180.  
  181. SRC=antlr.c scan.c err.c bits.c build.c fset2.c fset.c gen.c globals.c \
  182.     hash.c lex.c main.c misc.c $(SET)/set.c pred.c dialog.c
  183.  
  184. #
  185. # Don't worry about the ambiguity messages coming from antlr
  186. # for making antlr.c etc...  [should be 10 of them, I think]
  187. #
  188. antlr.c stdpccts.h parser.dlg tokens.h err.c : antlr.g
  189.     $(ANTLR) -gh antlr.g
  190.  
  191. antlr.o : antlr.c mode.h tokens.h
  192.  
  193. scan.o : scan.c mode.h tokens.h
  194.  
  195. scan.c mode.h: parser.dlg
  196.     $(DLG) -C2 parser.dlg scan.c
  197.  
  198. set.o : $(SET)/set.c
  199.     $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c
  200.  
  201.  
  202. #
  203. # ****** These next targets are common to UNIX and PC world ********
  204. #
  205.  
  206. #clean up all the intermediate files
  207. clean:
  208.     rm -f *.$(OBJ_EXT) core
  209.  
  210. #remove everything in clean plus the PCCTS files generated
  211. scrub:
  212.     rm -f $(PCCTS_GEN) *.$(OBJ_EXT) core
  213.