PokeMini/build/Makefile.wii_ppc
jdgleaver 1c74d02782 - Attempt to fix Windows build issues
- Update Makefiles
2018-04-16 16:38:47 +01:00

92 lines
1.9 KiB
Makefile

##############
# Works on hosts Linux
# Install devkitppc
##########################
# 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_ppc.o
SOEXT = .wii_ppc.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) $(COREDEFINES) $(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
###############
# Include rules
include $(BUILD_DIR)/Makefile.rules