summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 19:54:12 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 19:54:12 -0500
commit2783eed8257bcee46e33552a15e71b33a3d60058 (patch)
tree23127f54aeb3fae0c548dd6f19bfb3d468aab28d
parent3b1cbc58617fe45efbbbdd967ab1e0fae85d76a4 (diff)
Check for $(TOOLCHAIN) before checking for $(TOOLCHAIN)/bin
if TOOLCHAIN is blank, wildcard can still detect the `/bin` directory.
-rw-r--r--Makefile2
-rw-r--r--berry_fix/Makefile2
-rw-r--r--berry_fix/payload/Makefile2
-rw-r--r--libagbsyscall/Makefile2
4 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2e5a341dd..8a5a2b65f 100644
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,11 @@ 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
+endif
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
diff --git a/berry_fix/Makefile b/berry_fix/Makefile
index 6aab4ed62..8b8d07d42 100644
--- a/berry_fix/Makefile
+++ b/berry_fix/Makefile
@@ -8,9 +8,11 @@ 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
+endif
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
diff --git a/berry_fix/payload/Makefile b/berry_fix/payload/Makefile
index ad8787c34..bae657c92 100644
--- a/berry_fix/payload/Makefile
+++ b/berry_fix/payload/Makefile
@@ -8,9 +8,11 @@ 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
+endif
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
diff --git a/libagbsyscall/Makefile b/libagbsyscall/Makefile
index e1f502b2f..76368da86 100644
--- a/libagbsyscall/Makefile
+++ b/libagbsyscall/Makefile
@@ -8,9 +8,11 @@ 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
+endif
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy