home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Examples / StdLib / makeincl.inc < prev    next >
Encoding:
Text File  |  2000-01-31  |  5.9 KB  |  194 lines

  1. #==========================================================================
  2. #
  3. #  makeincl.bcc - header file Borland C++ makefiles
  4. #
  5. #==========================================================================
  6. #
  7. #  (c) Copyright 1994, 1995 Rogue Wave Software, Inc.
  8. #  ALL RIGHTS RESERVED
  9. #
  10. #  The software and information contained herein are proprietary to, and
  11. #  comprise valuable trade secrets of, Rogue Wave Software, Inc., which
  12. #  intends to preserve as trade secrets such software and information.
  13. #  This software is furnished pursuant to a written license agreement and
  14. #  may be used, copied, transmitted, and stored only in accordance with
  15. #  the terms of such license and with the inclusion of the above copyright
  16. #  notice.  This software and information or any other copies thereof may
  17. #  not be provided or otherwise made available to any other person.
  18. #
  19. #  Notwithstanding any other lease or license that may pertain to, or
  20. #  accompany the delivery of, this computer software and information, the
  21. #  rights of the Government regarding its use, reproduction and disclosure
  22. #  are as set forth in Section 52.227-19 of the FARS Computer
  23. #  Software-Restricted Rights clause.
  24. #
  25. #  Use, duplication, or disclosure by the Government is subject to
  26. #  restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
  27. #  Technical Data and Computer Software clause at DFARS 252.227-7013.
  28. #  Contractor/Manufacturer is Rogue Wave Software, Inc.,
  29. #  P.O. Box 2328, Corvallis, Oregon 97339.
  30. #
  31. #  This computer software and information is distributed with "restricted
  32. #  rights."  Use, duplication or disclosure is subject to restrictions as
  33. #  set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial
  34. #  Computer Software-Restricted Rights (April 1985)."  If the Clause at
  35. #  18-52.227-74 "Rights in Data General" is specified in the contract,
  36. #  then the "Alternate III" clause applies.
  37. #
  38. #==========================================================================
  39. #
  40. #  Header file for makefiles for the Rogue Wave Standard Library package,
  41. #  using Borland C++ with a Win32 target.
  42. #
  43. #==========================================================================
  44. #
  45. #       Usage:
  46. #
  47. #
  48. # make -fmakefile.bcc -DBINDING=<binding> -DTHREAD=<threads> \
  49. #                -DBMODE=<build mode> -DENVIRON=<environ>
  50. #
  51. #
  52. #      <environ> may be...          for...
  53. #      ----------------------   ------------------------------------------
  54. #     *WIN32                    32Bit Windows environment
  55. #
  56. #      <binding> may be...          for...
  57. #      ----------------------   ------------------------------------------
  58. #     *STATIC                 a statically linked version of the library
  59. #      DLL                                  a dynamically linked version of the library
  60. #
  61. #
  62. #      <thread> may be...           for...
  63. #      ----------------------   ------------------------------------------
  64. #     *SINGLE                       use with single-threaded applications
  65. #      MULTI                             an "MT-safe" version of the library
  66. #
  67. #
  68. #      <build mode> may be...   for...
  69. #      ----------------------   ------------------------------------------
  70. #      DEBUG                             a debug version of the library
  71. #     *RELEASE                           a release version of the library
  72. #
  73. #
  74. #==========================================================================
  75. #
  76. #  Examples:
  77. #
  78. #  (Assume building under Windows NT or 95):
  79. #      make -fmakefile.bcc BINDING=DLL THREAD=MULTI
  80. #       // builds or uses a flat-model dll version of the library, suitable for
  81. #       //   use with multi-threaded applications, under Windows NT/95
  82. #
  83. #==========================================================================
  84.  
  85. ###################################################################
  86. #
  87. #       Borland specific directives ---
  88. #
  89. .SWAP
  90. .AUTODEPEND
  91.  
  92. ###################################################################
  93. #
  94. #       set default values:
  95.  
  96. !ifndef ENVIRON
  97. ENVIRON = WIN32
  98. !endif
  99.  
  100. !ifndef BINDING
  101. BINDING = STATIC
  102. !endif
  103.  
  104. !ifndef THREAD
  105. THREAD = MULTI
  106. !endif
  107.  
  108. !ifndef BMODE
  109. BMODE = RELEASE
  110. !endif
  111.  
  112. ###################################################################
  113. #
  114. # Flag illegal options:
  115. #
  116.  
  117. !if $(ENVIRON) != WIN32
  118. ! error Illegal value for ENVIRON option
  119. !endif
  120.  
  121. !if $(BINDING) != DLL && $(BINDING) != STATIC
  122. !  error Illegal value for BINDING option
  123. !endif
  124.  
  125. !if $(THREAD) != SINGLE && $(THREAD) != MULTI
  126. !  error Illegal value for THREAD option
  127. !endif
  128.  
  129. !if $(BMODE) != RELEASE && $(BMODE) != DEBUG
  130. !  error Illegal value for BMODE option
  131. !endif
  132.  
  133. ###################################################################
  134. #
  135. # Set tool and version names:
  136.  
  137. !if $(ENVIRON) == WIN32
  138. CPP        = bcc32
  139. CPP32      = cpp32
  140. LIBRARIAN  = tlib /P128
  141. LINKER     = ilink32
  142. RC         = brc32
  143. ENVNAME    =
  144. !endif
  145.  
  146. ###################################################################
  147. #
  148. # Set the various flags:
  149.  
  150. !if $(BMODE) == DEBUG
  151. DBGOPT= -v -N -x -xp
  152. CCLINKOPT = -lGn
  153. !else
  154. CCLINKOPT = -lGn
  155. !endif
  156.  
  157. !if $(THREAD) == MULTI
  158. CCLINKOPT = $(CCLINKOPT) -tWM
  159. LIBSUF=mt
  160. !else
  161. CCLINKOPT = $(CCLINKOPT) -tWM-
  162. LIBSUF=
  163. !endif
  164.  
  165. ###################################################################
  166. #
  167. # Set any relevant defines (-Dxxx)
  168.  
  169. DEFOPTS =
  170.  
  171. !if $(BINDING) == DLL
  172. DEFOPTS=$(DEFOPTS) -tWCR
  173. TARGSUF=R
  174. LIBSUF=$(LIBSUF)i
  175. !else
  176. DEFOPTS = $(DEFOPTS) -tWC
  177. LIBSUF=$(LIBSUF)
  178. TARGSUF=
  179. !endif
  180.  
  181. ###################################################################
  182. #
  183. # Set any compiler options
  184.  
  185. PCHROOT=stl_pch
  186. CCOPTS = -w- -jb -j1 -Hc -H=$(PCHROOT).csm
  187.  
  188. #Compile flags:
  189. CPPFLAGS= $(CCOPTS) $(DBGOPT)  $(ENVOPTS) $(DEFOPTS) $(THROPTS) $(CCLINKOPT)
  190. LINKFLAGS= -Gn -Gi -Tpd -aa -L$(MAKEDIR)\..\lib -x
  191. LINKSTARTUP= c0d32.obj
  192. LINKLIBS=import32.lib cw32$(LIBSUF).lib
  193. RCFLAGS= -r -i$(MAKEDIR)\..\include;$(MAKEDIR)\..\include\windows
  194.