AS=cl65
LD=ld65


all:	sprite.sfc

sprite.sfc:	sprite.o 
	$(LD) -o sprite.sfc --config sprite.cfg --obj sprite.o

sprite.o:	sprite.s sphere.sprite
	$(AS) -t none -o sprite.o -l sprite.lst -c sprite.s

sphere.sprite:	sphere.pcx tools/pcx_to_sprite
	./tools/pcx_to_sprite < sphere.pcx > sphere.sprite

tools/pcx_to_sprite:	
	cd tools && make

submit:	sprite.sfc sprite.s
	tar -czvf hw3_submit.tar.gz sprite.sfc sprite.s

clean:
	rm -f *~ *.o *.lst
	cd tools && make clean
