Skip to content

Commit 5eab9a7

Browse files
committed
Make debug extension flexible, fixed DOCGroup#214
* docs/templates/bmake.txt: * templates/bmake.mpd: * templates/bmakecommon.mpt: * templates/bmakedll.mpt: * templates/bmakedllexe.mpt: * templates/bmakelibexe.mpt:
1 parent 1eac05d commit 5eab9a7

6 files changed

Lines changed: 8 additions & 14 deletions

File tree

docs/templates/bmake.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exeflags = Linker flags that are required to create an executable.
2121
libflags = Flags that are required to create a static library.
2222
link = The name of the tool used to create dynamic libraries and executables.
2323
obj_ext = The extension given to object files.
24-
postlinkrmext = A configuration specific extension applied to the 'exename' and removed during cleanup.
24+
debug_ext = The extension given to the debug symbols
2525
rc = The name of the resource compiler.
2626
rcdir = The list of directories to be searched when locating resource files. This is determined by the BMakeProjectCreator.
2727
startup_letter = The text used during the creation of the startup object file.

templates/bmake.mpd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ OBJECTSEARCHPATH = \
4141
EXEFLAGS = <%exeflags%>
4242
LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
4343
LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
44+
DEBUG_EXT = <%debug_ext%>
4445
!else
4546
<%endfor%>
4647
!error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
@@ -67,9 +68,6 @@ STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
6768
DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
6869
<%endif%>
6970
<%endif%>
70-
<%if(postlinkrmext)%>
71-
POSTLINKRM = <%postlinkrmext%>
72-
<%endif%>
7371
<%if(exename)%>
7472
EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
7573
<%endif%>
@@ -391,7 +389,7 @@ realclean: clean
391389
<%endif%>
392390
<%endif%>
393391
<%if(exename || sharedname || staticname)%>
394-
@del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL
392+
@del "$(OUTPUTDIR)$(NAME)$(DEBUG_EXT)" 2>NUL
395393
<%endif%>
396394
<%if(postclean)%>
397395
-<%eval(postclean)%>

templates/bmakecommon.mpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ lib_ext = .lib
3232
common_defines = WIN32 _WINDOWS
3333
common_flags = -a8
3434
obj_ext = .obj
35+
debug_ext = .tds
3536
linker_paths = -L\"$(BDS)\lib\win32\release\" -L\"$(BDS)\lib\win32\debug\"
3637
linker_passthrough =
3738
startup_bits = 32
@@ -63,6 +64,7 @@ lib_ext = .lib
6364
common_defines = WIN32 _WINDOWS
6465
common_flags = -a8
6566
obj_ext = .obj
67+
debug_ext = .tds
6668
linker_paths = -L\"$(BDS)\lib\win32c\debug\" -L\"$(BDS)\lib\win32c\release\"
6769
linker_passthrough =
6870
startup_bits = 32
@@ -93,6 +95,7 @@ lib_ext = .a
9395
common_defines = WIN32 _WINDOWS WIN64
9496
common_flags =
9597
obj_ext = .o
98+
debug_ext = .tds
9699
linker_paths = -L\"$(BDS)\lib\win64\debug\" -L\"$(BDS)\lib\win64\release\" -GE:HIGHENTROPYVA=off
97100
linker_passthrough =
98101
startup_bits = 64
@@ -113,7 +116,8 @@ debug_flags = -g -O0
113116
release_flags = -Wno-ignored-attributes
114117
optimize_flags = -O3
115118
unicode_flags = -tU
116-
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).pdb
119+
debug_ext = .pdb
120+
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).$(DEBUG_EXT)
117121
warn_flags =
118122
stack_flag = -Xlinker --stack=
119123
cc = bcc64x

templates/bmakedll.mpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Release {
99
defines = NDEBUG
1010
intermediate_dir = Release
1111
lib_modifier = _br
12-
postlinkrmext = .tds
1312
}
1413

1514
Debug {
@@ -18,7 +17,6 @@ Debug {
1817
defines = _DEBUG
1918
intermediate_dir = Debug
2019
lib_modifier = _bd
21-
postlinkrmext = .tds
2220
}
2321

2422
Static Release {

templates/bmakedllexe.mpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Release {
1010
output_dir = Release
1111
intermediate_dir = Release
1212
lib_modifier = _br
13-
postlinkrmext = .tds
1413
}
1514

1615
Debug {
@@ -19,7 +18,6 @@ Debug {
1918
defines = _DEBUG
2019
intermediate_dir = Debug
2120
lib_modifier = _bd
22-
postlinkrmext = .tds
2321
}
2422

2523
Static Release {
@@ -28,7 +26,6 @@ Static Release {
2826
output_dir = Static_Release
2927
intermediate_dir = Static_Release
3028
lib_modifier = _bsr
31-
postlinkrmext = .tds
3229
type_is_static = 1
3330
}
3431

@@ -39,7 +36,6 @@ Static Debug {
3936
output_dir = Static_Debug
4037
intermediate_dir = Static_Debug
4138
lib_modifier = _bsd
42-
postlinkrmext = .tds
4339
type_is_static = 1
4440
}
4541

templates/bmakelibexe.mpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Release {
99
output_dir = Static_Release
1010
intermediate_dir = Static_Release
1111
lib_modifier = _bsr
12-
postlinkrmext = .tds
1312
}
1413

1514
Debug {
@@ -19,7 +18,6 @@ Debug {
1918
output_dir = Static_Debug
2019
intermediate_dir = Static_Debug
2120
lib_modifier = _bsd
22-
postlinkrmext = .tds
2321
}
2422

2523
conditional_include "user_bmakelibexe"

0 commit comments

Comments
 (0)