From 6a4344ccc7a176cf5c0953ea26acbfba15a0fded Mon Sep 17 00:00:00 2001 From: John Zhao Date: Thu, 8 Mar 2018 17:33:41 +0800 Subject: [PATCH] Update makefile --- CommonDefs.mk | 6 +++--- Makefile | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CommonDefs.mk b/CommonDefs.mk index fe9f60d..11cda72 100644 --- a/CommonDefs.mk +++ b/CommonDefs.mk @@ -52,7 +52,7 @@ else DUMMY := $(error "Can't detect host os") endif -UNAME_M = $(shell uname -m) +UNAME_M := $(shell uname -m) ifneq ($(findstring x86_64,$(UNAME_M)),) HOST_ARCH := x64 else ifneq ($(findstring x86,$(UNAME_M)),) @@ -73,7 +73,7 @@ endif HOST_NAME := $(HOST_OS) ifeq ($(HOST_OS),Linux) - UNAME_A = $(shell uname -a) + UNAME_A := $(shell uname -a) ifneq ($(findstring tegra,$(UNAME_A)),) HOST_NAME := Tegra else ifneq ($(findstring jetsonbot,$(UNAME_A)),) @@ -147,7 +147,7 @@ endif ifeq ($(HOST_OS),Win) ifeq ($(HOST_ARCH),x64) - VS_VERSION = $(shell echo "$(shell which cl)" | sed -e "s/.*Visual\sStudio\s\([0-9]\+\).*/\1/g") + VS_VERSION := $(shell echo "$(shell which cl)" | sed "s/.*Visual\sStudio\s\([0-9]\+\).*/\1/g") ifeq (15,$(VS_VERSION)) CMAKE += -G "Visual Studio 15 2017 Win64" else ifeq (14,$(VS_VERSION)) diff --git a/Makefile b/Makefile index bc601a2..cb3db3b 100644 --- a/Makefile +++ b/Makefile @@ -21,3 +21,17 @@ opendoc: apidoc html=./doc/output/$$lang/html/index.html; \ [ -f "$$html" ] && sh ./scripts/open.sh $$html; \ done + +host: + @$(call echo,Make $@) + @echo HOST_OS: $(HOST_OS) + @echo HOST_ARCH: $(HOST_ARCH) + @echo ECHO: $(ECHO) + @echo CC: $(CC) + @echo CXX: $(CXX) + @echo MAKE: $(MAKE) + @echo BUILD: $(BUILD) + @echo FIND: $(FIND) + @echo LDD: $(LDD) + @echo CMAKE: $(CMAKE) + @#$(FIND) . -name READ*