101 lines
3.4 KiB
Lua
101 lines
3.4 KiB
Lua
require "utils"
|
|
|
|
-- determine visual studios version
|
|
vsver = nil;
|
|
if _ACTION == "vs2008" then
|
|
vsver = "9";
|
|
elseif _ACTION == "vs2010" then
|
|
vsver = "10";
|
|
elseif _ACTION == "vs2012" then
|
|
vsver = "11";
|
|
else
|
|
assert("unknown compiler version")
|
|
end
|
|
assert(vsver ~= nil)
|
|
if eal_impl then
|
|
eal_impl.suffix = ("_" .. platform .. "_vc" .. vsver)
|
|
end
|
|
|
|
require "solution"
|
|
require "library"
|
|
|
|
VitaTestProject = TestProject:New{
|
|
}
|
|
|
|
VitaLibProject = LibProject:New{
|
|
}
|
|
|
|
function VitaLibProject:GenerateConfigurations()
|
|
LibProject.GenerateConfigurations(self)
|
|
end
|
|
|
|
function VitaTestProject:GenerateDependencies()
|
|
TestProject.GenerateDependencies(self)
|
|
links {
|
|
"-lSceRtc_stub",
|
|
"-lSceNet_stub",
|
|
"-lSceCtrl_stub",
|
|
"-lSceSysmodule_stub",
|
|
"-lSceNetCtl_stub",
|
|
"-lSceTouch_stub",
|
|
"-lSceGxm_stub",
|
|
"-lSceDisplay_stub",
|
|
"-lScePerf_stub",
|
|
"-lSceRazorCapture_stub_weak" }
|
|
targetextension ".self"
|
|
end
|
|
|
|
VitaLibrary = Library:New{
|
|
TestProject = VitaTestProject,
|
|
LibProject = VitaLibProject,
|
|
libext = ".a"
|
|
}
|
|
|
|
local subdir = joindir(platform, "vc" .. vsver)
|
|
|
|
VitaSolution = Solution:New{
|
|
Library = VitaLibrary,
|
|
subdir = subdir,
|
|
location = joindir("solutions", subdir),
|
|
platform = "vita",
|
|
vitaconfigurations = {
|
|
["Debug"] = {
|
|
flags = { "Vita_Optimization_NoOptim" },
|
|
},
|
|
["Re*"] = {
|
|
flags = { "Vita_Optimization_O3" },
|
|
},
|
|
["**_v.cg"] = {
|
|
custombuild = { '"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/psp2cgc.exe" --cache --profile sce_vp_psp2 "$(InputDir)\$(InputName).cg" -o "$(IntDir)\$(InputName).gxp"&&"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/psp2bin.exe" "$(IntDir)\$(InputName).gxp" -b2e PSP2,_binary_$(InputName)_gxp_start,_binary_$(InputName)_gxp_size,4 -o "$(IntDir)\$(InputName)_gxp.obj"',
|
|
'Compiling Vertex Shader: "$(InputPath)"',
|
|
'"$(IntDir)\$(InputName)_gxp.obj"'
|
|
},
|
|
},
|
|
["**_f.cg"] = {
|
|
custombuild = { '"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/psp2cgc.exe" --cache --profile sce_fp_psp2 "$(InputDir)\$(InputName).cg" -o "$(IntDir)\$(InputName).gxp"&&"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/psp2bin.exe" "$(IntDir)\$(InputName).gxp" -b2e PSP2,_binary_$(InputName)_gxp_start,_binary_$(InputName)_gxp_size,4 -o "$(IntDir)\$(InputName)_gxp.obj"',
|
|
'Compiling Fragment Shader: "$(InputPath)"',
|
|
'"$(IntDir)\$(InputName)_gxp.obj"'
|
|
},
|
|
}
|
|
},
|
|
|
|
VitaDefaults = {
|
|
flags = { "StaticRuntime", "NoPCH", iif(vsver == "10", "VS_MultiProcessorCompilation_Yes") },
|
|
includedirs = { "$(SCE_PSP2_SDK_DIR)/host_tools/build/include", "$(SCE_PSP2_SDK_DIR)/target/include", "$(SCE_PSP2_SDK_DIR)/target/include_common" },
|
|
defines = { "SN_TARGET_PSP2",
|
|
-- gtest specific defines
|
|
"GTEST_HAS_POSIX_RE=0",
|
|
"GTEST_HAS_STREAM_REDIRECTION=0",
|
|
},
|
|
}
|
|
}
|
|
|
|
function VitaSolution:GenerateConfigurations()
|
|
Solution.GenerateConfigurations(self)
|
|
for name, options in pairs(self.vitaconfigurations) do
|
|
self:GenerateConfiguration(name, options)
|
|
end
|
|
self:GenerateConfiguration("*", self.VitaDefaults)
|
|
end
|
|
|
|
RegisterSolution("vita", VitaSolution)
|