release: all
	psp-build-exports -s exports.exp
	mv GameCategoriesLibKernel.S ../user/GameCategoriesLibKernel.S
	bin2c kernel.prx ../loader/kernel.c kernel
	sed -i 's#((aligned(16)))#((aligned(64)))#gi' ../loader/kernel.c
	sed -i 's#static##gi' ../loader/kernel.c

TARGET = kernel
OBJS = main.o communication.o

INCDIR = ../include
CFLAGS = -Os -G0 -Wall -fno-pic -fshort-wchar
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PRX_EXPORTS = exports.exp

USE_KERNEL_LIBS = 1
USE_KERNEL_LIBC = 1

LIBDIR = ../lib
LDFLAGS = -mno-crt0 -nostartfiles
LIBS = -lpspsystemctrl_kernel

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