mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-11 18:23:45 +00:00
cbf49a0b77
* Add xdelta in deps * Include <assert.h> in xdelta3.h - Otherwise the static_assert calls can fail * Build xdelta3 in Makefile.common * Add xdelta support to the softpatching infrastructure - The patching itself isn't fully implemented yet * Adjust how xdelta3.h checks the sizes of some types - Now checks max values instead of relying on autotools * Add some enums that were excluded by the cherry-pick * Remove stray whitespace * Adjust SIZE macros in xdelta3.h - Move them outside the XD3_USE_LARGEFILE64 block - Add more SIZE declarations - Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX * Reintegrate xdelta support * Enable support for xdelta's secondary compressors - Necessary for some patches * Fix some format specifiers * Remove unnecessary files from xdelta * Include xdelta3.h with a relative path * Add xdelta3 headers to HEADERS variable * Gate Xdelta support behind HAVE_XDELTA - HAVE_XDELTA is on by default - HAVE_PATCH is still required for HAVE_XDELTA to be meaningful - Support is mostly contingent on the availability of LZMA - Anything modern should be okay - Legacy platforms (e.g. DOS) may need to have Xdelta support disabled - At least until some other solution can be found * Disable HAVE_XDELTA on platforms where the build recently failed - These come from looking at the failed builds on GitHub - These are guesses, and may turn out to be wrong * Fix a potential memory leak - Whoops, looks like I need to call two cleanup functions - xd3_close_stream exists separately from xd3_free_stream * Split the --help printout for --xdelta into its own strlcat call - GCC was complaining about #ifdefs within macro arguments being non-portable * Fix some incorrect printf format specifiers * Modify Xdelta to adhere to C89 - It's mostly using RetroArch's INLINE macro instead of the inline keyword * Slight cleanups * Remove a stray comma that was hindering C89 builds * Add XDelta support to CHANGES.md * Change how the xdelta patch's name is computed - To be in line with other recent refactoring * Fix an incorrect merge - Whoops, this part was from before I figured out how to get the size of a patched file * Explain the song-and-dance behind computing a patched file's size * Define some XDelta3-related constants to 0 on 32-bit platforms * Adjust some Xdelta-related macro definitions - Exclude the encoder, since we're not making patches - Move some #defines to after inclusion of <stdint.h>, to fix undefined behavior - Remove _WIN32_WINNT overrides, since they were for code that we're not using * Fix Xdelta support * Wrap an encoder-only function in `#if XD3_ENCODER`
101 lines
2.1 KiB
Makefile
101 lines
2.1 KiB
Makefile
BUILD_PRX ?= 0
|
|
PSP_LARGE_MEMORY ?= 1
|
|
DEBUG ?= 0
|
|
HAVE_KERNEL_PRX ?= 1
|
|
HAVE_THREADS ?= 1
|
|
BIG_STACK ?= 0
|
|
LOAD_WITHOUT_CORE_INFO ?= 0
|
|
HAVE_STATIC_DUMMY ?= 0
|
|
HAVE_XDELTA ?= 1
|
|
TARGET = retroarchpsp
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
OPTIMIZE_LV := -O0 -g
|
|
else
|
|
OPTIMIZE_LV := -O3
|
|
endif
|
|
|
|
INCDIR = deps deps/stb deps/7zip libretro-common/include libretro-common/include/compat/zlib
|
|
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
|
|
ASFLAGS = $(CFLAGS)
|
|
|
|
RARCH_DEFINES = -DPSP \
|
|
-D_MIPS_ARCH_ALLEGREX \
|
|
-DHAVE_ZLIB \
|
|
-DHAVE_AUDIOMIXER \
|
|
-DHAVE_RWAV \
|
|
-DHAVE_RPNG \
|
|
-DHAVE_RJPEG \
|
|
-DHAVE_GRIFFIN=1 \
|
|
-DRARCH_INTERNAL \
|
|
-DHAVE_SCREENSHOTS \
|
|
-DHAVE_REWIND \
|
|
-DRARCH_CONSOLE \
|
|
-DHAVE_MENU \
|
|
-DHAVE_CONFIGFILE \
|
|
-DHAVE_PATCH \
|
|
-DHAVE_CHEATS \
|
|
-DHAVE_RGUI \
|
|
-DHAVE_FILTERS_BUILTIN \
|
|
-DHAVE_DSP_FILTER \
|
|
-DHAVE_VIDEO_FILTER \
|
|
-DHAVE_7ZIP \
|
|
-D_7ZIP_ST \
|
|
-DHAVE_CC_RESAMPLER \
|
|
-DHAVE_CORE_INFO_CACHE
|
|
|
|
LIBDIR =
|
|
LDFLAGS = -L$(shell psp-config --psp-prefix)
|
|
|
|
ifeq ($(HAVE_STATIC_DUMMY),1)
|
|
RARCH_DEFINES += -DHAVE_STATIC_DUMMY
|
|
else
|
|
LIBS += -lretro_psp1
|
|
endif
|
|
LIBS += -lstdc++ -lpspgu -lpspgum -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpthread
|
|
|
|
ifeq ($(HAVE_THREADS), 1)
|
|
RARCH_DEFINES += -DHAVE_THREADS
|
|
endif
|
|
|
|
ifeq ($(HAVE_KERNEL_PRX), 1)
|
|
OBJS += bootstrap/psp1/kernel_functions.o
|
|
CFLAGS += -DHAVE_KERNEL_PRX
|
|
endif
|
|
|
|
ifeq ($(BIG_STACK), 1)
|
|
CFLAGS += -DBIG_STACK
|
|
endif
|
|
|
|
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
|
RARCH_DEFINES += -DLOAD_WITHOUT_CORE_INFO
|
|
endif
|
|
|
|
CFLAGS += $(RARCH_DEFINES)
|
|
|
|
EXTRA_TARGETS = EBOOT.PBP
|
|
PSP_EBOOT_TITLE = RetroArch PSP1
|
|
|
|
OBJS += griffin/griffin.o
|
|
|
|
PSPSDK=$(shell psp-config --pspsdk-path)
|
|
include $(PSPSDK)/lib/build.mak
|
|
|
|
pspsh-debug:
|
|
pspsh -e reset
|
|
read -p "Start debugger in VSCode and press any key to continue... \n" -n1 -s
|
|
pspsh -e debug ./retroarchpsp.prx
|
|
pspsh
|
|
|
|
pspsh-run:
|
|
pspsh -e reset
|
|
pspsh -e ./retroarchpsp.prx
|
|
pspsh
|
|
|
|
debug: clean all pspsh-debug
|
|
|
|
run: clean all pspsh-run
|
|
|
|
sim:
|
|
/Applications/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL $(shell pwd)/EBOOT.PBP
|