home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / mawk11as.zip / MSDOS / MAKEFILE.TCC < prev    next >
Text File  |  1992-01-21  |  6KB  |  195 lines

  1.  
  2. #  this is a makefile for mawk under DOS
  3. #  with Borland make
  4. #
  5. #   make    --  mawk.exe   DOS command line
  6. #   make  -DLARGE   -- bmawk.exe   DOS  command line
  7. #   make  -DREARGV  --  mawk.exe   unix command line
  8. #   make  -DLARGE -DREARGV  -- bmawk.exe   unix  command line
  9.  
  10. #$Log:    Makefile.tcc,v $
  11. #Revision 1.2  91/11/12  09:59:26  brennan
  12. #changed tcc to $(CC) and .o to .obj
  13. #
  14. #Revision 1.1  91/10/29  07:45:29  brennan
  15. #Initial revision
  16. #
  17.  
  18. .SWAP
  19.  
  20. # user settable
  21. CC=tcc   # bcc or ? 
  22. TCCLIB =c:\lib
  23. FLOATLIB=emu   #  or  fp87
  24. WILDCARD=c:\lib\wildargs.obj
  25.  
  26. # compiler flags
  27. # -G optimize for speed
  28. # -d merge duplicate strings
  29. # -v- symbolic debugging off
  30. # -O  optimize
  31. CFLAGS = -c -d -v- -O -G
  32. LFLAGS = /c  #case sensitive linking
  33.  
  34. ##############################
  35. # end of user settable
  36. #
  37.  
  38. !if ! $d(LARGE)
  39. MODEL=s
  40. TARGET=mawk
  41. !else  
  42. MODEL=l
  43. TARGET=bmawk
  44. CFLAGS=$(CFLAGS) -DHAVE_SMALL_MEMORY=0
  45. !endif
  46.  
  47. CFLAGS=-m$(MODEL) $(CFLAGS)
  48.  
  49.  
  50. !if  $d(REARGV)
  51. CFLAGS=$(CFLAGS) -DHAVE_REARGV=1 # over rides def in tcc_dos.h
  52. !endif
  53.  
  54. OBS = parse.obj \
  55. array.obj \
  56. bi_funct.obj \
  57. bi_vars.obj \
  58. cast.obj \
  59. code.obj \
  60. da.obj \
  61. error.obj \
  62. execute.obj \
  63. fcall.obj \
  64. field.obj \
  65. files.obj \
  66. fin.obj \
  67. hash.obj \
  68. init.obj \
  69. jmp.obj \
  70. kw.obj \
  71. main.obj \
  72. matherr.obj \
  73. memory.obj \
  74. print.obj \
  75. re_cmpl.obj \
  76. scan.obj \
  77. scancode.obj \
  78. split.obj \
  79. zmalloc.obj  \
  80. version.obj  \
  81. dosexec.obj
  82.  
  83. !if  $d(REARGV)  
  84. OBS = $(OBS) reargv.obj
  85. !endif
  86.  
  87. !if  ! $d(LARGE)
  88. OBS=$(OBS) xdosexec.obj
  89. !endif
  90.  
  91. REXP_OBS = rexp.obj \
  92. rexp0.obj \
  93. rexp1.obj \
  94. rexp2.obj \
  95. rexp3.obj
  96.  
  97. LIBS = $(TCCLIB)\$(FLOATLIB) \
  98. $(TCCLIB)\math$(MODEL) $(TCCLIB)\c$(MODEL)
  99.  
  100. $(TARGET).exe : $(OBS)  $(REXP_OBS)
  101.     tlink $(LFLAGS) @&&!
  102.     $(TCCLIB)\c0$(MODEL) $(WILDCARD) $(OBS) $(REXP_OBS)
  103.     $(TARGET),$(TARGET)
  104.     $(LIBS)
  105. !
  106.  
  107. .c.obj :
  108.     $(CC) $(CFLAGS) {$*.c }
  109.  
  110.  
  111. scancode.c :  makescan.c  scan.h
  112.     $(CC) makescan.c
  113.     makescan.exe > scancode.c
  114.     del makescan.obj  
  115.     del makescan.exe
  116.  
  117. xdosexec.obj  :  msdos\xdosexec.see
  118.     $(CC) msdos\see2obj.c
  119.     see2obj < msdos\xdosexec.see > xdosexec.obj
  120.     del see2obj.exe
  121.  
  122. #xdosexec.obj  :  xdosexec.asm
  123. #    masm /mx /z xdosexec ;
  124.  
  125. ###################################################
  126. # parse.c is provided in distribution( made with byacc)
  127. # so you don't need to make it.
  128. # But if you do:  here's how:
  129. # To make it with bison1.14 under msdos
  130. # parse.c : parse.y parse2.xc
  131. #    bison -dy parse.y
  132. #    bmawk -f modbison.awk y_tab.c parse2.xc > parse.c
  133. #    rename y_tab.h parse.h
  134. #    del y_tab.c
  135. ########################################
  136.  
  137.  
  138. clean  :
  139.     del  *.obj
  140.  
  141.  
  142. RFLAGS=-Irexp -DMAWK
  143.  
  144. !if  $d(LARGE)
  145. RFLAGS=$(RFLAGS) -DLMDOS
  146. !endif
  147.  
  148. # there must be a better way to do this
  149. rexp.obj  :  rexp/rexp.c  rexp/rexp.h
  150.     $(CC) $(CFLAGS) $(RFLAGS) rexp/rexp.c
  151.  
  152. rexp0.obj  :  rexp/rexp0.c  rexp/rexp.h
  153.     $(CC) $(CFLAGS) $(RFLAGS) rexp/rexp0.c
  154.  
  155. rexp1.obj  :  rexp/rexp1.c  rexp/rexp.h
  156.     $(CC) $(CFLAGS) $(RFLAGS) rexp/rexp1.c
  157.  
  158. rexp2.obj  :  rexp/rexp2.c  rexp/rexp.h
  159.     $(CC) $(CFLAGS) $(RFLAGS) rexp/rexp2.c
  160.  
  161. rexp3.obj  :  rexp/rexp3.c  rexp/rexp.h
  162.     $(CC) $(CFLAGS) $(RFLAGS) rexp/rexp3.c
  163.  
  164.  
  165. #  dependencies of .objs on .h
  166. array.obj : bi_vars.h sizes.h zmalloc.h memory.h types.h field.h mawk.h config.h symtype.h config/Idefault.h
  167. bi_funct.obj : fin.h bi_vars.h sizes.h memory.h zmalloc.h regexp.h types.h field.h repl.h files.h bi_funct.h mawk.h config.h symtype.h init.h config/Idefault.h
  168. bi_vars.obj : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h mawk.h config.h symtype.h config/Idefault.h init.h
  169. cast.obj : parse.h sizes.h memory.h zmalloc.h types.h field.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h
  170. code.obj : sizes.h memory.h zmalloc.h types.h field.h code.h jmp.h mawk.h config.h symtype.h config/Idefault.h init.h
  171. da.obj : sizes.h memory.h zmalloc.h types.h field.h repl.h code.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
  172. error.obj : parse.h bi_vars.h sizes.h types.h scan.h mawk.h config.h symtype.h config/Idefault.h
  173. execute.obj : bi_vars.h fin.h sizes.h memory.h zmalloc.h regexp.h types.h field.h code.h repl.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
  174. fcall.obj : sizes.h memory.h zmalloc.h types.h code.h mawk.h config.h symtype.h config/Idefault.h
  175. field.obj : parse.h bi_vars.h sizes.h memory.h zmalloc.h regexp.h types.h field.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h init.h
  176. files.obj : fin.h sizes.h memory.h zmalloc.h types.h files.h mawk.h config.h config/Idefault.h
  177. fin.obj : parse.h fin.h bi_vars.h sizes.h memory.h zmalloc.h types.h field.h scan.h mawk.h config.h symtype.h config/Idefault.h
  178. hash.obj : sizes.h memory.h zmalloc.h types.h mawk.h config.h symtype.h config/Idefault.h
  179. init.obj : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h mawk.h config.h symtype.h config/Idefault.h init.h
  180. jmp.obj : sizes.h memory.h zmalloc.h types.h code.h mawk.h jmp.h config.h symtype.h config/Idefault.h init.h
  181. kw.obj : parse.h sizes.h types.h mawk.h config.h symtype.h config/Idefault.h init.h
  182. main.obj : fin.h bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h files.h mawk.h config.h symtype.h config/Idefault.h init.h
  183. makescan.obj : parse.h scan.h symtype.h
  184. matherr.obj : sizes.h types.h mawk.h config.h config/Idefault.h
  185. memory.obj : sizes.h memory.h zmalloc.h types.h mawk.h config.h config/Idefault.h
  186. parse.obj : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h code.h files.h bi_funct.h mawk.h jmp.h config.h symtype.h config/Idefault.h
  187. print.obj : bi_vars.h parse.h sizes.h memory.h zmalloc.h types.h field.h scan.h files.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
  188. re_cmpl.obj : parse.h sizes.h memory.h zmalloc.h regexp.h types.h scan.h repl.h mawk.h config.h symtype.h config/Idefault.h
  189. scan.obj : parse.h fin.h sizes.h memory.h zmalloc.h types.h field.h scan.h repl.h code.h files.h mawk.h config.h symtype.h config/Idefault.h init.h
  190. split.obj : bi_vars.h parse.h sizes.h memory.h zmalloc.h regexp.h types.h field.h scan.h bi_funct.h mawk.h config.h symtype.h config/Idefault.h
  191. version.obj : patchlev.h sizes.h types.h mawk.h config.h config/Idefault.h
  192. zmalloc.obj : sizes.h zmalloc.h types.h mawk.h config.h config/Idefault.h
  193. dosexec.obj : fin.h sizes.h memory.h zmalloc.h types.h files.h mawk.h config/Idefault.h config.h
  194.