Start adding some more build rules to Makefile.griffin for PSP,

move  some otherwise unused functions to else block
This commit is contained in:
twinaphex 2015-09-01 10:32:36 +02:00
parent 9c6f1c2c91
commit 309bd09cb0
2 changed files with 39 additions and 29 deletions

View File

@ -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)

View File

@ -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"