CC = /opt/gba/bin/arm-thumb-elf-gcc
OBJCOPY = /opt/gba/bin/arm-thumb-elf-objcopy
CFLAGS = -Wall -marm -mapcs-32 -mcpu=arm7tdmi -lm

directsound.gba: main.c Makefile
	${CC} main.c ritmo.o -o directsound.elf -T lnkscript -Wall ${CFLAGS}
	${OBJCOPY} -O binary directsound.elf directsound.gba
	# GBA Image

directsound.mb: main.c Makefile
	${CC} main.c ritmo.o -o directsound.elf -T lnkscript -DMULTIBOOT ${CFLAGS}
	${OBJCOPY} -O binary directsound.elf directsound.mb
	# MB Image

all: directsound.mb directsound.gba

clean:
	rm -f *~ directsound.elf directsound.mb directsound.gba
