home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DMAKE37S.ZIP / DMAKE / MSDOS / MSCDOS / CONFIG.MK < prev    next >
Encoding:
Text File  |  1991-03-13  |  2.4 KB  |  86 lines

  1. # This is the MSC 4.0 and higher DOS configuration file for DMAKE
  2. #    It simply modifies the values of SRC, and checks to see if
  3. #    OSENVIRONMENT is defined.  If so it includes the appropriate
  4. #    config.mk file.
  5. #
  6. # It also sets the values of .SOURCE.c and .SOURCE.h to include the local
  7. # directory.
  8. #
  9. osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
  10.  
  11. TMPDIR :=
  12. .EXPORT : TMPDIR
  13.  
  14. # Definition of macros for library, and C startup code.
  15.  
  16. # The following sources are required for MSC
  17. OSR_SRC = tempnam.c
  18. .SETDIR=$(osrdir) : $(OSR_SRC)
  19.  
  20. SRC += $(OSR_SRC)
  21. .SOURCE.h : $(osrdir)
  22.  
  23. # Local configuration modifications for CFLAGS 
  24. # If you have a 286, you can use -G2 or appropriate to get better code, 
  25. # in that case uncomment the line below.  (You can also simply set
  26. # it in the CL environment variable.)
  27. #CFLAGS += -G2
  28. ASFLAGS += -t -mx $(S_$(MODEL))
  29.  
  30. # Redefine this, it isn't needed!
  31. LDTAIL = ;
  32.  
  33. # Debugging libraries
  34. DB_LDFLAGS += /co /li /map
  35. DB_LDLIBS  +=
  36.  
  37. # NO Debug MSC flags:
  38. # Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
  39. # to get these by default when you make dmake using 'dmake'.
  40. #
  41. # Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
  42. # and sets the flags appropriately.
  43.  
  44. .IMPORT .IGNORE : MSC_VER
  45. MSC_VER *= 6.0              # If unset, assume 6.0 by default.
  46.  
  47. .IF $(MSC_VER) == 4.0
  48.    CFLAGS      += -I$(osrdir) $(C_$(MODEL):s/A/m/)
  49.    CFLAGS      += -DM_I86=1      # 5.0+ define this automatically
  50. #   CFLAGS      += -D__STDC__=1    # 5.0, 5.1, but not 6.0 do this automatically
  51.    NDB_CFLAGS  +=
  52.    DB_CFLAGS   += -Zi
  53. .ELSE
  54.    DB_CFLAGS   += -Zi
  55.    CFLAGS      += -I$(osrdir) $(C_$(MODEL))
  56.    .IF $(MSC_VER) != 6.0
  57.       # For 5.0 and 5.1, we define _MSC_VER=500 or 510
  58.       CFLAGS      += -D_MSC_VER=$(MSC_VER:s,.,,)0
  59.       NDB_CFLAGS  += -Oscl -Gs
  60.    .ELSE
  61.       # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
  62.       CFLAGS      += -D__STDC__=1 # incredibly not auto done by 6.0
  63.       NDB_CFLAGS  += -Osecgl -Gs
  64.  
  65.       # Redefine rule for making our objects, we don't need mv
  66.       %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
  67.    .END
  68.    NDB_LDFLAGS += /exe /packc /batch
  69.    NDB_LDLIBS  +=
  70. .END
  71.  
  72. # See if we modify anything in the lower levels.
  73. .IF $(OSENVIRONMENT) != $(NULL)
  74.    .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
  75. .END
  76.  
  77. C_s =
  78. C_m = -AM
  79. C_c = -AC
  80. C_l = -AL
  81.  
  82. S_s = -Dmsmall
  83. S_m = -Dmmedium
  84. S_c = -Dmcompact
  85. S_l = -Dmlarge
  86.