# PSF/MINIPSF Plugin for GameMusicGear by gama
#   Based on SexyPSF 
#    2002 - 2004 Xodnizel.

TARGET = in_psf

OBJS = in_psf.o \
	libpsf/PsxBios.o libpsf/PsxCounters.o libpsf/PsxDma.o \
	libpsf/Spu.o libpsf/PsxHw.o libpsf/PsxMem.o libpsf/Misc.o \
	libpsf/R3000A.o libpsf/PsxInterpreter.o libpsf/PsxHLE.o \
	libpsf/spu/spu.o libpsf/spu/cfg.o

# Define to build this as a prx (instead of a static elf)
BUILD_PRX = 1
# Define the name of our custom exports (minus the .exp extension)
PRX_EXPORTS = ../Input_Exports.exp

CFLAGS = -O2 -G0 -Wall -fprofile-use \
		 -DPSS_STYLE=1 -DMEM_SUPPORT
ASFLAGS = $(CFLAGS)

LDFLAGS = -mno-crt0 -nostartfiles

LIBS = -lz -lpspaudio \
	   -lconfig

INCDIR = sexypsf ../SharedLib/libconfig ../SharedLib/libutils
LIBDIR = ../SharedLib/libconfig ../SharedLib/libutils

all: exports $(TARGET).prx

exports:
	psp-build-exports -s ../Input_Exports.exp

PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
