Added premake5 configuration.
This commit is contained in:
parent
de7832f048
commit
bed6d56ecc
2 changed files with 74 additions and 0 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,7 @@
|
||||||
|
# premake
|
||||||
|
premake5.bat
|
||||||
|
premake5.exe
|
||||||
|
|
||||||
# visual studio
|
# visual studio
|
||||||
*.csproj
|
*.csproj
|
||||||
*.user
|
*.user
|
||||||
|
|
70
premake5.lua
Normal file
70
premake5.lua
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
workspace "ssc"
|
||||||
|
configurations { "Debug", "Release" }
|
||||||
|
targetdir "bin/%{cfg.buildcfg}"
|
||||||
|
|
||||||
|
startproject "frontend"
|
||||||
|
|
||||||
|
filter "configurations:Debug"
|
||||||
|
defines { "DEBUG" }
|
||||||
|
flags { "Symbols" }
|
||||||
|
|
||||||
|
filter "configurations:Release"
|
||||||
|
defines { "RELEASE" }
|
||||||
|
optimize "On"
|
||||||
|
|
||||||
|
-- sunscript compiler API library
|
||||||
|
project "ssc"
|
||||||
|
kind "SharedLib"
|
||||||
|
language "C#"
|
||||||
|
namespace "arookas"
|
||||||
|
location "ssc"
|
||||||
|
|
||||||
|
links { "System", "arookas", "grammatica-1.6" }
|
||||||
|
|
||||||
|
files
|
||||||
|
{
|
||||||
|
"ssc/**.cs",
|
||||||
|
"ssc/**.grammar",
|
||||||
|
"ssc/**.bat",
|
||||||
|
}
|
||||||
|
|
||||||
|
excludes
|
||||||
|
{
|
||||||
|
"ssc/bin/**",
|
||||||
|
"ssc/obj/**",
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuildcommands
|
||||||
|
{
|
||||||
|
-- regenerate grammatica classes before compilation begins
|
||||||
|
"{CHDIR} \"%{prj.location}\"",
|
||||||
|
"java -jar grammatica.jar \"sunscript.grammar\" --csoutput \".\\generated\" --csnamespace \"arookas\" --csclassname \"__sun\"",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- frontend project (example command-line interface)
|
||||||
|
project "frontend"
|
||||||
|
kind "ConsoleApp"
|
||||||
|
language "C#"
|
||||||
|
entrypoint "arookas.SSC"
|
||||||
|
namespace "arookas"
|
||||||
|
location "frontend"
|
||||||
|
|
||||||
|
links { "System", "arookas", "SSC" }
|
||||||
|
|
||||||
|
files
|
||||||
|
{
|
||||||
|
"frontend/**.cs",
|
||||||
|
}
|
||||||
|
|
||||||
|
excludes
|
||||||
|
{
|
||||||
|
"frontend/bin/**",
|
||||||
|
"frontend/obj/**",
|
||||||
|
}
|
||||||
|
|
||||||
|
postbuildcommands
|
||||||
|
{
|
||||||
|
-- copy stdlib to frontend output so users can import the scripts
|
||||||
|
"{RMDIR} \"%{cfg.buildtarget.directory}ssc\"",
|
||||||
|
"{COPY} \"%{wks.location}stdlib\" \"%{cfg.buildtarget.directory}ssc\"",
|
||||||
|
}
|
Loading…
Reference in a new issue