diff --git a/makefile b/makefile index 70d40d65..ddddb6cc 100644 --- a/makefile +++ b/makefile @@ -13,9 +13,11 @@ endif ifeq ($V,1) silent= silent_stdout= +silent_stderr= else silent=@ silent_stdout= > /dev/null +silent_stderr= 2> /dev/null endif PLATFORM := $(shell uname | sed -e 's/_.*//') diff --git a/makefile_include.mk b/makefile_include.mk index 72c4d363..c87550ba 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -55,13 +55,13 @@ endif ifndef EXTRALIBS ifneq ($(shell echo $(CFLAGS) | grep USE_LTM),) -EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs libtommath) -else -ifneq ($(shell echo $(CFLAGS) | grep USE_TFM),) -EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs tomsfastmath) -endif -endif +EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs libtommath ${silent_stderr} || true) +else ifneq ($(shell echo $(CFLAGS) | grep USE_TFM),) +EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs tomsfastmath ${silent_stderr} || true) +else ifneq ($(shell echo $(CFLAGS) | grep USE_GMP),) +EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --libs gmp ${silent_stderr} || true) endif +endif # EXTRALIBS need-help := $(filter help,$(MAKECMDGOALS)) define print-help @@ -77,13 +77,13 @@ endef # make CFLAGS="-I./src/headers/ -DLTC_SOURCE ..." ... # ifneq ($(shell echo $(CFLAGS) | grep LTM_DESC),) -LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I libtommath) +LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I libtommath ${silent_stderr} || true) endif ifneq ($(shell echo $(CFLAGS) | grep TFM_DESC),) -LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I tomsfastmath) +LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I tomsfastmath ${silent_stderr} || true) endif ifneq ($(shell echo $(CFLAGS) | grep GMP_DESC),) -LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I gmp) +LTC_CFLAGS+=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config --cflags-only-I gmp ${silent_stderr} || true) endif LTC_CFLAGS += -I./src/headers/ -DLTC_SOURCE -Wall -Wsign-compare -Wshadow