summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorpfero <ohpee@loves.dicksinhisan.us>2018-06-03 20:42:34 +0200
committerpfero <ohpee@loves.dicksinhisan.us>2018-06-03 20:46:15 +0200
commit25853364c84f0c05611b501807d75e1a1ec10927 (patch)
treeafbab05e7692976d2e78dab08c64f9c8586e3150 /tools
parent63ee9c801200b64108dbfcfbc31fe2f5eda975c9 (diff)
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.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sort_symfile.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/sort_symfile.sh b/tools/sort_symfile.sh
index d53150f..82fced5 100755
--- a/tools/sort_symfile.sh
+++ b/tools/sort_symfile.sh
@@ -1,10 +1,12 @@
#!/bin/sh
-sed $1 \
+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
-sed -i $1 -e "s/^\w*@//g"
+TEMP_FILE=$(mktemp)
+sed -e "s/^.*@//g" $1 > $TEMP_FILE && mv $TEMP_FILE $1