2011-12-14 13:36:23 +00:00
|
|
|
###
|
|
|
|
##
|
2012-04-21 21:42:20 +00:00
|
|
|
# Makefile for RetroArch Wii.
|
2011-12-14 13:36:23 +00:00
|
|
|
##
|
|
|
|
|
2012-03-12 23:44:37 +00:00
|
|
|
DEBUG = 0
|
|
|
|
HAVE_LOGGER = 0
|
2012-04-13 20:54:30 +00:00
|
|
|
HAVE_FILE_LOGGER = 0
|
2012-03-12 23:44:37 +00:00
|
|
|
|
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-03-12 21:39:29 +00:00
|
|
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc
|
|
|
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++
|
|
|
|
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
DOL_TARGET := ssnes.dol
|
|
|
|
ELF_TARGET := ssnes.elf
|
|
|
|
|
|
|
|
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include
|
2011-12-14 15:01:16 +00:00
|
|
|
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-04-13 00:17:27 +00:00
|
|
|
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
2011-12-14 13:36:23 +00:00
|
|
|
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
|
|
|
CXXFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
2011-12-14 15:01:16 +00:00
|
|
|
LDFLAGS := $(MACHDEP)
|
2012-04-13 00:17:27 +00:00
|
|
|
LIBS := -lfat -lretro -lwiiuse -logc -lbte -lfreetype
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-04-14 12:08:00 +00:00
|
|
|
OBJ = console/griffin/griffin.o console/font.bmpobj console/szlib/szlib.o
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-03-12 23:44:37 +00:00
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
OBJ += console/logger/logger.o
|
|
|
|
endif
|
|
|
|
|
2012-04-13 20:54:30 +00:00
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
endif
|
|
|
|
|
2012-04-28 23:06:53 +00:00
|
|
|
CFLAGS += -std=gnu99 -DRARCH_CONSOLE -DHAVE_CONFIGFILE=1 -DGEKKO -DHW_RVL -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_FREETYPE -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"0.9.6-beta1\" -Dmain=ssnes_main -Wno-char-subscripts -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
CXXFLAGS += -O0 -g
|
|
|
|
else
|
|
|
|
CLFAGS += -O3
|
|
|
|
CXXFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(DOL_TARGET)
|
|
|
|
|
|
|
|
%.dol: %.elf
|
2012-03-12 21:39:29 +00:00
|
|
|
$(DEVKITPPC)/bin/elf2dol $< $@
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
2011-12-14 18:11:46 +00:00
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2012-01-07 23:57:44 +00:00
|
|
|
%.bmpobj: %.bmp
|
|
|
|
$(LD) -r -b binary -o $@ $<
|
|
|
|
|
2011-12-14 13:36:23 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(DOL_TARGET)
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|