all: sfc.bin
	./c_g1awrapper sfc.bin -o sfc.g1a -v 1.0 -n SFC -N SFC -i icon.bmp
sfc.bin: sfc.elf
	sh3eb-elf-objcopy -R .comment -R .bss -O binary sfc.elf sfc.bin
sfc.elf: main.c sfc.c crt0.s
	sh3eb-elf-gcc -mb -m3 -T"addin.ld" main.c sfc.c crt0.s utils.c -lgcc -lfx -L. -Iinclude -nostdlib -o sfc.elf -Os -fno-builtin
clean:
	rm sfc.g1a sfc.elf sfc.bin
