mirror of
https://github.com/libretro/vba-next.git
synced 2025-02-17 05:28:05 +00:00
Add preliminary build/ files
This commit is contained in:
parent
2e9923163e
commit
55479df2bf
@ -2,6 +2,43 @@ DEBUG = 0
|
||||
FRONTEND_SUPPORTS_RGB565=1
|
||||
TILED_RENDERING=0
|
||||
|
||||
CORE_DIR := src
|
||||
BUILD_DIR = build
|
||||
|
||||
ifeq ($(platform),android-arm64_v8a)
|
||||
include $(BUILD_DIR)/Makefile.android-arm64_v8a
|
||||
else ifeq ($(platform),android-armeabi)
|
||||
include $(BUILD_DIR)/Makefile.android-armeabi
|
||||
else ifeq ($(platform),android-armeabi_v7a)
|
||||
include $(BUILD_DIR)/Makefile.android-armeabi_v7a
|
||||
else ifeq ($(platform),android-mips)
|
||||
include $(BUILD_DIR)/Makefile.android-mips
|
||||
else ifeq ($(platform),android-mips64)
|
||||
include $(BUILD_DIR)/Makefile.android-mips64
|
||||
else ifeq ($(platform),android-x86)
|
||||
include $(BUILD_DIR)/Makefile.android-x86
|
||||
else ifeq ($(platform),android-x86_64)
|
||||
include $(BUILD_DIR)/Makefile.android-x86_64
|
||||
else ifeq ($(platform),linux_portable-x86)
|
||||
include $(BUILD_DIR)/Makefile.linux_portable-x86
|
||||
else ifeq ($(platform),linux_portable-x86_64)
|
||||
include $(BUILD_DIR)/Makefile.linux_portable-x86_64
|
||||
else ifeq ($(platform),linux-x86)
|
||||
include $(BUILD_DIR)/Makefile.linux-x86
|
||||
else ifeq ($(platform),linux-x86_64)
|
||||
include $(BUILD_DIR)/Makefile.linux-x86_64
|
||||
else ifeq ($(platform),mingw32)
|
||||
include $(BUILD_DIR)/Makefile.mingw32
|
||||
else ifeq ($(platform),mingw64)
|
||||
include $(BUILD_DIR)/Makefile.mingw64
|
||||
else ifeq ($(platform),wii)
|
||||
include $(BUILD_DIR)/Makefile.wii
|
||||
else ifeq ($(platform),windows-x86)
|
||||
include $(BUILD_DIR)/Makefile.windows-x86
|
||||
else ifeq ($(platform),windows-x86_64)
|
||||
include $(BUILD_DIR)/Makefile.windows-x86_64
|
||||
else
|
||||
|
||||
ifneq ($(EMSCRIPTEN),)
|
||||
platform = emscripten
|
||||
endif
|
||||
@ -24,7 +61,6 @@ endif
|
||||
endif
|
||||
|
||||
LIBRETRO_DIR := libretro
|
||||
CORE_DIR := src
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@ -211,7 +247,7 @@ else
|
||||
CXXFLAGS += -O3
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
include build/Makefile.common
|
||||
|
||||
OBJECTS := $(SOURCES_CXX:.cpp=.o)
|
||||
|
||||
@ -258,3 +294,5 @@ clean:
|
||||
|
||||
.PHONY: clean clean-objs
|
||||
endif
|
||||
|
||||
endif
|
||||
|
99
build/Makefile.android-arm64_v8a
Normal file
99
build/Makefile.android-arm64_v8a
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
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++/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
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
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
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
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 -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++/4.9/libs/arm64-v8a/libgnustl_static.a
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-armeabi
Normal file
99
build/Makefile.android-armeabi
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-3/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include/backward
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc
|
||||
CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++
|
||||
AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as
|
||||
AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .armeabi.o
|
||||
SOEXT = .armeabi.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
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=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
|
||||
PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/thumb/libgnustl_static.a
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-armeabi_v7a
Normal file
99
build/Makefile.android-armeabi_v7a
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES = -I$(NDK_ROOT_DIR)/platforms/android-3/arch-arm/usr/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include/backward
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-gcc
|
||||
CXX = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-g++
|
||||
AS = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-as
|
||||
AR = $(NDK_ROOT_DIR)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/arm-linux-androideabi-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .armeabi-v7a.o
|
||||
SOEXT = .armeabi-v7a.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
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-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
|
||||
PLATLDXFLAGS = -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 $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/thumb/libgnustl_static.a
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-mips
Normal file
99
build/Makefile.android-mips
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
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++/4.8/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include/backward
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-gcc
|
||||
CXX = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-g++
|
||||
AS = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-as
|
||||
AR = $(NDK_ROOT_DIR)/toolchains/mipsel-linux-android-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/mipsel-linux-android-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .android_mips.o
|
||||
SOEXT = .android_mips.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = android
|
||||
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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
|
||||
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.8/libs/mips/libgnustl_static.a
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-mips64
Normal file
99
build/Makefile.android-mips64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
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++/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
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
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
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = android
|
||||
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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
|
||||
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__
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-x86
Normal file
99
build/Makefile.android-x86
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
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++/4.8/include $(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include -I$(NDK_ROOT_DIR)/sources/cxx-stl/gnu-libstdc++/4.8/include/backward
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(NDK_ROOT_DIR)/toolchains/x86-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-gcc
|
||||
CXX = $(NDK_ROOT_DIR)/toolchains/x86-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-g++
|
||||
AS = $(NDK_ROOT_DIR)/toolchains/x86-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-as
|
||||
AR = $(NDK_ROOT_DIR)/toolchains/x86-4.8/prebuilt/$(HOST_PLATFORM)-x86_64/bin/i686-linux-android-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .x86.o
|
||||
SOEXT = .x86.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = android
|
||||
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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
|
||||
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.8/libs/x86/libgnustl_static.a
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.android-x86_64
Normal file
99
build/Makefile.android-x86_64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux, Windows and Darwin
|
||||
# Download the Android NDK, unpack somewhere, and set NDK_ROOT_DIR to it
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
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++/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
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
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
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = android
|
||||
PLATDEFS = -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -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
|
||||
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__
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.linux-x86
Normal file
99
build/Makefile.linux-x86
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
# apt-get install g++-multilib libc6-dev-i386
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .linux_x86.o
|
||||
SOEXT = .linux_x86.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = unix
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined
|
||||
PLATLDXFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.linux-x86_64
Normal file
99
build/Makefile.linux-x86_64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
#
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .linux_x86_64.o
|
||||
SOEXT = .linux_x86_64.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = unix
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined
|
||||
PLATLDXFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.linux_portable-x86
Normal file
99
build/Makefile.linux_portable-x86
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
# apt-get install g++-multilib libc6-dev-i386
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .linux_x86.o
|
||||
SOEXT = .linux_x86.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = unix
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T
|
||||
PLATLDXFLAGS = -m32 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.linux_portable-x86_64
Normal file
99
build/Makefile.linux_portable-x86_64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
#
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .linux_x86_64.o
|
||||
SOEXT = .linux_x86_64.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = unix
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T
|
||||
PLATLDXFLAGS = -m64 -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T
|
||||
|
||||
################
|
||||
# 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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.mingw32
Normal file
99
build/Makefile.mingw32
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Windows
|
||||
# Install MSYS2
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .mingw32.o
|
||||
SOEXT = .mingw32.dll
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = win
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m32 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m32 -shared -lm
|
||||
PLATLDXFLAGS = -m32 -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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.mingw64
Normal file
99
build/Makefile.mingw64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Windows
|
||||
# Install MSYS2
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = as
|
||||
AR = ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .mingw64.o
|
||||
SOEXT = .mingw64.dll
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = win
|
||||
PLATDEFS =
|
||||
PLATCFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATCXXFLAGS = -m64 -fpic -fstrict-aliasing
|
||||
PLATLDFLAGS = -m64 -shared -lm
|
||||
PLATLDXFLAGS = -m64 -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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
40
build/Makefile.rules
Normal file
40
build/Makefile.rules
Normal file
@ -0,0 +1,40 @@
|
||||
TARGET_NAME ?= vba_next
|
||||
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
TARGET = $(TARGET_NAME)_libretro_$(platform).a
|
||||
else
|
||||
TARGET = $(TARGET_NAME)_libretro$(SOEXT)
|
||||
endif
|
||||
|
||||
DEFINES +=
|
||||
CFLAGS += -Wall
|
||||
CXXFLAGS += -Wall
|
||||
LDFLAGS +=
|
||||
|
||||
OBJS = $(SOURCES_C:.c=$(OBJEXT)) $(SOURCES_CXX:.cpp=$(OBJEXT))
|
||||
|
||||
%$(OBJEXT): %.cpp
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||
|
||||
%$(OBJEXT): %.c
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
%$(OBJEXT): %.S
|
||||
$(CC_AS) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(HEADERS) $(OBJS)
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJS)
|
||||
else
|
||||
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
clean-objs:
|
||||
rm -f $(OBJS)
|
||||
|
||||
clean: clean-objs
|
||||
rm -f $(TARGET)
|
||||
|
||||
.PHONY: clean-objs clean dist-clean FORCE
|
99
build/Makefile.wii
Normal file
99
build/Makefile.wii
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
# Install devkitppc
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = $(DEVKITPPC_ROOT_DIR)/bin/powerpc-eabi-gcc
|
||||
CXX = $(DEVKITPPC_ROOT_DIR)/bin/powerpc-eabi-g++
|
||||
AS = $(DEVKITPPC_ROOT_DIR)/bin/powerpc-eabi-as
|
||||
AR = $(DEVKITPPC_ROOT_DIR)/bin/powerpc-eabi-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .wii.o
|
||||
SOEXT = .wii.so
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 1
|
||||
platform = wii
|
||||
PLATDEFS = -DGEKKO -DHW_RVL
|
||||
PLATCFLAGS = -m32 -fstrict-aliasing -mrvl -mcpu=750 -meabi -mhard-float
|
||||
PLATCXXFLAGS = -m32 -fstrict-aliasing -mrvl -mcpu=750 -meabi -mhard-float
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.windows-x86
Normal file
99
build/Makefile.windows-x86
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
# apt-get install mingw-w64
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = i686-w64-mingw32-gcc
|
||||
CXX = i686-w64-mingw32-g++
|
||||
AS = i686-w64-mingw32-as
|
||||
AR = i686-w64-mingw32-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .windows_x86.o
|
||||
SOEXT = .windows_x86.dll
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = win
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
99
build/Makefile.windows-x86_64
Normal file
99
build/Makefile.windows-x86_64
Normal file
@ -0,0 +1,99 @@
|
||||
##############
|
||||
# Works on hosts Linux
|
||||
# apt-get install mingw-w64
|
||||
|
||||
#############
|
||||
# User config
|
||||
|
||||
DEBUG = 0
|
||||
LOG_PERFORMANCE = 1
|
||||
|
||||
##########################
|
||||
# Checks 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
|
||||
|
||||
|
||||
####################################
|
||||
# Variable setup for Makefile.common
|
||||
|
||||
CORE_DIR ?= ..
|
||||
BUILD_DIR ?= .
|
||||
INCLUDES =
|
||||
|
||||
include $(BUILD_DIR)/Makefile.common
|
||||
|
||||
#################
|
||||
# Toolchain setup
|
||||
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CXX = x86_64-w64-mingw32-g++
|
||||
AS = x86_64-w64-mingw32-as
|
||||
AR = x86_64-w64-mingw32-ar
|
||||
|
||||
############
|
||||
# Extensions
|
||||
|
||||
OBJEXT = .windows_x86_64.o
|
||||
SOEXT = .windows_x86_64.dll
|
||||
|
||||
################
|
||||
# Platform setup
|
||||
|
||||
STATIC_LINKING = 0
|
||||
platform = win
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
CXXFLAGS += -O0 -g
|
||||
LDFLAGS += -g
|
||||
LDXFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3 -DNDEBUG
|
||||
CXXFLAGS += -O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_PERFORMANCE), 1)
|
||||
CFLAGS += -DLOG_PERFORMANCE
|
||||
CXXFLAGS += -DLOG_PERFORMANCE
|
||||
endif
|
||||
|
||||
###############
|
||||
# Include rules
|
||||
|
||||
include $(BUILD_DIR)/Makefile.rules
|
5
build/link.T
Normal file
5
build/link.T
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
global: retro_*;
|
||||
local: *;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user