Skip to content

Commit bd652b0

Browse files
authored
Merge pull request DOCGroup#216 from jwillemsen/jwi-bcc64xunicode
bcc64x has a different compiler flag for enabling unicode
2 parents 611e388 + 62a9e6b commit bd652b0

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

docs/templates/bmake.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ common_flags = Compiler flags that are common to all configurations.
1313
common_libs = Libraries that are common to all configurations.
1414
compilers = The list of possible compilers.
1515
cppdir = The list of directories to be searched when locating C++ files. This is determined by the BMakeProjectCreator.
16+
debug_ext = The extension given to the file with the debug symbols.
1617
debug_macros = Macros that are only set for debug builds.
1718
debug_prj = Indicates that the current template configuration is debug. This is different than negating the 'optimize' template variable.
1819
defines = Macros that are specific to a particular configuration.
@@ -21,7 +22,6 @@ exeflags = Linker flags that are required to create an executable.
2122
libflags = Flags that are required to create a static library.
2223
link = The name of the tool used to create dynamic libraries and executables.
2324
obj_ext = The extension given to object files.
24-
postlinkrmext = A configuration specific extension applied to the 'exename' and removed during cleanup.
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
!ifdef <%normalize(uc(compiler))%>
1111
CC = <%cc%>
1212
OPTIMIZE_CFLAGS = <%optimize_flags%>
13+
UNICODE_CFLAGS = <%unicode_flags%>
1314
PDB_FLAGS = <%pdb_flags%>
1415
DEBUG_CFLAGS = <%debug_flags%>
1516
RELEASE_CFLAGS = <%release_flags%>
@@ -40,6 +41,7 @@ OBJECTSEARCHPATH = \
4041
EXEFLAGS = <%exeflags%>
4142
LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
4243
LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
44+
DEBUG_EXT = <%debug_ext%>
4345
!else
4446
<%endfor%>
4547
!error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
@@ -66,9 +68,6 @@ STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
6668
DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
6769
<%endif%>
6870
<%endif%>
69-
<%if(postlinkrmext)%>
70-
POSTLINKRM = <%postlinkrmext%>
71-
<%endif%>
7271
<%if(exename)%>
7372
EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
7473
<%endif%>
@@ -80,7 +79,7 @@ EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug
8079
<%endfor%>
8180

8281
!ifdef UNICODE
83-
UC_CFLAGS = <%unicode_flags%>
82+
UC_CFLAGS = $(UNICODE_CFLAGS)
8483
UNICODE_DIR = Unicode\\
8584
UC_MAIN = w
8685
ULIBMODIFIER = <%unicode_lib_modifier%>
@@ -204,6 +203,7 @@ CFLAGS = \
204203
<%foreach(macros common_defines)%>
205204
-D<%macro%> \
206205
<%endfor%>
206+
-DMPC_LIB_MODIFIER=\"$(LIBMODIFIER)$(ULIBMODIFIER)\" \
207207
<%foreach(includes)%>
208208
-I"<%include%>" \
209209
<%endfor%>
@@ -390,7 +390,7 @@ realclean: clean
390390
<%endif%>
391391
<%endif%>
392392
<%if(exename || sharedname || staticname)%>
393-
@del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL
393+
@del "$(OUTPUTDIR)$(NAME)$(DEBUG_EXT)" 2>NUL
394394
<%endif%>
395395
<%if(postclean)%>
396396
-<%eval(postclean)%>

templates/bmakecommon.mpt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ conditional_include "common"
1010

1111
configurations = Debug Release
1212
compilers = bcc32 bcc32c bcc64 bcc64x
13-
unicode_flags = -WU
1413
unicode_lib_modifier = u
1514
unicode_exe_modifier = u
1615
dll_ext = .dll
@@ -22,6 +21,7 @@ bcc32 {
2221
debug_flags = -v -y -Od -vi- -k
2322
release_flags =
2423
optimize_flags = -O1
24+
unicode_flags = -WU
2525
pdb_flags =
2626
warn_flags = -w-rvl -w-rch -w-ccc -w-obs -w-aus -w-pia -w-inl -w-mls
2727
stack_flag = /S:
@@ -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
@@ -52,6 +53,7 @@ bcc32c {
5253
debug_flags = -Od -vi-
5354
release_flags =
5455
optimize_flags = -O3
56+
unicode_flags = -WU
5557
pdb_flags =
5658
warn_flags =
5759
stack_flag = /S:
@@ -62,6 +64,7 @@ lib_ext = .lib
6264
common_defines = WIN32 _WINDOWS
6365
common_flags = -a8
6466
obj_ext = .obj
67+
debug_ext = .tds
6568
linker_paths = -L\"$(BDS)\lib\win32c\debug\" -L\"$(BDS)\lib\win32c\release\"
6669
linker_passthrough =
6770
startup_bits = 32
@@ -81,6 +84,7 @@ bcc64 {
8184
debug_flags = -g -O0
8285
release_flags =
8386
optimize_flags = -O3
87+
unicode_flags = -WU
8488
pdb_flags =
8589
warn_flags =
8690
stack_flag = /S:
@@ -91,6 +95,7 @@ lib_ext = .a
9195
common_defines = WIN32 _WINDOWS WIN64
9296
common_flags =
9397
obj_ext = .o
98+
debug_ext = .tds
9499
linker_paths = -L\"$(BDS)\lib\win64\debug\" -L\"$(BDS)\lib\win64\release\" -GE:HIGHENTROPYVA=off
95100
linker_passthrough =
96101
startup_bits = 64
@@ -110,7 +115,9 @@ bcc64x {
110115
debug_flags = -g -O0
111116
release_flags = -Wno-ignored-attributes
112117
optimize_flags = -O3
113-
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).pdb
118+
unicode_flags = -tU
119+
debug_ext = .pdb
120+
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).$(DEBUG_EXT)
114121
warn_flags =
115122
stack_flag = -Xlinker --stack=
116123
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)