bam.lua: Add "intermediate" directory to paths and use it when building object files.
This commit is contained in:
parent
03cbba9a6c
commit
1902b92210
1 changed files with 11 additions and 4 deletions
15
bam.lua
15
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue