summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2017-07-29 12:16:01 +0200
committerGitHub <noreply@github.com>2017-07-29 12:16:01 +0200
commitce4db70e2daa679de8cdacf1268bdc9cbfa2bd04 (patch)
treee2f4bb5e1e3a4b117ce8bcd7dfb7f97147a9f4a4
parent2acfc51d7c66050ecf40bece9565da3addf59713 (diff)
parent12357c5b9220d072c7b61ac580ca8beca99ae7bd (diff)
downloadMPC-ce4db70e2daa679de8cdacf1268bdc9cbfa2bd04.tar.gz
Merge pull request #38 from jwillemsen/jwi-bcc3264-improvements
Improvements for bcc32 and bcc64
-rw-r--r--templates/bmake.mpd21
-rw-r--r--templates/bmakecommon.mpt7
2 files changed, 23 insertions, 5 deletions
diff --git a/templates/bmake.mpd b/templates/bmake.mpd
index adef1e39..bf2bcddb 100644
--- a/templates/bmake.mpd
+++ b/templates/bmake.mpd
@@ -9,7 +9,7 @@
<%foreach(configurations)%>
!ifdef <%normalize(uc(configuration))%>
OCFLAGS32 = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-v -y -Od -vi- -k<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
-OCFLAGS64 = <%if(optimize)%>-O2<%else%><%if(debug_prj)%>-O3 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
+OCFLAGS64 = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-g -O0 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
CFG_DIR = <%intermediate_dir%>\\
LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
@@ -73,8 +73,12 @@ STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
DLL_EXT = <%dll_ext%>
<%if(build64bit)%>
LIB_EXT = <%lib64_ext%>
+THREADFLAGS = <%thrflags64%>
+BINARYFLAGS = <%binaryflags64%>
<%else%>
LIB_EXT = <%lib32_ext%>
+THREADFLAGS = <%thrflags32%>
+BINARYFLAGS = <%binaryflags32%>
<%endif%>
EXE_EXT = <%exe_ext%>
CC32 = <%cc32%>
@@ -84,13 +88,12 @@ CC64 = <%cc64%>
RC64 = <%rc64%>
LINK64 = <%link64%>
TLIB = <%tlib%>
-THREADFLAGS = <%thflags%>
DLLFLAGS = <%dllflags%>
LIBFLAGS = <%libflags%>
EXEFLAGS = <%exeflags%>
WARNFLAGS32 = <%warnflags32%>
WARNFLAGS64 = <%warnflags64%>
-CCFLAGS = <%ccflags%><%if(type_is_binary)%> <%binary_compile_flags("-tWR -tWD")%><%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
+CCFLAGS = <%ccflags%><%if(type_is_binary)%> $(BINARYFLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
<%if(exename)%>
@@ -117,7 +120,11 @@ OBJFILES = \
LFLAGS = \
<%if(build64bit)%>
- -L"$(BDS)\lib\win64\release" -L"$(BDS)\lib\win64\debug" \
+ -L"$(BDS)\lib\win64\debug" -L"$(BDS)\lib\win64\release" \
+<%if(debug_prj)%>
+ -v \
+ -r \
+<%endif%>
<%else%>
-L"$(BDS)\lib\win32\release" -L"$(BDS)\lib\win32\debug" \
<%endif%>
@@ -193,10 +200,16 @@ CFLAGS = \
<%foreach(common64_flags)%>
<%common64_flag%> \
<%endfor%>
+<%foreach(common64_defines)%>
+ -D<%common64_define%> \
+<%endfor%>
<%else%>
<%foreach(common32_flags)%>
<%common32_flag%> \
<%endfor%>
+<%foreach(common32_defines)%>
+ -D<%common32_define%> \
+<%endfor%>
<%endif%>
<%foreach(macros common_defines)%>
-D<%macro%> \
diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt
index 7bca7be2..9a43c773 100644
--- a/templates/bmakecommon.mpt
+++ b/templates/bmakecommon.mpt
@@ -3,6 +3,8 @@ conditional_include "common"
configurations = Debug Release
common_defines = WIN32 _WINDOWS
+common32_defines =
+common64_defines = WIN64
common_libs = ws2_32$(LIB_EXT)
common32_libs = import32$(LIB_EXT) cw32mti$(LIB_EXT)
common64_libs = import64$(LIB_EXT) cw64mti$(LIB_EXT)
@@ -26,7 +28,10 @@ cc64 = bcc64
rc64 = brcc64
link64 = ilink64
tlib = tlib
-thflags = -tWM
+thrflags32 = -tWM
+thrflags64 = -tM
+binaryflags32 = -tWR -tWD
+binaryflags64 = -tR -tD
dllflags = -Tpd -Gi -x -Gn -w-dup
libflags = /C
ccflags = -q