mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2024-11-23 07:49:48 +00:00
Merge pull request #116 from Classicmods/master
Added Classic Platform structure - ARMv7 Cortex A7 build
This commit is contained in:
commit
85edb5b900
@ -24,7 +24,9 @@ ifeq ($(platform),)
|
||||
platform = win
|
||||
endif
|
||||
else ifneq (,$(findstring armv,$(platform)))
|
||||
override platform += unix
|
||||
ifeq (,$(findstring classic_,$(platform)))
|
||||
override platform += unix
|
||||
endif
|
||||
else ifneq (,$(findstring rpi,$(platform)))
|
||||
override platform += unix
|
||||
endif
|
||||
@ -65,6 +67,37 @@ ifneq (,$(findstring unix,$(platform)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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=$(version_script) -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)
|
||||
HAVE_NETWORK=1
|
||||
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
|
||||
#######################################
|
||||
|
||||
# OS X
|
||||
else ifeq ($(platform), osx)
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
@ -591,6 +624,7 @@ endif
|
||||
endif
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
$(LD) $(LINKOUT)$@ $(OBJECTS)
|
||||
@ -600,6 +634,7 @@ endif
|
||||
else
|
||||
$(LD) $(LINKOUT)$@ $(SHARED) $(OBJS) $(LDFLAGS) $(LIBS)
|
||||
endif
|
||||
@echo "** BUILD SUCCESSFUL! GG NO RE **"
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(OBJOUT)$@ $< $(CPPFLAGS) $(CXXFLAGS) $(INCFLAGS)
|
||||
|
Loading…
Reference in New Issue
Block a user