home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DMAKE37S.ZIP / DMAKE / OS2 / MSCDOS / CONFIG.MK < prev    next >
Encoding:
Makefile  |  1991-01-06  |  2.2 KB  |  81 lines

  1. # This is the MSC 4.0 and higher OS/2 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. # OS/2 always has at least a 286 so this is enabled by default:
  25. CFLAGS += -G2
  26.  
  27. # For OS/2 we need the LDTAIL defined in os2\config.mk
  28. # Debugging libraries
  29. DB_LDFLAGS += /co /li /map
  30. DB_LDLIBS  +=
  31.  
  32. # NO Debug MSC flags:
  33. # Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
  34. # to get these by default when you make dmake using 'dmake'.
  35. #
  36. # Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
  37. # and sets the flags appropriately.
  38.  
  39. .IMPORT .IGNORE : MSC_VER
  40. MSC_VER *= 6.0              # If unset, assume 6.0 by default.
  41.  
  42. .IF $(MSC_VER) == 4.0
  43.    CFLAGS      += -I$(osrdir) $(C_$(MODEL):s/A/m/)
  44.    CFLAGS      += -DM_I86=1      # 5.0+ define this automatically
  45.    CFLAGS      += -D__STDC__=1    # 5.0, 5.1, but not 6.0 do this automatically
  46.    NDB_CFLAGS  +=
  47.    DB_CFLAGS   += -Zi
  48. .ELSE
  49.    DB_CFLAGS   += -Zi
  50.    CFLAGS      += -I$(osrdir) $(C_$(MODEL))
  51.    .IF $(MSC_VER) != 6.0
  52.       # For 5.0 and 5.1, we define _MSC_VER=500 or 510
  53.       CFLAGS      += -D_MSC_VER=$(MSC_VER:s,.,,)0
  54.       NDB_CFLAGS  += -Oscl -Gs
  55.    .ELSE
  56.       # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
  57.       CFLAGS      += -D__STDC__=1 # incredibly not auto done by 6.0
  58.       NDB_CFLAGS  += -Osecgl -Gs
  59.  
  60.        # Redefine rule for making our objects, we don't need mv
  61.       %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
  62.    .END
  63.    NDB_LDFLAGS += /exe /packc /batch
  64.    NDB_LDLIBS  +=
  65. .END
  66.  
  67. # See if we modify anything in the lower levels.
  68. .IF $(OSENVIRONMENT) != $(NULL)
  69.    .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
  70. .END
  71.  
  72. C_s =
  73. C_m = -AM
  74. C_c = -AC
  75. C_l = -AL
  76.  
  77. S_s = -Dmsmall
  78. S_m = -Dmmedium
  79. S_c = -Dmcompact
  80. S_l = -Dmlarge
  81.