summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 13:15:54 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 13:15:54 -0500
commitaad94c34334ee44f1298175df38f14dc27ae5fb8 (patch)
tree867dfb7640ca19531bd20ee70564b1c51bb6e71e
parent4ecbb91ccb609a83d82665d476d22228a1f88762 (diff)
Fix asmdiff.sh to work without DKP, also improve the makefile command for recognizing a toolchain.
The new command requires the toolchain binary path to exist in the file system before building using a toolchain (to handle the case where gba-dev is uninstalled but $(DEVKITARM) still exists))
-rw-r--r--Makefile2
-rwxr-xr-xasmdiff.sh7
-rw-r--r--berry_fix/Makefile2
-rw-r--r--berry_fix/payload/Makefile2
-rw-r--r--libagbsyscall/Makefile2
5 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index bffa4b560..de146726b 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
-ifneq ($(TOOLCHAIN),)
+ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
diff --git a/asmdiff.sh b/asmdiff.sh
index 9e8749acf..534281fdf 100755
--- a/asmdiff.sh
+++ b/asmdiff.sh
@@ -1,6 +1,11 @@
#!/bin/bash
-OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
+if [[ -d "$DEVKITARM/bin/" ]]; then
+ OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"
+else
+ OBJDUMP_BIN="arm-none-eabi-objdump"
+fi
+OBJDUMP="$OBJDUMP_BIN -D -bbinary -marmv4t -Mforce-thumb"
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
diff --git a/berry_fix/Makefile b/berry_fix/Makefile
index f7ce40504..6aab4ed62 100644
--- a/berry_fix/Makefile
+++ b/berry_fix/Makefile
@@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
-ifneq ($(TOOLCHAIN),)
+ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
diff --git a/berry_fix/payload/Makefile b/berry_fix/payload/Makefile
index 7a6a92396..ad8787c34 100644
--- a/berry_fix/payload/Makefile
+++ b/berry_fix/payload/Makefile
@@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
-ifneq ($(TOOLCHAIN),)
+ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
diff --git a/libagbsyscall/Makefile b/libagbsyscall/Makefile
index ba349e9eb..e1f502b2f 100644
--- a/libagbsyscall/Makefile
+++ b/libagbsyscall/Makefile
@@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
-ifneq ($(TOOLCHAIN),)
+ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif