Skip to content

Commit

Permalink
Merge pull request #216 from jwillemsen/jwi-bcc64xunicode
Browse files Browse the repository at this point in the history
bcc64x has a different compiler flag for enabling unicode
  • Loading branch information
jwillemsen authored Jul 26, 2024
2 parents 611e388 + 62a9e6b commit bd652b0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/templates/bmake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ common_flags = Compiler flags that are common to all configurations.
common_libs = Libraries that are common to all configurations.
compilers = The list of possible compilers.
cppdir = The list of directories to be searched when locating C++ files. This is determined by the BMakeProjectCreator.
debug_ext = The extension given to the file with the debug symbols.
debug_macros = Macros that are only set for debug builds.
debug_prj = Indicates that the current template configuration is debug. This is different than negating the 'optimize' template variable.
defines = Macros that are specific to a particular configuration.
Expand All @@ -21,7 +22,6 @@ exeflags = Linker flags that are required to create an executable.
libflags = Flags that are required to create a static library.
link = The name of the tool used to create dynamic libraries and executables.
obj_ext = The extension given to object files.
postlinkrmext = A configuration specific extension applied to the 'exename' and removed during cleanup.
rc = The name of the resource compiler.
rcdir = The list of directories to be searched when locating resource files. This is determined by the BMakeProjectCreator.
startup_letter = The text used during the creation of the startup object file.
Expand Down
10 changes: 5 additions & 5 deletions templates/bmake.mpd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
!ifdef <%normalize(uc(compiler))%>
CC = <%cc%>
OPTIMIZE_CFLAGS = <%optimize_flags%>
UNICODE_CFLAGS = <%unicode_flags%>
PDB_FLAGS = <%pdb_flags%>
DEBUG_CFLAGS = <%debug_flags%>
RELEASE_CFLAGS = <%release_flags%>
Expand Down Expand Up @@ -40,6 +41,7 @@ OBJECTSEARCHPATH = \
EXEFLAGS = <%exeflags%>
LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
DEBUG_EXT = <%debug_ext%>
!else
<%endfor%>
!error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
Expand All @@ -66,9 +68,6 @@ STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
<%endif%>
<%endif%>
<%if(postlinkrmext)%>
POSTLINKRM = <%postlinkrmext%>
<%endif%>
<%if(exename)%>
EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
<%endif%>
Expand All @@ -80,7 +79,7 @@ EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug
<%endfor%>

!ifdef UNICODE
UC_CFLAGS = <%unicode_flags%>
UC_CFLAGS = $(UNICODE_CFLAGS)
UNICODE_DIR = Unicode\\
UC_MAIN = w
ULIBMODIFIER = <%unicode_lib_modifier%>
Expand Down Expand Up @@ -204,6 +203,7 @@ CFLAGS = \
<%foreach(macros common_defines)%>
-D<%macro%> \
<%endfor%>
-DMPC_LIB_MODIFIER=\"$(LIBMODIFIER)$(ULIBMODIFIER)\" \
<%foreach(includes)%>
-I"<%include%>" \
<%endfor%>
Expand Down Expand Up @@ -390,7 +390,7 @@ realclean: clean
<%endif%>
<%endif%>
<%if(exename || sharedname || staticname)%>
@del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL
@del "$(OUTPUTDIR)$(NAME)$(DEBUG_EXT)" 2>NUL
<%endif%>
<%if(postclean)%>
-<%eval(postclean)%>
Expand Down
11 changes: 9 additions & 2 deletions templates/bmakecommon.mpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ conditional_include "common"

configurations = Debug Release
compilers = bcc32 bcc32c bcc64 bcc64x
unicode_flags = -WU
unicode_lib_modifier = u
unicode_exe_modifier = u
dll_ext = .dll
Expand All @@ -22,6 +21,7 @@ bcc32 {
debug_flags = -v -y -Od -vi- -k
release_flags =
optimize_flags = -O1
unicode_flags = -WU
pdb_flags =
warn_flags = -w-rvl -w-rch -w-ccc -w-obs -w-aus -w-pia -w-inl -w-mls
stack_flag = /S:
Expand All @@ -32,6 +32,7 @@ lib_ext = .lib
common_defines = WIN32 _WINDOWS
common_flags = -a8
obj_ext = .obj
debug_ext = .tds
linker_paths = -L\"$(BDS)\lib\win32\release\" -L\"$(BDS)\lib\win32\debug\"
linker_passthrough =
startup_bits = 32
Expand All @@ -52,6 +53,7 @@ bcc32c {
debug_flags = -Od -vi-
release_flags =
optimize_flags = -O3
unicode_flags = -WU
pdb_flags =
warn_flags =
stack_flag = /S:
Expand All @@ -62,6 +64,7 @@ lib_ext = .lib
common_defines = WIN32 _WINDOWS
common_flags = -a8
obj_ext = .obj
debug_ext = .tds
linker_paths = -L\"$(BDS)\lib\win32c\debug\" -L\"$(BDS)\lib\win32c\release\"
linker_passthrough =
startup_bits = 32
Expand All @@ -81,6 +84,7 @@ bcc64 {
debug_flags = -g -O0
release_flags =
optimize_flags = -O3
unicode_flags = -WU
pdb_flags =
warn_flags =
stack_flag = /S:
Expand All @@ -91,6 +95,7 @@ lib_ext = .a
common_defines = WIN32 _WINDOWS WIN64
common_flags =
obj_ext = .o
debug_ext = .tds
linker_paths = -L\"$(BDS)\lib\win64\debug\" -L\"$(BDS)\lib\win64\release\" -GE:HIGHENTROPYVA=off
linker_passthrough =
startup_bits = 64
Expand All @@ -110,7 +115,9 @@ bcc64x {
debug_flags = -g -O0
release_flags = -Wno-ignored-attributes
optimize_flags = -O3
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).pdb
unicode_flags = -tU
debug_ext = .pdb
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).$(DEBUG_EXT)
warn_flags =
stack_flag = -Xlinker --stack=
cc = bcc64x
Expand Down
2 changes: 0 additions & 2 deletions templates/bmakedll.mpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Release {
defines = NDEBUG
intermediate_dir = Release
lib_modifier = _br
postlinkrmext = .tds
}

Debug {
Expand All @@ -18,7 +17,6 @@ Debug {
defines = _DEBUG
intermediate_dir = Debug
lib_modifier = _bd
postlinkrmext = .tds
}

Static Release {
Expand Down
4 changes: 0 additions & 4 deletions templates/bmakedllexe.mpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Release {
output_dir = Release
intermediate_dir = Release
lib_modifier = _br
postlinkrmext = .tds
}

Debug {
Expand All @@ -19,7 +18,6 @@ Debug {
defines = _DEBUG
intermediate_dir = Debug
lib_modifier = _bd
postlinkrmext = .tds
}

Static Release {
Expand All @@ -28,7 +26,6 @@ Static Release {
output_dir = Static_Release
intermediate_dir = Static_Release
lib_modifier = _bsr
postlinkrmext = .tds
type_is_static = 1
}

Expand All @@ -39,7 +36,6 @@ Static Debug {
output_dir = Static_Debug
intermediate_dir = Static_Debug
lib_modifier = _bsd
postlinkrmext = .tds
type_is_static = 1
}

Expand Down
2 changes: 0 additions & 2 deletions templates/bmakelibexe.mpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Release {
output_dir = Static_Release
intermediate_dir = Static_Release
lib_modifier = _bsr
postlinkrmext = .tds
}

Debug {
Expand All @@ -19,7 +18,6 @@ Debug {
output_dir = Static_Debug
intermediate_dir = Static_Debug
lib_modifier = _bsd
postlinkrmext = .tds
}

conditional_include "user_bmakelibexe"

0 comments on commit bd652b0

Please sign in to comment.