| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238 |
- --
- -- Copyright 2010-2016 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-gcc-5", "Linux (GCC-5 compiler)" },
- { "linux-clang", "Linux (Clang compiler)" },
- { "linux-mips-gcc", "Linux (MIPS, GCC compiler)" },
- { "linux-arm-gcc", "Linux (ARM, GCC compiler)" },
- { "ios-arm", "iOS - ARM" },
- { "ios-simulator", "iOS - Simulator" },
- { "tvos-arm64", "tvOS - ARM64" },
- { "tvos-simulator", "tvOS - Simulator" },
- { "mingw-gcc", "MinGW" },
- { "mingw-clang", "MinGW (clang compiler)" },
- { "nacl", "Native Client" },
- { "nacl-arm", "Native Client - ARM" },
- { "netbsd", "NetBSD" },
- { "osx", "OSX" },
- { "pnacl", "Native Client - PNaCl" },
- { "ps4", "PS4" },
- { "qnx-arm", "QNX/Blackberry - ARM" },
- { "rpi", "RaspberryPi" },
- },
- }
- newoption {
- trigger = "vs",
- value = "toolset",
- description = "Choose VS toolset",
- allowed = {
- { "vs2012-clang", "Clang 3.6" },
- { "vs2013-clang", "Clang 3.6" },
- { "vs2015-clang", "Clang 3.9" },
- { "vs2012-xp", "Visual Studio 2012 targeting XP" },
- { "vs2013-xp", "Visual Studio 2013 targeting XP" },
- { "vs2015-xp", "Visual Studio 2015 targeting XP" },
- { "winphone8", "Windows Phone 8.0" },
- { "winphone81", "Windows Phone 8.1" },
- { "winstore81", "Windows Store 8.1" },
- { "winstore82", "Universal Windows App" },
- { "durango", "Durango" },
- },
- }
- newoption {
- trigger = "xcode",
- value = "xcode_target",
- description = "Choose XCode target",
- allowed = {
- { "osx", "OSX" },
- { "ios", "iOS" },
- { "tvos", "tvOS" },
- }
- }
- newoption {
- trigger = "with-android",
- value = "#",
- description = "Set Android platform version (default: android-14).",
- }
- newoption {
- trigger = "with-ios",
- value = "#",
- description = "Set iOS target version (default: 8.0).",
- }
- newoption {
- trigger = "with-tvos",
- value = "#",
- description = "Set tvOS target version (default: 9.0).",
- }
- newoption {
- trigger = "with-dynamic-runtime",
- description = "Dynamically link with the runtime rather than statically",
- }
- -- Avoid error when invoking genie --help.
- if (_ACTION == nil) then return false end
- location (path.join(_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
- local iosPlatform = ""
- if _OPTIONS["with-ios"] then
- iosPlatform = _OPTIONS["with-ios"]
- end
- local tvosPlatform = ""
- if _OPTIONS["with-tvos"] then
- tvosPlatform = _OPTIONS["with-tvos"]
- 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 (path.join(_buildDir, "projects", _ACTION .. "-android-arm"))
- elseif "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 (path.join(_buildDir, "projects", _ACTION .. "-android-mips"))
- elseif "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 (path.join(_buildDir, "projects", _ACTION .. "-android-x86"))
- elseif "asmjs" == _OPTIONS["gcc"] then
- if not os.getenv("EMSCRIPTEN") then
- print("Set EMSCRIPTEN enviroment variable.")
- end
- premake.gcc.cc = "\"$(EMSCRIPTEN)/emcc\""
- premake.gcc.cxx = "\"$(EMSCRIPTEN)/em++\""
- premake.gcc.ar = "\"$(EMSCRIPTEN)/emar\""
- premake.gcc.llvm = true
- location (path.join(_buildDir, "projects", _ACTION .. "-asmjs"))
- elseif "freebsd" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-freebsd"))
- elseif "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 (path.join(_buildDir, "projects", _ACTION .. "-ios-arm"))
- elseif "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 (path.join(_buildDir, "projects", _ACTION .. "-ios-simulator"))
- elseif "tvos-arm64" == _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 (path.join(_buildDir, "projects", _ACTION .. "-tvos-arm64"))
- elseif "tvos-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 (path.join(_buildDir, "projects", _ACTION .. "-tvos-simulator"))
- elseif "linux-gcc" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
- elseif "linux-gcc-5" == _OPTIONS["gcc"] then
- premake.gcc.cc = "gcc-5"
- premake.gcc.cxx = "g++-5"
- premake.gcc.ar = "ar"
- location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
- elseif "linux-clang" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
- premake.gcc.ar = "ar"
- location (path.join(_buildDir, "projects", _ACTION .. "-linux-clang"))
- elseif "linux-mips-gcc" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-linux-mips-gcc"))
- elseif "linux-arm-gcc" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-linux-arm-gcc"))
- elseif "linux-steamlink" == _OPTIONS["gcc"] then
- if not os.getenv("MARVELL_SDK_PATH") then
- print("Set MARVELL_SDK_PATH enviroment variable.")
- end
- premake.gcc.cc = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-gcc"
- premake.gcc.cxx = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-g++"
- premake.gcc.ar = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-ar"
- location (path.join(_buildDir, "projects", _ACTION .. "-linux-steamlink"))
- elseif "mingw-gcc" == _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 (path.join(_buildDir, "projects", _ACTION .. "-mingw-gcc"))
- elseif "mingw-clang" == _OPTIONS["gcc"] then
- premake.gcc.cc = "$(CLANG)/bin/clang"
- premake.gcc.cxx = "$(CLANG)/bin/clang++"
- premake.gcc.ar = "$(MINGW)/bin/ar"
- -- premake.gcc.ar = "$(CLANG)/bin/llvm-ar"
- -- premake.gcc.llvm = true
- location (path.join(_buildDir, "projects", _ACTION .. "-mingw-clang"))
- elseif "nacl" == _OPTIONS["gcc"] then
- if not os.getenv("NACL_SDK_ROOT") then
- print("Set NACL_SDK_ROOT enviroment variable.")
- 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 (path.join(_buildDir, "projects", _ACTION .. "-nacl"))
- elseif "nacl-arm" == _OPTIONS["gcc"] then
- if not os.getenv("NACL_SDK_ROOT") then
- print("Set NACL_SDK_ROOT enviroment variable.")
- 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 (path.join(_buildDir, "projects", _ACTION .. "-nacl-arm"))
- elseif "netbsd" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-netbsd"))
- elseif "osx" == _OPTIONS["gcc"] then
- if os.is("linux") then
- local osxToolchain = "x86_64-apple-darwin13-"
- premake.gcc.cc = osxToolchain .. "clang"
- premake.gcc.cxx = osxToolchain .. "clang++"
- premake.gcc.ar = osxToolchain .. "ar"
- end
- location (path.join(_buildDir, "projects", _ACTION .. "-osx"))
- elseif "pnacl" == _OPTIONS["gcc"] then
- if not os.getenv("NACL_SDK_ROOT") then
- print("Set NACL_SDK_ROOT enviroment variable.")
- 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 (path.join(_buildDir, "projects", _ACTION .. "-pnacl"))
- elseif "ps4" == _OPTIONS["gcc"] then
- if not os.getenv("PS4_SDK_ROOT") then
- print("Set PS4_SDK_ROOT enviroment variable.")
- end
- ps4Toolchain = "$(PS4_SDK_ROOT)/host_tools/bin/orbis-"
- premake.gcc.cc = ps4Toolchain .. "clang"
- premake.gcc.cxx = ps4Toolchain .. "clang++"
- premake.gcc.ar = ps4Toolchain .. "ar"
- location (path.join(_buildDir, "projects", _ACTION .. "-ps4"))
- elseif "qnx-arm" == _OPTIONS["gcc"] then
- if not os.getenv("QNX_HOST") then
- print("Set QNX_HOST enviroment variable.")
- 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 (path.join(_buildDir, "projects", _ACTION .. "-qnx-arm"))
- elseif "rpi" == _OPTIONS["gcc"] then
- location (path.join(_buildDir, "projects", _ACTION .. "-rpi"))
- elseif "riscv" == _OPTIONS["gcc"] then
- premake.gcc.cc = "$(RISCV_DIR)/bin/riscv64-unknown-elf-gcc"
- premake.gcc.cxx = "$(RISCV_DIR)/bin/riscv64-unknown-elf-g++"
- premake.gcc.ar = "$(RISCV_DIR)/bin/riscv64-unknown-elf-ar"
- location (path.join(_buildDir, "projects", _ACTION .. "-riscv"))
- end
- elseif _ACTION == "vs2012" or _ACTION == "vs2013" or _ACTION == "vs2015" then
- if (_ACTION .. "-clang") == _OPTIONS["vs"] then
- if "vs2015-clang" == _OPTIONS["vs"] then
- premake.vstudio.toolset = ("LLVM-vs2014")
- else
- premake.vstudio.toolset = ("LLVM-" .. _ACTION)
- end
- location (path.join(_buildDir, "projects", _ACTION .. "-clang"))
- elseif "winphone8" == _OPTIONS["vs"] then
- premake.vstudio.toolset = "v110_wp80"
- location (path.join(_buildDir, "projects", _ACTION .. "-winphone8"))
- elseif "winphone81" == _OPTIONS["vs"] then
- premake.vstudio.toolset = "v120_wp81"
- premake.vstudio.storeapp = "8.1"
- platforms { "ARM" }
- location (path.join(_buildDir, "projects", _ACTION .. "-winphone81"))
- elseif "winstore81" == _OPTIONS["vs"] then
- premake.vstudio.toolset = "v120"
- premake.vstudio.storeapp = "8.1"
- platforms { "ARM" }
- location (path.join(_buildDir, "projects", _ACTION .. "-winstore81"))
- elseif "winstore82" == _OPTIONS["vs"] then
- premake.vstudio.toolset = "v140"
- premake.vstudio.storeapp = "8.2"
- platforms { "ARM" }
- location (path.join(_buildDir, "projects", _ACTION .. "-winstore82"))
- elseif "durango" == _OPTIONS["vs"] then
- if not os.getenv("DurangoXDK") then
- print("DurangoXDK not found.")
- end
- premake.vstudio.toolset = "v140"
- premake.vstudio.storeapp = "durango"
- platforms { "Durango" }
- location (path.join(_buildDir, "projects", _ACTION .. "-durango"))
- end
- elseif ("vs2012-xp") == _OPTIONS["vs"] then
- premake.vstudio.toolset = ("v110_xp")
- location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
- elseif "vs2013-xp" == _OPTIONS["vs"] then
- premake.vstudio.toolset = ("v120_xp")
- location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
- elseif "vs2015-xp" == _OPTIONS["vs"] then
- premake.vstudio.toolset = ("v140_xp")
- location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
- elseif _ACTION == "xcode4" then
- if "osx" == _OPTIONS["xcode"] then
- premake.xcode.toolset = "macosx"
- location (path.join(_buildDir, "projects", _ACTION .. "-osx"))
- elseif "ios" == _OPTIONS["xcode"] then
- premake.xcode.toolset = "iphoneos"
- location (path.join(_buildDir, "projects", _ACTION .. "-ios"))
- elseif "tvos" == _OPTIONS["xcode"] then
- premake.xcode.toolset = "appletvos"
- location (path.join(_buildDir, "projects", _ACTION .. "-tvos"))
- end
- end
- if not _OPTIONS["with-dynamic-runtime"] then
- flags { "StaticRuntime" }
- end
- flags {
- "NoPCH",
- "NativeWChar",
- "NoRTTI",
- "NoExceptions",
- "NoEditAndContinue",
- "NoFramePointer",
- "Symbols",
- }
- defines {
- "__STDC_LIMIT_MACROS",
- "__STDC_FORMAT_MACROS",
- "__STDC_CONSTANT_MACROS",
- }
- configuration { "Debug" }
- targetsuffix "Debug"
- configuration { "Release" }
- flags {
- "NoBufferSecurityCheck",
- "OptimizeSpeed",
- }
- targetsuffix "Release"
- configuration { "vs*", "x32" }
- flags {
- "EnableSSE2",
- }
- configuration { "vs*" }
- includedirs { path.join(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 {
- "/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 { path.join(bxDir, "include/compat/msvc/pre1600") }
- configuration { "x32", "vs*" }
- targetdir (path.join(_buildDir, "win32_" .. _ACTION, "bin"))
- objdir (path.join(_buildDir, "win32_" .. _ACTION, "obj"))
- libdirs {
- path.join(_libDir, "lib/win32_" .. _ACTION),
- }
- configuration { "x64", "vs*" }
- defines { "_WIN64" }
- targetdir (path.join(_buildDir, "win64_" .. _ACTION, "bin"))
- objdir (path.join(_buildDir, "win64_" .. _ACTION, "obj"))
- libdirs {
- path.join(_libDir, "lib/win64_" .. _ACTION),
- }
- configuration { "ARM", "vs*" }
- targetdir (path.join(_buildDir, "arm_" .. _ACTION, "bin"))
- objdir (path.join(_buildDir, "arm_" .. _ACTION, "obj"))
- configuration { "vs*-clang" }
- buildoptions {
- "-Qunused-arguments",
- }
- configuration { "x32", "vs*-clang" }
- targetdir (path.join(_buildDir, "win32_" .. _ACTION .. "-clang/bin"))
- objdir (path.join(_buildDir, "win32_" .. _ACTION .. "-clang/obj"))
- configuration { "x64", "vs*-clang" }
- targetdir (path.join(_buildDir, "win64_" .. _ACTION .. "-clang/bin"))
- objdir (path.join(_buildDir, "win64_" .. _ACTION .. "-clang/obj"))
- configuration { "winphone8* or winstore8*" }
- removeflags {
- "StaticRuntime",
- "NoExceptions",
- }
- configuration { "*-gcc* or osx" }
- buildoptions {
- "-Wshadow",
- }
- configuration { "mingw-*" }
- defines { "WIN32" }
- includedirs { path.join(bxDir, "include/compat/mingw") }
- buildoptions {
- "-Wunused-value",
- "-fdata-sections",
- "-ffunction-sections",
- "-msse2",
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- linkoptions {
- "-Wl,--gc-sections",
- "-static",
- "-static-libgcc",
- "-static-libstdc++",
- }
- configuration { "x32", "mingw-gcc" }
- targetdir (path.join(_buildDir, "win32_mingw-gcc/bin"))
- objdir (path.join(_buildDir, "win32_mingw-gcc/obj"))
- libdirs {
- path.join(_libDir, "lib/win32_mingw-gcc"),
- }
- buildoptions {
- "-m32",
- "-mstackrealign",
- }
- configuration { "x64", "mingw-gcc" }
- targetdir (path.join(_buildDir, "win64_mingw-gcc/bin"))
- objdir (path.join(_buildDir, "win64_mingw-gcc/obj"))
- libdirs {
- path.join(_libDir, "lib/win64_mingw-gcc"),
- }
- buildoptions { "-m64" }
- configuration { "mingw-clang" }
- buildoptions {
- "-isystem$(MINGW)/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++",
- "-isystem$(MINGW)/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32",
- "-isystem$(MINGW)/x86_64-w64-mingw32/include",
- }
- linkoptions {
- "-Qunused-arguments",
- "-Wno-error=unused-command-line-argument-hard-error-in-future",
- }
- configuration { "x32", "mingw-clang" }
- targetdir (path.join(_buildDir, "win32_mingw-clang/bin"))
- objdir (path.join(_buildDir, "win32_mingw-clang/obj"))
- libdirs {
- path.join(_libDir, "lib/win32_mingw-clang"),
- }
- buildoptions { "-m32" }
- configuration { "x64", "mingw-clang" }
- targetdir (path.join(_buildDir, "win64_mingw-clang/bin"))
- objdir (path.join(_buildDir, "win64_mingw-clang/obj"))
- libdirs {
- path.join(_libDir, "lib/win64_mingw-clang"),
- }
- buildoptions { "-m64" }
- configuration { "linux-clang" }
- configuration { "linux-gcc-5" }
- buildoptions {
- -- "-fno-omit-frame-pointer",
- -- "-fsanitize=address",
- -- "-fsanitize=undefined",
- -- "-fsanitize=float-divide-by-zero",
- -- "-fsanitize=float-cast-overflow",
- }
- links {
- -- "asan",
- -- "ubsan",
- }
- configuration { "linux-gcc" }
- buildoptions {
- "-mfpmath=sse",
- }
- configuration { "linux-gcc or linux-clang" }
- buildoptions {
- "-msse2",
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- links {
- "rt",
- "dl",
- }
- linkoptions {
- "-Wl,--gc-sections",
- }
- configuration { "linux-gcc*", "x32" }
- targetdir (path.join(_buildDir, "linux32_gcc/bin"))
- objdir (path.join(_buildDir, "linux32_gcc/obj"))
- libdirs { path.join(_libDir, "lib/linux32_gcc") }
- buildoptions {
- "-m32",
- }
- configuration { "linux-gcc*", "x64" }
- targetdir (path.join(_buildDir, "linux64_gcc/bin"))
- objdir (path.join(_buildDir, "linux64_gcc/obj"))
- libdirs { path.join(_libDir, "lib/linux64_gcc") }
- buildoptions {
- "-m64",
- }
- configuration { "linux-clang", "x32" }
- targetdir (path.join(_buildDir, "linux32_clang/bin"))
- objdir (path.join(_buildDir, "linux32_clang/obj"))
- libdirs { path.join(_libDir, "lib/linux32_clang") }
- buildoptions {
- "-m32",
- }
- configuration { "linux-clang", "x64" }
- targetdir (path.join(_buildDir, "linux64_clang/bin"))
- objdir (path.join(_buildDir, "linux64_clang/obj"))
- libdirs { path.join(_libDir, "lib/linux64_clang") }
- buildoptions {
- "-m64",
- }
- configuration { "linux-mips-gcc" }
- targetdir (path.join(_buildDir, "linux32_mips_gcc/bin"))
- objdir (path.join(_buildDir, "linux32_mips_gcc/obj"))
- libdirs { path.join(_libDir, "lib/linux32_mips_gcc") }
- buildoptions {
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- links {
- "rt",
- "dl",
- }
- linkoptions {
- "-Wl,--gc-sections",
- }
- configuration { "linux-arm-gcc" }
- targetdir (path.join(_buildDir, "linux32_arm_gcc/bin"))
- objdir (path.join(_buildDir, "linux32_arm_gcc/obj"))
- libdirs { path.join(_libDir, "lib/linux32_arm_gcc") }
- buildoptions {
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- links {
- "rt",
- "dl",
- }
- linkoptions {
- "-Wl,--gc-sections",
- }
- configuration { "android-*" }
- targetprefix ("lib")
- 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",
- "-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",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- linkoptions {
- "-no-canonical-prefixes",
- "-Wl,--no-undefined",
- "-Wl,-z,noexecstack",
- "-Wl,-z,relro",
- "-Wl,-z,now",
- }
- configuration { "linux-steamlink" }
- targetdir (path.join(_buildDir, "steamlink/bin"))
- objdir (path.join(_buildDir, "steamlink/obj"))
- libdirs { path.join(_libDir, "lib/steamlink") }
- includedirs { path.join(bxDir, "include/compat/linux") }
- defines {
- "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
- }
- buildoptions {
- "-std=c++0x",
- "-Wfatal-errors",
- "-Wunused-value",
- "-Wundef",
- "-pthread",
- "-marm",
- "-mfloat-abi=hard",
- "--sysroot=$(MARVELL_SDK_PATH)/rootfs",
- }
- linkoptions {
- "-static-libgcc",
- "-static-libstdc++",
- "--sysroot=$(MARVELL_SDK_PATH)/rootfs",
- }
- configuration { "android-arm" }
- targetdir (path.join(_buildDir, "android-arm/bin"))
- objdir (path.join(_buildDir, "android-arm/obj"))
- libdirs {
- path.join(_libDir, "lib/android-arm"),
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a",
- }
- includedirs {
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include",
- "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include",
- }
- buildoptions {
- "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-arm"),
- "-mthumb",
- "-march=armv7-a",
- "-mfloat-abi=softfp",
- "-mfpu=neon",
- "-Wunused-value",
- "-Wundef",
- }
- linkoptions {
- "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-arm"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-arm/usr/lib/crtbegin_so.o"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-arm/usr/lib/crtend_so.o"),
- "-march=armv7-a",
- "-Wl,--fix-cortex-a8",
- }
- configuration { "android-mips" }
- targetdir (path.join(_buildDir, "android-mips/bin"))
- objdir (path.join(_buildDir, "android-mips/obj"))
- libdirs {
- path.join(_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=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips"),
- "-Wunused-value",
- "-Wundef",
- }
- linkoptions {
- "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips/usr/lib/crtbegin_so.o"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips/usr/lib/crtend_so.o"),
- }
- configuration { "android-x86" }
- targetdir (path.join(_buildDir, "android-x86/bin"))
- objdir (path.join(_buildDir, "android-x86/obj"))
- libdirs {
- path.join(_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=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-x86"),
- "-march=i686",
- "-mtune=atom",
- "-mstackrealign",
- "-msse3",
- "-mfpmath=sse",
- "-Wunused-value",
- "-Wundef",
- }
- linkoptions {
- "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-x86"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-x86/usr/lib/crtbegin_so.o"),
- path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-x86/usr/lib/crtend_so.o"),
- }
- configuration { "asmjs" }
- targetdir (path.join(_buildDir, "asmjs/bin"))
- objdir (path.join(_buildDir, "asmjs/obj"))
- libdirs { path.join(_libDir, "lib/asmjs") }
- buildoptions {
- "-i\"system$(EMSCRIPTEN)/system/include\"",
- "-i\"system$(EMSCRIPTEN)/system/include/libc\"",
- "-Wunused-value",
- "-Wundef",
- }
- configuration { "freebsd" }
- targetdir (path.join(_buildDir, "freebsd/bin"))
- objdir (path.join(_buildDir, "freebsd/obj"))
- libdirs { path.join(_libDir, "lib/freebsd") }
- includedirs {
- path.join(bxDir, "include/compat/freebsd"),
- }
- configuration { "nacl or nacl-arm or pnacl" }
- buildoptions {
- "-U__STRICT_ANSI__", -- strcasecmp, setenv, unsetenv,...
- "-fno-stack-protector",
- "-fdiagnostics-show-option",
- "-fdata-sections",
- "-ffunction-sections",
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- includedirs {
- "$(NACL_SDK_ROOT)/include",
- path.join(bxDir, "include/compat/nacl"),
- }
- configuration { "nacl" }
- buildoptions {
- "-pthread",
- "-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic.
- "-msse2",
- }
- linkoptions {
- "-Wl,--gc-sections",
- }
- configuration { "x32", "nacl" }
- targetdir (path.join(_buildDir, "nacl-x86/bin"))
- objdir (path.join(_buildDir, "nacl-x86/obj"))
- libdirs { path.join(_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 (path.join(_buildDir, "nacl-x64/bin"))
- objdir (path.join(_buildDir, "nacl-x64/obj"))
- libdirs { path.join(_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 {
- "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
- }
- targetdir (path.join(_buildDir, "nacl-arm/bin"))
- objdir (path.join(_buildDir, "nacl-arm/obj"))
- libdirs { path.join(_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" }
- targetdir (path.join(_buildDir, "pnacl/bin"))
- objdir (path.join(_buildDir, "pnacl/obj"))
- libdirs { path.join(_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 (path.join(_buildDir, "xbox360/bin"))
- objdir (path.join(_buildDir, "xbox360/obj"))
- includedirs { path.join(bxDir, "include/compat/msvc") }
- libdirs { path.join(_libDir, "lib/xbox360") }
- defines {
- "NOMINMAX",
- }
- configuration { "durango" }
- targetdir (path.join(_buildDir, "durango/bin"))
- objdir (path.join(_buildDir, "durango/obj"))
- includedirs { path.join(bxDir, "include/compat/msvc") }
- libdirs { path.join(_libDir, "lib/durango") }
- removeflags { "StaticRuntime" }
- defines {
- "NOMINMAX",
- }
- configuration { "netbsd" }
- targetdir (path.join(_buildDir, "netbsd/bin"))
- objdir (path.join(_buildDir, "netbsd/obj"))
- libdirs { path.join(_libDir, "lib/netbsd") }
- includedirs {
- path.join(bxDir, "include/compat/freebsd"),
- }
- configuration { "osx", "x32" }
- targetdir (path.join(_buildDir, "osx32_clang/bin"))
- objdir (path.join(_buildDir, "osx32_clang/obj"))
- --libdirs { path.join(_libDir, "lib/osx32_clang") }
- buildoptions {
- "-m32",
- }
- configuration { "osx", "x64" }
- targetdir (path.join(_buildDir, "osx64_clang/bin"))
- objdir (path.join(_buildDir, "osx64_clang/obj"))
- --libdirs { path.join(_libDir, "lib/osx64_clang") }
- buildoptions {
- "-m64",
- }
- configuration { "osx", "Universal" }
- targetdir (path.join(_buildDir, "osx_universal/bin"))
- objdir (path.join(_buildDir, "osx_universal/bin"))
- configuration { "osx" }
- buildoptions {
- "-Wfatal-errors",
- "-msse2",
- "-Wunused-value",
- "-Wundef",
- }
- includedirs { path.join(bxDir, "include/compat/osx") }
- configuration { "ios*" }
- linkoptions {
- "-lc++",
- }
- buildoptions {
- "-Wfatal-errors",
- "-Wunused-value",
- "-Wundef",
- }
- includedirs { path.join(bxDir, "include/compat/ios") }
- configuration { "xcode4", "ios*" }
- targetdir (path.join(_buildDir, "ios-arm/bin"))
- objdir (path.join(_buildDir, "ios-arm/obj"))
- configuration { "ios-arm" }
- targetdir (path.join(_buildDir, "ios-arm/bin"))
- objdir (path.join(_buildDir, "ios-arm/obj"))
- libdirs { path.join(_libDir, "lib/ios-arm") }
- linkoptions {
- "-miphoneos-version-min=7.0",
- "-arch armv7",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS" ..iosPlatform .. ".sdk",
- "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS" ..iosPlatform .. ".sdk/usr/lib/system",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS" ..iosPlatform .. ".sdk/System/Library/Frameworks",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS" ..iosPlatform .. ".sdk/System/Library/PrivateFrameworks",
- }
- buildoptions {
- "-miphoneos-version-min=7.0",
- "-arch armv7",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS" ..iosPlatform .. ".sdk",
- }
- configuration { "ios-simulator" }
- targetdir (path.join(_buildDir, "ios-simulator/bin"))
- objdir (path.join(_buildDir, "ios-simulator/obj"))
- libdirs { path.join(_libDir, "lib/ios-simulator") }
- linkoptions {
- "-mios-simulator-version-min=7.0",
- "-arch i386",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk",
- "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/usr/lib/system",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/System/Library/Frameworks",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/System/Library/PrivateFrameworks",
- }
- buildoptions {
- "-mios-simulator-version-min=7.0",
- "-arch i386",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk",
- }
- configuration { "tvos*" }
- linkoptions {
- "-lc++",
- }
- buildoptions {
- "-Wfatal-errors",
- "-Wunused-value",
- "-Wundef",
- }
- includedirs { path.join(bxDir, "include/compat/ios") }
- configuration { "xcode4", "tvos*" }
- targetdir (path.join(_buildDir, "tvos-arm64/bin"))
- objdir (path.join(_buildDir, "tvos-arm64/obj"))
- configuration { "tvos-arm64" }
- targetdir (path.join(_buildDir, "tvos-arm64/bin"))
- objdir (path.join(_buildDir, "tvos-arm64/obj"))
- libdirs { path.join(_libDir, "lib/tvos-arm64") }
- linkoptions {
- "-mtvos-version-min=9.0",
- "-arch arm64",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS" ..tvosPlatform .. ".sdk",
- "-L/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS" ..tvosPlatform .. ".sdk/usr/lib/system",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS" ..tvosPlatform .. ".sdk/System/Library/Frameworks",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS" ..tvosPlatform .. ".sdk/System/Library/PrivateFrameworks",
- }
- buildoptions {
- "-mtvos-version-min=9.0",
- "-arch arm64",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS" ..tvosPlatform .. ".sdk",
- }
- configuration { "tvos-simulator" }
- targetdir (path.join(_buildDir, "tvos-simulator/bin"))
- objdir (path.join(_buildDir, "tvos-simulator/obj"))
- libdirs { path.join(_libDir, "lib/tvos-simulator") }
- linkoptions {
- "-mtvos-simulator-version-min=9.0",
- "-arch i386",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator" ..tvosPlatform .. ".sdk",
- "-L/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator" ..tvosPlatform .. ".sdk/usr/lib/system",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator" ..tvosPlatform .. ".sdk/System/Library/Frameworks",
- "-F/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator" ..tvosPlatform .. ".sdk/System/Library/PrivateFrameworks",
- }
- buildoptions {
- "-mtvos-simulator-version-min=9.0",
- "-arch i386",
- "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator" ..tvosPlatform .. ".sdk",
- }
- configuration { "ps4" }
- targetdir (path.join(_buildDir, "ps4/bin"))
- objdir (path.join(_buildDir, "ps4/obj"))
- libdirs { path.join(_libDir, "lib/ps4") }
- includedirs {
- path.join(bxDir, "include/compat/freebsd"),
- "$(PS4_SDK_ROOT)/target/include",
- "$(PS4_SDK_ROOT)/target/include_common",
- }
- buildoptions {
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- linkoptions {
- }
- configuration { "qnx-arm" }
- targetdir (path.join(_buildDir, "qnx-arm/bin"))
- objdir (path.join(_buildDir, "qnx-arm/obj"))
- libdirs { path.join(_libDir, "lib/qnx-arm") }
- -- includedirs { path.join(bxDir, "include/compat/qnx") }
- buildoptions {
- "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- configuration { "rpi" }
- targetdir (path.join(_buildDir, "rpi/bin"))
- objdir (path.join(_buildDir, "rpi/obj"))
- libdirs {
- path.join(_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 {
- "-Wunused-value",
- "-Wundef",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- includedirs {
- "/opt/vc/include",
- "/opt/vc/include/interface/vcos/pthreads",
- "/opt/vc/include/interface/vmcs_host/linux",
- }
- links {
- "rt",
- }
- linkoptions {
- "-Wl,--gc-sections",
- }
- configuration { "riscv" }
- targetdir (path.join(_buildDir, "riscv/bin"))
- objdir (path.join(_buildDir, "riscv/obj"))
- includedirs {
- "$(RISCV_DIR)/sysroot/usr/include",
- }
- buildoptions {
- "-Wunused-value",
- "-Wundef",
- "--sysroot=$(RISCV_DIR)/sysroot",
- }
- buildoptions_cpp {
- "-std=c++0x",
- }
- configuration {} -- reset configuration
- return true
- end
- function strip()
- configuration { "android-arm", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-strip -s \"$(TARGET)\""
- }
- configuration { "android-mips", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-strip -s \"$(TARGET)\""
- }
- configuration { "android-x86", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(ANDROID_NDK_X86)/bin/i686-linux-android-strip -s \"$(TARGET)\""
- }
- configuration { "linux-steamlink", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-strip -s \"$(TARGET)\""
- }
- configuration { "linux-* or rpi", "not linux-steamlink", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) strip -s \"$(TARGET)\""
- }
- configuration { "mingw*", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) $(MINGW)/bin/strip -s \"$(TARGET)\""
- }
- configuration { "pnacl" }
- postbuildcommands {
- "$(SILENT) echo Running pnacl-finalize.",
- "$(SILENT) " .. naclToolchain .. "finalize \"$(TARGET)\""
- }
- configuration { "*nacl*", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. naclToolchain .. "strip -s \"$(TARGET)\""
- }
- configuration { "asmjs" }
- postbuildcommands {
- "$(SILENT) echo Running asmjs finalize.",
- "$(SILENT) \"$(EMSCRIPTEN)/emcc\" -O2 "
- -- .. "-s EMTERPRETIFY=1 "
- -- .. "-s EMTERPRETIFY_ASYNC=1 "
- .. "-s TOTAL_MEMORY=268435456 "
- -- .. "-s ALLOW_MEMORY_GROWTH=1 "
- -- .. "-s USE_WEBGL2=1 "
- .. "--memory-init-file 1 "
- .. "\"$(TARGET)\" -o \"$(TARGET)\".html "
- -- .. "--preload-file ../../../examples/runtime@/"
- }
- configuration {} -- reset configuration
- end
|