mgba/libretro-build/Makefile.wii_ppc

97 lines
2.0 KiB
Makefile
Raw Permalink Normal View History

2015-08-04 03:52:00 +00:00
##############
# Works on hosts Linux
# Install devkitppc
2018-09-09 15:54:06 +00:00
#########################
# Check the host platform
2015-08-04 03:52:00 +00:00
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
2018-09-09 15:54:06 +00:00
#########################
# Set the target platform
TARGET_PLATFORM = wii_ppc
2015-08-04 03:52:00 +00:00
#################
# 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
2015-08-17 00:29:11 +00:00
OBJEXT = .wii_ppc.o
SOEXT = .wii_ppc.so
2018-09-09 15:54:06 +00:00
LIBEXT = .wii_ppc.a
2015-08-04 03:52:00 +00:00
################
# 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
2018-09-09 15:54:06 +00:00
RETRODEFS = -D__LIBRETRO__
2015-08-04 03:52:00 +00:00
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
2015-08-17 00:29:11 +00:00
ifneq ($(DEBUG),)
2015-08-04 03:52:00 +00:00
CFLAGS += -O0 -g
CXXFLAGS += -O0 -g
else
CFLAGS += -O3 -DNDEBUG
CXXFLAGS += -O3 -DNDEBUG
endif
2015-08-17 00:29:11 +00:00
ifneq ($(LOG_PERFORMANCE),)
2015-08-04 03:52:00 +00:00
CFLAGS += -DLOG_PERFORMANCE
CXXFLAGS += -DLOG_PERFORMANCE
endif
2015-08-17 02:21:08 +00:00
####################################
# Variable setup for Makefile.common
CORE_DIR ?= ..
BUILD_DIR ?= .
INCLUDES =
include $(BUILD_DIR)/Makefile.common
2015-08-04 03:52:00 +00:00
###############
# Include rules
include $(BUILD_DIR)/Makefile.rules