From 12357c5b9220d072c7b61ac580ca8beca99ae7bd Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sat, 29 Jul 2017 12:15:05 +0200 Subject: Improvements for bcc32 and bcc64 * templates/bmake.mpd: * templates/bmakecommon.mpt: --- templates/bmake.mpd | 21 +++++++++++++++++---- templates/bmakecommon.mpt | 7 ++++++- 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 -- cgit v1.2.1