Skip to content
Snippets Groups Projects
Commit 068aa48cb72d authored by Igor Zlatkovic's avatar Igor Zlatkovic
Browse files

added cruntime option, contributed by Oliver Stoeneberg

parent b3654de3bd24
Branches
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
# The compiler and its options. # The compiler and its options.
CC = cl.exe CC = cl.exe
CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 /MD /D "_REENTRANT" CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 $(CRUNTIME) /D "_REENTRANT"
CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX) CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX)
# The linker and its options. # The linker and its options.
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
/* Win32 build options. */ /* Win32 build options. */
var dirSep = "\\"; var dirSep = "\\";
var compiler = "msvc"; var compiler = "msvc";
var cruntime = "/MD";
var buildDebug = 0; var buildDebug = 0;
var buildStatic = 0; var buildStatic = 0;
var buildPrefix = "."; var buildPrefix = ".";
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
txt += "\nWin32 build options, default value given in parentheses:\n\n"; txt += "\nWin32 build options, default value given in parentheses:\n\n";
txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
txt += " static: Link xsltproc statically to libxslt (" + (buildStatic? "yes" : "no") + ")\n"; txt += " static: Link xsltproc statically to libxslt (" + (buildStatic? "yes" : "no") + ")\n";
txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n"; txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
...@@ -176,6 +178,7 @@ ...@@ -176,6 +178,7 @@
if (compiler == "msvc") { if (compiler == "msvc") {
vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude); vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
vf.WriteLine("LIB=$(LIB);" + buildLib); vf.WriteLine("LIB=$(LIB);" + buildLib);
vf.WriteLine("CRUNTIME=" + cruntime);
} else if (compiler == "mingw") { } else if (compiler == "mingw") {
vf.WriteLine("INCLUDE+=;" + buildInclude); vf.WriteLine("INCLUDE+=;" + buildInclude);
vf.WriteLine("LIB+=;" + buildLib); vf.WriteLine("LIB+=;" + buildLib);
...@@ -323,6 +326,8 @@ ...@@ -323,6 +326,8 @@
withZlib = strToBool(arg.substring(opt.length + 1, arg.length)); withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "compiler") else if (opt == "compiler")
compiler = arg.substring(opt.length + 1, arg.length); compiler = arg.substring(opt.length + 1, arg.length);
else if (opt == "cruntime")
cruntime = arg.substring(opt.length + 1, arg.length);
else if (opt == "static") else if (opt == "static")
buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "prefix") else if (opt == "prefix")
...@@ -427,6 +432,8 @@ ...@@ -427,6 +432,8 @@
txtOut += "Win32 build configuration\n"; txtOut += "Win32 build configuration\n";
txtOut += "-------------------------\n"; txtOut += "-------------------------\n";
txtOut += " Compiler: " + compiler + "\n"; txtOut += " Compiler: " + compiler + "\n";
if (compiler == "msvc")
txtOut += " C-Runtime option: " + cruntime + "\n";
txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n"; txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n";
txtOut += " Install prefix: " + buildPrefix + "\n"; txtOut += " Install prefix: " + buildPrefix + "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment