From 840f382ee691596474966f74bd1be37722bbc91c Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Tue, 9 Jun 2020 20:52:31 +0800 Subject: [PATCH] mtce: do not use which to check CC Signed-off-by: Jackie Huang --- mtce-common/src/common/Makefile | 4 +--- mtce/src/common/Makefile | 4 +--- mtce/src/public/Makefile | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mtce-common/src/common/Makefile b/mtce-common/src/common/Makefile index e0a5574..d44eef6 100755 --- a/mtce-common/src/common/Makefile +++ b/mtce-common/src/common/Makefile @@ -54,9 +54,7 @@ CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 STATIC_ANALYSIS_TOOL = cppcheck STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0) -ifeq (,$(shell which ${CC})) -CC=g++ -endif +CC ?= g++ .cpp.o: $(CXX) $(CCFLAGS) $(INCLUDES) $(EXTRACCFLAGS) -c $< -o $@ diff --git a/mtce/src/common/Makefile b/mtce/src/common/Makefile index 229a1a3..f797724 100755 --- a/mtce/src/common/Makefile +++ b/mtce/src/common/Makefile @@ -17,9 +17,7 @@ CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 STATIC_ANALYSIS_TOOL = cppcheck STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0) -ifeq (,$(shell which ${CC})) -CC=g++ -endif +CC ?= g++ .cpp.o: $(CXX) $(CCFLAGS) $(INCLUDES) $(EXTRACCFLAGS) -c $< -o $@ diff --git a/mtce/src/public/Makefile b/mtce/src/public/Makefile index 403638f..7dd80e4 100644 --- a/mtce/src/public/Makefile +++ b/mtce/src/public/Makefile @@ -13,9 +13,7 @@ LDFLAGS = -shared CFLAGS = -fPIC -g -O2 -Wall -Wextra -Werror TARGET_LIB = libamon.so lib: build -ifeq (,$(shell which ${CC})) -CC=gcc -endif +CC ?= gcc STATIC_ANALYSIS_TOOL = cppcheck STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0) -- 2.7.4