summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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)