TARGET = MasterX
OBJS = mxfont.o pixelbuffer.o knight.o mx_win.o mx.o calc.o about.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

PSPBIN = $(PSPSDK)/../bin
CFLAGS += `$(PSPBIN)/sdl-config --cflags` 
LIBS +=  -`$(PSPBIN)/sdl-config --libs` -lpsppower 
#-logg -lvorbisfile -lvorbis
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = MasterX Windows
# PSP_EBOOT_ICON = mpsp.png
# PSP_EBOOT_PIC1 = test.png

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

psp: 
	rm -f *.o
	echo "#define FOR_PSP" > platform.h
pc:
	rm -f *.o
	echo "" > platform.h
	gcc mxfont.c -c `sdl-config --cflags`
	gcc pixelbuffer.c -c `sdl-config --cflags`
	gcc mx.c -c `sdl-config --cflags`
	gcc mx_win.c -c `sdl-config --cflags`
	gcc knight.c -c `sdl-config --cflags`
	gcc calc.c -c `sdl-config --cflags`
	gcc about.c -c `sdl-config --cflags`
	gcc mxfont.o pixelbuffer.o knight.o mx_win.o mx.o calc.o about.o -o MasterX `sdl-config --libs`



