home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / VCL_Source / Source / RTL / win32.mak < prev   
Makefile  |  2000-02-01  |  7KB  |  201 lines

  1. #############################################################################
  2. # Configure the tools appropriately.                                        #
  3. #############################################################################
  4. # This is the major version # of the RTL DLL.
  5. DLLMAJOR  = 5
  6.  
  7. # VCLPACKVER is the VCL Package version number in the .BPL filenames
  8. VCLPACKVER=$(DLLMAJOR)0
  9.  
  10. # PRODVER is the version # of the Borland C++Builder product
  11. PRODVER=$(DLLMAJOR).0
  12.  
  13. # BETA is defined only prior to RTM and indicates the current milestone.
  14. #BETA=rtm
  15.  
  16. !if $d(DLL)
  17. DLLCOPYRIGHTSTR = Copyright Inprise Corporation 1994,2000
  18.  
  19. # DLLVER is the version number in the RTL .DLL files: the xx (c?32xx*.dll)
  20. # DLLVERSTR is a string representation of the same number for VERSION.RC
  21.   DLLVER        = $(DLLMAJOR)0
  22.   DLLVERSTR     = $(DLLMAJOR).0
  23. !if $d(MT)
  24. !if $d(MAGIC)
  25.   DLLDESCSTR    = Borland C++ Multi-thread RTL (WIN/VCL MT)
  26. !endif # MAGIC
  27. !else
  28.   DLLDESCSTR    = Borland C++ Single-thread RTL (WIN ST)
  29. !endif # MT
  30.  
  31. # -b:0x32X00000 for base address - X should be only the major version num.
  32. #               ie: 4 for 40 & 45, 5 for 50, 6 for 60, 7 for 70...
  33. LINKER_DLL_BASE_SWITCH=-b:0x32$(DLLMAJOR)00000
  34. !endif
  35.  
  36. !if $d(MAGIC) && $d(DLL)
  37. !  if $d(RTLSOURCE)
  38.      EXTLIB=$(BCB)\lib\release\vcl$(VCLPACKVER).lib $(BCB)\lib\release\vcle$(VCLPACKVER).lib
  39. !  else
  40.      EXTLIB=$(EXTDIR)\vcl$(VCLPACKVER).lib $(EXTDIR)\vcle$(VCLPACKVER).lib
  41. !  endif
  42. !endif
  43.  
  44. !if $d(RTLSOURCE)
  45. AFLAGS   = /kh30000 -t -m -D__WIN32__ -I$(BCINCL:;= -I) -I$(INCLBASE)\rtlinc
  46. !else
  47. AFLAGS   = /kh30000 -t -m -D__WIN32__ -I$(INCLBASE) -I$(INCLBASE)\rtlinc
  48. !endif
  49. !if $d(TASM_CASE_SENSITIVE)
  50. AFLAGS   = -ml $(AFLAGS)
  51. !else
  52. AFLAGS   = -mx $(AFLAGS)
  53. !endif
  54.  
  55. ASM      = tasm32
  56. BRCC     = brcc32
  57. !if $d(MT)
  58.   BRCC   = $(BRCC) -d__MT__
  59. !endif
  60. !if $d(MAGIC)
  61.   BRCC   = $(BRCC) -dMAGIC
  62. !endif
  63.  
  64. CC       = bcc32 +$(OBJDIR)\$(CFG) $(XTRAFLAGS) $(CCXTRAFLAGS)
  65. CPP      = cpp32 +$(OBJDIR)\$(CFG) $(XTRAFLAGS) $(CPPXTRAFLAGS)
  66. CFLAGS   = -c -X -n$(OBJDIR) -I$(INCLUDES) -ff- -j3 -jb -w -w-sig -V? -D__RTL_BUILD__;NO_STRICT;__USELOCALES__
  67. !if $d(CREATE_ALLSTL)
  68. CFLAGS   = $(CFLAGS) -Jgi -w- -D__CREATE_ALLSTL__
  69. !endif
  70. IMPLIB   = implib -i -c -f
  71. !if $d(RTLSOURCE)
  72. INCLUDES = $(BCINCL);$(INCLBASE)\rtlinc
  73. !else
  74. INCLUDES = $(INCLBASE);$(INCLBASE)\windows;$(INCLBASE)\rtlinc
  75. !endif
  76. !if $d(DLL)
  77. LINK     = ilink32
  78. LINKEROPTS=$(LINKEROPTS) -s -c -Tpd -Gn -Gm -M $(LINKER_DLL_BASE_SWITCH)
  79. LINKEROPTS=$(LINKEROPTS) -D"$(DLLDESCSTR)"
  80. !endif
  81.  
  82. !if $d(MAGIC)
  83. #
  84. # The RTLDLL now has the prefix CC32 always.  The CC32xxMT.DLL supports
  85. # both the standard Win32 RTL (the old CW32...) and the VCL compatible RTL
  86. # (the old CP32...). The import libraries will still have the same names:
  87. # cw32i, cw32mti, cp32mti
  88. #
  89. LIBNAME      = cp32
  90. LIBNAME_W    = cw32
  91. DLLBASENAME  = cc32
  92. !else
  93. LIBNAME      = cw32
  94. DLLBASENAME  = cc32
  95. !endif
  96.  
  97. OBJDIR = $(OBJBASE)\obj$(MAGICSUFFIX)$(MTSUFFIX)$(DLLSUFFIX)
  98. PUBTOOL = pubdup.exe
  99. PUBNAME = names32.pub
  100.  
  101. !if $d(DEBUG)
  102.     TLIB = tlib /C /P512
  103.     TLIB_NO_PURGE = tlib /C /P512
  104.     CFLAGS = $(CFLAGS) -D_RWDEBUG=1 -x -xp
  105. !else
  106.     TLIB = tlib /C /0 /P512
  107.     TLIB_NO_PURGE = tlib /C /P512
  108.     CFLAGS = $(CFLAGS) -O2
  109. !endif
  110.  
  111. !if $d(MAGIC)
  112.     CFLAGS = $(CFLAGS) -DMAGIC "-D__VCLPACKVERSTR=\"$(VCLPACKVER)\"" -D__VCLPACKVER=$(VCLPACKVER)
  113.     AFLAGS = $(AFLAGS) -DMAGIC
  114.     MAGICSUFFIX = mg
  115. !endif
  116.  
  117. !if $d(MT)
  118.     AFLAGS = $(AFLAGS) -D_MT
  119.     CFLAGS = $(CFLAGS) -WM
  120.     MTSUFFIX = mt
  121. !else
  122.     CFLAGS = $(CFLAGS) -WM-
  123. !endif
  124.  
  125. !if $d(BETA)
  126.     CFLAGS = $(CFLAGS) "-D__RTL_BETA=$(BETA)"
  127. !endif
  128.  
  129. !if $d(MBCS)
  130.     CFLAGS = $(CFLAGS) -D_MBCS -D_MBC_USE_MACROS
  131.     AFLAGS = $(AFLAGS) -D_MBCS -D_MBC_USE_MACROS
  132. !endif
  133.  
  134. !if $d(DLL)
  135.     AFLAGS = $(AFLAGS) -D_BUILDRTLDLL
  136.     CFLAGS = $(CFLAGS) -D_BUILDRTLDLL -WD -D_RWSTDBUILDDLL -D_RWSTDDLL "-D__RTLDLLVERSTR=\"$(DLLVER)\""
  137.     BRCC = $(BRCC) "-D__RTLDLLVERSTR=\"$(DLLVERSTR)\0\""
  138.     BRCC = $(BRCC) "-D__RTLDLLPRODNAMESTR=\"Borland C++ Builder $(PRODVER)\0\""
  139.     BRCC = $(BRCC) "-D__RTLDLLDESCSTR=\"$(DLLDESCSTR)\0\""
  140.     BRCC = $(BRCC) "-D__RTLDLLCOPYRIGHTSTR=\"$(DLLCOPYRIGHTSTR)\0\""
  141. !if $d(BETA)
  142.     BRCC = $(BRCC) "-D__RTLDLLBETASTR=\"[pre-release version: $(BETA)]\0\""
  143. !endif
  144.     DLLC0 = c0d32
  145.     DLLNAME = $(DLLBASENAME)$(DLLVER)$(MTSUFFIX)
  146.     DLLSUFFIX = x
  147.     IMPLIBNAME = $(LIBNAME)$(MTSUFFIX)i
  148.     IMPORT = import32
  149. !if $d(MAGIC)
  150.     IMPORT = $(IMPORT)
  151.     IMPLIBNAME_W = $(LIBNAME_W)$(MTSUFFIX)i
  152. # Don't force in the VCL memory manager any more
  153. #$(EXTDIR)\memmgr.lib
  154. !endif
  155. !else
  156.     CFLAGS = $(CFLAGS) -W
  157. !endif
  158.  
  159. #############################################################################
  160. # $(CFG) is created only once for each build.  In order to modify compiler  #
  161. # options on a source directory basis, CC should be modified instead of     #
  162. # CFLAGS.                                                                   #
  163. #############################################################################
  164. !if $d(PCH)
  165.     CC = $(CC) -H -Hc -Hs- -H=$(OBJBASE).csm
  166. !endif
  167.  
  168. #############################################################################
  169. # The source directories.                                                   #
  170. #############################################################################
  171.  
  172. #----------------------------------------------------------------------------
  173. # Note: The following dirs must be built in this order for the RTL to work
  174. #----------------------------------------------------------------------------
  175.  
  176. SRCDIRS =                               \
  177.           $(SRCBASE)\memory             \
  178.           $(SRCBASE)\vcl                \
  179.           $(SRCBASE)\stl\predecl        \
  180.           $(SRCBASE)\stl\allstl         \
  181.           $(SRCBASE)\stl                \
  182.           $(SRCBASE)\conio              \
  183.           $(SRCBASE)\cstrings           \
  184.           $(SRCBASE)\except             \
  185.           $(SRCBASE)\io                 \
  186.           $(SRCBASE)\locale             \
  187.           $(SRCBASE)\math               \
  188.           $(SRCBASE)\mbcs               \
  189.           $(SRCBASE)\misc               \
  190.           $(SRCBASE)\process            \
  191.           $(SRCBASE)\startup            \
  192.           $(SRCBASE)\threads            \
  193.           $(SRCBASE)\time               \
  194.           $(SRCBASE)\pcre
  195.  
  196.  
  197. #!if !$d(DLL) && (!$d(MT) || $d(MAGIC))
  198.     SRCDIRS = $(SRCDIRS)                \
  199.               $(SRCBASE)\defs
  200. #!endif
  201.