home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / DMAKE38C.ZIP / OS2 / IBM / CONFIG.MK < prev    next >
Makefile  |  1992-01-22  |  2KB  |  84 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. # Definition of macros for library, and C startup code.
  12.  
  13. # The following sources are required for MSC
  14. OSR_SRC = tempnam.c
  15. .SETDIR=$(osrdir) : $(OSR_SRC)
  16.  
  17. SRC += $(OSR_SRC)
  18. .SOURCE.h : $(osrdir)
  19.  
  20. # Local configuration modifications for CFLAGS 
  21. # OS/2 always has at least a 286 so this is enabled by default:
  22. CFLAGS += -G2
  23.  
  24. SET_STACK = /stack:8192
  25. NDB_LDFLAGS += $(SET_STACK)
  26.  
  27. # Microsoft C doesn't need tail but needs head
  28. LDTAIL = $(OS)$(DIRSEPSTR)$(TARGET:b).def;
  29. LDHEAD = $(LDFLAGS)
  30.  
  31. # Debugging libraries
  32. DB_LDFLAGS += /co /li /map $(SET_STACK)
  33. DB_LDLIBS  +=
  34.  
  35. # NO Debug MSC flags:
  36. # Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
  37. # to get these by default when you make dmake using 'dmake'.
  38. #
  39. # Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
  40. # and sets the flags appropriately.
  41.  
  42. .IMPORT .IGNORE : MSC_VER
  43. MSC_VER *= 6.0              # If unset, assume 6.0 by default.
  44.  
  45. .IF $(MSC_VER) == 4.0
  46.    CFLAGS      += -I$(osrdir) $(C_$(MODEL):s/A/m/)
  47.    CFLAGS      += -DM_I86=1      # 5.0+ define this automatically
  48.    CFLAGS      += -D__STDC__=1    # 5.0, 5.1, but not 6.0 do this automatically
  49.    NDB_CFLAGS  +=
  50.    DB_CFLAGS   += -Zi
  51. .ELSE
  52.    DB_CFLAGS   += -Zi
  53.    CFLAGS      += -I$(osrdir) $(C_$(MODEL))
  54.    .IF $(MSC_VER) != 6.0
  55.       # For 5.0 and 5.1, we define _MSC_VER=500 or 510
  56.       CFLAGS      += -D_MSC_VER=$(MSC_VER:s,.,,)0
  57.       NDB_CFLAGS  += -Osl -Gs
  58.    .ELSE
  59.       # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
  60.       CFLAGS      += -D__STDC__=1 # incredibly not auto done by 6.0
  61.       NDB_CFLAGS  += -Osecgl -Gs
  62.  
  63.        # Redefine rule for making our objects, we don't need mv
  64.       %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
  65.    .END
  66.    NDB_LDFLAGS += /exe /packc /batch
  67.    NDB_LDLIBS  += /NOD:LLIBCE LLIBCEP
  68. .END
  69.  
  70. # See if we modify anything in the lower levels.
  71. .IF $(OSENVIRONMENT) != $(NULL)
  72.    .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
  73. .END
  74.  
  75. C_s =
  76. C_m = -AM
  77. C_c = -AC
  78. C_l = -AL
  79.  
  80. S_s = -Dmsmall
  81. S_m = -Dmmedium
  82. S_c = -Dmcompact
  83. S_l = -Dmlarge
  84.