This commit is contained in:
twinaphex 2017-06-30 22:19:27 +02:00
parent e7734756d2
commit 70fdea6bbc
17 changed files with 37 additions and 27 deletions

View File

@ -45,7 +45,7 @@ SOEXT = .android_arm64-v8a.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-21/arch-arm64 -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -45,7 +45,7 @@ SOEXT = .android_armeabi.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-3/arch-arm -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -45,7 +45,7 @@ SOEXT = .android_armeabi-v7a.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-3/arch-arm -lgcc -no-canonical-prefixes -march=armv7-a -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -45,7 +45,7 @@ SOEXT = .android_mips.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -fomit-frame-pointer -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -fomit-frame-pointer -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-9/arch-mips -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -45,7 +45,7 @@ SOEXT = .android_mips64.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -fomit-frame-pointer -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -fomit-frame-pointer -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-21/arch-mips64 -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -45,7 +45,7 @@ SOEXT = .android_x86.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -ffunction-sections -funwind-tables -no-canonical-prefixes -fstack-protector -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -ffunction-sections -funwind-tables -no-canonical-prefixes -fstack-protector -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-9/arch-x86 -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm

View File

@ -45,7 +45,7 @@ SOEXT = .android_x86_64.so
STATIC_LINKING = 0
platform = android
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST
PLATDEFS = -DANDROID -DINLINE=inline -DBSPF_UNIX -DHAVE_STDINT_H -DHAVE_INTTYPES -DLSB_FIRST
PLATCFLAGS = -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security
PLATCXXFLAGS = -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti
PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-21/arch-x86_64 -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm
@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -1,4 +1,4 @@
TARGET_NAME ?= vba_next
TARGET_NAME ?= snes9x2010
ifeq ($(STATIC_LINKING), 1)
TARGET = $(TARGET_NAME)_libretro_$(platform).a
@ -10,17 +10,27 @@ DEFINES +=
CFLAGS += -Wall
CXXFLAGS += -Wall
LDFLAGS +=
OBJOUT = -o
LINKOUT = -o
OBJS = $(SOURCES_C:.c=$(OBJEXT)) $(SOURCES_CXX:.cpp=$(OBJEXT))
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
LINKOUT = -out:
LD = link.exe
else
LD = $(CC)
endif
%$(OBJEXT): %.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(CXX) -c $(OBJOUT)$@ $< $(INCFLAGS) $(CXXFLAGS)
%$(OBJEXT): %.c
$(CC) -c -o $@ $< $(CFLAGS)
$(CC) -c $(OBJOUT)$@ $< $(INCFLAGS) $(CFLAGS)
%$(OBJEXT): %.S
$(CC_AS) -c -o $@ $< $(CFLAGS)
$(CC_AS) -c $(OBJOUT)$@ $< $(CFLAGS)
all: $(TARGET)
@ -28,7 +38,7 @@ $(TARGET): $(HEADERS) $(OBJS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJS)
else
$(CC) -o $@ $(OBJS) $(LDFLAGS)
$(LD) $(LINKOUT)$@ $(OBJS) $(LDFLAGS)
endif
clean-objs:

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)

View File

@ -63,7 +63,7 @@ RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)