summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-08-06 20:16:36 -0400
committerGitHub <noreply@github.com>2019-08-06 20:16:36 -0400
commitca8048c300f7df74e46ade85b1a7f3adbf34522a (patch)
treea76d164bd08fb82a9001e08ecc4d2c18890102c1 /Makefile
parent2a0517f0fdfe0ce8f2395f6572bf43190ecbe611 (diff)
parente28cf5406b25707338458a3f49125b38750c8627 (diff)
Merge pull request #771 from aaaaaa123456789/master
Fix Makefiles to account for the $CC and $CXX environment variables
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 65a4aa7bd..5a8af32a9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,17 @@
TOOLCHAIN := $(DEVKITARM)
+
+ifeq ($(CC),)
+HOSTCC := gcc
+else
+HOSTCC := $(CC)
+endif
+
+ifeq ($(CXX),)
+HOSTCXX := g++
+else
+HOSTCXX := $(CXX)
+endif
+
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
include $(TOOLCHAIN)/base_tools
else
@@ -136,7 +149,7 @@ all: rom
tools: $(TOOLDIRS)
$(TOOLDIRS):
- @$(MAKE) -C $@
+ @$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX)
rom: $(ROM)