mirror of
https://github.com/FunKey-Project/gpsp_libretro.git
synced 2026-03-27 14:22:43 +01:00
initial funkey changes to compile
This commit is contained in:
63
Makefile
63
Makefile
@@ -30,6 +30,8 @@ ifeq ($(platform),)
|
||||
endif
|
||||
endif
|
||||
|
||||
platform = funkey
|
||||
|
||||
|
||||
ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
|
||||
|
||||
@@ -393,6 +395,67 @@ else ifeq ($(platform), gcw0)
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
|
||||
USE_LIBCO = 0
|
||||
|
||||
# FunKey S
|
||||
else ifeq ($(platform), funkey)
|
||||
TARGET := $(TARGET_NAME)_libretro.so
|
||||
OD_TOOLCHAIN ?= /opt/FunKey-sdk-2.0.0/
|
||||
CC := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc
|
||||
CXX := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-g++
|
||||
LD := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc
|
||||
AR = $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-ar
|
||||
|
||||
|
||||
# fpic := -fPIC
|
||||
# SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined -fPIC
|
||||
# #CFLAGS += -march=armv7-a+neon-vfpv4 -mtune=cortex-a7 -mfpu=neon-vfpv4 -Ofast -fno-PIC -fdata-sections -ffunction-sections -fsingle-precision-constant -fno-common -fno-builtin -DFUNKEY
|
||||
# CFLAGS += -Ofast \
|
||||
# -flto=4 -fwhole-program -fuse-linker-plugin \
|
||||
# -fdata-sections -ffunction-sections -Wl,--gc-sections \
|
||||
# -fno-stack-protector -fno-ident -fomit-frame-pointer \
|
||||
# -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
|
||||
# -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
|
||||
# -fmerge-all-constants -fno-math-errno \
|
||||
# -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a
|
||||
# # HAVE_NEON = 1
|
||||
# # ARCH = arm
|
||||
# # BUILTIN_GPU = neon
|
||||
# # HAVE_DYNAREC := 1
|
||||
# # CFLAGS += -DARM_MEMORY_DYNAREC
|
||||
# CFLAGS += -DARM -DARM_ARCH
|
||||
# # USE_LIBCO = 1
|
||||
# #LDFLAGS += -static-libgcc -static-libstdc++
|
||||
|
||||
pic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined -fPIC
|
||||
CFLAGS += -Ofast \
|
||||
-flto=4 -fwhole-program -fuse-linker-plugin \
|
||||
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
||||
-fno-stack-protector -fno-ident -fomit-frame-pointer \
|
||||
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
|
||||
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
|
||||
-fmerge-all-constants -fno-math-errno \
|
||||
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
CXXFLAGS = $(CFLAGS) -std=gnu++11
|
||||
CPPFLAGS += $(CFLAGS)
|
||||
ASFLAGS += $(CFLAGS)
|
||||
HAVE_NEON = 1
|
||||
ARCH = arm
|
||||
BUILTIN_GPU = neon
|
||||
CPU_ARCH := arm
|
||||
HAVE_DYNAREC = 1
|
||||
USE_LIBCO = 0 ## IMPORTANT to be 0!
|
||||
CFLAGS += -DARM -DARM_ARCH
|
||||
CFLAGS += -DARM_MEMORY_DYNAREC
|
||||
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
|
||||
CFLAGS += -march=armv7-a
|
||||
else
|
||||
CFLAGS += -march=armv7ve
|
||||
# If gcc is 5.0 or later
|
||||
ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
|
||||
LDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
# Windows
|
||||
else
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
|
||||
Reference in New Issue
Block a user