diff --git a/Common.mak b/Common.mak index 4f18b976f..daef12728 100644 --- a/Common.mak +++ b/Common.mak @@ -127,6 +127,25 @@ endif CROSS := CROSS_SUFFIX := +CCFULLPATH = $(CC) + +ifeq ($(PLATFORM),WII) + ifeq ($(strip $(DEVKITPPC)),) + $(error "Please set DEVKITPPC in your environment. export DEVKITPPC := devkitPPC") + endif + + ifeq ($(HOSTPLATFORM),WINDOWS) + override DEVKITPRO := $(subst /c/,C:/,$(DEVKITPRO)) + override DEVKITPPC := $(subst /c/,C:/,$(DEVKITPPC)) + endif + + export PATH := $(DEVKITPPC)/bin:$(PATH) + + CROSS := powerpc-eabi- + + CCFULLPATH = $(DEVKITPPC)/bin/$(CC) +endif + CC := $(CROSS)gcc$(CROSS_SUFFIX) CXX := $(CROSS)g++$(CROSS_SUFFIX) COBJC := $(CC) -x objective-c @@ -156,22 +175,6 @@ ifeq ($(AS),as) override AS := nasm endif -CCFULLPATH := $(CC) - -ifeq ($(PLATFORM),WII) - ifeq ($(strip $(DEVKITPPC)),) - $(error "Please set DEVKITPPC in your environment. export DEVKITPPC := devkitPPC") - endif - - include $(DEVKITPPC)/wii_rules - - CCFULLPATH := $(DEVKITPPC)/bin/$(CC) - - CROSS := powerpc-eabi- - RANLIB := powerpc-eabi-ranlib - STRIP := powerpc-eabi-strip -endif - ifeq ($(PLATFORM),$(filter $(PLATFORM),DINGOO GCW)) CROSS := mipsel-linux- endif @@ -470,8 +473,12 @@ else ifeq ($(PLATFORM),DARWIN) ASFORMAT += 64 endif else ifeq ($(PLATFORM),WII) - LINKERFLAGS += -mrvl -meabi -mhard-float -Wl,--gc-sections - # -msdata=eabi + LIBOGC_INC := $(DEVKITPRO)/libogc/include + LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii + + COMMONFLAGS += -mrvl -mcpu=750 -meabi -mhard-float + LINKERFLAGS += -Wl,--gc-sections + # -msdata=eabiexport COMPILERFLAGS += -DGEKKO -D__POWERPC__ -I$(LIBOGC_INC) LIBDIRS += -L$(LIBOGC_LIB) else ifeq ($(PLATFORM),$(filter $(PLATFORM),DINGOO GCW)) diff --git a/source/build/include/wiibits.h b/source/build/include/wiibits.h index 849ae76fe..3bcec6f1b 100644 --- a/source/build/include/wiibits.h +++ b/source/build/include/wiibits.h @@ -1,6 +1,4 @@ -#define HW_RVL - #include "compat.h" #ifdef __cplusplus