Add platform Amlogic

For 32Bit ARM Amlogic boards, S905, S912 and probably others
This commit is contained in:
Shanti Gilbert 2019-05-23 17:19:14 -05:00 committed by m4xw
parent a479228312
commit 96608bace2
2 changed files with 16 additions and 1 deletions

View File

@ -12,7 +12,7 @@
#define glGetProcAddress wglGetProcAddress
#define GL_GET_PROC_ADR(proc_type, proc_name) ptr##proc_name = (proc_type) glGetProcAddress("gl"#proc_name)
#elif defined(VERO4K) || defined(ODROID) || defined(VC)
#elif defined(VERO4K) || defined(ODROID) || defined(VC) || defined(AMLOGIC)
#include <dlfcn.h>
#define GL_GET_PROC_ADR(proc_type, proc_name) ptr##proc_name = (proc_type) dlsym(gles2so, "gl"#proc_name);
@ -210,6 +210,8 @@ extern "C" void initGLFunctions()
void *gles2so = dlopen("/usr/lib/arm-linux-gnueabihf/libGLESv2.so", RTLD_NOW);
#elif defined(VERO4K)
void *gles2so = dlopen("/opt/vero3/lib/libGLESv2.so", RTLD_NOW);
#elif defined(AMLOGIC)
void *gles2so = dlopen("/usr/lib/libGLESv2.so", RTLD_NOW);
#endif
#if defined(EGL) || defined(OS_IOS)

View File

@ -213,6 +213,19 @@ else ifneq (,$(findstring odroid,$(platform)))
COREFLAGS += -DOS_LINUX
ASFLAGS = -f elf -d ELF_TYPE
# Amlogic S905/S912
else ifneq (,$(findstring amlogic,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -ldl
GLES = 1
GL_LIB := -lGLESv2
CPUFLAGS += -marm -mfloat-abi=hard -mfpu=neon
HAVE_NEON = 1
WITH_DYNAREC=arm
COREFLAGS += -DAMLOGIC -DOS_LINUX -DUNDEF_GL_GLEXT_PROTOTYPES
CPUFLAGS += -march=armv8-a -mcpu=cortex-a53 -mtune=cortex-a53
# OS X
else ifneq (,$(findstring osx,$(platform)))
TARGET := $(TARGET_NAME)_libretro.dylib