#
## demo.mak
#
## a minimal makefile (and I do mean minimal, look to the others
# for real-life use)
#
PROJ= Demo
CC= arm-eabi-g++
OBJCOPY= arm-eabi-objcopy
PROJFILES = Demo.o

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



.PHONY : build
build : $(PROJFILES)
#	$(CC) -MMD -MP -MF $(PROJ).d -c $(PROJ).cpp
	$(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
