EE_BIN = ORI_FMCB_CFG.ELF
EE_OBJS = main.o pad.o config.o elf.o draw.o loader.o  filer.o \
	timer.o lang.o \
	icon_sys.o icon_icn.o \
	font_uLE.o

EE_INCS := -I$(PS2DEV)/gsKit/include -I$(PS2DEV)/libjpg/include \
	-I$(PS2SDK)/sbv/include -I$(PS2DEV)/libcdvd/ee

EE_LDFLAGS := -L$(PS2DEV)/gsKit/lib -L$(PS2DEV)/libjpg \
	-L$(PS2SDK)/sbv/lib -L$(PS2DEV)/libcdvd/lib -s
EE_LIBS = -lpad -lgskit -ldmakit -ljpg -lmc -lkbd -lmf -lfileXio -lpatches  -ldebug -lc

EE_OUTPUT=FMCB_CFG.ELF

all:	$(EE_BIN)

all: $(EE_OUTPUT)
$(EE_OUTPUT) : $(EE_BIN)
		$(PS2PACKER)/ps2-packer $(EE_BIN) $(EE_OUTPUT)
		rm -f $(EE_BIN)

run: all
	ps2client -h 192.168.0.10 -t 1 execee host:BOOT.ELF
reset: clean
	ps2client -h 192.168.0.10 reset

loader.s:
	$(MAKE) -C loader
	bin2s loader/loader.elf loader.s loader_elf

icon_sys.s:
	bin2s icons/icon.sys icon_sys.s icon_sys

icon_icn.s:
	bin2s icons/FMCB.icn icon_icn.s icon_icn


clean:
	$(MAKE) -C loader clean
	rm -f *.o *.a *.s *FMCB_CFG.ELF

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
