2012-08-06 00:36:41 +00:00
|
|
|
###
|
|
|
|
##
|
|
|
|
# Makefile for RetroArch Wii.
|
|
|
|
##
|
|
|
|
|
|
|
|
DEBUG = 0
|
|
|
|
HAVE_LOGGER = 0
|
|
|
|
HAVE_FILE_LOGGER = 0
|
2017-08-19 06:46:04 +00:00
|
|
|
EXTERNAL_LIBOGC = 0
|
2012-08-06 00:36:41 +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
|
|
|
|
|
2014-05-31 20:27:27 +00:00
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
2012-08-06 00:36:41 +00:00
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
2012-08-18 14:54:57 +00:00
|
|
|
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)
|
2012-08-06 00:36:41 +00:00
|
|
|
|
2012-09-01 01:01:33 +00:00
|
|
|
DOL_TARGET := retroarch-salamander_wii.dol
|
|
|
|
ELF_TARGET := retroarch-salamander_wii.elf
|
2012-08-06 00:36:41 +00:00
|
|
|
|
2017-08-19 06:31:02 +00:00
|
|
|
INCLUDE := -I. -Ilibretro-common/include -Ideps/libz
|
|
|
|
ifeq ($(EXTERNAL_LIBOGC), 1)
|
|
|
|
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
2017-08-19 07:03:10 +00:00
|
|
|
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
2017-08-19 06:31:02 +00:00
|
|
|
else
|
|
|
|
INCLUDE += -Iwii/libogc/include
|
2017-08-19 07:03:10 +00:00
|
|
|
LIBDIRS := -Lwii/libogc/libs/wii -L.
|
2017-08-19 06:31:02 +00:00
|
|
|
endif
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
|
|
|
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
2012-08-30 22:59:21 +00:00
|
|
|
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
2017-08-19 07:01:51 +00:00
|
|
|
LIBS := -lwiiuse -logc -lbte
|
2017-08-19 06:46:04 +00:00
|
|
|
|
|
|
|
ifeq ($(EXTERNAL_LIBOGC), 1)
|
|
|
|
LIBS += -lfat
|
|
|
|
endif
|
2012-08-06 00:36:41 +00:00
|
|
|
|
2015-09-20 17:14:13 +00:00
|
|
|
APP_BOOTER_DIR = wii/app_booter
|
2012-08-30 22:59:21 +00:00
|
|
|
|
2015-09-04 16:54:29 +00:00
|
|
|
OBJ = frontend/frontend_salamander.o \
|
|
|
|
frontend/frontend_driver.o \
|
|
|
|
frontend/drivers/platform_gx.o \
|
|
|
|
frontend/drivers/platform_wii.o \
|
|
|
|
frontend/drivers/platform_null.o \
|
|
|
|
libretro-common/file/file_path.o \
|
|
|
|
libretro-common/hash/rhash.o \
|
2015-12-26 06:45:19 +00:00
|
|
|
libretro-common/string/stdstring.o \
|
2016-03-20 13:53:54 +00:00
|
|
|
libretro-common/lists/string_list.o \
|
|
|
|
libretro-common/lists/dir_list.o \
|
2016-03-20 15:29:14 +00:00
|
|
|
libretro-common/streams/file_stream.o \
|
2017-12-14 14:18:48 +00:00
|
|
|
libretro-common/vfs/vfs_implementation.o \
|
2015-09-04 16:54:29 +00:00
|
|
|
libretro-common/file/retro_dirent.o \
|
2017-08-06 11:58:17 +00:00
|
|
|
libretro-common/encodings/encoding_utf.o \
|
2015-10-26 01:46:51 +00:00
|
|
|
libretro-common/compat/compat_strl.o \
|
2016-12-17 18:35:51 +00:00
|
|
|
libretro-common/compat/compat_strcasestr.o \
|
2015-09-04 16:54:29 +00:00
|
|
|
libretro-common/file/config_file.o \
|
2016-06-28 01:21:30 +00:00
|
|
|
file_path_str.o \
|
2015-11-23 11:03:38 +00:00
|
|
|
verbosity.o \
|
2015-09-04 16:54:29 +00:00
|
|
|
$(APP_BOOTER_DIR)/app_booter.binobj
|
2012-08-06 00:36:41 +00:00
|
|
|
|
2017-08-19 06:46:04 +00:00
|
|
|
ifeq ($(EXTERNAL_LIBOGC), 1)
|
|
|
|
else
|
|
|
|
OBJ += wii/libogc/libfat/cache.o \
|
|
|
|
wii/libogc/libfat/directory.o \
|
|
|
|
wii/libogc/libfat/disc.o \
|
|
|
|
wii/libogc/libfat/fatdir.o \
|
|
|
|
wii/libogc/libfat/fatfile.o \
|
|
|
|
wii/libogc/libfat/file_allocation_table.o \
|
|
|
|
wii/libogc/libfat/filetime.o \
|
|
|
|
wii/libogc/libfat/libfat.o \
|
|
|
|
wii/libogc/libfat/lock.o \
|
|
|
|
wii/libogc/libfat/partition.o
|
|
|
|
endif
|
|
|
|
|
2012-08-06 00:36:41 +00:00
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
2016-05-19 09:46:54 +00:00
|
|
|
OBJ += network/net_logger.o \
|
2016-05-01 22:05:33 +00:00
|
|
|
libretro-common/net/net_compat.o \
|
|
|
|
libretro-common/net/net_socket.o
|
2012-08-06 00:36:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
endif
|
|
|
|
|
2015-11-17 03:09:16 +00:00
|
|
|
CFLAGS += -std=gnu99 -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_RARCH_EXEC -DGEKKO -Wno-char-subscripts
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
|
|
|
CFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
2015-11-17 03:09:16 +00:00
|
|
|
ifeq ($(USBGECKO), 1)
|
|
|
|
LIBS += -ldb
|
|
|
|
CFLAGS += -DUSBGECKO
|
|
|
|
endif
|
|
|
|
|
2012-08-06 00:36:41 +00:00
|
|
|
all: $(DOL_TARGET)
|
|
|
|
|
|
|
|
%.dol: %.elf
|
2012-08-18 14:54:57 +00:00
|
|
|
$(ELF2DOL) $< $@
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2012-08-30 22:59:21 +00:00
|
|
|
%.binobj: %.bin
|
2012-08-06 00:36:41 +00:00
|
|
|
$(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-08-06 00:36:41 +00:00
|
|
|
pkg: all
|
2015-08-31 19:04:00 +00:00
|
|
|
cp -r $(DOL_TARGET) pkg/wii/boot.dol
|
2012-08-06 00:36:41 +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
|
2012-08-06 00:36:41 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|