2013-06-28 12:11:10 +00:00
|
|
|
RARCH_VERSION = "0.9.9.3"
|
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-10-01 22:47:20 +00:00
|
|
|
PERF_TEST = 0
|
2013-02-22 20:24:05 +00:00
|
|
|
WHOLE_ARCHIVE_LINK = 0
|
|
|
|
BIG_STACK = 0
|
2012-03-12 23:44:37 +00:00
|
|
|
|
2013-04-26 17:14:25 +00:00
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.6"
|
2012-03-12 23:44:37 +00:00
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-08-18 14:54:57 +00:00
|
|
|
# system platform
|
|
|
|
system_platform = unix
|
|
|
|
ifeq ($(shell uname -a),)
|
|
|
|
EXE_EXT = .exe
|
|
|
|
system_platform = win
|
|
|
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
|
|
|
system_platform = osx
|
|
|
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
|
|
|
system_platform = win
|
|
|
|
endif
|
|
|
|
|
|
|
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
|
|
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
|
|
|
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
|
|
|
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-09-01 01:01:33 +00:00
|
|
|
DOL_TARGET := retroarch_wii.dol
|
|
|
|
ELF_TARGET := retroarch_wii.elf
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2013-01-07 03:09:13 +00:00
|
|
|
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/ogc
|
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
|
2012-06-26 16:58:41 +00:00
|
|
|
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
2013-02-06 00:29:27 +00:00
|
|
|
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
2013-02-22 20:24:05 +00:00
|
|
|
WHOLE_START := -Wl,--whole-archive
|
|
|
|
WHOLE_END := -Wl,--no-whole-archive
|
|
|
|
endif
|
|
|
|
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size
|
|
|
|
ifeq ($(BIG_STACK), 1)
|
|
|
|
LDFLAGS += -T gx/ld/rvl.ld
|
2013-02-06 00:29:27 +00:00
|
|
|
endif
|
2013-04-28 19:45:09 +00:00
|
|
|
LIBS := -lfat $(WHOLE_START) -lretro_wii $(WHOLE_END) -logc -lwiiuse -lbte
|
2012-09-03 22:05:23 +00:00
|
|
|
APP_BOOTER_DIR = wii/app_booter
|
2012-08-30 22:59:21 +00:00
|
|
|
|
2013-03-18 04:46:19 +00:00
|
|
|
OBJ = griffin/griffin.o $(APP_BOOTER_DIR)/app_booter.binobj
|
2011-12-14 13:36:23 +00:00
|
|
|
|
2012-10-01 22:47:20 +00:00
|
|
|
ifeq ($(PERF_TEST), 1)
|
|
|
|
CFLAGS += -DPERF_TEST
|
|
|
|
endif
|
|
|
|
|
2012-03-12 23:44:37 +00:00
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
2012-06-26 16:58:41 +00:00
|
|
|
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
2012-07-28 15:32:30 +00:00
|
|
|
CFLAGS += -Iconsole/logger
|
2012-03-12 23:44:37 +00:00
|
|
|
endif
|
|
|
|
|
2012-04-13 20:54:30 +00:00
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
2012-07-28 15:32:30 +00:00
|
|
|
CFLAGS += -Iconsole/logger
|
2012-04-13 20:54:30 +00:00
|
|
|
endif
|
|
|
|
|
2013-01-18 12:32:57 +00:00
|
|
|
|
2013-11-11 10:14:55 +00:00
|
|
|
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_THREADS -DHAVE_RSOUND -Wno-char-subscripts
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
2012-11-22 07:08:50 +00:00
|
|
|
CFLAGS += -O0 -g -DDEBUG
|
2011-12-14 13:36:23 +00:00
|
|
|
else
|
2012-07-28 15:57:36 +00:00
|
|
|
CFLAGS += -O3
|
2011-12-14 13:36:23 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(DOL_TARGET)
|
|
|
|
|
|
|
|
%.dol: %.elf
|
2012-08-18 14:54:57 +00:00
|
|
|
$(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 $@ $<
|
|
|
|
|
2012-08-27 00:33:22 +00:00
|
|
|
%.binobj: %.bin
|
|
|
|
$(LD) -r -b binary -o $@ $<
|
|
|
|
|
2012-09-03 22:05:23 +00:00
|
|
|
$(APP_BOOTER_DIR)/app_booter.bin:
|
|
|
|
$(MAKE) -C $(APP_BOOTER_DIR)
|
2012-08-30 22:59:21 +00:00
|
|
|
|
2012-06-26 16:58:41 +00:00
|
|
|
pkg: all
|
2012-09-01 01:01:33 +00:00
|
|
|
cp -r $(DOL_TARGET) wii/pkg/CORE.dol
|
2012-06-26 16:58:41 +00:00
|
|
|
|
2011-12-14 13:36:23 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(DOL_TARGET)
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
2012-09-03 22:05:23 +00:00
|
|
|
$(MAKE) -C $(APP_BOOTER_DIR) clean
|
2011-12-14 13:36:23 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|