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