Merge pull request #51 from Classicmods/master
Added Classic Platform Structure - Armv7 CortexA7 Build
This commit is contained in:
commit
19aed0288d
41
Makefile
41
Makefile
|
@ -276,6 +276,45 @@ else ifeq ($(platform), rpi1)
|
||||||
CPU_ARCH := arm
|
CPU_ARCH := arm
|
||||||
HAVE_DYNAREC = 1
|
HAVE_DYNAREC = 1
|
||||||
|
|
||||||
|
# Classic Platforms ####################
|
||||||
|
# Platform affix = classic_<ISA>_<µARCH>
|
||||||
|
# Help at https://modmyclassic.com/comp
|
||||||
|
|
||||||
|
# (armv7 a7, hard point, neon based) ###
|
||||||
|
# NESC, SNESC, C64 mini
|
||||||
|
else ifeq ($(platform), classic_armv7_a7)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
fpic := -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
|
||||||
|
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
|
||||||
|
#######################################
|
||||||
|
|
||||||
# Xbox 360
|
# Xbox 360
|
||||||
else ifeq ($(platform), xenon)
|
else ifeq ($(platform), xenon)
|
||||||
TARGET := $(TARGET_NAME)_libretro_xenon360.a
|
TARGET := $(TARGET_NAME)_libretro_xenon360.a
|
||||||
|
@ -433,11 +472,13 @@ else
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
|
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
|
||||||
ifeq ($(STATIC_LINKING), 1)
|
ifeq ($(STATIC_LINKING), 1)
|
||||||
$(AR) rcs $@ $(OBJECTS)
|
$(AR) rcs $@ $(OBJECTS)
|
||||||
else
|
else
|
||||||
$(CC) $(fpic) $(SHARED) $(INCFLAGS) $(OPTIMIZE) -o $@ $(OBJECTS) $(LIBM) $(LDFLAGS)
|
$(CC) $(fpic) $(SHARED) $(INCFLAGS) $(OPTIMIZE) -o $@ $(OBJECTS) $(LIBM) $(LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
@echo "** BUILD SUCCESSFUL! GG NO RE **"
|
||||||
|
|
||||||
cpu_threaded.o: cpu_threaded.c
|
cpu_threaded.o: cpu_threaded.c
|
||||||
$(CC) $(CFLAGS) -Wno-unused-variable -Wno-unused-label $(OPTIMIZE_SAFE) $(INCDIRS) -c -o $@ $<
|
$(CC) $(CFLAGS) -Wno-unused-variable -Wno-unused-label $(OPTIMIZE_SAFE) $(INCDIRS) -c -o $@ $<
|
||||||
|
|
Loading…
Reference in New Issue