From 9d671094e7824b3c43a6723d724a79d0561ac74d Mon Sep 17 00:00:00 2001 From: Craig Carnell Date: Mon, 26 Feb 2024 19:44:13 +0000 Subject: [PATCH] Fix rpath on webOS --- Makefile.webos | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.webos b/Makefile.webos index f8fe7dd559f7..c772fc4231bd 100644 --- a/Makefile.webos +++ b/Makefile.webos @@ -7,6 +7,8 @@ WEBOS_FREETYPE_CONFIG ?= $(SDKTARGETSYSROOT)/usr/bin/freetype-config WEBOS_INC_DIR ?= $(SDKTARGETSYSROOT)/usr/include WEBOS_LIB_DIR ?= $(SDKTARGETSYSROOT)/usr/lib +ADD_SDL2_LIB ?= 0 + ######################### ######################### @@ -128,7 +130,7 @@ LIBS := -ldl -lz -lrt -pthread CFLAGS := CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS ASFLAGS := -LDFLAGS := -Wl,--rpath $ORIGIN/lib,--gc-sections +LDFLAGS := -Wl,-rpath=\$$ORIGIN/lib,--gc-sections INCLUDE_DIRS = -I$(WEBOS_INC_DIR) LIBRARY_DIRS = -L$(WEBOS_LIB_DIR) DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY @@ -232,7 +234,9 @@ ipk: $(TARGET) echo "$$APPINFO" > webos/dist/appinfo.json cp -t webos/dist -vf $(TARGET) webos/icon160.png cp -t webos/dist/lib -vf $(WEBOS_LIB_DIR)/libstdc++.so.6 +ifeq ($(ADD_SDL2_LIB), 1) cp -t webos/dist/lib -vf $(WEBOS_LIB_DIR)/libSDL2-2.0.so.0 +endif $(STRIP) webos/dist/$(TARGET) cd webos && ares-package dist