home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / BCEXAMS.PAK / OCFMAKE.GEN < prev    next >
Text File  |  1995-08-29  |  3KB  |  112 lines

  1. #----------------------------------------------------------------------------
  2. # ObjectWindows - (C) Copyright 1993 by Borland International
  3. #     Extension to makefile.gen, adding OCF definitions and libraries
  4. #----------------------------------------------------------------------------
  5.  
  6. !ifndef MODELS
  7. MODELS = smldf
  8. !endif
  9. !ifndef SYSTEMS
  10. SYSTEMS = WIN16 WIN32
  11. !endif
  12.  
  13.  
  14. #
  15. # if no MODEL is specified & we're in 16-bit,  default to LARGE
  16. #
  17. !if !$d(MODEL) && !$d(WIN32) && "$(SYSTEM)" != "WIN32"
  18. MODEL=l
  19. !endif
  20.  
  21.  
  22. SYSLIBS  = 1   # force defined, actually set after include of makefile.gen
  23. SYSLIBSD = 1   # force defined, actually set after include of makefile.gen
  24. !include $(BCEXAMPLEDIR)\makefile.gen
  25.  
  26. !ifdef USEDLL
  27. CFLAGS = $(CFLAGS) -D_OCFDLL -D_BIDSDLL
  28. CFLAGSD = $(CFLAGSD) -D_OCFDLL -D_BIDSDLL
  29. !endif
  30.  
  31. #----------------------------------------------------------------------------
  32. # dir & search paths
  33. #----------------------------------------------------------------------------
  34.  
  35. !ifndef OCFLIBDIR
  36. OCFLIBDIR = $(BCLIBDIR)
  37. !endif
  38.  
  39. !if !$d(OCFINCDIR)
  40. OCFINCDIR = $(BCINCDIR)
  41. !elif "$(OCFINCDIR)" != "$(BCINCDIR)"
  42. INCLUDEPATH = $(OCFINCDIR);$(BCINCDIR)
  43. !endif
  44.  
  45. #----------------------------------------------------------------------------
  46. # additional libraries for OCF and BIDS
  47. #----------------------------------------------------------------------------
  48.  
  49. # determine library name suffix based upon model
  50. #
  51. !if $(_32BIT_)
  52. ! if $d(USEDLL)
  53. _SFX_ = fi
  54. ! else
  55. _SFX_ = f
  56. ! endif
  57. !else #WIN16
  58. ! if $d(USEDLL)
  59. _SFX_ = i
  60. ! else
  61. _SFX_ = $(MODEL)
  62. ! endif
  63. !endif
  64.  
  65. !if $(_32BIT_)
  66. _OCFCODE_ = w
  67. !else
  68. _OCFCODE_ = $(_SYSCODE_)
  69. !endif
  70.  
  71. #
  72. # select suffix for alternate library if diagnostics enabled
  73. #
  74. !if $(DIAGS)
  75. OCFSFX = d$(_OCFCODE_)$(_SFX_)
  76. ! if $d(USEDLL) || $(_32BIT_)
  77. BIDSSFX = d$(_SFX_)
  78. ! else # 16-bit static
  79. BIDSSFX = db$(_SFX_)  #use 'db' for 16 bit static for compatibility
  80. ! endif
  81. !else # no diags
  82. OCFSFX = $(_OCFCODE_)$(_SFX_)
  83. BIDSSFX = $(_SFX_)
  84. !endif
  85.  
  86. #
  87. # add OCF to system libraries
  88. #
  89. !if $(_32BIT_)
  90. OLELIB =   $(BCLIBDIR)\ole2w32
  91. SYSLIBS =  $(OCFLIBDIR)\ocf$(OCFSFX) $(BCLIBDIR)\bids$(BIDSSFX) $(OLELIB)
  92. SYSLIBSD = $(SYSLIBS)
  93. !else
  94. OLELIB =   $(BCLIBDIR)\ole2w16
  95. SYSLIBS =  $(OCFLIBDIR)\ocf$(OCFSFX) $(BCLIBDIR)\bids$(BIDSSFX) $(OLELIB)
  96. SYSLIBSD = $(OCFLIBDIR)\ocf$(OCFSFX)u $(BCLIBDIR)\bids$(BIDSSFX) $(OLELIB)
  97. !endif
  98.  
  99. #
  100. # build the cpp command line option for precompiled headers if requested
  101. #
  102. !if !$d(NOOCFPCH)
  103. CPCH = -H=$(OCFLIBDIR)\ocf$(OCFSFX).csm -H"ocf\ocfpch.h" -D_OCFPCH
  104. !if $(_32BIT_)
  105. CPCHD = -H=$(OCFLIBDIR)\ocf$(OCFSFX).csm -H"ocf\ocfpch.h" -D_OCFPCH
  106. !else
  107. CPCHD = -H=$(OCFLIBDIR)\ocf$(OCFSFX)u.csm -H"ocf\ocfpch.h" -D_OCFPCH
  108. !endif
  109. !endif
  110.  
  111. $(MAKEFILE) :: $(OCFLIBDIR)\ocf$(OCFSFX).lib $(BCLIBDIR)\bids$(BIDSSFX).lib
  112.