diff --git a/makefile b/makefile index 620fff50399..7818353125d 100644 --- a/makefile +++ b/makefile @@ -1178,6 +1178,32 @@ os2_x86: generate $(PROJECTDIR)/gmake-os2/Makefile $(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-os2 config=$(CONFIG)32 +#------------------------------------------------- +# gmake-steamlink +#------------------------------------------------- + +$(PROJECTDIR)/gmake-steamlink/Makefile: makefile $(SCRIPTS) $(GENIE) +ifndef MARVELL_SDK_PATH + $(error MARVELL_SDK_PATH is not set) +endif +ifndef MARVELL_ROOTFS + $(error MARVELL_ROOTFS is not set) +endif + $(SILENT) $(GENIE) $(PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --USE_BGFX=0 --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr gmake + +.PHONY: steamlink +ifndef MARVELL_SDK_PATH + $(error MARVELL_SDK_PATH is not set) +endif +ifndef MARVELL_ROOTFS + $(error MARVELL_ROOTFS is not set) +endif +steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) + + + #------------------------------------------------- # cmake #------------------------------------------------- diff --git a/scripts/genie.lua b/scripts/genie.lua index cc34fb8c18d..2fcfb323653 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -108,6 +108,7 @@ newoption { { "os2", "OS/2 eComStation" }, { "haiku", "Haiku" }, { "solaris", "Solaris SunOS" }, + { "steamlink", "Steam Link" }, }, } @@ -1052,6 +1053,15 @@ configuration { "linux-*" } end + +configuration { "steamlink" } + links { + "dl", + } + defines { + "EGL_API_FB", + } + configuration { "osx*" } links { "pthread", diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 9c8b78ee485..7fad61ce928 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -32,6 +32,7 @@ newoption { { "qnx-arm", "QNX/Blackberry - ARM" }, { "rpi", "RaspberryPi" }, { "solaris", "Solaris" }, + { "steamlink", "Steam Link" }, }, } @@ -189,8 +190,18 @@ function toolchain(_buildDir, _subDir) location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux-clang") end + if "steamlink" == _OPTIONS["gcc"] then + if not os.getenv("MARVELL_SDK_PATH") then + print("Set MARVELL_SDK_PATH envrionment 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 (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink") + end + if "mingw32-gcc" == _OPTIONS["gcc"] then - if not os.getenv("MINGW32") or not os.getenv("MINGW32") then + if not os.getenv("MINGW32") then print("Set MINGW32 envrionment variable.") end premake.gcc.cc = "$(MINGW32)/bin/i686-w64-mingw32-gcc" @@ -207,7 +218,7 @@ function toolchain(_buildDir, _subDir) end if "mingw64-gcc" == _OPTIONS["gcc"] then - if not os.getenv("MINGW64") or not os.getenv("MINGW64") then + if not os.getenv("MINGW64") then print("Set MINGW64 envrionment variable.") end premake.gcc.cc = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc" @@ -483,6 +494,26 @@ function toolchain(_buildDir, _subDir) configuration { "x64", "mingw64-gcc", "Debug" } targetdir (_buildDir .. "mingw-gcc" .. "/bin/x64/Debug") + configuration { "steamlink" } + objdir ( _buildDir .. "steamlink/obj") + + buildoptions { + "-marm", + "-mfloat-abi=hard", + "--sysroot=$(MARVELL_SDK_PATH)/rootfs", + } + linkoptions { + "-static-libgcc", + "-static-libstdc++", + "--sysroot=$(MARVELL_SDK_PATH)/rootfs", + } + + configuration { "steamlink", "Release" } + targetdir (_buildDir .. "steamlink/bin/Release") + + configuration { "steamlink", "Debug" } + targetdir (_buildDir .. "steamlink/bin/Debug") + configuration { "mingw-clang" } linkoptions { "-Wl,--allow-multiple-definition", @@ -496,7 +527,7 @@ function toolchain(_buildDir, _subDir) targetdir (_buildDir .. "mingw-clang/bin/x32/Release") configuration { "x32", "mingw-clang", "Debug" } - targetdir (_buildDir .. "win32_mingw-clang/bin/x32/Debug") + targetdir (_buildDir .. "mingw-clang/bin/x32/Debug") configuration { "x64", "mingw-clang" } objdir (_buildDir .. "mingw-clang/obj")