home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 15a / ndmake45.zip / MAKE.INI < prev    next >
Text File  |  1987-10-30  |  2KB  |  107 lines

  1. # This is a sample `make.ini' file for NDMAKE.  You will probably want
  2. # to customize it for your system.
  3.  
  4. # If .NOIG is used, it *must* be the first directive in this file.
  5. #.NOIG
  6.  
  7.  
  8. # The order to search for rules and files is specified by .SUFFIXES
  9. .SUFFIXES : .exe .obj .c .for .asm .y .l
  10.  
  11.  
  12. # The directory NDMAKE uses for temporary file
  13. MAKE_TMP= $(TMP)
  14.  
  15.  
  16. # Macros for compilers and assemblers.
  17. AS    = masm
  18. CC    = cl
  19. CFLAGS    = -A$(MODEL)
  20. LEX    = lex
  21. LFLAGS    = 
  22. YACC    = yacc
  23. YFLAGS    = 
  24.  
  25.  
  26. # Other useful macros
  27. BIN    =
  28. ECHO    = >stdout
  29. LIBS    =
  30. MODEL    = S
  31. SETARGV    = $(LIB)\$(MODEL)SETARGV
  32. LINKFLAGS =
  33.  
  34.  
  35. # DEFAULT RULES
  36. #
  37. #    ASM -> OBJ using MASM.
  38. .asm.obj:
  39.     ${AS} $<;
  40.  
  41. #    C -> OBJ using Microsoft C. 
  42. .c.obj:
  43.     ${CC} ${CFLAGS} -c $<
  44.  
  45. #    FOR -> OBJ using Microsoft Fortran.
  46. .for.obj:
  47.     for1 $<;
  48.     pas2
  49.  
  50. #     Y -> C, for YACC
  51. .y.c:
  52.     $(YACC) $(YFLAGS) $<
  53.     rename ytab.c $@
  54.  
  55. #    L -> C, for LEX
  56. .l.c:
  57.     $(LEX) $(LFLAGS) $<
  58.     mv lex.yy.c $@
  59.  
  60.  
  61. # To produce a `.exe' file from an `.obj' file.  Note that there is a
  62. # problem because LIBS may be different for linking `.obj' files
  63. # produced by different compilers (C, FORTRAN, PASCAL, etc).  To avoid
  64. # this problem you may want to have the C compiler produce `.cbj' files,
  65. # the FORTRAN compiler produce `.fbj' files, etc.  Then you could write
  66. # specific rules for `.cbj.exe' and `.fbj.exe' which would use the correct
  67. # libraries.
  68. .obj.exe:
  69.     link $< $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
  70.  
  71. # To produce a `.exe' file from a `.asm' file.
  72. .asm.exe:
  73.     ${AS} $<;
  74.     link $*.obj, $@,, $(LIBS)
  75.     erase $*.obj
  76.  
  77. # To produce a `.exe' file from a `.c' file.
  78. .c.exe:
  79.     ${CC} $(CFLAGS) -c $<
  80.     link $*.obj $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
  81.     erase $*.obj
  82.  
  83. # To produce a `.exe' file from a `.for' file.
  84. .for.exe:
  85.     for1 $<;
  86.     pas2
  87.     link $*.obj, $@,, $(LIB)\FORTRAN
  88.     erase $*.obj
  89.  
  90. # A universally useful target so "make clean" always works.
  91. clean:
  92.     -(erase *.bak; erase *.map)
  93.  
  94. large:
  95.     (if exist \bin\c3s.exe do goto end; \
  96.      rename \bin\c3.exe c3s.exe; \
  97.      rename \bin\c3l.exe c3.exe; \
  98.      :end)
  99. small:
  100.     (if exist \bin\c3s.exe do goto end; \
  101.      rename \bin\c3.exe c3l.exe; \
  102.      rename \bin\c3s.exe c3.exe; \
  103.      :end)
  104.  
  105. chkdsk:
  106.     chkdsk d:
  107.