From 93b4e41fbec98ba3c5bba22f5357c6055eb2d2be Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 14 Jul 2011 02:47:31 +0000
Subject: [PATCH] Use __MAKE__ macro to detect C++Builder 2010 and enable the
 necessary hacks (and change the output directory prefix from "bcc" to
 "ecc6"). Fix the output directory naming when used with MSVC, which we don't
 do.

---
 src/build/Common.bmake | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/build/Common.bmake b/src/build/Common.bmake
index 0fe40ca255..380d01c800 100644
--- a/src/build/Common.bmake
+++ b/src/build/Common.bmake
@@ -107,7 +107,7 @@ UL_SUF	=	$(LIBFILE)
 !ifdef msc	# Microsoft Visual C++
 CC		=	cl
 LD		=	link
-CCPRE	=	msvc.win32
+CCPRE	=	msvc
 OUTPUT	=	-Fo
 LOUTPUT	=	-Fe
 CFLAGS  =	-nologo -MTd
@@ -139,8 +139,11 @@ MKSHLIB =       $(CC) -WD
 CFLAGS	=	$(CFLAGS) -Od -D_DEBUG 
 !endif
 
-# Required for C++Builder 2010
-CFLAGS	=	$(CFLAGS) -DHAS_STDINT_H -D_WIN32_WINNT=0x502
+# Required for Embarcadero C++Builder 2010
+!if __MAKE__ >= 0x0540
+	CCPRE	=	ecc6
+	CFLAGS	=	$(CFLAGS) -DHAS_STDINT_H -D_WIN32_WINNT=0x502
+!endif
 
 # Debug or release build?
 !ifdef DEBUG
-- 
GitLab