ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
endif

include $(DEVKITARM)/ds_rules



all: boot7.bin boot9.bin

boot7.bin: boot7.s
	$(AS) -o boot7.o boot7.s
	$(PREFIX)ld -Ttext 0x0380f800 -o boot7.elf boot7.o
	$(OBJCOPY) -O binary -S boot7.elf boot7.bin

boot9.bin: boot9.s
	$(AS) -o boot9.o boot9.s
	$(PREFIX)ld -Ttext 0x023a0000 -o boot9.elf boot9.o
	$(OBJCOPY) -O binary -S boot9.elf boot9.bin

clean:
	rm -f *.o *.elf *.bin
