Move all build files to build directory
Former-commit-id: 499125a81d877144aabe7d89bb69043b92872b24
This commit is contained in:
parent
aee0812505
commit
a6092be930
|
|
@ -11,42 +11,43 @@ SDK/lib/NazaraSDK*.so
|
||||||
build/scripts/features/index.html
|
build/scripts/features/index.html
|
||||||
|
|
||||||
# Codeblocks
|
# Codeblocks
|
||||||
*.cbp
|
build/**/*.cbp
|
||||||
*.cbTemp
|
build/**/*.cbp
|
||||||
*.cscope_file_list
|
build/**/*.cbTemp
|
||||||
*.depend
|
build/**/*.cscope_file_list
|
||||||
*.layout
|
build/**/*.depend
|
||||||
*.workspace
|
build/**/*.layout
|
||||||
|
build/**/*.workspace
|
||||||
|
|
||||||
# CodeLite
|
# CodeLite
|
||||||
*.project
|
build/**/*.project
|
||||||
|
|
||||||
# Visual Studio
|
# Visual Studio
|
||||||
*.filters
|
build/**/*.filters
|
||||||
*.vcxproj
|
build/**/*.vcxproj
|
||||||
*.tlog
|
build/**/*.tlog
|
||||||
*.sln
|
build/**/*.sln
|
||||||
*.vcxprojResolveAssemblyReference.cache
|
build/**/*.vcxprojResolveAssemblyReference.cache
|
||||||
*.exp
|
build/**/*.nativecodeanalysis.all.xml
|
||||||
*.nativecodeanalysis.all.xml
|
build/**/*.nativecodeanalysis.xml
|
||||||
*.nativecodeanalysis.xml
|
lib/*.exp
|
||||||
|
|
||||||
# Compiled Object files
|
# Compiled Object files
|
||||||
*.slo
|
build/**/*.slo
|
||||||
*.lo
|
build/**/*.lo
|
||||||
*.o
|
build/**/*.o
|
||||||
*.obj
|
build/**/*.obj
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
# Compiled Dynamic libraries
|
||||||
*.so
|
build/**/*.so
|
||||||
*.lib
|
lib/*.lib
|
||||||
|
|
||||||
# Compiled Static libraries
|
# Compiled Static libraries
|
||||||
*.lai
|
build/**/*.lai
|
||||||
*.la
|
build/**/*.la
|
||||||
|
|
||||||
# Object files
|
# Object files
|
||||||
*.o
|
build/**/*.o
|
||||||
|
|
||||||
# Windows image file caches
|
# Windows image file caches
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
|
||||||
|
|
@ -231,9 +231,7 @@ function Feature.GenerateFeatureList(featureTable, space, content)
|
||||||
table.insert(content, string.format("%s</ul>", space))
|
table.insert(content, string.format("%s</ul>", space))
|
||||||
end
|
end
|
||||||
|
|
||||||
newaction
|
ACTION.Name = "GenerateFeatures"
|
||||||
{
|
ACTION.Description = "Generate a web page describing each module's feature"
|
||||||
trigger = "generatefeatures",
|
|
||||||
description = "Generate a web page describing each module's feature",
|
ACTION.Function = Feature.Generate
|
||||||
execute = Feature.Generate
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,94 +1,123 @@
|
||||||
local PosixOSes = {"bsd", "linux", "macosx", "solaris"}
|
local PosixOSes = {"bsd", "linux", "macosx", "solaris"}
|
||||||
|
|
||||||
NazaraBuild = {} -- L'équivalent d'un namespace en Lua est une table
|
NazaraBuild = {} -- L'équivalent d'un namespace en Lua est une table
|
||||||
|
|
||||||
function NazaraBuild:Execute()
|
function NazaraBuild:Execute()
|
||||||
if (_ACTION == nil) then -- Si aucune action n'est spécifiée
|
if (_ACTION == nil) then -- Si aucune action n'est spécifiée
|
||||||
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.Actions[_ACTION] ~= nil) then
|
if (self.Actions[_ACTION] ~= nil) then
|
||||||
self.Actions[_ACTION].Function()
|
self.Actions[_ACTION].Function()
|
||||||
else
|
else
|
||||||
solution "NazaraEngine"
|
if (_OPTIONS["with-extlibs"]) then
|
||||||
|
solution("NazaraExtlibs")
|
||||||
|
-- Configuration générale
|
||||||
|
configurations({
|
||||||
|
"DebugStatic",
|
||||||
|
"ReleaseStatic"
|
||||||
|
})
|
||||||
|
|
||||||
-- Configuration générale
|
includedirs("../extlibs/include")
|
||||||
configurations
|
location(_ACTION)
|
||||||
{
|
kind("StaticLib")
|
||||||
|
|
||||||
|
if (_OPTIONS["x64"]) then
|
||||||
|
libdirs("../extlibs/lib/x64")
|
||||||
|
targetdir("../extlibs/lib/x64")
|
||||||
|
else
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
targetdir("../extlibs/lib/x86")
|
||||||
|
end
|
||||||
|
|
||||||
|
configuration("Debug*")
|
||||||
|
flags("Symbols")
|
||||||
|
|
||||||
|
configuration("Release*")
|
||||||
|
flags({"EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI"})
|
||||||
|
|
||||||
|
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
||||||
|
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
||||||
|
buildoptions("-ftree-vectorize") -- Activation de la vectorisation du code
|
||||||
|
|
||||||
|
configuration("DebugStatic")
|
||||||
|
targetsuffix("-s-d")
|
||||||
|
|
||||||
|
configuration("ReleaseStatic")
|
||||||
|
targetsuffix("-s")
|
||||||
|
|
||||||
|
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
||||||
|
buildoptions("-std=c++11")
|
||||||
|
|
||||||
|
for i=1, #self.ExtLibs do
|
||||||
|
local libTable = self.ExtLibs[i]
|
||||||
|
project(libTable.Name)
|
||||||
|
|
||||||
|
language(libTable.Language)
|
||||||
|
location(_ACTION .. "/extlibs")
|
||||||
|
|
||||||
|
files(libTable.Files)
|
||||||
|
excludes(libTable.FilesExclusion)
|
||||||
|
|
||||||
|
defines(libTable.Defines)
|
||||||
|
flags(libTable.Flags)
|
||||||
|
links(libTable.Libraries)
|
||||||
|
|
||||||
|
for k,v in pairs(libTable.ConfigurationLibraries) do
|
||||||
|
configuration(k)
|
||||||
|
links(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
configuration({})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
solution("NazaraEngine")
|
||||||
|
|
||||||
|
-- Configuration générale
|
||||||
|
configurations({
|
||||||
-- "DebugStatic",
|
-- "DebugStatic",
|
||||||
-- "ReleaseStatic",
|
-- "ReleaseStatic",
|
||||||
"DebugDynamic",
|
"DebugDynamic",
|
||||||
"ReleaseDynamic"
|
"ReleaseDynamic"
|
||||||
}
|
})
|
||||||
|
|
||||||
defines "NAZARA_BUILD"
|
language("C++")
|
||||||
language "C++"
|
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
|
|
||||||
includedirs
|
configuration("Debug*")
|
||||||
{
|
defines("NAZARA_DEBUG")
|
||||||
"../include",
|
flags("Symbols")
|
||||||
"../src/",
|
|
||||||
"../extlibs/include"
|
|
||||||
}
|
|
||||||
|
|
||||||
libdirs "../lib"
|
configuration("Release*")
|
||||||
|
flags({"EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI"})
|
||||||
|
|
||||||
|
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
||||||
|
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
||||||
|
buildoptions("-ftree-vectorize") -- Activation de la vectorisation du code
|
||||||
|
|
||||||
|
configuration("*Static")
|
||||||
|
defines("NAZARA_STATIC")
|
||||||
|
|
||||||
|
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
||||||
|
buildoptions("-std=c++11")
|
||||||
if (_OPTIONS["x64"]) then
|
if (_OPTIONS["x64"]) then
|
||||||
defines "NAZARA_PLATFORM_x64"
|
buildoptions("-m64")
|
||||||
libdirs "../extlibs/lib/x64"
|
|
||||||
else
|
|
||||||
libdirs "../extlibs/lib/x86"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
targetdir "../lib"
|
configuration({"linux or bsd or macosx", "gmake"})
|
||||||
|
buildoptions("-fvisibility=hidden")
|
||||||
|
|
||||||
configuration "Debug*"
|
configuration({"linux or bsd or macosx", "gmake"})
|
||||||
defines "NAZARA_DEBUG"
|
buildoptions("-fvisibility=hidden")
|
||||||
flags "Symbols"
|
|
||||||
|
|
||||||
configuration "Release*"
|
configuration("vs*")
|
||||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
defines("_CRT_SECURE_NO_WARNINGS")
|
||||||
|
defines("_SCL_SECURE_NO_WARNINGS")
|
||||||
|
|
||||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
-- Spécification des modules
|
||||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
|
||||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
|
||||||
|
|
||||||
configuration "*Static"
|
|
||||||
defines "NAZARA_STATIC"
|
|
||||||
kind "StaticLib"
|
|
||||||
|
|
||||||
configuration "*Dynamic"
|
|
||||||
kind "SharedLib"
|
|
||||||
|
|
||||||
configuration "DebugStatic"
|
|
||||||
targetsuffix "-s-d"
|
|
||||||
|
|
||||||
configuration "ReleaseStatic"
|
|
||||||
targetsuffix "-s"
|
|
||||||
|
|
||||||
configuration "DebugDynamic"
|
|
||||||
targetsuffix "-d"
|
|
||||||
|
|
||||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
|
||||||
buildoptions "-std=c++11"
|
|
||||||
if (_OPTIONS["x64"]) then
|
|
||||||
buildoptions "-m64"
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration { "linux or bsd or macosx", "gmake" }
|
|
||||||
buildoptions "-fvisibility=hidden"
|
|
||||||
|
|
||||||
configuration { "linux or bsd or macosx", "gmake" }
|
|
||||||
buildoptions "-fvisibility=hidden"
|
|
||||||
|
|
||||||
configuration "vs*"
|
|
||||||
defines "_CRT_SECURE_NO_WARNINGS"
|
|
||||||
defines "_SCL_SECURE_NO_WARNINGS"
|
|
||||||
|
|
||||||
-- Spécification des modules
|
|
||||||
if (_OPTIONS["united"]) then
|
if (_OPTIONS["united"]) then
|
||||||
project "NazaraEngine"
|
project("NazaraEngine")
|
||||||
end
|
end
|
||||||
|
|
||||||
for i=1, #self.Modules do
|
for i=1, #self.Modules do
|
||||||
|
|
@ -97,7 +126,43 @@ function NazaraBuild:Execute()
|
||||||
project("Nazara" .. moduleTable.Name)
|
project("Nazara" .. moduleTable.Name)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration {}
|
location(_ACTION .. "/modules")
|
||||||
|
|
||||||
|
defines("NAZARA_BUILD")
|
||||||
|
|
||||||
|
includedirs({
|
||||||
|
"../include",
|
||||||
|
"../src/",
|
||||||
|
"../extlibs/include"
|
||||||
|
})
|
||||||
|
|
||||||
|
libdirs("../lib")
|
||||||
|
|
||||||
|
if (_OPTIONS["x64"]) then
|
||||||
|
defines("NAZARA_PLATFORM_x64")
|
||||||
|
libdirs("../extlibs/lib/x64")
|
||||||
|
else
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
end
|
||||||
|
|
||||||
|
targetdir("../lib")
|
||||||
|
|
||||||
|
configuration("*Static")
|
||||||
|
kind("StaticLib")
|
||||||
|
|
||||||
|
configuration("*Dynamic")
|
||||||
|
kind("SharedLib")
|
||||||
|
|
||||||
|
configuration("DebugStatic")
|
||||||
|
targetsuffix("-s-d")
|
||||||
|
|
||||||
|
configuration("ReleaseStatic")
|
||||||
|
targetsuffix("-s")
|
||||||
|
|
||||||
|
configuration("DebugDynamic")
|
||||||
|
targetsuffix("-d")
|
||||||
|
|
||||||
|
configuration({})
|
||||||
|
|
||||||
files(moduleTable.Files)
|
files(moduleTable.Files)
|
||||||
excludes(moduleTable.FilesExclusion)
|
excludes(moduleTable.FilesExclusion)
|
||||||
|
|
@ -110,63 +175,37 @@ function NazaraBuild:Execute()
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
configuration({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (_OPTIONS["with-examples"]) then
|
if (_OPTIONS["with-examples"]) then
|
||||||
solution "NazaraExamples"
|
|
||||||
-- Configuration générale
|
|
||||||
configurations
|
|
||||||
{
|
|
||||||
-- "DebugStatic",
|
|
||||||
-- "ReleaseStatic",
|
|
||||||
"DebugDynamic",
|
|
||||||
"ReleaseDynamic"
|
|
||||||
}
|
|
||||||
|
|
||||||
language "C++"
|
|
||||||
location("../examples/build/" .. _ACTION)
|
|
||||||
|
|
||||||
debugdir "../examples/bin"
|
|
||||||
includedirs "../include"
|
|
||||||
libdirs "../lib"
|
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
|
||||||
defines "NAZARA_PLATFORM_x64"
|
|
||||||
libdirs "../extlibs/lib/x64"
|
|
||||||
else
|
|
||||||
libdirs "../extlibs/lib/x86"
|
|
||||||
end
|
|
||||||
|
|
||||||
targetdir "../examples/bin"
|
|
||||||
|
|
||||||
configuration "Debug*"
|
|
||||||
defines "NAZARA_DEBUG"
|
|
||||||
flags "Symbols"
|
|
||||||
|
|
||||||
configuration "Release*"
|
|
||||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
|
||||||
|
|
||||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
|
||||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
|
||||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
|
||||||
|
|
||||||
configuration "*Static"
|
|
||||||
defines "NAZARA_STATIC"
|
|
||||||
|
|
||||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
|
||||||
buildoptions "-std=c++11"
|
|
||||||
|
|
||||||
for i=1, #self.Examples do
|
for i=1, #self.Examples do
|
||||||
local exampleTable = self.Examples[i]
|
local exampleTable = self.Examples[i]
|
||||||
project("Demo" .. exampleTable.Name)
|
project("Demo" .. exampleTable.Name)
|
||||||
|
|
||||||
|
location(_ACTION .. "/examples")
|
||||||
|
|
||||||
if (exampleTable.Console) then
|
if (exampleTable.Console) then
|
||||||
kind "ConsoleApp"
|
kind("ConsoleApp")
|
||||||
else
|
else
|
||||||
kind "Window"
|
kind("Window")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
debugdir("../examples/bin")
|
||||||
|
includedirs("../include")
|
||||||
|
libdirs("../lib")
|
||||||
|
|
||||||
|
if (_OPTIONS["x64"]) then
|
||||||
|
defines("NAZARA_PLATFORM_x64")
|
||||||
|
libdirs("../extlibs/lib/x64")
|
||||||
|
else
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
end
|
||||||
|
|
||||||
|
targetdir("../examples/bin")
|
||||||
|
|
||||||
files(exampleTable.Files)
|
files(exampleTable.Files)
|
||||||
excludes(exampleTable.FilesExclusion)
|
excludes(exampleTable.FilesExclusion)
|
||||||
|
|
||||||
|
|
@ -178,93 +217,35 @@ function NazaraBuild:Execute()
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if (_OPTIONS["with-extlibs"]) then
|
configuration({})
|
||||||
solution "NazaraExtlibs"
|
|
||||||
-- Configuration générale
|
|
||||||
configurations
|
|
||||||
{
|
|
||||||
"DebugStatic",
|
|
||||||
"ReleaseStatic"
|
|
||||||
}
|
|
||||||
|
|
||||||
location("../extlibs/build/" .. _ACTION)
|
|
||||||
includedirs "../extlibs/include"
|
|
||||||
kind "StaticLib"
|
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
|
||||||
libdirs "../extlibs/lib/x64"
|
|
||||||
targetdir "../extlibs/lib/x64"
|
|
||||||
else
|
|
||||||
libdirs "../extlibs/lib/x86"
|
|
||||||
targetdir "../extlibs/lib/x86"
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration "Debug*"
|
|
||||||
flags "Symbols"
|
|
||||||
|
|
||||||
configuration "Release*"
|
|
||||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
|
||||||
|
|
||||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
|
||||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
|
||||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
|
||||||
|
|
||||||
configuration "DebugStatic"
|
|
||||||
targetsuffix "-s-d"
|
|
||||||
|
|
||||||
configuration "ReleaseStatic"
|
|
||||||
targetsuffix "-s"
|
|
||||||
|
|
||||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
|
||||||
buildoptions "-std=c++11"
|
|
||||||
|
|
||||||
for i=1, #self.ExtLibs do
|
|
||||||
local libTable = self.ExtLibs[i]
|
|
||||||
project(libTable.Name)
|
|
||||||
|
|
||||||
language(libTable.Language)
|
|
||||||
|
|
||||||
files(libTable.Files)
|
|
||||||
excludes(libTable.FilesExclusion)
|
|
||||||
|
|
||||||
defines(libTable.Defines)
|
|
||||||
flags(libTable.Flags)
|
|
||||||
links(libTable.Libraries)
|
|
||||||
|
|
||||||
for k,v in pairs(libTable.ConfigurationLibraries) do
|
|
||||||
configuration(k)
|
|
||||||
links(v)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:Initialize()
|
function NazaraBuild:Initialize()
|
||||||
-- Commençons par les options
|
-- Commençons par les options
|
||||||
newoption {
|
newoption({
|
||||||
trigger = "x64",
|
trigger = "x64",
|
||||||
description = "Setup build project for x64 arch"
|
description = "Setup build project for x64 arch"
|
||||||
}
|
})
|
||||||
|
|
||||||
newoption {
|
newoption({
|
||||||
trigger = "united",
|
trigger = "united",
|
||||||
description = "Builds all the modules as one united library"
|
description = "Builds all the modules as one united library"
|
||||||
}
|
})
|
||||||
|
|
||||||
newoption {
|
newoption({
|
||||||
trigger = "with-extlibs",
|
trigger = "with-extlibs",
|
||||||
description = "Builds the extern libraries"
|
description = "Builds the extern libraries"
|
||||||
}
|
})
|
||||||
|
|
||||||
newoption {
|
newoption({
|
||||||
trigger = "with-examples",
|
trigger = "with-examples",
|
||||||
description = "Builds the examples"
|
description = "Builds the examples"
|
||||||
}
|
})
|
||||||
|
|
||||||
-- Puis par les bibliothèques externes
|
-- Puis par les bibliothèques externes
|
||||||
self.ExtLibs = {}
|
self.ExtLibs = {}
|
||||||
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
||||||
for k,v in pairs(extlibs) do
|
for k,v in pairs(extlibs) do
|
||||||
|
|
@ -300,16 +281,17 @@ function NazaraBuild:Initialize()
|
||||||
self.Modules = {}
|
self.Modules = {}
|
||||||
local modules = os.matchfiles("scripts/module/*.lua")
|
local modules = os.matchfiles("scripts/module/*.lua")
|
||||||
for k,v in pairs(modules) do
|
for k,v in pairs(modules) do
|
||||||
local moduleName = v:match(".*/(.*).lua"):lower()
|
local moduleName = v:match(".*/(.*).lua")
|
||||||
|
local moduleNameLower = moduleName:lower()
|
||||||
|
|
||||||
if (moduleName ~= "core") then -- exclure le noyau n'aurait aucun sens
|
if (moduleNameLower ~= "core") then -- exclure le noyau n'aurait aucun sens
|
||||||
newoption {
|
newoption({
|
||||||
trigger = "exclude-" .. moduleName,
|
trigger = "exclude-" .. moduleNameLower,
|
||||||
description = "Exclude the " .. moduleName .. " module from the build system"
|
description = "Exclude the " .. moduleName .. " module from the build system"
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if (not _OPTIONS["exclude-" .. moduleName]) then
|
if (not _OPTIONS["exclude-" .. moduleNameLower]) then
|
||||||
local f, err = loadfile(v)
|
local f, err = loadfile(v)
|
||||||
if (f) then
|
if (f) then
|
||||||
MODULE = {}
|
MODULE = {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue