RetroArch/Makefile.wii

59 lines
1.3 KiB
Makefile
Raw Normal View History

2011-12-14 13:36:23 +00:00
###
##
# Makefile for SSNES Wii.
2011-12-14 15:29:38 +00:00
## Doesn't really work yet, beware :V
2011-12-14 13:36:23 +00:00
###
##
DEBUG = 0
CC = powerpc-eabi-gcc
CXX = powerpc-eabi-g++
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
MACHDEP := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
CXXFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
2011-12-14 15:01:16 +00:00
LDFLAGS := $(MACHDEP)
2011-12-14 18:11:46 +00:00
LIBS := -lfat -logc -lsnes
2011-12-14 13:36:23 +00:00
2011-12-14 18:11:46 +00:00
OBJ = wii/main.o fifo_buffer.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o wii/audio.o wii/input.o wii/video.o
2011-12-14 13:36:23 +00:00
2011-12-14 15:40:25 +00:00
CFLAGS += -std=gnu99 -DHAVE_CONFIGFILE=1 -DHAVE_GETOPT_LONG -DPACKAGE_VERSION=\"0.9.3\" -Dmain=ssnes_main -Wno-char-subscripts
CXXFLAGS += -std=gnu99 -DHAVE_CONFIGFILE=1 -DHAVE_GETOPT_LONG -DPACKAGE_VERSION=\"0.9.3\" -Dmain=ssnes_main -Wno-char-subscripts
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
elf2dol $< $@
$(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 $@ $<
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f $(DOL_TARGET)
rm -f $(ELF_TARGET)
rm -f $(OBJ)
.PHONY: clean