1
0
Fork 0

bam.lua: Add "intermediate" directory to paths and use it when building object files.

This commit is contained in:
Henrik Hautakoski 2022-09-10 15:20:08 +02:00
parent 03cbba9a6c
commit 1902b92210

15
bam.lua
View file

@ -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