2011-12-07 02:19:12 +00:00
|
|
|
###
|
|
|
|
##
|
|
|
|
# Makefile for SSNES libxenon.
|
|
|
|
##
|
|
|
|
###
|
|
|
|
##
|
|
|
|
|
2011-12-10 14:23:20 +00:00
|
|
|
DEBUG = 0
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2011-12-10 16:41:16 +00:00
|
|
|
CC = xenon-gcc
|
|
|
|
CXX = xenon-g++
|
|
|
|
STRIP = xenon-strip
|
2011-12-07 02:19:12 +00:00
|
|
|
|
|
|
|
PPU_TARGET := ssnes-libxenon.elf
|
|
|
|
|
2011-12-10 16:41:16 +00:00
|
|
|
LDDIRS = -L. -L$(DEVKITXENON)/usr/lib -L$(DEVKITXENON)/xenon/lib/32
|
2011-12-10 14:23:20 +00:00
|
|
|
INCDIRS = -I. -I$(DEVKITXENON)/usr/include -I$(DEVKITXENON)/usr/include/SDL
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2011-12-10 16:41:16 +00:00
|
|
|
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
|
2011-12-07 02:19:12 +00:00
|
|
|
|
|
|
|
LIBS = -lsnes -lSDL -lxenon -lm
|
2011-12-10 16:41:16 +00:00
|
|
|
DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DHAVE_SDL=1 -DPACKAGE_VERSION=\"0.9.2\" -DHAVE_GETOPT_LONG=1
|
|
|
|
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DSDL -DXENON $(INCDIRS)
|
2011-12-07 02:19:12 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
OPTIMIZE_LV := -O0 -g
|
|
|
|
else
|
|
|
|
OPTIMIZE_LV := -O3
|
|
|
|
endif
|
|
|
|
|
2011-12-10 14:23:20 +00:00
|
|
|
CFLAGS := $(OPTIMIZE_LV) $(DEFINES)
|
2011-12-10 16:41:16 +00:00
|
|
|
LDFLAGS := -m32 -mpowerpc64 -u read -u _start -u exc_base -fno-pic -mhard-float
|
2011-12-07 02:19:12 +00:00
|
|
|
|
|
|
|
$(PPU_TARGET): $(OBJ)
|
2011-12-10 16:41:16 +00:00
|
|
|
$(CXX) -o $@ $(OBJ) $(LDFLAGS) $(LDDIRS) $(LIBS)
|
2011-12-07 02:19:12 +00:00
|
|
|
$(STRIP) $(PPU_TARGET)
|
|
|
|
|
|
|
|
%.o: %.c config.h
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(PPU_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|
2011-12-10 14:23:20 +00:00
|
|
|
|