From e4250fbaac8c4944d27f58cbfa469edd8b6374f5 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 16 Dec 2020 19:43:34 -0500 Subject: Check for $(DEVKITARM) first before checking for $(DEVKITARM)/bin --- libc/Makefile | 13 +++++++++++-- libgcc/Makefile | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/libc/Makefile b/libc/Makefile index 2b60a95..d9de489 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -1,6 +1,15 @@ -ifneq (,$(wildcard $(DEVKITARM)/bin)) -include $(DEVKITARM)/base_tools +ifneq (,$(DEVKITARM)) + ifneq (,$(wildcard $(DEVKITARM)/bin)) + include $(DEVKITARM)/base_tools + DKA_EXISTS=1 + else + DKA_EXISTS=0 + endif else +DKA_EXISTS=0 +endif + +ifneq ($(DKA_EXISTS),1) PREFIX := arm-none-eabi- export AR := $(PREFIX)ar export AS := $(PREFIX)as diff --git a/libgcc/Makefile b/libgcc/Makefile index 1aec873..6461d8e 100644 --- a/libgcc/Makefile +++ b/libgcc/Makefile @@ -1,6 +1,15 @@ -ifneq (,$(wildcard $(DEVKITARM)/bin)) -include $(DEVKITARM)/base_tools +ifneq (,$(DEVKITARM)) + ifneq (,$(wildcard $(DEVKITARM)/bin)) + include $(DEVKITARM)/base_tools + DKA_EXISTS=1 + else + DKA_EXISTS=0 + endif else +DKA_EXISTS=0 +endif + +ifneq ($(DKA_EXISTS),1) PREFIX := arm-none-eabi- export AR := $(PREFIX)ar export AS := $(PREFIX)as -- cgit v1.2.3