RetroArch/Makefile.xenon
2011-12-14 01:35:17 +01:00

56 lines
1.4 KiB
Makefile

###
##
# Makefile for SSNES libxenon.
##
###
##
DEBUG = 0
CC = xenon-gcc
CXX = xenon-g++
OBJCOPY = xenon-objcopy
STRIP = xenon-strip
PPU_TARGET := ssnes-libxenon.elf
PPU_TARGET_ADJUSTED := ssnes-libxenon.elf32
LDDIRS = -L. -L$(DEVKITXENON)/usr/lib -L$(DEVKITXENON)/xenon/lib/32
INCDIRS = -I. -I$(DEVKITXENON)/usr/include -I$(DEVKITXENON)/usr/include/SDL
OBJ = fifo_buffer.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o input/sdl.o audio/sdl.o gfx/sdl.o gfx/sdlwrap.o gfx/gfx_common.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o xenon/cond.o xenon/main.o xenon/xenon360_audio.o xenon/xenon360_input.o
LIBS = -lsnes -lSDL -lxenon -lm -lc
DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DHAVE_SDL=1 -DPACKAGE_VERSION=\"0.9.3\" -DHAVE_GETOPT_LONG=1 -Dmain=ssnes_main
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DSDL -DXENON $(INCDIRS)
DEFINES += -u read -u _start -u exc_base
ifeq ($(DEBUG), 1)
OPTIMIZE_LV := -O0 -g
else
OPTIMIZE_LV := -O3
endif
all: $(PPU_TARGET_ADJUSTED)
CFLAGS := $(OPTIMIZE_LV) $(DEFINES)
LDFLAGS := -m32 -n -T $(DEVKITXENON)/app.lds
$(PPU_TARGET_ADJUSTED): $(PPU_TARGET)
$(OBJCOPY) -O elf32-powerpc --adjust-vma 0x80000000 $< $@
$(STRIP) $@
$(PPU_TARGET): $(OBJ)
$(CXX) -o $@ $(OBJ) $(LDFLAGS) $(LDDIRS) $(LIBS)
%.o: %.c config.h
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(PPU_TARGET)
rm -f $(OBJ)
.PHONY: clean