diff --git a/Makefile.griffin b/Makefile.griffin index 55219db458..201db6d6d6 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -137,14 +137,20 @@ else ifeq ($(platform), psp1) -D_MIPS_ARCH_ALLEGREX LIBS += $(WHOLE_START) -lretro_psp1 $(WHOLE_END) \ -lpspgu -lpspgum -lm -lpspaudio -lpspfpu \ - -lpsppower -lpsprtc + -lpsppower -lpsprtc -lpspkernel LIBDIRS += -L. LDFLAGS += -Wl,-q + BUILD_PRX = 1 HAVE_LIBRETRO_MANAGEMENT := 1 HAVE_RPNG := 1 HAVE_KERNEL_PRX := 1 + +ifeq ($(BUILD_PRX), 1) + LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS) +endif + else ifeq ($(platform), vita) CC = arm-vita-eabi-gcc$(EXE_EXT) CXX = arm-vita-eabi-g++$(EXE_EXT) @@ -299,6 +305,11 @@ all: $(EXT_TARGET) arm-vita-eabi-strip -g $< vita-elf-create $< $@ $(VITASDK)/bin/db.json +%.prx: %.elf +ifeq ($(platform),psp1) + psp-prxgen $< $@ +endif + $(EXT_INTER_TARGET): $(OBJ) $(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS) diff --git a/audio/drivers_resampler/cc_resampler.c b/audio/drivers_resampler/cc_resampler.c index 7cdf7966a3..b27110510f 100644 --- a/audio/drivers_resampler/cc_resampler.c +++ b/audio/drivers_resampler/cc_resampler.c @@ -54,34 +54,6 @@ typedef struct rarch_CC_resampler void (*process)(void *re, struct resampler_data *data); } rarch_CC_resampler_t; -/* memalign() replacement functions - * copied from sinc.c and changed signature so no conflict - * happens when using griffin.c - * these functions should probably be moved to a common header - */ - -static void *memalign_alloc__(size_t boundary, size_t size) -{ - void **place; - uintptr_t addr = 0; - void *ptr = malloc(boundary + size + sizeof(uintptr_t)); - if (!ptr) - return NULL; - - addr = ((uintptr_t) - ptr + sizeof(uintptr_t) + boundary) - & ~(boundary - 1); - place = (void**)addr; - place[-1] = ptr; - - return (void*)addr; -} - -static void memalign_free__(void *ptr) -{ - void **p = (void**)ptr; - free(p[-1]); -} #ifdef _MIPS_ARCH_ALLEGREX static void resampler_CC_process(void *re_, struct resampler_data *data) @@ -205,7 +177,34 @@ static void *resampler_CC_init(const struct resampler_config *config, return (void*)-1; } #else +/* memalign() replacement functions + * copied from sinc.c and changed signature so no conflict + * happens when using griffin.c + * these functions should probably be moved to a common header + */ +static void *memalign_alloc__(size_t boundary, size_t size) +{ + void **place; + uintptr_t addr = 0; + void *ptr = malloc(boundary + size + sizeof(uintptr_t)); + if (!ptr) + return NULL; + + addr = ((uintptr_t) + ptr + sizeof(uintptr_t) + boundary) + & ~(boundary - 1); + place = (void**)addr; + place[-1] = ptr; + + return (void*)addr; +} + +static void memalign_free__(void *ptr) +{ + void **p = (void**)ptr; + free(p[-1]); +} #if defined(__SSE__) #define CC_RESAMPLER_IDENT "SSE"