changed compiler options and linked libraries to account for the change from Visual Studio 98 to Visual Studio 2015
diff --git a/src/packages/xdc/xs/package.bld b/src/packages/xdc/xs/package.bld
index a1773da..d4d9213 100644
--- a/src/packages/xdc/xs/package.bld
+++ b/src/packages/xdc/xs/package.bld
@@ -3,7 +3,7 @@
Pkg.otherFiles = [
"tcf.h", "xsapi.h",
"config.jar",
- "xs.ksh", "xs-arm.ksh", "xs-mac.ksh",
+ "xs.ksh", "xs-arm.ksh", "xs-mac.ksh",
"tconfini.tcf"
];
@@ -11,78 +11,89 @@
var XSSOURCES = ["xsapi.c"];
for (var i = 0; i < Build.targets.length; i++) {
var targ = Build.targets[i];
-
+
if (targ.os == "MacOS") {
var lib = Pkg.addLibrary("lib/tcf", targ, {profile: "debug"});
lib.attrs.incs = "-I./jdk-include/macos ";
lib.addObjects(SOURCES);
lib.addObjects(XSSOURCES);
- var prog = Pkg.addExecutable("xs", targ, targ.platform,
- {profile: "debug", cfgScript: "xs.cfg"});
- prog.addObjects(["xs"]);
- prog.attrs.lopts = "-lm -ldl -lpthread";
+ var prog = Pkg.addExecutable("xs", targ, targ.platform,
+ {profile: "debug", cfgScript: "xs.cfg"});
+ prog.addObjects(["xs"]);
+ prog.attrs.lopts = "-lm -ldl -lpthread";
}
else if (targ.os == "Linux") {
var lib = Pkg.addLibrary("lib/tcf", targ, {profile: "debug"});
if (targ.isa == "i686") {
- lib.attrs.incs = "-I$(TOOLS)/jdk86U/include " +
+ lib.attrs.incs = "-I$(TOOLS)/jdk86U/include " +
"-I$(TOOLS)/jdk86U/include/linux";
}
else if (targ.isa == "v7A") {
- lib.attrs.incs = "-I$(TOOLS)/vendors/openjdk/java-1.6.0-openjdk-armhf/include";
+ lib.attrs.incs =
+ "-I$(TOOLS)/vendors/openjdk/java-1.6.0-openjdk-armhf/include";
}
lib.addObjects(SOURCES);
lib.addObjects(XSSOURCES);
- var prog = Pkg.addExecutable("xs", targ, targ.platform,
- {profile: "debug", cfgScript: "xs.cfg"});
- prog.addObjects(["xs"]);
- prog.attrs.lopts = "-lm -ldl -lpthread";
+ var prog = Pkg.addExecutable("xs", targ, targ.platform,
+ {profile: "debug", cfgScript: "xs.cfg"});
+ prog.addObjects(["xs"]);
+ prog.attrs.lopts = "-lm -ldl -lpthread";
}
else if (targ.os == "Windows") {
- var includes = "-I$(TOOLS)/jdknt/include " +
- "-I$(TOOLS)/jdknt/include/win32";
-
- targ.$orig.profiles['release'].compileOpts.copts = " -Oti -Og -Gf -Gy -MT ";
+ /* For Windows, we need to completely clean release.compileOpts.copts
+ * and add different Object.Attrs because one set of objects has to be
+ * compiled with -MT and another, for the DLLS, with -MD.
+ */
+ targ.$orig.profiles['release'].compileOpts.copts = "";
+ var includes = "-IR:/library/vendors/jdk/jdk1.6.0_37/Windows/include "
+ + "-IR:/library/vendors/jdk/jdk1.6.0_37/Windows/include/win32";
var libd = Pkg.addLibrary("lib/debug/tcf", targ,
- {profile: "debug", suffix: ".lib"});
+ {profile: "debug", suffix: ".lib",
+ copts: " -Oti -Gy -GF -MTd "});
libd.addObjects(SOURCES);
- libd.attrs.incs = includes;
-
+ libd.attrs.incs = includes;
+
var libr = Pkg.addLibrary("lib/release/tcf", targ,
- {profile: "release", suffix: ".lib"});
+ {profile: "release", suffix: ".lib",
+ copts: " -Oti -Gy -GF -MT "});
libr.addObjects(SOURCES);
- libr.attrs.incs = includes;
+ libr.attrs.incs = includes;
var libdx = Pkg.addLibrary("lib/debug/xs", targ,
- {profile: "debug", suffix: ".lib"});
+ {profile: "debug", suffix: ".lib",
+ copts: " -Oti -Gy -GF -MTd "});
libdx.addObjects(XSSOURCES);
- libdx.attrs.incs = includes;
-
+ libdx.attrs.incs = includes;
+
var librx = Pkg.addLibrary("lib/release/xs", targ,
- {profile: "release", suffix: ".lib"});
+ {profile: "release", suffix: ".lib",
+ copts: " -Oti -Gy -GF -MT "});
librx.addObjects(XSSOURCES);
- librx.attrs.incs = includes;
+ librx.attrs.incs = includes;
- var prog1 = Pkg.addExecutable("debug/xs", targ, targ.platform,
- {profile: "debug", cfgScript: "xs.cfg"});
- prog1.addObjects(["xs.c"]);
+ var prog1 = Pkg.addExecutable("debug/xs", targ, targ.platform,
+ {profile: "debug", cfgScript: "xs.cfg",
+ copts: " -Oti -Gy -GF -MTd "});
+ prog1.addObjects(["xs.c"]);
- var prog2 = Pkg.addExecutable("release/xs", targ, targ.platform,
- {profile: "release", cfgScript: "xs.cfg"});
- prog2.addObjects(["xs.c"]);
-
+ var prog2 = Pkg.addExecutable("release/xs", targ, targ.platform,
+ {profile: "release", cfgScript: "xs.cfg",
+ copts: " -Oti -Gy -GF -MT "});
+ prog2.addObjects(["xs.c"]);
+
/* dlls for use by IAR C-SPY plug-in to call ROV scripts */
- targ.$orig.profiles['release'].compileOpts.copts = " -Oti -Og -Gf -Gy -MD ";
var tcfdll = Pkg.addLibrary("lib/release/dlls/tcf", targ,
- {profile: "release", suffix: ".dll"});
+ {profile: "release", suffix: ".dll",
+ copts: " -Oti -Gy -GF -MD "});
tcfdll.addObjects(SOURCES);
tcfdll.attrs.incs = includes;
-
+
var xsdll = Pkg.addLibrary("lib/release/dlls/xs", targ,
- {profile: "release", suffix: ".dll"});
+ {profile: "release", suffix: ".dll",
+ copts: " -Oti -Gy -GF -MD "});
xsdll.addObjects(XSSOURCES);
xsdll.attrs.incs = includes;
}
@@ -92,4 +103,3 @@
}
Pkg.attrs.exportExe = true;
-