From f12fc190a4e6907a6107e19b80c6efb81dca1814 Mon Sep 17 00:00:00 2001 From: rock88 Date: Tue, 5 May 2020 23:39:38 +0300 Subject: [PATCH] Fix build --- Makefile | 14 +++++++------- build_opus_lakka_switch.sh | 10 +++++----- moonlight.xcodeproj/project.pbxproj | 4 ++++ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 7e014c3..0808796 100755 --- a/Makefile +++ b/Makefile @@ -53,16 +53,15 @@ else ifneq (,$(findstring osx,$(platform))) fpic += -mmacosx-version-min=10.12 # Lakka Switch else ifeq ($(platform), lakka-switch) - LAKKA_ROOT := /home/rock88/Documents/Lakka-LibreELEC/build.Lakka-L4T.aarch64-2.2-devel - LAKKA_TOOLCHAIN := $(LAKKA_ROOT)/toolchain - CC = $(LAKKA_TOOLCHAIN)/bin/aarch64-libreelec-linux-gnueabi-gcc - CXX = $(LAKKA_TOOLCHAIN)/bin/aarch64-libreelec-linux-gnueabi-c++ + TOOLCHAIN := /home/rock88/Documents/Lakka-LibreELEC/build.Lakka-L4T.aarch64-2.2-devel/toolchain + CC = $(TOOLCHAIN)/bin/aarch64-libreelec-linux-gnueabi-gcc + CXX = $(TOOLCHAIN)/bin/aarch64-libreelec-linux-gnueabi-c++ TARGET := $(TARGET_NAME)_libretro.so DEFINES += -mcpu=cortex-a57+crypto+crc+fp+simd -mabi=lp64 -Wno-psabi -mtune=cortex-a57 \ -march=armv8-a+crypto+crc+fp+simd -fomit-frame-pointer -Wall -pipe -fPIC -pthread \ -D__LAKKA_SWITCH__ - INCLUDES += -I$(LAKKA_TOOLCHAIN)/aarch64-libreelec-linux-gnueabi/sysroot/usr/include \ - -I$(LAKKA_TOOLCHAIN)/include -Ithird_party/opus/include + INCLUDES += -I$(TOOLCHAIN)/aarch64-libreelec-linux-gnueabi/sysroot/usr/include \ + -I$(TOOLCHAIN)/include -Ithird_party/opus/include LIBS += -lpthread -lGL -luuid -Lthird_party/opus/lib SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined else @@ -193,7 +192,8 @@ INCLUDES += \ -Ithird_party/moonlight-common-c/src \ -Ithird_party/moonlight-common-c/enet/include \ -Ithird_party/nanogui/include \ - -Ithird_party/nanogui/ext/nanovg/src + -Ithird_party/nanogui/ext/nanovg/src \ + -Ithird_party/json/single_include/nlohmann C_SOURCES = $(LIBGAMESTREAM_SOURCES) $(MOONLIGHT_LIBRETRO_C_SOURCES) $(MOONLIGHT_COMMON_C_SOURCES) $(NANOGUI_C_SOURCES) CXX_SOURCES = $(MOONLIGHT_LIBRETRO_CXX_SOURCES) $(NANOGUI_CXX_SOURCES) diff --git a/build_opus_lakka_switch.sh b/build_opus_lakka_switch.sh index 48ec738..85c3388 100755 --- a/build_opus_lakka_switch.sh +++ b/build_opus_lakka_switch.sh @@ -5,13 +5,13 @@ git clone https://github.com/xiph/opus.git opus_tmp cd opus_tmp ./autogen.sh -# Fix LAKKA_TOOLCHAIN path! -LAKKA_TOOLCHAIN=/home/rock88/Documents/Lakka-LibreELEC/build.Lakka-L4T.aarch64-2.2-devel/toolchain +# Fix TOOLCHAIN path! +TOOLCHAIN=/home/rock88/Documents/Lakka-LibreELEC/build.Lakka-L4T.aarch64-2.2-devel/toolchain CFLAGS='-mcpu=cortex-a57+crypto+crc+fp+simd -mabi=lp64 -Wno-psabi -mtune=cortex-a57 -march=armv8-a+crypto+crc+fp+simd -fomit-frame-pointer -Wall -pipe -O2 -mcpu=cortex-a57 -fPIC' \ ASFLAGS='-mcpu=cortex-a57+crypto+crc+fp+simd -mabi=lp64 -Wno-psabi -mtune=cortex-a57 -march=armv8-a+crypto+crc+fp+simd -fomit-frame-pointer -Wall -pipe -O2 -mcpu=cortex-a57 -fPIC' \ -CC=$LAKKA_TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-gcc \ -LD=$LAKKA_TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-ld \ -AR=$LAKKA_TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-ar \ +CC=$TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-gcc \ +LD=$TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-ld \ +AR=$TOOLCHAIN/bin/aarch64-libreelec-linux-gnueabi-ar \ ./configure --host=aarch64-libreelec-linux-gnueabi --prefix=$INSTALL_DIR make install cd .. diff --git a/moonlight.xcodeproj/project.pbxproj b/moonlight.xcodeproj/project.pbxproj index 9f336f2..8a22d85 100644 --- a/moonlight.xcodeproj/project.pbxproj +++ b/moonlight.xcodeproj/project.pbxproj @@ -282,6 +282,7 @@ 36A0C0392461E4C00083289C /* SettingsWindow.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = SettingsWindow.hpp; sourceTree = ""; }; 36A0C03B2461F03C0083289C /* Settings.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Settings.cpp; sourceTree = ""; }; 36A0C03C2461F03C0083289C /* Settings.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Settings.hpp; sourceTree = ""; }; + 36A0C03E2461FFF10083289C /* build_opus_lakka_switch.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_opus_lakka_switch.sh; sourceTree = ""; }; 36A5630B245F194000901354 /* gl_render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gl_render.h; sourceTree = ""; }; 36A5630C245F194000901354 /* gl_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_render.c; sourceTree = ""; }; 36A5630D245F194000901354 /* audio_decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_decoder.h; sourceTree = ""; }; @@ -646,6 +647,7 @@ isa = PBXGroup; children = ( 3602C3C0245DC7E300368900 /* Makefile */, + 36A0C03E2461FFF10083289C /* build_opus_lakka_switch.sh */, 3652F006245C2918001FABF3 /* libgamestream */, 36B406932459F41E005BD903 /* src */, 36DFDCF62459F80600FC51CE /* third_party */, @@ -951,6 +953,7 @@ "\"$(SRCROOT)/src/nanogui_resources\"", "\"$(SRCROOT)/third_party/moonlight-common-c/enet/include\"", "\"$(SRCROOT)/third_party/moonlight-common-c/src\"", + "\"$(SRCROOT)/third_party/json/single_include/nlohmann\"", ); LIBRARY_SEARCH_PATHS = ( /usr/local/lib, @@ -1040,6 +1043,7 @@ "\"$(SRCROOT)/src/nanogui_resources\"", "\"$(SRCROOT)/third_party/moonlight-common-c/enet/include\"", "\"$(SRCROOT)/third_party/moonlight-common-c/src\"", + "\"$(SRCROOT)/third_party/json/single_include/nlohmann\"", ); LIBRARY_SEARCH_PATHS = ( /usr/local/lib,