2011-12-07 02:19:12 +00:00
|
|
|
###
|
|
|
|
##
|
2012-04-21 21:42:20 +00:00
|
|
|
# Makefile for RetroArch libxenon.
|
2011-12-07 02:19:12 +00:00
|
|
|
##
|
|
|
|
###
|
|
|
|
##
|
|
|
|
|
2011-12-16 13:43:09 +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++
|
2011-12-10 17:02:50 +00:00
|
|
|
OBJCOPY = xenon-objcopy
|
2011-12-10 16:41:16 +00:00
|
|
|
STRIP = xenon-strip
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2012-04-21 21:42:20 +00:00
|
|
|
PPU_TARGET := retroarch-libxenon.elf
|
|
|
|
PPU_TARGET_ADJUSTED := retroarch-libxenon.elf32
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2011-12-10 16:41:16 +00:00
|
|
|
LDDIRS = -L. -L$(DEVKITXENON)/usr/lib -L$(DEVKITXENON)/xenon/lib/32
|
2011-12-15 12:54:22 +00:00
|
|
|
INCDIRS = -I. -I$(DEVKITXENON)/usr/include
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2012-08-11 12:27:12 +00:00
|
|
|
OBJ = fifo_buffer.o retroarch.o driver.o file.o file_path.o settings.o message.o rewind.o movie.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o 360/frontend-xenon/main.o 360/xenon360_audio.o 360/xenon360_input.o 360/xenon360_video.o thread/xenon_sdl_threads.o
|
2011-12-07 02:19:12 +00:00
|
|
|
|
2012-06-30 12:59:39 +00:00
|
|
|
LIBS = -lretro_xenon360 -lxenon -lm -lc
|
2012-11-12 23:52:23 +00:00
|
|
|
DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"0.9.8-beta2\" -DRARCH_CONSOLE -DHAVE_GETOPT_LONG=1 -Dmain=rarch_main
|
2011-12-15 12:54:22 +00:00
|
|
|
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS)
|
2011-12-10 17:02:50 +00:00
|
|
|
DEFINES += -u read -u _start -u exc_base
|
2011-12-07 02:19:12 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
OPTIMIZE_LV := -O0 -g
|
|
|
|
else
|
|
|
|
OPTIMIZE_LV := -O3
|
|
|
|
endif
|
|
|
|
|
2011-12-10 17:02:50 +00:00
|
|
|
all: $(PPU_TARGET_ADJUSTED)
|
|
|
|
|
2011-12-10 14:23:20 +00:00
|
|
|
CFLAGS := $(OPTIMIZE_LV) $(DEFINES)
|
2011-12-10 17:02:50 +00:00
|
|
|
|
|
|
|
LDFLAGS := -m32 -n -T $(DEVKITXENON)/app.lds
|
|
|
|
|
|
|
|
$(PPU_TARGET_ADJUSTED): $(PPU_TARGET)
|
|
|
|
$(OBJCOPY) -O elf32-powerpc --adjust-vma 0x80000000 $< $@
|
|
|
|
$(STRIP) $@
|
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
|
|
|
|
|
|
|
%.o: %.c config.h
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(PPU_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|