2012-08-06 00:36:41 +00:00
|
|
|
###
|
|
|
|
##
|
|
|
|
# Makefile for RetroArch Wii.
|
|
|
|
##
|
|
|
|
|
|
|
|
DEBUG = 0
|
|
|
|
HAVE_LOGGER = 0
|
|
|
|
HAVE_FILE_LOGGER = 0
|
|
|
|
|
2012-08-18 14:54:57 +00:00
|
|
|
# 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
|
|
|
|
|
2012-08-06 00:36:41 +00:00
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
2012-08-18 14:54:57 +00:00
|
|
|
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)
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
DOL_TARGET := retroarch-salamander_gx.dol
|
|
|
|
ELF_TARGET := retroarch-salamander_gx.elf
|
|
|
|
|
|
|
|
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include
|
|
|
|
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
|
|
|
|
|
|
|
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
|
|
|
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
2012-08-30 22:59:21 +00:00
|
|
|
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
2012-08-06 00:36:41 +00:00
|
|
|
LIBS := -lfat -lretro_wii -lwiiuse -logc -lbte
|
|
|
|
|
2012-08-30 22:59:21 +00:00
|
|
|
APP_BOOTER_DIR = gx/app_booter
|
|
|
|
|
2012-08-31 23:38:12 +00:00
|
|
|
OBJ = gx/salamander/main.o console/rarch_console_exec.o console/rarch_console_libretro_mgmt.o file_path.o compat/compat.o conf/config_file.o $(APP_BOOTER_DIR)/app_booter_wii.binobj
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
|
|
|
CFLAGS += -Iconsole/logger
|
|
|
|
OBJ += console/logger/logger.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
CFLAGS += -Iconsole/logger
|
|
|
|
endif
|
|
|
|
|
2012-08-31 23:38:12 +00:00
|
|
|
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_RARCH_EXEC -DHAVE_CONFIGFILE=1 -DGEKKO -DPACKAGE_VERSION=\"0.9.7\" -Wno-char-subscripts
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
|
|
|
CFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(DOL_TARGET)
|
|
|
|
|
|
|
|
%.dol: %.elf
|
2012-08-18 14:54:57 +00:00
|
|
|
$(ELF2DOL) $< $@
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2012-08-30 22:59:21 +00:00
|
|
|
%.binobj: %.bin
|
2012-08-06 00:36:41 +00:00
|
|
|
$(LD) -r -b binary -o $@ $<
|
|
|
|
|
2012-08-31 23:38:12 +00:00
|
|
|
$(APP_BOOTER_DIR)/app_booter_wii.bin:
|
|
|
|
$(MAKE) -C $(APP_BOOTER_DIR) platform=wii
|
2012-08-30 22:59:21 +00:00
|
|
|
|
2012-08-06 00:36:41 +00:00
|
|
|
pkg: all
|
2012-08-07 03:24:12 +00:00
|
|
|
cp -r $(DOL_TARGET) gx/pkg/boot.dol
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(DOL_TARGET)
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
2012-08-31 23:38:12 +00:00
|
|
|
$(MAKE) -C $(APP_BOOTER_DIR) platform=wii clean
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|