home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / MAWK113.ZIP / mawk113 / msdos / Makefile.MSC < prev    next >
Makefile  |  1992-01-21  |  6KB  |  144 lines

  1. # Microsoft C 6.0A makefile for mawk,
  2. # an implementation of The AWK Programming Language, 1988.
  3. # This makefile requires Microsoft C's NMAKE program
  4.  
  5. ####################################
  6. # user settable macros
  7. #
  8.  
  9. CFLAGS = -O -Gs
  10.  
  11. # if you don't change parse.y or parse2.xc
  12. # then you can use the parse.c and parse.h provided and don't need yacc
  13. # The parse.c and parse.h in the distribution were made with
  14. # Berkeley yacc, which is freely available for MSDOS
  15.  
  16. YACC=byacc -d
  17.  
  18. ####################################
  19. # rules for making small-memory and large-memory object files
  20. #
  21. .c.obs:
  22.     cl $(CFLAGS) -Os -AS -c -Fo$@ $<
  23. .c.obl:
  24.     cl $(CFLAGS) -AL -DHAVE_SMALL_MEMORY=0 -c -Fo$@ $<
  25.  
  26. #######################################
  27.  
  28. OBS=parse.obs scan.obs memory.obs main.obs hash.obs execute.obs code.obs\
  29.   da.obs error.obs init.obs bi_vars.obs cast.obs print.obs bi_funct.obs\
  30.   kw.obs jmp.obs array.obs field.obs  split.obs re_cmpl.obs zmalloc.obs\
  31.   fin.obs files.obs  scancode.obs matherr.obs  fcall.obs version.obs\
  32.   xdosexec.obj dosexec.obs
  33.  
  34. OBL=parse.obl scan.obl memory.obl main.obl hash.obl execute.obl code.obl\
  35.   da.obl error.obl init.obl bi_vars.obl cast.obl print.obl bi_funct.obl\
  36.   kw.obl jmp.obl array.obl field.obl  split.obl re_cmpl.obl zmalloc.obl\
  37.   fin.obl files.obl  scancode.obl matherr.obl  fcall.obl version.obl\
  38.   dosexec.obl
  39.  
  40. REXP_C=rexp/rexp.c rexp/rexp0.c rexp/rexp1.c rexp/rexp2.c\
  41.     rexp/rexp3.c rexp/rexpdb.c
  42.  
  43. all: mawk.exe bmawk.exe
  44.  
  45. mawk.exe : $(OBS)  rexp/regexp.lib
  46.     link @msdos\mawkmsc.lnk
  47.  
  48. bmawk.exe : $(OBL)  rexp/lregexp.lib
  49.     link @msdos\bmawkmsc.lnk
  50.  
  51. test : mawk.exe  # test that we have a sane mawk
  52.     copy mawk.exe test\mawk.exe
  53.     cd test
  54.     @echo you may have to run the test manually
  55.     -mawk_tes
  56.     del mawk.exe
  57.     cd ..
  58.  
  59. fpe_test :  mawk.exe # test FPEs are handled OK
  60.     copy mawk.exe test\mawk.exe
  61.     @echo testing floating point exception handling
  62.     cd test
  63.     @echo you may have to run the test manually
  64.     -fpe_test
  65.     del mawk.exe
  66.     cd ..
  67.  
  68. rexp/regexp.lib :  $(REXP_C)
  69.     cd rexp
  70.     nmake "CFLAGS=$(CFLAGS) -DMAWK"
  71.     cd ..
  72.  
  73. rexp/lregexp.lib :  $(REXP_C)
  74.     cd rexp
  75.     nmake "CFLAGS=$(CFLAGS) -DMAWK -DLMDOS" lregexp.lib
  76.     cd ..
  77.  
  78. ###########################
  79. # uncomment this after checking file times are OK
  80. #parse.c  : parse.y  parse2.xc
  81. #    @echo  expect 4 shift/reduce conflicts
  82. #    $(YACC)  parse.y
  83. #    cat  y_tab.c parse2.xc > parse.c && del y_tab.c
  84. #    -if cmp -s y_tab.h parse.h ;\
  85. #       then del y_tab.h ;\
  86. #       else mv y_tab.h parse.h ; fi
  87.  
  88.  
  89. scancode.c :  makescan.c  scan.h
  90.     $(CC) -o makescan.exe  makescan.c
  91.     makescan.exe > scancode.c
  92.     del makescan.exe
  93.  
  94. xdosexec.obj : xdosexec.see
  95.     $(CC) -o see2obj.exe  see2obj.c
  96.     see2obj.exe < xdosexec.see > xdosexec.obj
  97.     del see2obj.exe
  98.  
  99. # xdosexec.obj : xdosexec.asm
  100. #    masm /mx /z xdosexec.asm ;
  101.  
  102. clean :
  103.     del *.obs
  104.     del xdosexec.obj
  105.     del rexp/*.obs
  106.     del rexp/regexp.lib
  107.     del *.obl
  108.     del rexp/*.obl
  109.     del rexp/lregexp.lib
  110.     del test/mawk.exe
  111.  
  112. config.h : config\msc_dos.h
  113.     copy config\msc_dos.h config.h
  114.  
  115.  
  116. array.obs array.obl : bi_vars.h sizes.h zmalloc.h memory.h types.h field.h mawk.h config.h symtype.h config/Idefault.h
  117. bi_funct.obs bi_funct.obl : 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
  118. bi_vars.obs bi_vars.obl : bi_vars.h sizes.h memory.h zmalloc.h types.h field.h mawk.h config.h symtype.h config/Idefault.h init.h
  119. cast.obs cast.obl : 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
  120. code.obs code.obl : 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
  121. da.obs da.obl : 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
  122. error.obs error.obl : parse.h bi_vars.h sizes.h types.h scan.h mawk.h config.h symtype.h config/Idefault.h
  123. execute.obs execute.obl : 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
  124. fcall.obs fcall.obl : sizes.h memory.h zmalloc.h types.h code.h mawk.h config.h symtype.h config/Idefault.h
  125. field.obs field.obl : 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
  126. files.obs files.obl : fin.h sizes.h memory.h zmalloc.h types.h files.h mawk.h config.h config/Idefault.h
  127. fin.obs fin.obl : 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
  128. hash.obs hash.obl : sizes.h memory.h zmalloc.h types.h mawk.h config.h symtype.h config/Idefault.h
  129. init.obs init.obl : 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
  130. jmp.obs jmp.obl : sizes.h memory.h zmalloc.h types.h code.h mawk.h jmp.h config.h symtype.h config/Idefault.h init.h
  131. kw.obs kw.obl : parse.h sizes.h types.h mawk.h config.h symtype.h config/Idefault.h init.h
  132. main.obs main.obl : 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
  133. makescan.obs makescan.obl : parse.h scan.h symtype.h
  134. matherr.obs matherr.obl : sizes.h types.h mawk.h config.h config/Idefault.h
  135. memory.obs memory.obl : sizes.h memory.h zmalloc.h types.h mawk.h config.h config/Idefault.h
  136. parse.obs parse.obl : 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
  137. print.obs print.obl : 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
  138. re_cmpl.obs re_cmpl.obl : 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
  139. scan.obs scan.obl : 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
  140. split.obs split.obl : 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
  141. version.obs version.obl : patchlev.h sizes.h types.h mawk.h config.h config/Idefault.h
  142. zmalloc.obs zmalloc.obl : sizes.h zmalloc.h types.h mawk.h config.h config/Idefault.h
  143.