fixed /MT and /MD options for Windows libraries and executables
diff --git a/src/packages/xdc/services/host/lib/package.bld b/src/packages/xdc/services/host/lib/package.bld
index 597b9b5..5dbda57 100644
--- a/src/packages/xdc/services/host/lib/package.bld
+++ b/src/packages/xdc/services/host/lib/package.bld
@@ -19,7 +19,9 @@
     var targ = Build.targets[i];
 
     if (targ.os == "Windows") {
-        var lib = Pkg.addLibrary("lib/xutils", targ, {profile: "release"});
+        targ.$orig.profiles['release'].compileOpts.copts = " ";
+        var lib = Pkg.addLibrary("lib/xutils", targ,
+            {profile: "release", copts: " -O2 -MT "});
         lib.addObjects(LIB_SOURCES);
     }
     else if (targ.os == "Linux" || targ.os == "MacOS") {
@@ -29,9 +31,10 @@
 
     /* dll for use by IAR C-SPY plug-in to call ROV scripts */
     if (targ.os == "Windows") {
-        targ.$orig.profiles['release'].compileOpts.copts = " -Oti -Gy -GF -MD ";
+        targ.$orig.profiles['release'].compileOpts.copts = " ";
         var dll = Pkg.addLibrary("lib/dlls/xutils", targ,
-                               {profile: "release", suffix: ".dll"});
+                               {profile: "release", suffix: ".dll",
+                                copts: " -Oti -Gy -GF -MD "});
         dll.addObjects(LIB_SOURCES);
     }
 }
diff --git a/src/packages/xdc/xs/package.bld b/src/packages/xdc/xs/package.bld
index 318863b..b48bc42 100644
--- a/src/packages/xdc/xs/package.bld
+++ b/src/packages/xdc/xs/package.bld
@@ -46,47 +46,54 @@
          * 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 = " -Oti -Gy -GF -MT ";
+        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;
 
         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;
 
         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;
 
         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;
 
         var prog1 = Pkg.addExecutable("debug/xs", targ, targ.platform,
-            {profile: "debug", cfgScript: "xs.cfg"});
+            {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"});
+            {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 -Gy -GF -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;
     }