Files
pfero 25853364c8 Update tools/sort_symfile.sh and clean up Makefile
Fixed compare being ran before the correctedheader rom was built.
Made `mostlyclean` clean up all the .d files it knows about and include
the correct .d files.
2018-06-03 20:46:15 +02:00

13 lines
319 B
Bash
Executable File

#!/bin/sh
sed \
-e "s/^..:[0-3]/0_ROM0@&/g" \
-e "s/^..:[4-7]/1_ROMX@&/g" \
-e "s/^..:[8-9]/2_VRAM@&/g" \
-e "s/^..:[A-B]/3_SRAM@&/g" \
-e "s/^00:[C-D]/4_WRAM0@&/g" \
-e "s/^..:[D-D]/5_WRAMX@&/g" \
$1 \
| sort -o $1
TEMP_FILE=$(mktemp)
sed -e "s/^.*@//g" $1 > $TEMP_FILE && mv $TEMP_FILE $1