From 3db35eab70be425c679169fbda3a08bedc023107 Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Fri, 26 Mar 2021 16:03:46 +0000 Subject: Fix OpenDingux Beta build --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eddfe36..a5f2649 100644 --- a/Makefile +++ b/Makefile @@ -379,6 +379,22 @@ else ifeq ($(platform), gcw0) HAVE_DYNAREC := 1 CPU_ARCH := mips +# GCW0 (OpenDingux Beta) +else ifeq ($(platform), gcw0-odbeta) + TARGET := $(TARGET_NAME)_libretro.so + CC = /opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc + CXX = /opt/gcw0-toolchain/usr/bin/mipsel-linux-g++ + AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar + SHARED := -shared -nostdlib -Wl,--version-script=link.T + fpic := -fPIC -DPIC + CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float + # The ASM code and/or MIPS dynarec of GPSP does not respect + # MIPS calling conventions, so we must use '-fno-caller-saves' + # for the OpenDingux Beta build + CFLAGS += -fno-caller-saves + HAVE_DYNAREC := 1 + CPU_ARCH := mips + # Windows else TARGET := $(TARGET_NAME)_libretro.dll -- cgit v1.2.3 From 7ea6c5e247a742af6f7acfbf215c23264410451f Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Thu, 25 Mar 2021 23:01:20 +0100 Subject: Move OAM RAM to stubs also Makes accesses more efficient for MIPS. Make accesses also fast for palette reads. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a5f2649..dfc7c37 100644 --- a/Makefile +++ b/Makefile @@ -362,6 +362,15 @@ else ifneq (,$(findstring armv,$(platform))) endif LDFLAGS := -Wl,--no-undefined +# MIPS +else ifeq ($(platform), mips32) + TARGET := $(TARGET_NAME)_libretro.so + SHARED := -shared -nostdlib -Wl,--version-script=link.T + fpic := -fPIC -DPIC + CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float + HAVE_DYNAREC := 1 + CPU_ARCH := mips + # emscripten else ifeq ($(platform), emscripten) TARGET := $(TARGET_NAME)_libretro_$(platform).bc -- cgit v1.2.3 From fd2079354572372f4516fcc13c51992ef4b4c715 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 27 Mar 2021 15:09:01 +0100 Subject: Add CROSS_COMPILE rules --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dfc7c37..4a5806d 100644 --- a/Makefile +++ b/Makefile @@ -104,10 +104,18 @@ else ifeq ($(platform), osx) ifeq ($(HAVE_DYNAREC),1) HAVE_MMAP = 1 endif - ifndef ($(NOUNIVERSAL)) - CFLAGS += $(ARCHFLAGS) - LDFLAGS += $(ARCHFLAGS) - endif + + ifeq ($(CROSS_COMPILE),1) + TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT) + CFLAGS += $(TARGET_RULE) + CPPFLAGS += $(TARGET_RULE) + CXXFLAGS += $(TARGET_RULE) + LDFLAGS += $(TARGET_RULE) + endif + + CFLAGS += $(ARCHFLAGS) + CXXFLAGS += $(ARCHFLAGS) + LDFLAGS += $(ARCHFLAGS) # iOS else ifneq (,$(findstring ios,$(platform))) -- cgit v1.2.3