From 097bbc9afea847adee8a4de7ecc363b43d581831 Mon Sep 17 00:00:00 2001 From: Andre Leiradella Date: Sun, 9 Sep 2018 16:54:06 +0100 Subject: [PATCH] Updated cross-makefiles --- libretro-build/Makefile.android_arm64-v8a | 27 +++--- libretro-build/Makefile.android_armeabi | 25 +++-- libretro-build/Makefile.android_armeabi-v7a | 27 +++--- libretro-build/Makefile.android_mips | 25 +++-- libretro-build/Makefile.android_mips64 | 25 +++-- libretro-build/Makefile.android_x86 | 25 +++-- libretro-build/Makefile.android_x86_64 | 25 +++-- libretro-build/Makefile.linux-portable_x86 | 12 ++- libretro-build/Makefile.linux-portable_x86_64 | 12 ++- libretro-build/Makefile.linux_x86 | 12 ++- libretro-build/Makefile.linux_x86_64 | 12 ++- libretro-build/Makefile.mingw_x86 | 12 ++- libretro-build/Makefile.mingw_x86_64 | 12 ++- libretro-build/Makefile.osx_x86 | 96 +++++++++++++++++++ libretro-build/Makefile.osx_x86_64 | 96 +++++++++++++++++++ libretro-build/Makefile.ps3_ppc | 96 +++++++++++++++++++ libretro-build/Makefile.vita_arm | 96 +++++++++++++++++++ libretro-build/Makefile.wii_ppc | 12 ++- libretro-build/Makefile.windows_x86 | 12 ++- libretro-build/Makefile.windows_x86_64 | 12 ++- 20 files changed, 572 insertions(+), 99 deletions(-) create mode 100644 libretro-build/Makefile.osx_x86 create mode 100644 libretro-build/Makefile.osx_x86_64 create mode 100644 libretro-build/Makefile.ps3_ppc create mode 100644 libretro-build/Makefile.vita_arm diff --git a/libretro-build/Makefile.android_arm64-v8a b/libretro-build/Makefile.android_arm64-v8a index f08f46b14..a26cc2998 100644 --- a/libretro-build/Makefile.android_arm64-v8a +++ b/libretro-build/Makefile.android_arm64-v8a @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,36 +16,41 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_arm64-v8a + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-g++ -AS = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-as -AR = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-ar +CC = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-g++ +AS = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-as +AR = $(NDK_ROOT_DIR)/toolchains/aarch64-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/aarch64-linux-android-ar ############ # Extensions OBJEXT = .android_arm64-v8a.o SOEXT = .android_arm64-v8a.so +LIBEXT = .android_arm64-v8a.a ################ # Platform setup STATIC_LINKING = 0 platform = android -PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST -DHAVE_LOCALE +PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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 -PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/arm64-v8a/libgnustl_static.a +PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-arm64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/arm64-v8a/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-arm64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_armeabi b/libretro-build/Makefile.android_armeabi index d17223f30..77653be5b 100644 --- a/libretro-build/Makefile.android_armeabi +++ b/libretro-build/Makefile.android_armeabi @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_armeabi + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++ -AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as -AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar +CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++ +AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as +AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar ############ # Extensions OBJEXT = .android_armeabi.o SOEXT = .android_armeabi.so +LIBEXT = .android_armeabi.a ################ # Platform setup @@ -40,12 +45,12 @@ PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_IN 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-9/arch-arm -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm -PLATLDXFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-9/arch-arm -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/thumb/libgnustl_static.a +PLATLDXFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-9/arch-arm -lgcc -no-canonical-prefixes -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lc -lm $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_armeabi-v7a b/libretro-build/Makefile.android_armeabi-v7a index fd2a2aa94..4914ef176 100644 --- a/libretro-build/Makefile.android_armeabi-v7a +++ b/libretro-build/Makefile.android_armeabi-v7a @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_armeabi-v7a + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++ -AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as -AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar +CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++ +AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as +AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar ############ # Extensions OBJEXT = .android_armeabi-v7a.o SOEXT = .android_armeabi-v7a.so +LIBEXT = .android_armeabi-v7a.a ################ # Platform setup @@ -39,13 +44,13 @@ platform = android PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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-9/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 -PLATLDXFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-9/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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi-v7a/thumb/libgnustl_static.a +PLATLDFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-21/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 +PLATLDXFLAGS = -shared --sysroot=$(NDK_ROOT_DIR)/platforms/android-21/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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_mips b/libretro-build/Makefile.android_mips index 33463e20d..5566d99b6 100644 --- a/libretro-build/Makefile.android_mips +++ b/libretro-build/Makefile.android_mips @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_mips + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-g++ -AS = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-as -AR = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-ar +CC = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-g++ +AS = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-as +AR = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-ar ############ # Extensions OBJEXT = .android_mips.o SOEXT = .android_mips.so +LIBEXT = .android_mips.a ################ # Platform setup @@ -40,12 +45,12 @@ PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_IN 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 -PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/mips/libgnustl_static.a +PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-mips/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/mips/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-mips/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_mips64 b/libretro-build/Makefile.android_mips64 index 6176c5cf8..4b25c234d 100644 --- a/libretro-build/Makefile.android_mips64 +++ b/libretro-build/Makefile.android_mips64 @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_mips64 + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-g++ -AS = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-as -AR = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-ar +CC = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-g++ +AS = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-as +AR = $(NDK_ROOT_DIR)/toolchains/mips64el-linux-android-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mips64el-linux-android-ar ############ # Extensions OBJEXT = .android_mips64.o SOEXT = .android_mips64.so +LIBEXT = .android_mips64.a ################ # Platform setup @@ -40,12 +45,12 @@ PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_IN 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 -PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/mips64/libgnustl_static.a +PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips64/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-mips64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/mips64/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-mips64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips64/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_x86 b/libretro-build/Makefile.android_x86 index 12ee11ff1..6ac4857ce 100644 --- a/libretro-build/Makefile.android_x86 +++ b/libretro-build/Makefile.android_x86 @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_x86 + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/x86-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/x86-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-g++ -AS = $(NDK_ROOT_DIR)/toolchains/x86-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-as -AR = $(NDK_ROOT_DIR)/toolchains/x86-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-ar +CC = $(NDK_ROOT_DIR)/toolchains/x86-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/x86-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-g++ +AS = $(NDK_ROOT_DIR)/toolchains/x86-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-as +AR = $(NDK_ROOT_DIR)/toolchains/x86-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-ar ############ # Extensions OBJEXT = .android_x86.o SOEXT = .android_x86.so +LIBEXT = .android_x86.a ################ # Platform setup @@ -40,12 +45,12 @@ PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_IN 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 -PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/x86/libgnustl_static.a +PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-x86/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/x86/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-9/arch-x86/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.android_x86_64 b/libretro-build/Makefile.android_x86_64 index 4797bb323..dca601b3c 100644 --- a/libretro-build/Makefile.android_x86_64 +++ b/libretro-build/Makefile.android_x86_64 @@ -2,8 +2,8 @@ # Works on hosts Linux, Windows and Darwin # Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,20 +16,25 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = android_x86_64 + ################# # Toolchain setup -NDK_TOOLCHAIN_VERSION ?= 4.8 -CC = $(NDK_ROOT_DIR)/toolchains/x86_64-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-gcc -CXX = $(NDK_ROOT_DIR)/toolchains/x86_64-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-g++ -AS = $(NDK_ROOT_DIR)/toolchains/x86_64-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-as -AR = $(NDK_ROOT_DIR)/toolchains/x86_64-$(NDK_TOOLCHAIN_VERSION)/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-ar +CC = $(NDK_ROOT_DIR)/toolchains/x86_64-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-gcc +CXX = $(NDK_ROOT_DIR)/toolchains/x86_64-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-g++ +AS = $(NDK_ROOT_DIR)/toolchains/x86_64-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-as +AR = $(NDK_ROOT_DIR)/toolchains/x86_64-4.9/prebuilt/$(HOST_PLATFORM)-x86_64/bin/x86_64-linux-android-ar ############ # Extensions OBJEXT = .android_x86_64.o SOEXT = .android_x86_64.so +LIBEXT = .android_x86_64.a ################ # Platform setup @@ -40,12 +45,12 @@ PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_IN 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 -PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/x86_64/libgnustl_static.a +PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/libgnustl_static.a ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ -DMINIMAL_CORE=2 +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = @@ -81,7 +86,7 @@ endif CORE_DIR ?= .. BUILD_DIR ?= . -INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-x86_64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/x86_64/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include/backward +INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-21/arch-x86_64/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward include $(BUILD_DIR)/Makefile.common diff --git a/libretro-build/Makefile.linux-portable_x86 b/libretro-build/Makefile.linux-portable_x86 index ec49244f6..61c06906e 100644 --- a/libretro-build/Makefile.linux-portable_x86 +++ b/libretro-build/Makefile.linux-portable_x86 @@ -2,8 +2,8 @@ # Works on hosts Linux # apt-get install g++-multilib libc6-dev-i386 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = linux-portable_x86 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .linux-portable_x86.o SOEXT = .linux-portable_x86.so +LIBEXT = .linux-portable_x86.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.linux-portable_x86_64 b/libretro-build/Makefile.linux-portable_x86_64 index 551aa71c0..ecfbcf54b 100644 --- a/libretro-build/Makefile.linux-portable_x86_64 +++ b/libretro-build/Makefile.linux-portable_x86_64 @@ -2,8 +2,8 @@ # Works on hosts Linux # -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = linux-portable_x86_64 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .linux-portable_x86_64.o SOEXT = .linux-portable_x86_64.so +LIBEXT = .linux-portable_x86_64.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.linux_x86 b/libretro-build/Makefile.linux_x86 index 6f693d870..68b5fa868 100644 --- a/libretro-build/Makefile.linux_x86 +++ b/libretro-build/Makefile.linux_x86 @@ -2,8 +2,8 @@ # Works on hosts Linux # apt-get install g++-multilib libc6-dev-i386 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = linux_x86 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .linux_x86.o SOEXT = .linux_x86.so +LIBEXT = .linux_x86.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-n ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.linux_x86_64 b/libretro-build/Makefile.linux_x86_64 index eb9c7e02f..7a304bdb0 100644 --- a/libretro-build/Makefile.linux_x86_64 +++ b/libretro-build/Makefile.linux_x86_64 @@ -2,8 +2,8 @@ # Works on hosts Linux # -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = linux_x86_64 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .linux_x86_64.o SOEXT = .linux_x86_64.so +LIBEXT = .linux_x86_64.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-n ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.mingw_x86 b/libretro-build/Makefile.mingw_x86 index 5abe2eacc..3c286f610 100644 --- a/libretro-build/Makefile.mingw_x86 +++ b/libretro-build/Makefile.mingw_x86 @@ -2,8 +2,8 @@ # Works on hosts Windows # Install MSYS2 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = mingw_x86 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .mingw_x86.o SOEXT = .mingw_x86.dll +LIBEXT = .mingw_x86.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m32 -shared -lm ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.mingw_x86_64 b/libretro-build/Makefile.mingw_x86_64 index 4ffac415a..45dbdfd5c 100644 --- a/libretro-build/Makefile.mingw_x86_64 +++ b/libretro-build/Makefile.mingw_x86_64 @@ -2,8 +2,8 @@ # Works on hosts Windows # Install MSYS2 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = mingw_x86_64 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = ar OBJEXT = .mingw_x86_64.o SOEXT = .mingw_x86_64.dll +LIBEXT = .mingw_x86_64.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -m64 -shared -lm ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.osx_x86 b/libretro-build/Makefile.osx_x86 new file mode 100644 index 000000000..602031afb --- /dev/null +++ b/libretro-build/Makefile.osx_x86 @@ -0,0 +1,96 @@ +############## +# Works on hosts Linux +# Compile and install OSXCROSS: https://github.com/tpoechtrager/osxcross + +######################### +# Check the host platform + +HOST_PLATFORM = linux +ifeq ($(shell uname -a),) + HOST_PLATFORM = windows +else ifneq ($(findstring MINGW,$(shell uname -a)),) + HOST_PLATFORM = windows +else ifneq ($(findstring Darwin,$(shell uname -a)),) + HOST_PLATFORM = darwin +else ifneq ($(findstring win,$(shell uname -a)),) + HOST_PLATFORM = windows +endif + +######################### +# Set the target platform + +TARGET_PLATFORM = osx_x86 + +################# +# Toolchain setup + +CC = $(OSXCROSS_ROOT_DIR)/target/bin/i386-apple-darwin13-cc +CXX = $(OSXCROSS_ROOT_DIR)/target/bin/i386-apple-darwin13-c++ +AS = $(OSXCROSS_ROOT_DIR)/target/bin/i386-apple-darwin13-as +AR = $(OSXCROSS_ROOT_DIR)/target/bin/i386-apple-darwin13-ar + +############ +# Extensions + +OBJEXT = .osx_x86.o +SOEXT = .osx_x86.dylib +LIBEXT = .osx_x86.a + +################ +# Platform setup + +STATIC_LINKING = 0 +platform = osx +PLATDEFS = +PLATCFLAGS = -fstrict-aliasing +PLATCXXFLAGS = -fstrict-aliasing +PLATLDFLAGS = -shared -lm +PLATLDXFLAGS = -shared -lm + +################ +# libretro setup + +RETRODEFS = -D__LIBRETRO__ +RETROCFLAGS = +RETROCXXFLAGS = +RETROLDFLAGS = +RETROLDXFLAGS = + +################# +# Final variables + +DEFINES = $(PLATDEFS) $(RETRODEFS) +CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES) +CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES) +LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS) +LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS) + +######## +# Tuning + +ifneq ($(DEBUG),) + CFLAGS += -O0 -g + CXXFLAGS += -O0 -g +else + CFLAGS += -O3 -DNDEBUG + CXXFLAGS += -O3 -DNDEBUG +endif + +ifneq ($(LOG_PERFORMANCE),) + CFLAGS += -DLOG_PERFORMANCE + CXXFLAGS += -DLOG_PERFORMANCE +endif + +#################################### +# Variable setup for Makefile.common + +CORE_DIR ?= .. +BUILD_DIR ?= . +INCLUDES = + +include $(BUILD_DIR)/Makefile.common + +############### +# Include rules + +include $(BUILD_DIR)/Makefile.rules diff --git a/libretro-build/Makefile.osx_x86_64 b/libretro-build/Makefile.osx_x86_64 new file mode 100644 index 000000000..1329aa0f0 --- /dev/null +++ b/libretro-build/Makefile.osx_x86_64 @@ -0,0 +1,96 @@ +############## +# Works on hosts Linux +# Compile and install OSXCROSS: https://github.com/tpoechtrager/osxcross + +######################### +# Check the host platform + +HOST_PLATFORM = linux +ifeq ($(shell uname -a),) + HOST_PLATFORM = windows +else ifneq ($(findstring MINGW,$(shell uname -a)),) + HOST_PLATFORM = windows +else ifneq ($(findstring Darwin,$(shell uname -a)),) + HOST_PLATFORM = darwin +else ifneq ($(findstring win,$(shell uname -a)),) + HOST_PLATFORM = windows +endif + +######################### +# Set the target platform + +TARGET_PLATFORM = osx_x86_64 + +################# +# Toolchain setup + +CC = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-cc +CXX = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-c++ +AS = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-as +AR = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-ar + +############ +# Extensions + +OBJEXT = .osx_x86_64.o +SOEXT = .osx_x86_64.dylib +LIBEXT = .osx_x86_64.a + +################ +# Platform setup + +STATIC_LINKING = 0 +platform = osx +PLATDEFS = +PLATCFLAGS = -fpic -fstrict-aliasing +PLATCXXFLAGS = -fpic -fstrict-aliasing +PLATLDFLAGS = -shared -lm +PLATLDXFLAGS = -shared -lm + +################ +# libretro setup + +RETRODEFS = -D__LIBRETRO__ +RETROCFLAGS = +RETROCXXFLAGS = +RETROLDFLAGS = +RETROLDXFLAGS = + +################# +# Final variables + +DEFINES = $(PLATDEFS) $(RETRODEFS) +CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES) +CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES) +LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS) +LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS) + +######## +# Tuning + +ifneq ($(DEBUG),) + CFLAGS += -O0 -g + CXXFLAGS += -O0 -g +else + CFLAGS += -O3 -DNDEBUG + CXXFLAGS += -O3 -DNDEBUG +endif + +ifneq ($(LOG_PERFORMANCE),) + CFLAGS += -DLOG_PERFORMANCE + CXXFLAGS += -DLOG_PERFORMANCE +endif + +#################################### +# Variable setup for Makefile.common + +CORE_DIR ?= .. +BUILD_DIR ?= . +INCLUDES = + +include $(BUILD_DIR)/Makefile.common + +############### +# Include rules + +include $(BUILD_DIR)/Makefile.rules diff --git a/libretro-build/Makefile.ps3_ppc b/libretro-build/Makefile.ps3_ppc new file mode 100644 index 000000000..03ba57340 --- /dev/null +++ b/libretro-build/Makefile.ps3_ppc @@ -0,0 +1,96 @@ +############## +# Works on hosts Windows or Linux using Wine +# Install CellSDK + +######################### +# Check the host platform + +HOST_PLATFORM = linux +ifeq ($(shell uname -a),) + HOST_PLATFORM = windows +else ifneq ($(findstring MINGW,$(shell uname -a)),) + HOST_PLATFORM = windows +else ifneq ($(findstring Darwin,$(shell uname -a)),) + HOST_PLATFORM = darwin +else ifneq ($(findstring win,$(shell uname -a)),) + HOST_PLATFORM = windows +endif + +######################### +# Set the target platform + +TARGET_PLATFORM = ps3_ppc + +################# +# Toolchain setup + +CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc +CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++ +AS = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-as +AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar + +############ +# Extensions + +OBJEXT = .ps3_ppc.o +SOEXT = .ps3_ppc.so +LIBEXT = .ps3_ppc.a + +################ +# Platform setup + +STATIC_LINKING = 1 +platform = ps3 +PLATDEFS = -D__CELLOS_LV2__ +PLATCFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1 +PLATCXXFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1 +PLATLDFLAGS = -shared -lm +PLATLDXFLAGS = -shared -lm + +################ +# libretro setup + +RETRODEFS = -D__LIBRETRO__ +RETROCFLAGS = +RETROCXXFLAGS = +RETROLDFLAGS = +RETROLDXFLAGS = + +################# +# Final variables + +DEFINES = $(PLATDEFS) $(RETRODEFS) +CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES) +CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES) +LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS) +LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS) + +######## +# Tuning + +ifneq ($(DEBUG),) + CFLAGS += -O0 -g + CXXFLAGS += -O0 -g +else + CFLAGS += -O3 -DNDEBUG + CXXFLAGS += -O3 -DNDEBUG +endif + +ifneq ($(LOG_PERFORMANCE),) + CFLAGS += -DLOG_PERFORMANCE + CXXFLAGS += -DLOG_PERFORMANCE +endif + +#################################### +# Variable setup for Makefile.common + +CORE_DIR ?= .. +BUILD_DIR ?= . +INCLUDES = + +include $(BUILD_DIR)/Makefile.common + +############### +# Include rules + +include $(BUILD_DIR)/Makefile.rules diff --git a/libretro-build/Makefile.vita_arm b/libretro-build/Makefile.vita_arm new file mode 100644 index 000000000..557ef95ba --- /dev/null +++ b/libretro-build/Makefile.vita_arm @@ -0,0 +1,96 @@ +############## +# Works on hosts Linux +# Install vitasdk + +######################### +# Check the host platform + +HOST_PLATFORM = linux +ifeq ($(shell uname -a),) + HOST_PLATFORM = windows +else ifneq ($(findstring MINGW,$(shell uname -a)),) + HOST_PLATFORM = windows +else ifneq ($(findstring Darwin,$(shell uname -a)),) + HOST_PLATFORM = darwin +else ifneq ($(findstring win,$(shell uname -a)),) + HOST_PLATFORM = windows +endif + +######################### +# Set the target platform + +TARGET_PLATFORM = vita_arm + +################# +# Toolchain setup + +CC = $(VITASDK)/bin/arm-vita-eabi-gcc +CXX = $(VITASDK)/bin/arm-vita-eabi-g++ +AS = $(VITASDK)/bin/arm-vita-eabi-as +AR = $(VITASDK)/bin/arm-vita-eabi-ar + +############ +# Extensions + +OBJEXT = .vita_arm.o +SOEXT = .vita_arm.so +LIBEXT = .vita_arm.a + +################ +# Platform setup + +STATIC_LINKING = 1 +platform = vita +PLATDEFS = -DVITA +PLATCFLAGS = -ftree-vectorize -mfloat-abi=hard -ffast-math -fsingle-precision-constant -funroll-loops -fno-short-enums +PLATCXXFLAGS = -ftree-vectorize -mfloat-abi=hard -ffast-math -fsingle-precision-constant -funroll-loops -fno-short-enums +PLATLDFLAGS = -shared -lm -mthumb -mcpu=cortex-a9 -mfloat-abi=hard +PLATLDXFLAGS = -shared -lm -mthumb -mcpu=cortex-a9 -mfloat-abi=hard + +################ +# libretro setup + +RETRODEFS = -D__LIBRETRO__ +RETROCFLAGS = +RETROCXXFLAGS = +RETROLDFLAGS = +RETROLDXFLAGS = + +################# +# Final variables + +DEFINES = $(PLATDEFS) $(RETRODEFS) +CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES) +CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES) +LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS) +LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS) + +######## +# Tuning + +ifneq ($(DEBUG),) + CFLAGS += -O0 -g + CXXFLAGS += -O0 -g +else + CFLAGS += -O3 -DNDEBUG + CXXFLAGS += -O3 -DNDEBUG +endif + +ifneq ($(LOG_PERFORMANCE),) + CFLAGS += -DLOG_PERFORMANCE + CXXFLAGS += -DLOG_PERFORMANCE +endif + +#################################### +# Variable setup for Makefile.common + +CORE_DIR ?= .. +BUILD_DIR ?= . +INCLUDES = + +include $(BUILD_DIR)/Makefile.common + +############### +# Include rules + +include $(BUILD_DIR)/Makefile.rules diff --git a/libretro-build/Makefile.wii_ppc b/libretro-build/Makefile.wii_ppc index 95f2ef6a8..89bd5d15e 100644 --- a/libretro-build/Makefile.wii_ppc +++ b/libretro-build/Makefile.wii_ppc @@ -2,8 +2,8 @@ # Works on hosts Linux # Install devkitppc -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = wii_ppc + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = $(DEVKITPPC_ROOT_DIR)/bin/powerpc-eabi-ar OBJEXT = .wii_ppc.o SOEXT = .wii_ppc.so +LIBEXT = .wii_ppc.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -shared -lm ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.windows_x86 b/libretro-build/Makefile.windows_x86 index 8cd9d11c9..489403055 100644 --- a/libretro-build/Makefile.windows_x86 +++ b/libretro-build/Makefile.windows_x86 @@ -2,8 +2,8 @@ # Works on hosts Linux # apt-get install mingw-w64 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = windows_x86 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = i686-w64-mingw32-ar OBJEXT = .windows_x86.o SOEXT = .windows_x86.dll +LIBEXT = .windows_x86.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -shared -lm ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS = diff --git a/libretro-build/Makefile.windows_x86_64 b/libretro-build/Makefile.windows_x86_64 index ce4b445d6..4d61da7f2 100644 --- a/libretro-build/Makefile.windows_x86_64 +++ b/libretro-build/Makefile.windows_x86_64 @@ -2,8 +2,8 @@ # Works on hosts Linux # apt-get install mingw-w64 -########################## -# Checks the host platform +######################### +# Check the host platform HOST_PLATFORM = linux ifeq ($(shell uname -a),) @@ -16,6 +16,11 @@ else ifneq ($(findstring win,$(shell uname -a)),) HOST_PLATFORM = windows endif +######################### +# Set the target platform + +TARGET_PLATFORM = windows_x86_64 + ################# # Toolchain setup @@ -29,6 +34,7 @@ AR = x86_64-w64-mingw32-ar OBJEXT = .windows_x86_64.o SOEXT = .windows_x86_64.dll +LIBEXT = .windows_x86_64.a ################ # Platform setup @@ -44,7 +50,7 @@ PLATLDXFLAGS = -shared -lm ################ # libretro setup -#RETRODEFS = -D__LIBRETRO__ +RETRODEFS = -D__LIBRETRO__ RETROCFLAGS = RETROCXXFLAGS = RETROLDFLAGS =