diff --git a/src/gba/hle-bios.make b/src/gba/hle-bios.make new file mode 100644 index 000000000..84d0f2c69 --- /dev/null +++ b/src/gba/hle-bios.make @@ -0,0 +1,18 @@ +PREFIX := $(DEVKITARM)/bin/arm-none-eabi- +AS := $(PREFIX)as +OBJCOPY := $(PREFIX)objcopy + +all: hle-bios.c + +hle-bios.o: hle-bios.s + $(AS) -o $@ $< + +hle-bios.bin: hle-bios.o + $(OBJCOPY) -O binary $< $@ + +hle-bios.c: hle-bios.bin + echo '#include "hle-bios.h"' > $@ + echo >> $@ + echo '#include "gba-memory.h"' >> $@ + echo >> $@ + xxd -i $< | sed -e 's/unsigned char hle_bios_bin\[\]/const uint8_t hleBios[SIZE_BIOS]/' | grep -v hle_bios_bin_len >> $@