summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCleverking2003 <30466983+Cleverking2003@users.noreply.github.com>2020-06-08 17:07:26 +0300
committerGitHub <noreply@github.com>2020-06-08 17:07:26 +0300
commit5bd65c61af7865f213ae142aa369c41ed272d24c (patch)
tree1fc64a437d7305403a2115ece9f044550ddc987f
parent59508fe7f84b67d7920a3cbc0df3cd6fe6cec71a (diff)
parent7594546ee990c55b5427a7f5bfc62263dc53ae5f (diff)
Merge branch 'master' into master
-rw-r--r--Makefile9
-rw-r--r--tools/jsonproc/Makefile2
-rw-r--r--tools/knarc/Makefile2
-rw-r--r--tools/narccomp/Makefile1
-rw-r--r--tools/scaninc/Makefile2
5 files changed, 5 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ea6e00fb..ff18771a 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
@:
diff --git a/tools/jsonproc/Makefile b/tools/jsonproc/Makefile
index 721da102..622f00ab 100644
--- a/tools/jsonproc/Makefile
+++ b/tools/jsonproc/Makefile
@@ -1,5 +1,3 @@
-CXX := g++
-
CXXFLAGS := -Wall -std=c++11 -O2
INCLUDES := -I .
diff --git a/tools/knarc/Makefile b/tools/knarc/Makefile
index 2e851af6..62af834f 100644
--- a/tools/knarc/Makefile
+++ b/tools/knarc/Makefile
@@ -1,5 +1,3 @@
-CXX := g++
-
CXXFLAGS := -std=c++17 -O2 -Wall -Wno-switch -lstdc++fs
SRCS := Source.cpp Narc.cpp
diff --git a/tools/narccomp/Makefile b/tools/narccomp/Makefile
index b484e7a1..6b404f32 100644
--- a/tools/narccomp/Makefile
+++ b/tools/narccomp/Makefile
@@ -1,4 +1,3 @@
-CXX = g++
CXXFLAGS := -O3 -std=c++11
.PHONY: all clean
diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile
index 1516f159..6168acd6 100644
--- a/tools/scaninc/Makefile
+++ b/tools/scaninc/Makefile
@@ -1,5 +1,3 @@
-CXX = g++
-
CXXFLAGS = -Wall -Werror -std=c++11 -O2
SRCS = scaninc.cpp c_file.cpp asm_file.cpp source_file.cpp