diff --git a/make-msc-module.tscript b/make-msc-module.tscript index 87dc926f0..20a976917 100644 --- a/make-msc-module.tscript +++ b/make-msc-module.tscript @@ -199,29 +199,35 @@ function: buildLibraryMSC($name, $libraries, $definitions, $includes, $ldFlags, $libraryExtension = ".dll" try - try - filesystem.removePath($objectPath, true) - catch ($exception) - end - # create paths createPathRecusively($objectPath) createPathRecusively($libraryPath) # compile each compilation units - $compilationUnitIdx = 0 + $fileObjectPaths = {} $commands = [] $compilationUnits = "" forEach($file in $files) # - # $fileObjectPath = filesystem.getPathName($file) - $fileObjectPath = "" + $fileObjectPathCandidate = + $name + + "/" + + filesystem.getFileName(filesystem.getPathName(filesystem.getPathName($file))) + + "/" + + filesystem.getFileName(filesystem.getPathName($file)) + if ($fileObjectPaths->contains($fileObjectPathCandidate) == false) + $fileObjectPaths->set($fileObjectPathCandidate, $fileObjectPaths->getSize()) + end + $fileObjectPath = + $name + + "/" + + $fileObjectPaths->get($fileObjectPathCandidate) # create file object path createPathRecusively($objectPath + "/" + $fileObjectPath) # - $compilationUnit = $objectPath + "/" + ($compilationUnitIdx++) + ".obj" + $compilationUnit = $objectPath + "/" + $fileObjectPath + "/" + filesystem.removeFileExtension(filesystem.getFileName($file)) + ".obj" if ($compilationUnits->isEmpty() == false) $compilationUnits = $compilationUnits + " " end @@ -266,7 +272,7 @@ function: buildLibraryMSC($name, $libraries, $definitions, $includes, $ldFlags, " " + $file + " " + - "1 > nul" + "1>nul" # if ($command == null) continue diff --git a/make.tscript b/make.tscript index 8c226c1ad..33064e6a8 100644 --- a/make.tscript +++ b/make.tscript @@ -175,6 +175,7 @@ function: main() $executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libminitscript.lib\"" $executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libyannet.lib\"" $executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libtdme-ext.lib\"" + $executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libagui.lib\"" $executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libtdme.lib\"" elseif ($$.application::OS == "Windows-MINGW") $yannetPlatformFiles = [