src/gba/hle-bios.make (view raw)
1PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
2AS := $(PREFIX)as
3OBJCOPY := $(PREFIX)objcopy
4
5all: hle-bios.c
6
7hle-bios.o: hle-bios.s
8 $(AS) -o $@ $<
9
10hle-bios.bin: hle-bios.o
11 $(OBJCOPY) -O binary $< $@
12
13hle-bios.c: hle-bios.bin
14 echo '#include "hle-bios.h"' > $@
15 echo >> $@
16 echo '#include <mgba/internal/gba/memory.h>' >> $@
17 echo >> $@
18 xxd -i $< | sed -e 's/unsigned char hle_bios_bin\[\]/const uint8_t hleBios[SIZE_BIOS]/' -e 's/^ \+/\t/' | grep -v hle_bios_bin_len >> $@