From c8b3046c6efaef6dc9fd59a7b0a760a6656c94f4 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sat, 18 Aug 2012 16:54:57 +0200 Subject: [PATCH] (Wii) Makefile update - should compile on both Win32 and Linux now --- Makefile.wii | 20 ++++++++++++++++---- Makefile.wii.salamander | 20 ++++++++++++++++---- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Makefile.wii b/Makefile.wii index c3f0f9523f..85c153a6c9 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -10,9 +10,21 @@ HAVE_FILE_LOGGER = 0 PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7" PC_DEVELOPMENT_UDP_PORT = 3490 -CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc -CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++ -LD = $(DEVKITPPC)/bin/powerpc-eabi-ld +# system platform +system_platform = unix +ifeq ($(shell uname -a),) +EXE_EXT = .exe + system_platform = win +else ifneq ($(findstring Darwin,$(shell uname -a)),) + system_platform = osx +else ifneq ($(findstring MINGW,$(shell uname -a)),) + system_platform = win +endif + +CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT) +CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT) +LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT) +ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT) DOL_TARGET := retroarch.dol ELF_TARGET := retroarch.elf @@ -50,7 +62,7 @@ endif all: $(DOL_TARGET) %.dol: %.elf - $(DEVKITPPC)/bin/elf2dol $< $@ + $(ELF2DOL) $< $@ $(ELF_TARGET): $(OBJ) $(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS) diff --git a/Makefile.wii.salamander b/Makefile.wii.salamander index a50544c9bc..e082447306 100644 --- a/Makefile.wii.salamander +++ b/Makefile.wii.salamander @@ -7,12 +7,24 @@ DEBUG = 0 HAVE_LOGGER = 0 HAVE_FILE_LOGGER = 0 +# system platform +system_platform = unix +ifeq ($(shell uname -a),) +EXE_EXT = .exe + system_platform = win +else ifneq ($(findstring Darwin,$(shell uname -a)),) + system_platform = osx +else ifneq ($(findstring MINGW,$(shell uname -a)),) + system_platform = win +endif + PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7" PC_DEVELOPMENT_UDP_PORT = 3490 -CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc -CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++ -LD = $(DEVKITPPC)/bin/powerpc-eabi-ld +CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT) +CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT) +LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT) +ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT) DOL_TARGET := retroarch-salamander_gx.dol ELF_TARGET := retroarch-salamander_gx.elf @@ -50,7 +62,7 @@ endif all: $(DOL_TARGET) %.dol: %.elf - $(DEVKITPPC)/bin/elf2dol $< $@ + $(ELF2DOL) $< $@ $(ELF_TARGET): $(OBJ) $(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)