home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / AWK.ZIP / MAKE.INI < prev    next >
Encoding:
Text File  |  1988-09-09  |  2.3 KB  |  99 lines

  1. # If .NOIG is used, it *must* be the first directive in this file.
  2. #.NOIG
  3.  
  4. # The order to search for rules and files is specified by .SUFFIXES
  5. .SUFFIXES : .exe .obj .c .for .asm .y .lxi
  6.  
  7. # The directory NDMAKE uses for temporary file
  8. MAKE_TMP = $(TMP)
  9.  
  10. # Macros for compilers and assemblers.
  11. AS        = masm
  12. CC        = cl
  13. LEX       = lex
  14. YACC      = yacc
  15. YFLAGS    = -hi
  16. #HPATH     = -I..\incl
  17. HPATH     =
  18. DEBUG     = -Ox
  19. CFLAGS    = -A$(MODEL) -J -DLINT_ARGS $(DEBUG) $(HPATH)
  20. MODEL     = L
  21. VARSTK    = $(LIB)$(MODEL)VARSTK
  22. SETARGV   = $(LIB)SETARGV
  23. LIBS      = lex.lib
  24. LINKFLAGS = /NOE
  25. BIN       =
  26.  
  27. # DEFAULT RULES
  28. #
  29. #  ASM -> OBJ using MASM.
  30. .asm.obj:
  31.    ${AS} $<;
  32.  
  33. #  C -> OBJ using Microsoft C. 
  34. .c.obj:
  35.    ${CC} ${CFLAGS} -c $<
  36.  
  37. #  FOR -> OBJ using Microsoft Fortran.
  38. .for.obj:
  39.    for1 $<;
  40.    pas2
  41.  
  42. #  Y -> C, for YACC
  43. #.y.c:
  44. #   $(YACC) $(YFLAGS) $< 
  45. #   mv ytab.c $@
  46. #
  47. #.y.obj:
  48. #   $(YACC) $(YFLAGS) $<
  49. #   grep ^#.*define ytab.h | sed "s/^#define \([^ ]*\) [^ ]*$$/    \"\1\",/" >tok.h
  50. #   ${CC} ${CFLAGS} -c ytab.c
  51. #   rm ytab.c
  52. #   mv ytab.obj $@
  53.  
  54. #  L -> C, for LEX
  55. .lxi.c:
  56.    $(LEX) -i $< -o lextab.c -t $*
  57.    grep -v ^#line <lextab.c >temp
  58.    copy temp lextab.c
  59.    mv lextab.c $@
  60. #
  61. .lxi.obj:
  62.    $(LEX) -i $< -o lextab.c -t $*
  63.    grep -v ^#line <lextab.c >temp.c
  64.    ${CC} ${CFLAGS} -c temp.c
  65.    rm temp.c lextab.c
  66.    mv temp.obj $@
  67.  
  68.  
  69. # To produce a `.exe' file from an `.obj' file.  Note that there is a
  70. # problem because LIBS may be different for linking `.obj' files
  71. # produced by different compilers (C, FORTRAN, PASCAL, etc).  To avoid
  72. # this problem you may want to have the C compiler produce `.cbj' files,
  73. # the FORTRAN compiler produce `.fbj' files, etc.  Then you could write
  74. # specific rules for `.cbj.exe' and `.fbj.exe' which would use the correct
  75. # libraries.
  76. .obj.exe:
  77.    link $< $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
  78.  
  79. # To produce a `.exe' file from a `.asm' file.
  80. .asm.exe:
  81.    ${AS} $<;
  82.    link $*.obj, $@,, $(LIBS)
  83.  
  84. # To produce a `.exe' file from a `.c' file.
  85. .c.exe:
  86.    ${CC} $(CFLAGS) -c $<
  87.    link $*.obj $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
  88.  
  89. # To produce a `.exe' file from a `.for' file.
  90. .for.exe:
  91.    for1 $<;
  92.    pas2
  93.    link $*.obj, $@,, $(LIB)\FORTRAN
  94.  
  95. # A universally useful target so "make clean" always works.
  96. clean:
  97.    -(erase *.bak; erase *.map)
  98.  
  99.