@@ -376,6 +376,27 @@ else ifeq ($(platform), gcw0)
376376 CFLAGS += $(PTHREAD_FLAGS) -DHAVE_MKDIR
377377 CFLAGS += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
378378
379+ # RETROFW (needs retrofw 2.3 dev version or above) - crashes on 2.2 or under likely
380+ else ifeq ($(platform), retrofw)
381+ TARGET := $(TARGET_NAME)_libretro.so
382+ HAS_GPU=0
383+ CC = /opt/retrofw-toolchain/usr/bin/mipsel-linux-gcc
384+ CXX = /opt/retrofw-toolchain/usr/bin/mipsel-linux-g++
385+ AR = /opt/retrofw-toolchain/usr/bin/mipsel-linux-ar
386+ fpic := -fPIC
387+ SHARED := -shared -Wl,-no-undefined -Wl,--version-script=$(CORE_DIR)/link.T
388+ LDFLAGS += $(PTHREAD_FLAGS) -flto -mplt
389+ CFLAGS += $(PTHREAD_FLAGS) -DHAVE_MKDIR
390+ CFLAGS += -Ofast
391+ CFLAGS += -DRETROFW
392+ CFLAGS += -march=mips32 -mtune=mips32 -mhard-float
393+ CFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1
394+ CFLAGS += -fomit-frame-pointer -ffast-math -fmerge-all-constants -flto
395+ CFLAGS += -funsafe-math-optimizations -fsingle-precision-constant -fexpensive-optimizations
396+ CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops
397+ CFLAGS += -fmerge-all-constants -fno-math-errno -fno-stack-protector -fno-ident
398+ CFLAGS += -DRETROFW
399+
379400# Windows MSVC 2003 Xbox 1
380401else ifeq ($(platform), xbox1_msvc2003)
381402 TARGET := $(TARGET_NAME)_libretro_xdk1.lib
@@ -761,4 +782,3 @@ clean:
761782
762783.PHONY: clean
763784endif
764-
0 commit comments