Skip to content

Commit b0bd0b6

Browse files
committed
Update Makefile
1 parent 0d860bc commit b0bd0b6

File tree

1 file changed

+61
-7
lines changed

1 file changed

+61
-7
lines changed

Makefile.libretro

+61-7
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,31 @@ else ifeq ($(platform), rpi2)
216216
CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -funsafe-math-optimizations
217217
CFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
218218

219+
# Raspberry Pi 3
220+
else ifeq ($(platform), rpi3)
221+
TARGET := $(TARGET_NAME)_libretro.so
222+
fpic := -fPIC
223+
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
224+
CFLAGS += -DARM
225+
CFLAGS += -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -funsafe-math-optimizations
226+
CFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
227+
228+
# Raspberry Pi 3 (64 bit)
229+
else ifeq ($(platform), rpi3_64)
230+
TARGET := $(TARGET_NAME)_libretro.so
231+
fpic := -fPIC
232+
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
233+
CFLAGS += -mcpu=cortex-a53 -mtune=cortex-a53 -funsafe-math-optimizations
234+
CFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
235+
236+
# Raspberry Pi 4 (64-bit)
237+
else ifneq (,$(findstring rpi4,$(platform)))
238+
TARGET := $(TARGET_NAME)_libretro.so
239+
fpic := -fPIC
240+
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
241+
CFLAGS += -mcpu=cortex-a72 -mtune=cortex-a72 -funsafe-math-optimizations
242+
CFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
243+
219244
# Lightweight PS3 Homebrew SDK
220245
else ifeq ($(platform), psl1ght)
221246
TARGET := $(TARGET_NAME)_libretro_$(platform).a
@@ -299,26 +324,55 @@ else ifeq ($(platform), libnx)
299324
else ifeq ($(platform), classic_armv7_a7)
300325
TARGET := $(TARGET_NAME)_libretro.so
301326
fpic := -fPIC
302-
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
303-
PLATFORM_DEFINES += -Ofast \
327+
SHARED := -fPIC -shared -Wl,--version-script=link.T -Wl,-no-undefined
328+
CFLAGS += -Ofast \
304329
-flto=4 -fwhole-program -fuse-linker-plugin \
305330
-fdata-sections -ffunction-sections -Wl,--gc-sections \
306331
-fno-stack-protector -fno-ident -fomit-frame-pointer \
307332
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
308333
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
309334
-fmerge-all-constants -fno-math-errno \
310335
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
311-
PLATFORM_DEFINES += -DARM
312-
LDFLAGS += -marm -mtune=cortex-a7 -mfpu=neon-vfpv4
336+
CXXFLAGS += $(CFLAGS)
337+
CPPFLAGS += $(CFLAGS)
338+
ASFLAGS += $(CFLAGS)
339+
HAVE_NEON = 1
340+
ARCH = arm
341+
BUILTIN_GPU = neon
342+
USE_DYNAREC = 1
313343
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
314-
PLATFORM_DEFINES += -march=armv7-a
344+
CFLAGS += -march=armv7-a
315345
else
316-
PLATFORM_DEFINES += -march=armv7ve
346+
CFLAGS += -march=armv7ve
317347
# If gcc is 5.0 or later
318348
ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
319349
LDFLAGS += -static-libgcc -static-libstdc++
320350
endif
321351
endif
352+
353+
# (armv8 a35, hard point, neon based) ###
354+
# Playstation Classic
355+
else ifeq ($(platform), classic_armv8_a35)
356+
TARGET := $(TARGET_NAME)_libretro.so
357+
fpic := -fPIC
358+
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
359+
CFLAGS += -Ofast \
360+
-flto=4 -fwhole-program -fuse-linker-plugin \
361+
-fdata-sections -ffunction-sections -Wl,--gc-sections \
362+
-fno-stack-protector -fno-ident -fomit-frame-pointer \
363+
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
364+
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
365+
-fmerge-all-constants -fno-math-errno \
366+
-marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
367+
CXXFLAGS += $(CFLAGS)
368+
CPPFLAGS += $(CFLAGS)
369+
ASFLAGS += $(CFLAGS)
370+
HAVE_NEON = 1
371+
ARCH = arm
372+
BUILTIN_GPU = neon
373+
USE_DYNAREC = 1
374+
LDFLAGS += -lrt
375+
LDFLAGS += -marm -mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -Ofast -flto -fuse-linker-plugin
322376
#######################################
323377

324378
# ARM
@@ -385,7 +439,7 @@ else ifeq ($(platform), retrofw)
385439
PLATFORM_DEFINES += -DDINGUX_BETA=1
386440
LIBS = -lm
387441

388-
# MIYOO
442+
# Miyoo
389443
else ifeq ($(platform), miyoo)
390444
TARGET := $(TARGET_NAME)_libretro.so
391445
fpic := -fPIC

0 commit comments

Comments
 (0)