premake4でC#開発
vimじゃないとだめなのでちょっと寄り道。
こちら
を参考にIDEから降りる道を模索。
premake4でC#向けのMakefileの自動生成
premake4.lua
-- A solution contains projects, and defines the available configurations solution "Sample" configurations { "Release", "Debug" } configuration "windows*" do end configuration "Debug" do flags { "Symbols" } targetdir "debug" end configuration "Release" do flags { "Optimize" } targetdir "release" end configuration {} ------------------------------------------------------------------------------ -- Project ------------------------------------------------------------------------------ project "Sample" --language "C" --language "C++" language "C#" --kind "StaticLib" --kind "DynamicLib" kind "ConsoleApp" --kind "WindowedApp" files { "*.cs", } defines { } includedirs { } libdirs { "C:/Program Files (x86)/SlimDX SDK (January 2012)/Bin/net40/x86", } links { "SlimDX", }
$ export PATH=/cygdrive/C/WINDOWS/Microsoft.NET/Framework/v4.0.30319:$PATH $ premake4 --dotnet=msnet gmake $ make verbose=t ==== Building Sample (release) ==== Creating obj/Release mkdir -p obj/Release csc /nologo /out:release/Sample.exe /optimize /t:exe /lib:C:/Program\ Files\ \(x86\)/SlimDX\ SDK\ \(January\ 2012\)/Bin/net40/ x86 /r:SlimDX.dll Hello.cs $ ./release/Sample.exe hello world
VCのソリューションも以下の方法で作れる。
$ premake4 vs2008
# vs2010は未対応だった premake4.3