mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Updated genie windows binary.
This commit is contained in:
24
scripts/bx.lua
Normal file
24
scripts/bx.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
--
|
||||
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
|
||||
-- License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
--
|
||||
|
||||
project "bx"
|
||||
uuid "4db0b09e-d6df-11e1-a0ec-65ccdd6a022f"
|
||||
kind "StaticLib"
|
||||
|
||||
configuration { "osx or ios" }
|
||||
-- OSX ar doesn't like creating archive without object files
|
||||
-- here is object file...
|
||||
prebuildcommands {
|
||||
"@echo \"void dummy() {}\" > /tmp/dummy.cpp",
|
||||
}
|
||||
files {
|
||||
"/tmp/dummy.cpp",
|
||||
}
|
||||
|
||||
configuration {}
|
||||
|
||||
files {
|
||||
"../include/**.h",
|
||||
}
|
||||
94
scripts/genie.lua
Normal file
94
scripts/genie.lua
Normal file
@@ -0,0 +1,94 @@
|
||||
--
|
||||
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
|
||||
-- License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
--
|
||||
|
||||
solution "bx"
|
||||
configurations {
|
||||
"Debug",
|
||||
"Release",
|
||||
}
|
||||
|
||||
platforms {
|
||||
"x32",
|
||||
"x64",
|
||||
"Native", -- for targets where bitness is not specified
|
||||
}
|
||||
|
||||
language "C++"
|
||||
|
||||
BX_DIR = (path.getabsolute("..") .. "/")
|
||||
local BX_BUILD_DIR = (BX_DIR .. ".build/")
|
||||
local BX_THIRD_PARTY_DIR = (BX_DIR .. "3rdparty/")
|
||||
|
||||
defines {
|
||||
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
|
||||
}
|
||||
|
||||
dofile "toolchain.lua"
|
||||
toolchain(BX_BUILD_DIR, BX_THIRD_PARTY_DIR)
|
||||
|
||||
function copyLib()
|
||||
end
|
||||
|
||||
dofile "bx.lua"
|
||||
dofile "unittest++.lua"
|
||||
|
||||
project "bx.test"
|
||||
uuid "8a653da8-23d6-11e3-acb4-887628d43830"
|
||||
kind "ConsoleApp"
|
||||
|
||||
debugdir (BX_DIR .. "tests")
|
||||
|
||||
includedirs {
|
||||
BX_DIR .. "include",
|
||||
BX_THIRD_PARTY_DIR .. "UnitTest++/src/",
|
||||
}
|
||||
|
||||
links {
|
||||
"UnitTest++",
|
||||
}
|
||||
|
||||
files {
|
||||
BX_DIR .. "tests/**.cpp",
|
||||
BX_DIR .. "tests/**.H",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
|
||||
configuration { "android*" }
|
||||
kind "ConsoleApp"
|
||||
targetextension ".so"
|
||||
linkoptions {
|
||||
"-shared",
|
||||
}
|
||||
|
||||
configuration { "nacl or nacl-arm" }
|
||||
kind "ConsoleApp"
|
||||
targetextension ".nexe"
|
||||
links {
|
||||
"ppapi",
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "pnacl" }
|
||||
kind "ConsoleApp"
|
||||
targetextension ".pexe"
|
||||
links {
|
||||
"ppapi",
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "linux-*" }
|
||||
links {
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "osx" }
|
||||
links {
|
||||
"Cocoa.framework",
|
||||
}
|
||||
|
||||
configuration {}
|
||||
|
||||
strip()
|
||||
798
scripts/toolchain.lua
Executable file
798
scripts/toolchain.lua
Executable file
@@ -0,0 +1,798 @@
|
||||
--
|
||||
-- Copyright 2010-2014 Branimir Karadzic. All rights reserved.
|
||||
-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause
|
||||
--
|
||||
|
||||
local bxDir = (path.getabsolute("..") .. "/")
|
||||
local naclToolchain = ""
|
||||
|
||||
function toolchain(_buildDir, _libDir)
|
||||
|
||||
newoption {
|
||||
trigger = "gcc",
|
||||
value = "GCC",
|
||||
description = "Choose GCC flavor",
|
||||
allowed = {
|
||||
{ "android-arm", "Android - ARM" },
|
||||
{ "android-mips", "Android - MIPS" },
|
||||
{ "android-x86", "Android - x86" },
|
||||
{ "asmjs", "Emscripten/asm.js" },
|
||||
{ "freebsd", "FreeBSD" },
|
||||
{ "linux-gcc", "Linux (GCC compiler)" },
|
||||
{ "linux-clang", "Linux (Clang compiler)" },
|
||||
{ "ios-arm", "iOS - ARM" },
|
||||
{ "ios-simulator", "iOS - Simulator" },
|
||||
{ "mingw", "MinGW" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "osx", "OSX" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
},
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-android",
|
||||
value = "#",
|
||||
description = "Set Android platform version.",
|
||||
}
|
||||
|
||||
-- Avoid error when invoking premake4 --help.
|
||||
if (_ACTION == nil) then return end
|
||||
|
||||
location (_buildDir .. "projects/" .. _ACTION)
|
||||
|
||||
if _ACTION == "clean" then
|
||||
os.rmdir(BUILD_DIR)
|
||||
end
|
||||
|
||||
local androidPlatform = "android-14"
|
||||
if _OPTIONS["with-android"] then
|
||||
androidPlatform = "android-" .. _OPTIONS["with-android"]
|
||||
end
|
||||
|
||||
if _ACTION == "gmake" then
|
||||
|
||||
if nil == _OPTIONS["gcc"] then
|
||||
print("GCC flavor must be specified!")
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
flags {
|
||||
"ExtraWarnings",
|
||||
}
|
||||
|
||||
if "android-arm" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("ANDROID_NDK_ARM") or not os.getenv("ANDROID_NDK_ROOT") then
|
||||
print("Set ANDROID_NDK_ARM and ANDROID_NDK_ROOT envrionment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-gcc"
|
||||
premake.gcc.cxx = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-g++"
|
||||
premake.gcc.ar = "$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-android-arm")
|
||||
end
|
||||
|
||||
if "android-mips" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("ANDROID_NDK_MIPS") or not os.getenv("ANDROID_NDK_ROOT") then
|
||||
print("Set ANDROID_NDK_MIPS and ANDROID_NDK_ROOT envrionment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-gcc"
|
||||
premake.gcc.cxx = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-g++"
|
||||
premake.gcc.ar = "$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-android-mips")
|
||||
end
|
||||
|
||||
if "android-x86" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("ANDROID_NDK_X86") or not os.getenv("ANDROID_NDK_ROOT") then
|
||||
print("Set ANDROID_NDK_X86 and ANDROID_NDK_ROOT envrionment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(ANDROID_NDK_X86)/bin/i686-linux-android-gcc"
|
||||
premake.gcc.cxx = "$(ANDROID_NDK_X86)/bin/i686-linux-android-g++"
|
||||
premake.gcc.ar = "$(ANDROID_NDK_X86)/bin/i686-linux-android-ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-android-x86")
|
||||
end
|
||||
|
||||
if "asmjs" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("EMSCRIPTEN") then
|
||||
print("Set EMSCRIPTEN enviroment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(EMSCRIPTEN)/emcc"
|
||||
premake.gcc.cxx = "$(EMSCRIPTEN)/em++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-asmjs")
|
||||
end
|
||||
|
||||
if "freebsd" == _OPTIONS["gcc"] then
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-freebsd")
|
||||
end
|
||||
|
||||
if "ios-arm" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||
premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-ios-arm")
|
||||
end
|
||||
|
||||
if "ios-simulator" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||
premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-ios-simulator")
|
||||
end
|
||||
|
||||
if "linux-gcc" == _OPTIONS["gcc"] then
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-linux")
|
||||
end
|
||||
|
||||
if "linux-clang" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "clang"
|
||||
premake.gcc.cxx = "clang++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-linux-clang")
|
||||
end
|
||||
|
||||
if "mingw" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "$(MINGW)/bin/x86_64-w64-mingw32-gcc"
|
||||
premake.gcc.cxx = "$(MINGW)/bin/x86_64-w64-mingw32-g++"
|
||||
premake.gcc.ar = "$(MINGW)/bin/ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-mingw")
|
||||
end
|
||||
|
||||
if "nacl" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL_SDK_ROOT") then
|
||||
print("Set NACL_SDK_ROOT enviroment variables.")
|
||||
end
|
||||
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-"
|
||||
if os.is("macosx") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_x86_newlib/bin/x86_64-nacl-"
|
||||
elseif os.is("linux") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_x86_newlib/bin/x86_64-nacl-"
|
||||
end
|
||||
|
||||
premake.gcc.cc = naclToolchain .. "gcc"
|
||||
premake.gcc.cxx = naclToolchain .. "g++"
|
||||
premake.gcc.ar = naclToolchain .. "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-nacl")
|
||||
end
|
||||
|
||||
if "nacl-arm" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL_SDK_ROOT") then
|
||||
print("Set NACL_SDK_ROOT enviroment variables.")
|
||||
end
|
||||
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-"
|
||||
if os.is("macosx") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_arm_newlib/bin/arm-nacl-"
|
||||
elseif os.is("linux") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_arm_newlib/bin/arm-nacl-"
|
||||
end
|
||||
|
||||
premake.gcc.cc = naclToolchain .. "gcc"
|
||||
premake.gcc.cxx = naclToolchain .. "g++"
|
||||
premake.gcc.ar = naclToolchain .. "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-nacl-arm")
|
||||
end
|
||||
|
||||
if "osx" == _OPTIONS["gcc"] then
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-osx")
|
||||
end
|
||||
|
||||
if "pnacl" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("NACL_SDK_ROOT") then
|
||||
print("Set NACL_SDK_ROOT enviroment variables.")
|
||||
end
|
||||
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_pnacl/bin/pnacl-"
|
||||
if os.is("macosx") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_pnacl/bin/pnacl-"
|
||||
elseif os.is("linux") then
|
||||
naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-"
|
||||
end
|
||||
|
||||
premake.gcc.cc = naclToolchain .. "clang"
|
||||
premake.gcc.cxx = naclToolchain .. "clang++"
|
||||
premake.gcc.ar = naclToolchain .. "ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-pnacl")
|
||||
end
|
||||
|
||||
if "qnx-arm" == _OPTIONS["gcc"] then
|
||||
|
||||
if not os.getenv("QNX_HOST") then
|
||||
print("Set QNX_HOST enviroment variables.")
|
||||
end
|
||||
|
||||
premake.gcc.cc = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc"
|
||||
premake.gcc.cxx = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-g++"
|
||||
premake.gcc.ar = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-ar"
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-qnx-arm")
|
||||
end
|
||||
|
||||
if "rpi" == _OPTIONS["gcc"] then
|
||||
location (_buildDir .. "projects/" .. _ACTION .. "-rpi")
|
||||
end
|
||||
end
|
||||
|
||||
flags {
|
||||
"StaticRuntime",
|
||||
"NoMinimalRebuild",
|
||||
"NoPCH",
|
||||
"NativeWChar",
|
||||
"NoRTTI",
|
||||
"NoExceptions",
|
||||
"NoEditAndContinue",
|
||||
"Symbols",
|
||||
}
|
||||
|
||||
defines {
|
||||
"__STDC_LIMIT_MACROS",
|
||||
"__STDC_FORMAT_MACROS",
|
||||
"__STDC_CONSTANT_MACROS",
|
||||
}
|
||||
|
||||
configuration { "Debug" }
|
||||
targetsuffix "Debug"
|
||||
|
||||
configuration { "Release" }
|
||||
flags {
|
||||
"OptimizeSpeed",
|
||||
}
|
||||
targetsuffix "Release"
|
||||
|
||||
configuration { "vs*" }
|
||||
flags {
|
||||
"EnableSSE2",
|
||||
}
|
||||
includedirs { bxDir .. "include/compat/msvc" }
|
||||
defines {
|
||||
"WIN32",
|
||||
"_WIN32",
|
||||
"_HAS_EXCEPTIONS=0",
|
||||
"_HAS_ITERATOR_DEBUGGING=0",
|
||||
"_SCL_SECURE=0",
|
||||
"_SECURE_SCL=0",
|
||||
"_SCL_SECURE_NO_WARNINGS",
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_SECURE_NO_DEPRECATE",
|
||||
}
|
||||
buildoptions {
|
||||
"/Oy-", -- Suppresses creation of frame pointers on the call stack.
|
||||
"/Ob2", -- The Inline Function Expansion
|
||||
}
|
||||
linkoptions {
|
||||
"/ignore:4221", -- LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
|
||||
}
|
||||
|
||||
configuration { "vs2008" }
|
||||
includedirs { bxDir .. "include/compat/msvc/pre1600" }
|
||||
|
||||
configuration { "x32", "vs*" }
|
||||
targetdir (_buildDir .. "win32_" .. _ACTION .. "/bin")
|
||||
objdir (_buildDir .. "win32_" .. _ACTION .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/win32_" .. _ACTION,
|
||||
"$(DXSDK_DIR)/lib/x86",
|
||||
}
|
||||
|
||||
configuration { "x64", "vs*" }
|
||||
defines { "_WIN64" }
|
||||
targetdir (_buildDir .. "win64_" .. _ACTION .. "/bin")
|
||||
objdir (_buildDir .. "win64_" .. _ACTION .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/win64_" .. _ACTION,
|
||||
"$(DXSDK_DIR)/lib/x64",
|
||||
}
|
||||
|
||||
configuration { "mingw" }
|
||||
defines { "WIN32" }
|
||||
includedirs { bxDir .. "include/compat/mingw" }
|
||||
buildoptions {
|
||||
"-std=c++11",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-Wunused-value",
|
||||
"-fdata-sections",
|
||||
"-ffunction-sections",
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
|
||||
configuration { "x32", "mingw" }
|
||||
targetdir (_buildDir .. "win32_mingw" .. "/bin")
|
||||
objdir (_buildDir .. "win32_mingw" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/win32_mingw",
|
||||
"$(DXSDK_DIR)/lib/x86",
|
||||
}
|
||||
buildoptions { "-m32" }
|
||||
|
||||
configuration { "x64", "mingw" }
|
||||
targetdir (_buildDir .. "win64_mingw" .. "/bin")
|
||||
objdir (_buildDir .. "win64_mingw" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/win64_mingw",
|
||||
"$(DXSDK_DIR)/lib/x64",
|
||||
"$(GLES_X64_DIR)",
|
||||
}
|
||||
buildoptions { "-m64" }
|
||||
|
||||
configuration { "linux-gcc and not linux-clang" }
|
||||
buildoptions {
|
||||
"-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic.
|
||||
}
|
||||
|
||||
configuration { "linux-clang" }
|
||||
buildoptions {
|
||||
"--analyze",
|
||||
}
|
||||
|
||||
configuration { "linux-*" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
links {
|
||||
"rt",
|
||||
}
|
||||
linkoptions {
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
|
||||
configuration { "linux-gcc", "x32" }
|
||||
targetdir (_buildDir .. "linux32_gcc" .. "/bin")
|
||||
objdir (_buildDir .. "linux32_gcc" .. "/obj")
|
||||
libdirs { _libDir .. "lib/linux32_gcc" }
|
||||
buildoptions {
|
||||
"-m32",
|
||||
}
|
||||
|
||||
configuration { "linux-gcc", "x64" }
|
||||
targetdir (_buildDir .. "linux64_gcc" .. "/bin")
|
||||
objdir (_buildDir .. "linux64_gcc" .. "/obj")
|
||||
libdirs { _libDir .. "lib/linux64_gcc" }
|
||||
buildoptions {
|
||||
"-m64",
|
||||
}
|
||||
|
||||
configuration { "linux-clang", "x32" }
|
||||
targetdir (_buildDir .. "linux32_clang" .. "/bin")
|
||||
objdir (_buildDir .. "linux32_clang" .. "/obj")
|
||||
libdirs { _libDir .. "lib/linux32_clang" }
|
||||
buildoptions {
|
||||
"-m32",
|
||||
}
|
||||
|
||||
configuration { "linux-clang", "x64" }
|
||||
targetdir (_buildDir .. "linux64_clang" .. "/bin")
|
||||
objdir (_buildDir .. "linux64_clang" .. "/obj")
|
||||
libdirs { _libDir .. "lib/linux64_clang" }
|
||||
buildoptions {
|
||||
"-m64",
|
||||
}
|
||||
|
||||
configuration { "android-*" }
|
||||
flags {
|
||||
"NoImportLib",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/android/native_app_glue",
|
||||
}
|
||||
linkoptions {
|
||||
"-nostdlib",
|
||||
"-static-libgcc",
|
||||
}
|
||||
links {
|
||||
"c",
|
||||
"dl",
|
||||
"m",
|
||||
"android",
|
||||
"log",
|
||||
"gnustl_static",
|
||||
"gcc",
|
||||
}
|
||||
buildoptions {
|
||||
"-fPIC",
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-no-canonical-prefixes",
|
||||
"-Wa,--noexecstack",
|
||||
"-fstack-protector",
|
||||
"-ffunction-sections",
|
||||
"-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"-no-canonical-prefixes",
|
||||
"-Wl,--no-undefined",
|
||||
"-Wl,-z,noexecstack",
|
||||
"-Wl,-z,relro",
|
||||
"-Wl,-z,now",
|
||||
}
|
||||
|
||||
configuration { "android-arm" }
|
||||
targetdir (_buildDir .. "android-arm" .. "/bin")
|
||||
objdir (_buildDir .. "android-arm" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/android-arm",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",
|
||||
"-mthumb",
|
||||
"-march=armv7-a",
|
||||
"-mfloat-abi=softfp",
|
||||
"-mfpu=neon",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtend_so.o",
|
||||
"-march=armv7-a",
|
||||
"-Wl,--fix-cortex-a8",
|
||||
}
|
||||
|
||||
configuration { "android-mips" }
|
||||
targetdir (_buildDir .. "android-mips" .. "/bin")
|
||||
objdir (_buildDir .. "android-mips" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/android-mips",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtend_so.o",
|
||||
}
|
||||
|
||||
configuration { "android-x86" }
|
||||
targetdir (_buildDir .. "android-x86" .. "/bin")
|
||||
objdir (_buildDir .. "android-x86" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/android-x86",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86",
|
||||
"-march=i686",
|
||||
"-mtune=atom",
|
||||
"-mstackrealign",
|
||||
"-msse3",
|
||||
"-mfpmath=sse",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtend_so.o",
|
||||
}
|
||||
|
||||
configuration { "asmjs" }
|
||||
targetdir (_buildDir .. "asmjs" .. "/bin")
|
||||
objdir (_buildDir .. "asmjs" .. "/obj")
|
||||
libdirs { _libDir .. "lib/asmjs" }
|
||||
includedirs {
|
||||
"$(EMSCRIPTEN)/system/include",
|
||||
"$(EMSCRIPTEN)/system/include/libc",
|
||||
}
|
||||
buildoptions {
|
||||
"-Wno-unknown-warning-option", -- Linux Emscripten doesn't know about no-warn-absolute-paths...
|
||||
"-Wno-warn-absolute-paths",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
|
||||
configuration { "freebsd" }
|
||||
targetdir (_buildDir .. "freebsd" .. "/bin")
|
||||
objdir (_buildDir .. "freebsd" .. "/obj")
|
||||
libdirs { _libDir .. "lib/freebsd" }
|
||||
includedirs {
|
||||
bxDir .. "include/compat/freebsd",
|
||||
}
|
||||
|
||||
configuration { "nacl or nacl-arm or pnacl" }
|
||||
includedirs {
|
||||
"$(NACL_SDK_ROOT)/include",
|
||||
bxDir .. "include/compat/nacl",
|
||||
}
|
||||
|
||||
configuration { "nacl" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-pthread",
|
||||
"-fno-stack-protector",
|
||||
"-fdiagnostics-show-option",
|
||||
"-fdata-sections",
|
||||
"-ffunction-sections",
|
||||
"-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic.
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
|
||||
configuration { "x32", "nacl" }
|
||||
targetdir (_buildDir .. "nacl-x86" .. "/bin")
|
||||
objdir (_buildDir .. "nacl-x86" .. "/obj")
|
||||
libdirs { _libDir .. "lib/nacl-x86" }
|
||||
linkoptions { "-melf32_nacl" }
|
||||
|
||||
configuration { "x32", "nacl", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Debug" }
|
||||
|
||||
configuration { "x32", "nacl", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Release" }
|
||||
|
||||
configuration { "x64", "nacl" }
|
||||
targetdir (_buildDir .. "nacl-x64" .. "/bin")
|
||||
objdir (_buildDir .. "nacl-x64" .. "/obj")
|
||||
libdirs { _libDir .. "lib/nacl-x64" }
|
||||
linkoptions { "-melf64_nacl" }
|
||||
|
||||
configuration { "x64", "nacl", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Debug" }
|
||||
|
||||
configuration { "x64", "nacl", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Release" }
|
||||
|
||||
configuration { "nacl-arm" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-fno-stack-protector",
|
||||
"-fdiagnostics-show-option",
|
||||
"-fdata-sections",
|
||||
"-ffunction-sections",
|
||||
"-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
targetdir (_buildDir .. "nacl-arm" .. "/bin")
|
||||
objdir (_buildDir .. "nacl-arm" .. "/obj")
|
||||
libdirs { _libDir .. "lib/nacl-arm" }
|
||||
|
||||
configuration { "nacl-arm", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Debug" }
|
||||
|
||||
configuration { "nacl-arm", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Release" }
|
||||
|
||||
configuration { "pnacl" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-fno-stack-protector",
|
||||
"-fdiagnostics-show-option",
|
||||
"-fdata-sections",
|
||||
"-ffunction-sections",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
targetdir (_buildDir .. "pnacl" .. "/bin")
|
||||
objdir (_buildDir .. "pnacl" .. "/obj")
|
||||
libdirs { _libDir .. "lib/pnacl" }
|
||||
|
||||
configuration { "pnacl", "Debug" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Debug" }
|
||||
|
||||
configuration { "pnacl", "Release" }
|
||||
libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Release" }
|
||||
|
||||
configuration { "Xbox360" }
|
||||
targetdir (_buildDir .. "xbox360" .. "/bin")
|
||||
objdir (_buildDir .. "xbox360" .. "/obj")
|
||||
includedirs { bxDir .. "include/compat/msvc" }
|
||||
libdirs { _libDir .. "lib/xbox360" }
|
||||
defines {
|
||||
"NOMINMAX",
|
||||
"_XBOX",
|
||||
}
|
||||
|
||||
configuration { "osx", "x32" }
|
||||
targetdir (_buildDir .. "osx32_gcc" .. "/bin")
|
||||
objdir (_buildDir .. "osx32_gcc" .. "/obj")
|
||||
libdirs { _libDir .. "lib/osx32_gcc" }
|
||||
buildoptions {
|
||||
"-m32",
|
||||
}
|
||||
|
||||
configuration { "osx", "x64" }
|
||||
targetdir (_buildDir .. "osx64_gcc" .. "/bin")
|
||||
objdir (_buildDir .. "osx64_gcc" .. "/obj")
|
||||
libdirs { _libDir .. "lib/osx64_gcc" }
|
||||
buildoptions {
|
||||
"-m64",
|
||||
}
|
||||
|
||||
configuration { "osx" }
|
||||
buildoptions {
|
||||
"-U__STRICT_ANSI__",
|
||||
"-Wfatal-errors",
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
includedirs { bxDir .. "include/compat/osx" }
|
||||
|
||||
configuration { "ios-*" }
|
||||
linkoptions {
|
||||
"-lc++",
|
||||
}
|
||||
buildoptions {
|
||||
"-miphoneos-version-min=7.0",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-Wfatal-errors",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
includedirs { bxDir .. "include/compat/ios" }
|
||||
|
||||
configuration { "ios-arm" }
|
||||
targetdir (_buildDir .. "ios-arm" .. "/bin")
|
||||
objdir (_buildDir .. "ios-arm" .. "/obj")
|
||||
libdirs { _libDir .. "lib/ios-arm" }
|
||||
linkoptions {
|
||||
"-arch armv7",
|
||||
"--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk",
|
||||
"-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/lib/system",
|
||||
"-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks",
|
||||
"-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/PrivateFrameworks",
|
||||
}
|
||||
buildoptions {
|
||||
"-arch armv7",
|
||||
"--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk",
|
||||
}
|
||||
|
||||
configuration { "ios-simulator" }
|
||||
targetdir (_buildDir .. "ios-simulator" .. "/bin")
|
||||
objdir (_buildDir .. "ios-simulator" .. "/obj")
|
||||
libdirs { _libDir .. "lib/ios-simulator" }
|
||||
linkoptions {
|
||||
"-arch i386",
|
||||
"--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk",
|
||||
"-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/system",
|
||||
"-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks",
|
||||
"-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/PrivateFrameworks",
|
||||
}
|
||||
buildoptions {
|
||||
"-arch i386",
|
||||
"--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk",
|
||||
}
|
||||
|
||||
configuration { "qnx-arm" }
|
||||
targetdir (_buildDir .. "qnx-arm" .. "/bin")
|
||||
objdir (_buildDir .. "qnx-arm" .. "/obj")
|
||||
libdirs { _libDir .. "lib/qnx-arm" }
|
||||
-- includedirs { bxDir .. "include/compat/qnx" }
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
|
||||
configuration { "rpi" }
|
||||
targetdir (_buildDir .. "rpi" .. "/bin")
|
||||
objdir (_buildDir .. "rpi" .. "/obj")
|
||||
libdirs {
|
||||
_libDir .. "lib/rpi",
|
||||
"/opt/vc/lib",
|
||||
}
|
||||
defines {
|
||||
"__VCCOREVER__=0x04000000", -- There is no special prefedined compiler symbol to detect RaspberryPi, faking it.
|
||||
"__STDC_VERSION__=199901L",
|
||||
}
|
||||
buildoptions {
|
||||
"-std=c++0x",
|
||||
"-U__STRICT_ANSI__",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
includedirs {
|
||||
"/opt/vc/include",
|
||||
"/opt/vc/include/interface/vcos/pthreads",
|
||||
"/opt/vc/include/interface/vmcs_host/linux",
|
||||
}
|
||||
links {
|
||||
"rt",
|
||||
}
|
||||
linkoptions {
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
|
||||
configuration {} -- reset configuration
|
||||
end
|
||||
|
||||
function strip()
|
||||
|
||||
configuration { "android-arm", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "android-mips", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@$(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "android-x86", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@$(ANDROID_NDK_X86)/bin/i686-linux-android-strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "linux-* or rpi", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "mingw", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@$(MINGW)/bin/strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "pnacl" }
|
||||
postbuildcommands {
|
||||
"@echo Running pnacl-finalize.",
|
||||
"@" .. naclToolchain .. "finalize \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "*nacl*", "Release" }
|
||||
postbuildcommands {
|
||||
"@echo Stripping symbols.",
|
||||
"@" .. naclToolchain .. "strip -s \"$(TARGET)\""
|
||||
}
|
||||
|
||||
configuration { "asmjs" }
|
||||
postbuildcommands {
|
||||
"@echo Running asmjs finalize.",
|
||||
"@$(EMSCRIPTEN)/emcc -O2 -s TOTAL_MEMORY=268435456 \"$(TARGET)\" -o \"$(TARGET)\".html"
|
||||
-- ALLOW_MEMORY_GROWTH
|
||||
}
|
||||
|
||||
configuration {} -- reset configuration
|
||||
end
|
||||
218
scripts/uncrustify.cfg
Normal file
218
scripts/uncrustify.cfg
Normal file
@@ -0,0 +1,218 @@
|
||||
tok_split_gte=false
|
||||
utf8_byte=false
|
||||
utf8_force=false
|
||||
indent_cmt_with_tabs=false
|
||||
indent_align_string=false
|
||||
indent_braces=false
|
||||
indent_braces_no_func=false
|
||||
indent_braces_no_class=false
|
||||
indent_braces_no_struct=false
|
||||
indent_brace_parent=false
|
||||
indent_namespace=true
|
||||
indent_extern=false
|
||||
indent_class=false
|
||||
indent_class_colon=false
|
||||
indent_else_if=false
|
||||
indent_var_def_cont=false
|
||||
indent_func_call_param=false
|
||||
indent_func_def_param=false
|
||||
indent_func_proto_param=false
|
||||
indent_func_class_param=false
|
||||
indent_func_ctor_var_param=false
|
||||
indent_template_param=false
|
||||
indent_func_param_double=false
|
||||
indent_relative_single_line_comments=false
|
||||
indent_col1_comment=false
|
||||
indent_access_spec_body=false
|
||||
indent_paren_nl=true
|
||||
indent_comma_paren=true
|
||||
indent_bool_paren=true
|
||||
indent_first_bool_expr=false
|
||||
indent_square_nl=false
|
||||
indent_preserve_sql=false
|
||||
indent_align_assign=true
|
||||
sp_balance_nested_parens=false
|
||||
align_keep_tabs=false
|
||||
align_with_tabs=false
|
||||
align_on_tabstop=false
|
||||
align_number_left=true
|
||||
align_func_params=false
|
||||
align_same_func_call_params=false
|
||||
align_var_def_colon=false
|
||||
align_var_def_attribute=false
|
||||
align_var_def_inline=false
|
||||
align_right_cmt_mix=false
|
||||
align_on_operator=false
|
||||
align_mix_var_proto=false
|
||||
align_single_line_func=false
|
||||
align_single_line_brace=false
|
||||
align_nl_cont=false
|
||||
align_left_shift=true
|
||||
align_oc_decl_colon=false
|
||||
nl_collapse_empty_body=false
|
||||
nl_assign_leave_one_liners=true
|
||||
nl_class_leave_one_liners=false
|
||||
nl_enum_leave_one_liners=false
|
||||
nl_getset_leave_one_liners=false
|
||||
nl_func_leave_one_liners=false
|
||||
nl_if_leave_one_liners=false
|
||||
nl_multi_line_cond=false
|
||||
nl_multi_line_define=false
|
||||
nl_before_case=true
|
||||
nl_after_case=false
|
||||
nl_after_return=false
|
||||
nl_after_semicolon=false
|
||||
nl_after_brace_open=false
|
||||
nl_after_brace_open_cmt=false
|
||||
nl_after_vbrace_open=false
|
||||
nl_after_vbrace_open_empty=false
|
||||
nl_after_brace_close=false
|
||||
nl_after_vbrace_close=false
|
||||
nl_define_macro=false
|
||||
nl_squeeze_ifdef=false
|
||||
nl_ds_struct_enum_cmt=false
|
||||
nl_ds_struct_enum_close_brace=false
|
||||
nl_create_if_one_liner=false
|
||||
nl_create_for_one_liner=false
|
||||
nl_create_while_one_liner=false
|
||||
ls_for_split_full=false
|
||||
ls_func_split_full=false
|
||||
nl_after_multiline_comment=false
|
||||
eat_blanks_after_open_brace=true
|
||||
eat_blanks_before_close_brace=true
|
||||
mod_full_brace_if_chain=false
|
||||
mod_pawn_semicolon=false
|
||||
mod_full_paren_if_bool=false
|
||||
mod_remove_extra_semicolon=true
|
||||
mod_sort_import=false
|
||||
mod_sort_using=false
|
||||
mod_sort_include=false
|
||||
mod_move_case_break=false
|
||||
mod_remove_empty_return=true
|
||||
cmt_indent_multi=false
|
||||
cmt_c_group=false
|
||||
cmt_c_nl_start=false
|
||||
cmt_c_nl_end=false
|
||||
cmt_cpp_group=false
|
||||
cmt_cpp_nl_start=false
|
||||
cmt_cpp_nl_end=false
|
||||
cmt_cpp_to_c=false
|
||||
cmt_star_cont=false
|
||||
cmt_multi_check_last=false
|
||||
cmt_insert_before_preproc=false
|
||||
pp_indent_at_level=false
|
||||
pp_region_indent_code=false
|
||||
pp_if_indent_code=false
|
||||
pp_define_at_level=false
|
||||
indent_paren_close=1
|
||||
align_struct_init_span=1
|
||||
align_pp_define_span=1
|
||||
nl_end_of_file_min=1
|
||||
nl_max=2
|
||||
mod_add_long_ifdef_endif_comment=1
|
||||
pp_space_count=3
|
||||
newlines=auto
|
||||
indent_with_tabs=1
|
||||
sp_arith=force
|
||||
sp_assign=force
|
||||
sp_enum_assign=force
|
||||
sp_bool=force
|
||||
sp_compare=force
|
||||
sp_inside_paren=remove
|
||||
sp_paren_paren=force
|
||||
sp_before_ptr_star=remove
|
||||
sp_before_unnamed_ptr_star=remove
|
||||
sp_between_ptr_star=remove
|
||||
sp_after_ptr_star=force
|
||||
sp_after_ptr_star_func=force
|
||||
sp_before_ptr_star_func=remove
|
||||
sp_before_byref=remove
|
||||
sp_before_unnamed_byref=remove
|
||||
sp_after_byref=force
|
||||
sp_after_type=force
|
||||
sp_template_angle=remove
|
||||
sp_angle_shift=add
|
||||
sp_before_sparen=force
|
||||
sp_inside_sparen=remove
|
||||
sp_after_sparen=force
|
||||
sp_special_semi=remove
|
||||
sp_before_semi=remove
|
||||
sp_after_semi_for=force
|
||||
sp_after_semi_for_empty=remove
|
||||
sp_before_square=remove
|
||||
sp_before_squares=remove
|
||||
sp_after_comma=force
|
||||
sp_before_comma=remove
|
||||
sp_before_ellipsis=force
|
||||
sp_after_class_colon=force
|
||||
sp_before_class_colon=force
|
||||
sp_before_case_colon=remove
|
||||
sp_after_operator=remove
|
||||
sp_after_operator_sym=remove
|
||||
sp_cpp_cast_paren=remove
|
||||
sp_sizeof_paren=remove
|
||||
sp_inside_braces_enum=force
|
||||
sp_inside_braces_struct=force
|
||||
sp_inside_braces_empty=remove
|
||||
sp_type_func=force
|
||||
sp_func_proto_paren=remove
|
||||
sp_func_def_paren=remove
|
||||
sp_inside_fparens=remove
|
||||
sp_inside_fparen=remove
|
||||
sp_square_fparen=remove
|
||||
sp_fparen_brace=force
|
||||
sp_func_call_paren=remove
|
||||
sp_func_call_paren_empty=remove
|
||||
sp_func_call_user_paren=remove
|
||||
sp_func_class_paren=remove
|
||||
sp_return_paren=force
|
||||
sp_attribute_paren=remove
|
||||
sp_defined_paren=remove
|
||||
sp_macro=force
|
||||
sp_macro_func=force
|
||||
sp_not=remove
|
||||
sp_inv=remove
|
||||
sp_addr=remove
|
||||
sp_member=remove
|
||||
sp_deref=remove
|
||||
sp_sign=remove
|
||||
sp_incdec=remove
|
||||
sp_before_nl_cont=force
|
||||
sp_cond_colon=force
|
||||
sp_cond_question=force
|
||||
sp_case_label=force
|
||||
sp_endif_cmt=force
|
||||
sp_after_new=force
|
||||
nl_end_of_file=force
|
||||
nl_assign_brace=force
|
||||
nl_fcall_brace=force
|
||||
nl_enum_brace=force
|
||||
nl_struct_brace=force
|
||||
nl_union_brace=force
|
||||
nl_if_brace=force
|
||||
nl_brace_else=force
|
||||
nl_elseif_brace=force
|
||||
nl_else_brace=force
|
||||
nl_else_if=remove
|
||||
nl_for_brace=force
|
||||
nl_while_brace=force
|
||||
nl_brace_brace=force
|
||||
nl_do_brace=force
|
||||
nl_brace_while=force
|
||||
nl_switch_brace=force
|
||||
nl_namespace_brace=force
|
||||
nl_fdef_brace=force
|
||||
nl_after_if=add
|
||||
nl_after_for=add
|
||||
nl_after_while=add
|
||||
nl_after_switch=add
|
||||
nl_after_do=add
|
||||
pos_bool=lead_force
|
||||
mod_full_brace_do=force
|
||||
mod_full_brace_for=force
|
||||
mod_full_brace_function=force
|
||||
mod_full_brace_if=force
|
||||
mod_full_brace_while=force
|
||||
mod_paren_on_return=remove
|
||||
pp_indent=remove
|
||||
pp_space=add
|
||||
44
scripts/unittest++.lua
Normal file
44
scripts/unittest++.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
--
|
||||
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
|
||||
-- License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
--
|
||||
|
||||
function flagsremove(name)
|
||||
-- bx's toolchain.lua disables exceptions everywhere
|
||||
-- this function can remove some of those flags when
|
||||
-- needed.
|
||||
local container, err = premake.getobject("solution")
|
||||
for _, block in pairs(container["blocks"]) do
|
||||
local tbl = block["flags"]
|
||||
for index, value in pairs(tbl) do
|
||||
if value == name then
|
||||
table.remove(tbl, index)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
project "UnitTest++"
|
||||
uuid "ab932f5c-2409-11e3-b000-887628d43830"
|
||||
kind "StaticLib"
|
||||
|
||||
flagsremove("NoExceptions")
|
||||
|
||||
files {
|
||||
"../3rdparty/UnitTest++/src/*.cpp",
|
||||
"../3rdparty/UnitTest++/src/*.h",
|
||||
}
|
||||
|
||||
configuration { "linux or osx or android-* or *nacl*" }
|
||||
files {
|
||||
"../3rdparty/UnitTest++/src/Posix/**.cpp",
|
||||
"../3rdparty/UnitTest++/src/Posix/**.h",
|
||||
}
|
||||
|
||||
configuration { "mingw or vs*" }
|
||||
files {
|
||||
"../3rdparty/UnitTest++/src/Win32/**.cpp",
|
||||
"../3rdparty/UnitTest++/src/Win32/**.h",
|
||||
}
|
||||
|
||||
configuration {}
|
||||
Reference in New Issue
Block a user