summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2020-06-08 14:57:36 +0200
committermid-kid <esteve.varela@gmail.com>2020-06-08 14:57:36 +0200
commit672325017c48804a933ef944e63f2b5918763f7f (patch)
treeeba218a137421005ac1ec0a2473458cfe62f5a09 /Makefile
parenta9a1e08acac9dab227f0421be5f42128a9fd2537 (diff)
Pass down host variables
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ea6e00fb..1d0c177f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,11 @@
include config.mk
include filesystem.mk
-HOSTCC := $(CC)
-HOSTCXX := $(CXX)
+HOSTCC = $(CC)
+HOSTCXX = $(CXX)
HOSTCFLAGS = $(CFLAGS)
HOSTCXXFLAGS = $(CXXFLAGS)
+HOST_VARS := CC=$(HOSTCC) CXX=$(HOSTCXX) CFLAGS=$(HOSTCFLAGS) CXXFLAGS=$(HOSTCXXFLAGS)
.PHONY: clean tidy all default patch_mwasmarm
@@ -219,7 +220,7 @@ infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst
# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
ifeq (,$(filter-out all,$(MAKECMDGOALS)))
-$(call infoshell, $(MAKE) tools patch_mwasmarm)
+$(call infoshell, $(HOST_VARS) $(MAKE) tools patch_mwasmarm)
else
NODEP := 1
endif
@@ -256,7 +257,7 @@ tidy:
tools: $(TOOLDIRS)
$(TOOLDIRS):
- @$(MAKE) -C $@
+ @$(HOST_VARS) $(MAKE) -C $@
$(MWASMARM): patch_mwasmarm
@: