From e28cf5406b25707338458a3f49125b38750c8627 Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Tue, 6 Aug 2019 20:30:57 -0300 Subject: Fix Makefiles to account for the $CC and $CXX environment variables --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Makefile') 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) -- cgit v1.2.3