 #
 #  File: Makefile
 #  Project: Tile Demo
 #  Description: the makefile
 #

PROJ= tileDemo
CC= arm-eabi-g++
OBJCOPY= arm-eabi-objcopy
PROJFILES = graphics.o tileDemo.o

.cpp.o:
	$(CC) -c $<



.PHONY : build
build : $(PROJFILES)
	$(CC) -specs=gba.specs -g  $(PROJFILES) -o $(PROJ).elf
	$(OBJCOPY) -v -O binary $(PROJ).elf $(PROJ).gba
	gbafix $(PROJ).gba

.PHONY : clean

clean :
	@rm -fv *.o
	@rm -fv *.elf
	@rm -fv *.gba
