diff --git a/bam.lua b/bam.lua index d4b62ae..8838de9 100644 --- a/bam.lua +++ b/bam.lua @@ -24,9 +24,15 @@ end -- paths used when building. paths = { - build = ScriptArgs.build_dir or "build", - object = "obj", - examples = "examples" + -- Root build directory. + build = ScriptArgs.build_dir or "build", + + -- Directory where internal object/libs files are + -- stored to produce the final library. + intermediate = PathJoin("spectre", TARGET_OS), + + object = "obj", + examples = "examples" } -------------------------------- @@ -59,7 +65,8 @@ global_settings.link.Output = function(settings, input) end global_settings.cc.Output = function(settings, input) - return Path(PathJoin(PathJoin(paths.build, paths.object), PathBase(input))) + local path = PathJoin(paths.build, paths.intermediate) + return Path(PathJoin(PathJoin(path, paths.object), PathBase(input))) end -- Compiler configuration