Update makefile

This commit is contained in:
John Zhao 2018-03-08 17:33:41 +08:00
parent 1931fb96dd
commit 6a4344ccc7
2 changed files with 17 additions and 3 deletions

View File

@ -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))

View File

@ -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*