2019-05-27 11:40:50 +00:00
|
|
|
TARGET := retroarch_wiiu
|
2017-12-31 13:07:14 +00:00
|
|
|
|
|
|
|
BUILD_HBL_ELF = 1
|
|
|
|
BUILD_RPX = 1
|
|
|
|
DEBUG = 0
|
|
|
|
GRIFFIN_BUILD = 0
|
|
|
|
SALAMANDER_BUILD = 0
|
|
|
|
WHOLE_ARCHIVE_LINK = 0
|
2018-02-06 07:21:00 +00:00
|
|
|
WIIU_HID = 1
|
2018-04-08 05:15:59 +00:00
|
|
|
HAVE_RUNAHEAD = 1
|
Fix disabled HID code, add defensive programming
== DETAILS
1. Noticed that the HID driver wasn't loading after setting WIIU_HID=1. Found
that the HID driver init was ifdef'd out. Removed that.
2. Current theory around "System Memory Error 160-2203" is in-memory
corruption. So, to try to identify it:
- Created a routine that does a hex dump of the RPX over the logger. (I
have a python3 script that can extract the hex dump back into a binary
file). If a SME occurs with this routine enabled, we can see if the
corruption is happening at read-time, or somewhere between when we send
the RPX to the loader and try to execute it.
- I noticed that we allocate slightly more memory than the RPX actually
needs, and we don't zero the memory, which means there's a handful of
bytes at the end that could be anything. I added a call to memset() to
zero out the memory prior to loading the RPX off the SD card.
And, of course, after adding those, I haven't been able to reproduce the
System Memory Error, so maybe the uninitialized memory was the problem?
Here's hoping.
2018-01-19 03:57:19 +00:00
|
|
|
WIIU_LOG_RPX = 0
|
2017-12-31 13:07:14 +00:00
|
|
|
BUILD_DIR = objs/wiiu
|
2019-05-27 11:40:50 +00:00
|
|
|
PC_DEVELOPMENT_TCP_PORT ?=
|
2017-12-31 13:07:14 +00:00
|
|
|
|
|
|
|
ifeq ($(SALAMANDER_BUILD),1)
|
|
|
|
BUILD_DIR := $(BUILD_DIR)-salamander
|
|
|
|
TARGET := $(TARGET)_salamander
|
2018-01-11 01:09:03 +00:00
|
|
|
else ifeq ($(GRIFFIN_BUILD),1)
|
|
|
|
BUILD_DIR := $(BUILD_DIR)-griffin
|
2017-12-31 13:07:14 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
BUILD_DIR := $(BUILD_DIR)-debug
|
|
|
|
endif
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2017-11-04 05:19:49 +00:00
|
|
|
ifneq ($(V), 1)
|
|
|
|
Q := @
|
|
|
|
endif
|
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
DEFINES :=
|
2016-11-09 13:26:38 +00:00
|
|
|
OBJ :=
|
2019-05-27 11:40:50 +00:00
|
|
|
INCDIRS :=
|
|
|
|
|
|
|
|
#-----------------------------
|
|
|
|
# Features and object files
|
|
|
|
|
2018-05-01 04:56:06 +00:00
|
|
|
OBJ += wiiu/main.o
|
2016-11-09 13:26:38 +00:00
|
|
|
OBJ += wiiu/system/memory.o
|
2018-04-14 08:26:26 +00:00
|
|
|
OBJ += wiiu/system/atomic.o
|
2016-11-09 13:26:38 +00:00
|
|
|
OBJ += wiiu/system/exception_handler.o
|
2018-05-06 16:55:36 +00:00
|
|
|
OBJ += wiiu/system/missing_libc_functions.o
|
2016-11-09 13:26:38 +00:00
|
|
|
OBJ += wiiu/fs/sd_fat_devoptab.o
|
|
|
|
OBJ += wiiu/fs/fs_utils.o
|
2017-01-25 18:52:31 +00:00
|
|
|
OBJ += wiiu/hbl.o
|
2016-11-09 13:26:38 +00:00
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o
|
|
|
|
HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o \
|
|
|
|
$(BUILD_DIR)/wiiu/system/stubs_elf.o
|
2018-01-08 04:26:24 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
ifeq ($(SALAMANDER_BUILD),1)
|
|
|
|
DEFINES += -DRARCH_CONSOLE -DIS_SALAMANDER
|
|
|
|
|
|
|
|
OBJ += frontend/frontend_salamander.o
|
|
|
|
OBJ += frontend/frontend_driver.o
|
|
|
|
OBJ += frontend/drivers/platform_wiiu.o
|
|
|
|
OBJ += libretro-common/encodings/encoding_utf.o
|
|
|
|
OBJ += libretro-common/compat/compat_strcasestr.o
|
2019-01-08 20:42:52 +00:00
|
|
|
OBJ += libretro-common/compat/fopen_utf8.o
|
2017-12-31 13:07:14 +00:00
|
|
|
OBJ += libretro-common/file/file_path.o
|
2020-01-10 00:16:25 +00:00
|
|
|
OBJ += libretro-common/file/file_path_io.o
|
2017-12-31 13:07:14 +00:00
|
|
|
OBJ += libretro-common/string/stdstring.o
|
|
|
|
OBJ += libretro-common/lists/string_list.o
|
|
|
|
OBJ += libretro-common/lists/dir_list.o
|
|
|
|
OBJ += libretro-common/file/retro_dirent.o
|
|
|
|
OBJ += libretro-common/compat/compat_strl.o
|
|
|
|
OBJ += libretro-common/file/config_file.o
|
|
|
|
OBJ += libretro-common/streams/file_stream.o
|
|
|
|
OBJ += libretro-common/vfs/vfs_implementation.o
|
|
|
|
OBJ += libretro-common/hash/rhash.o
|
|
|
|
OBJ += file_path_str.o
|
|
|
|
OBJ += verbosity.o
|
2019-05-27 11:40:50 +00:00
|
|
|
|
|
|
|
# $(SALAMANDER_BUILD),0
|
2016-10-27 00:34:10 +00:00
|
|
|
else
|
2017-12-31 13:07:14 +00:00
|
|
|
DEFINES += -DRARCH_INTERNAL
|
|
|
|
DEFINES += -DHAVE_KEYMAPPER
|
2019-11-10 23:22:03 +00:00
|
|
|
DEFINES += -DHAVE_ONLINE_UPDATER
|
2017-12-31 13:07:14 +00:00
|
|
|
DEFINES += -DHAVE_UPDATE_ASSETS
|
2019-11-10 14:55:39 +00:00
|
|
|
DEFINES += -DHAVE_UPDATE_CORES
|
2017-12-31 13:07:14 +00:00
|
|
|
DEFINES += -DHAVE_FILTERS_BUILTIN
|
2018-01-06 02:39:53 +00:00
|
|
|
DEFINES += -DHAVE_SLANG
|
2018-01-11 01:09:03 +00:00
|
|
|
DEFINES += -DHAVE_SHADERPIPELINE
|
2017-12-31 13:07:14 +00:00
|
|
|
|
2018-04-08 05:15:59 +00:00
|
|
|
ifeq ($(HAVE_RUNAHEAD),1)
|
2019-05-27 11:40:50 +00:00
|
|
|
DEFINES += -DHAVE_RUNAHEAD
|
2018-04-08 05:15:59 +00:00
|
|
|
endif
|
|
|
|
|
2018-01-04 16:38:04 +00:00
|
|
|
OBJ += wiiu/shader_utils.o
|
2018-01-12 01:54:45 +00:00
|
|
|
OBJ += gfx/drivers/gx2_shaders/tex.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/sprite.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/frame.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/ribbon.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/ribbon_simple.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/bokeh.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/snow.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/snow_simple.o
|
|
|
|
OBJ += gfx/drivers/gx2_shaders/snowflake.o
|
2017-12-31 13:07:14 +00:00
|
|
|
|
|
|
|
ifeq ($(GRIFFIN_BUILD), 1)
|
2019-05-27 11:40:50 +00:00
|
|
|
OBJ += griffin/griffin.o
|
|
|
|
|
|
|
|
INCDIRS += -Ilibretro-common/include/compat/zlib
|
2019-05-29 08:23:21 +00:00
|
|
|
# for stb, libfat, iosuhax
|
|
|
|
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax
|
2019-05-27 12:12:29 +00:00
|
|
|
# pad_functions uses wiiu/input.h
|
|
|
|
INCDIRS += -Iinput/include
|
2019-07-24 01:42:41 +00:00
|
|
|
INCDIRS += -Ideps/SPIRV-Cross
|
2019-05-27 11:40:50 +00:00
|
|
|
|
2019-07-11 09:51:06 +00:00
|
|
|
DEFINES += -DHAVE_AUDIOMIXER
|
2019-05-27 11:40:50 +00:00
|
|
|
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
2019-07-25 06:07:24 +00:00
|
|
|
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
2019-07-24 01:42:41 +00:00
|
|
|
DEFINES += -DHAVE_SPIRV_CROSS -DHAVE_SLANG
|
2019-05-27 11:40:50 +00:00
|
|
|
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY
|
|
|
|
#DEFINES += -DWANT_IFADDRS
|
|
|
|
#DEFINES += -DHAVE_FREETYPE
|
|
|
|
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
2019-05-27 12:12:29 +00:00
|
|
|
DEFINES += -DHAVE_HID
|
2019-05-29 08:23:21 +00:00
|
|
|
DEFINES += -DWANT_LIBFAT -DHAVE_LIBFAT -DWANT_IOSUHAX -DHAVE_IOSUHAX
|
2019-07-24 01:42:41 +00:00
|
|
|
DEFINES += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
2019-05-27 11:40:50 +00:00
|
|
|
|
|
|
|
# $(GRIFFIN_BUILD),0
|
2017-12-31 13:07:14 +00:00
|
|
|
else
|
2019-07-11 09:51:06 +00:00
|
|
|
HAVE_AUDIOMIXER = 1
|
2019-05-27 11:40:50 +00:00
|
|
|
HAVE_MENU_COMMON = 1
|
|
|
|
HAVE_RTGA = 1
|
|
|
|
HAVE_RPNG = 1
|
|
|
|
HAVE_RJPEG = 1
|
|
|
|
HAVE_RBMP = 1
|
|
|
|
HAVE_MENU = 1
|
|
|
|
HAVE_RGUI = 1
|
|
|
|
HAVE_7ZIP = 1
|
|
|
|
HAVE_ZLIB = 1
|
|
|
|
HAVE_BUILTINZLIB = 0
|
|
|
|
HAVE_LIBRETRODB = 1
|
|
|
|
HAVE_MATERIALUI = 1
|
|
|
|
HAVE_XMB = 1
|
|
|
|
HAVE_STB_FONT = 1
|
|
|
|
#HAVE_FREETYPE = 1
|
|
|
|
HAVE_LANGEXTRA = 1
|
|
|
|
HAVE_LIBRETRODB = 1
|
|
|
|
HAVE_NETWORKING = 1
|
|
|
|
HAVE_NETPLAYDISCOVERY = 1
|
|
|
|
HAVE_CHEEVOS = 1
|
|
|
|
#WANT_IFADDRS = 1
|
|
|
|
HAVE_OVERLAY = 1
|
2019-07-24 01:42:41 +00:00
|
|
|
HAVE_SPIRV_CROSS = 1
|
|
|
|
HAVE_SLANG = 1
|
2019-05-12 23:57:26 +00:00
|
|
|
HAVE_VIDEO_LAYOUT = 0
|
2019-05-27 11:40:50 +00:00
|
|
|
HAVE_STATIC_VIDEO_FILTERS = 1
|
|
|
|
HAVE_STATIC_AUDIO_FILTERS = 1
|
|
|
|
WANT_LIBFAT = 1
|
|
|
|
WANT_IOSUHAX = 1
|
|
|
|
|
|
|
|
include Makefile.common
|
|
|
|
DEFINES += $(DEF_FLAGS)
|
|
|
|
INCDIRS += $(INCLUDE_DIRS)
|
2017-12-31 13:07:14 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
#-----------------------------
|
|
|
|
# Compile flags
|
|
|
|
|
2019-05-27 09:19:01 +00:00
|
|
|
DEFINES += -DWIIU -DMSB_FIRST -D__WUT__ -DHW_WUP -D__wiiu__
|
2017-12-31 13:07:14 +00:00
|
|
|
DEFINES += -DHAVE_MAIN
|
|
|
|
DEFINES += -DRARCH_CONSOLE
|
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
ifeq ($(WIIU_LOG_RPX),1)
|
|
|
|
DEFINES += -DWIIU_LOG_RPX
|
2016-10-27 00:34:10 +00:00
|
|
|
endif
|
2016-10-29 01:56:40 +00:00
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
ifneq ($(PC_DEVELOPMENT_TCP_PORT),)
|
|
|
|
DEFINES += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT)
|
2017-01-23 14:59:44 +00:00
|
|
|
endif
|
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
INCDIRS += -I.
|
2018-05-02 06:23:40 +00:00
|
|
|
INCDIRS += -Ilibretro-common/include
|
|
|
|
INCDIRS += -Iwiiu
|
|
|
|
INCDIRS += -Iwiiu/include
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2019-05-27 09:19:01 +00:00
|
|
|
CFLAGS := -mcpu=750 -meabi -mhard-float
|
2019-05-27 11:40:50 +00:00
|
|
|
CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
|
|
|
CFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
2019-07-24 01:42:41 +00:00
|
|
|
#CFLAGS += -Wall
|
2016-10-27 00:34:10 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
2016-11-08 08:25:20 +00:00
|
|
|
CFLAGS += -O0 -g
|
2016-10-27 00:34:10 +00:00
|
|
|
else
|
2016-11-08 08:25:20 +00:00
|
|
|
CFLAGS += -O3
|
2016-10-27 00:34:10 +00:00
|
|
|
endif
|
2017-12-31 13:07:14 +00:00
|
|
|
|
2016-11-24 02:26:34 +00:00
|
|
|
ASFLAGS := $(CFLAGS) -mregnames
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
#-----------------------------
|
|
|
|
# Linking/library flags
|
|
|
|
|
|
|
|
LIBDIRS := -L.
|
|
|
|
LDFLAGS := $(CFLAGS)
|
2017-01-23 14:59:44 +00:00
|
|
|
|
2016-10-27 00:34:10 +00:00
|
|
|
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
|
|
|
WHOLE_START := -Wl,--whole-archive
|
|
|
|
WHOLE_END := -Wl,--no-whole-archive
|
|
|
|
endif
|
2017-12-31 13:07:14 +00:00
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm
|
2017-12-19 21:12:58 +00:00
|
|
|
|
2019-05-29 08:23:21 +00:00
|
|
|
# Use portlibs zlib if deps/ isn't being used
|
2019-05-27 11:40:50 +00:00
|
|
|
ifeq ($(HAVE_ZLIB),1)
|
|
|
|
ifeq ($(HAVE_BUILTINZLIB),0)
|
|
|
|
INCDIRS += -I$(DEVKITPRO)/portlibs/ppc/include
|
|
|
|
LIBDIRS += -L$(DEVKITPRO)/portlibs/ppc/lib
|
|
|
|
# Bonus: libpng for cores that need it
|
|
|
|
LIBS += -lpng -lz
|
|
|
|
endif
|
2017-12-19 21:12:58 +00:00
|
|
|
endif
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
LDFLAGS += -Wl,--gc-sections
|
2016-11-23 02:21:01 +00:00
|
|
|
|
2017-01-18 10:38:01 +00:00
|
|
|
RPX_LDFLAGS := -pie -fPIE
|
2016-11-23 02:21:01 +00:00
|
|
|
RPX_LDFLAGS += -z common-page-size=64 -z max-page-size=64
|
|
|
|
RPX_LDFLAGS += -T wiiu/link_rpl.ld
|
|
|
|
RPX_LDFLAGS += -nostartfiles
|
|
|
|
|
|
|
|
HBL_ELF_LDFLAGS := -T wiiu/link_elf.ld
|
|
|
|
|
2019-05-27 11:40:50 +00:00
|
|
|
#-----------------------------
|
|
|
|
# Compiler setup
|
|
|
|
|
|
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
|
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
|
|
|
endif
|
|
|
|
ifeq ($(strip $(DEVKITPRO)),)
|
|
|
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
|
|
|
|
endif
|
|
|
|
|
2019-07-24 01:42:41 +00:00
|
|
|
export PATH := $(PATH):$(DEVKITPPC)/bin
|
2019-05-27 11:40:50 +00:00
|
|
|
|
|
|
|
PREFIX := powerpc-eabi-
|
|
|
|
|
|
|
|
CC := $(PREFIX)gcc
|
|
|
|
CXX := $(PREFIX)g++
|
|
|
|
AS := $(PREFIX)as
|
|
|
|
AR := $(PREFIX)ar
|
|
|
|
OBJCOPY := $(PREFIX)objcopy
|
|
|
|
STRIP := $(PREFIX)strip
|
|
|
|
NM := $(PREFIX)nm
|
|
|
|
LD := $(CXX)
|
|
|
|
|
|
|
|
ELF2RPL := wiiu/wut/elf2rpl/elf2rpl
|
|
|
|
|
|
|
|
ifneq ($(findstring Linux,$(shell uname -a)),)
|
|
|
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
|
|
|
else
|
|
|
|
ELF2RPL := $(ELF2RPL).exe
|
|
|
|
endif
|
|
|
|
|
|
|
|
#-----------------------------
|
|
|
|
# Targets and build rules
|
|
|
|
|
2016-11-23 02:21:01 +00:00
|
|
|
TARGETS :=
|
|
|
|
ifeq ($(BUILD_RPX), 1)
|
|
|
|
TARGETS += $(TARGET).rpx
|
2016-11-09 13:26:38 +00:00
|
|
|
endif
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2016-11-23 02:21:01 +00:00
|
|
|
ifeq ($(BUILD_HBL_ELF), 1)
|
|
|
|
TARGETS += $(TARGET).elf
|
|
|
|
endif
|
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend
|
2016-11-24 02:26:34 +00:00
|
|
|
|
2016-11-23 02:21:01 +00:00
|
|
|
all: $(TARGETS)
|
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
%: $(BUILD_DIR)/%
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(BUILD_DIR)/%.o: %.cpp %.depend
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo CXX $<,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/%.o: %.c %.depend
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo CC $<,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(Q)$(CC) -c -o $@ $< $(CFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/%.o: %.S %.depend
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo AS $<,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/%.o: %.s %.depend
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo AS $<,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2017-11-04 05:19:49 +00:00
|
|
|
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
2016-10-27 00:34:10 +00:00
|
|
|
%.a:
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo AR $<,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2017-11-04 05:19:49 +00:00
|
|
|
$(Q)$(AR) -rc $@ $^
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2016-11-24 02:26:34 +00:00
|
|
|
%.depend: ;
|
2017-12-31 13:07:14 +00:00
|
|
|
%.last: ;
|
2016-11-24 02:26:34 +00:00
|
|
|
|
2017-01-18 10:38:01 +00:00
|
|
|
$(ELF2RPL):
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo MAKE $@,)
|
|
|
|
$(Q)$(MAKE) -C wiiu/wut/elf2rpl/
|
2017-01-18 10:38:01 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld .$(TARGET).elf.last
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo LD $@,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@touch .$(TARGET).elf.last
|
2017-11-04 05:19:49 +00:00
|
|
|
$(Q)$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
2016-11-23 02:21:01 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo LD $@,)
|
|
|
|
$(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
2016-11-09 13:26:38 +00:00
|
|
|
|
2017-12-31 13:07:14 +00:00
|
|
|
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.last
|
2017-11-04 05:19:49 +00:00
|
|
|
@$(if $(Q), echo ELF2RPL $@,)
|
2017-12-31 13:07:14 +00:00
|
|
|
@touch .$(TARGET).rpx.last
|
|
|
|
$(Q)-$(ELF2RPL) $< $@
|
2016-10-27 00:34:10 +00:00
|
|
|
|
|
|
|
clean:
|
2019-05-27 11:40:50 +00:00
|
|
|
@$(if $(Q), echo $@,)
|
|
|
|
$(Q)rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx
|
|
|
|
$(Q)rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).rpx
|
|
|
|
$(Q)rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.last
|
|
|
|
$(Q)rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
2016-10-27 00:34:10 +00:00
|
|
|
|
2016-11-09 13:26:38 +00:00
|
|
|
.PHONY: clean all
|
2017-12-31 13:07:14 +00:00
|
|
|
.PRECIOUS: %.depend %.last
|
2016-11-24 02:26:34 +00:00
|
|
|
|
|
|
|
-include $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|