Fix Makefiles to account for the $CC and $CXX environment variables

This commit is contained in:
aaaaaa123456789
2019-08-06 20:30:57 -03:00
parent 2a0517f0fd
commit e28cf5406b
12 changed files with 25 additions and 12 deletions
+14 -1
View File
@@ -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)