Reputation: 101
I'm using Premake5 as my build system for a C project on Windows. I'm using three scripts for my project:
premake5.lua
workspace "epoch"
configurations { "Debug", "Release", "Dist" }
architecture "x86_64"
startproject "sandbox"
include "runtime/runtime.lua"
include "sandbox/sandbox.lua"
runtime/runtime.lua
project "runtime"
kind "SharedLib"
language "C"
targetdir "../bin/%{cfg.buildcfg}"
objdir "../obj/%{cfg.buildcfg}"
files {
"runtime/src/**.c",
"runtime/src/**.h"
}
filter "configurations:Debug"
symbols "On"
filter "configurations:Release or configurations:Dist"
optimize "On"
sandbox/sandbox.lua
project "sandbox"
kind "WindowedApp"
language "C"
targetdir "../bin/%{cfg.buildcfg}"
objdir "../obj/%{cfg.buildcfg}"
files {
"sandbox/src/**.c",
"sandbox/src/**.h"
}
filter "configurations:Debug"
symbols "On"
filter "configurations:Release or configurations:Dist"
optimize "On"
I;m using the gmake2
generator, but when I call make
on the resulting Makefile, I get the following error:
==== Building runtime (debug) ====
Creating ../bin/Debug
mkdir: cannot create directory '..\\bin\\Debug': No such file or directory
make[1]: *** [Makefile:88: ../bin/Debug] Error 1
make: *** [Makefile:36: runtime] Error 2
My understanding is that this is due to the bin
directory not existing prior to the mkdir
call. How can I fix this?
Upvotes: 0
Views: 90