# Informations sur le compilateur et le lieur
PSPSDK = $(shell psp-config --pspsdk-path)
GPP = psp-g++ -ansi $(INCLUDE_FOLDERS) -I$(PSPSDK)/include $(GPP_OPTIONS) -D_PSP_FW_VERSION=150
GCC = psp-gcc -ansi $(INCLUDE_FOLDERS) -I$(PSPSDK)/include $(GCC_OPTIONS) -D_PSP_FW_VERSION=150
LINKER = psp-gcc -D_PSP_FW_VERSION=150 -L. -L$(PSPSDK)/lib

# Informations sur la construction du fichier PSP
ICON_PNG = NULL
ICON_PMF = NULL
PIC_FG = NULL
PIC_BG = NULL
SOUND = NULL
PSAR = NULL

ICON_PNG = "res/build/icon.png"
#ICON_PMF = "movie.pmf"
#PIC_BG = "background.png"
PIC_FG = "res/build/foreground.png"
#SOUND = "sound.at3"
#PSAR = "data.psar"

# Informations sur la sortie
PROGNAME = myElf.elf

STDOPTIONS =
COMPILELIBS = lib/USpeedGameEngine.psp -lpsputility -lpspgum -lpspgu -lm -lstdc++ -lpspdebug \
	-lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspwlan \
	-lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lpsppower -lpspaudiolib -lpspaudio -lpsprtc

# Message d'accueil
HOME_MSG = Version : Sony PlayStation Portable - Custom Firmware

include makefile.var

build: link
	@echo  - Fixing imports...
	@psp-fixup-imports $(RELEASE)$(PROGNAME)
	@echo  - Strip ELF...
	@psp-strip $(RELEASE)$(PROGNAME) -o $(RELEASE)$(PROGNAME).strip
	@echo  - Making SFO...
	@makeSFO.bat
	@echo Building...
	@pack-pbp $(RELEASE)EBOOT.PBP $(RELEASE)PARAM.SFO $(ICON_PNG) $(ICON_PMF) $(PIC_FG) $(PIC_BG) $(SOUND) $(RELEASE)$(PROGNAME).strip $(PSAR)

include makefile.task
