POSIX: Be less verbose on CXX builds, add option to provide log verbosity level on commandline

This commit is contained in:
Lorenz Meier 2015-07-05 11:02:19 +02:00
parent d1f8edb346
commit a4a73ff53e
1 changed files with 8 additions and 1 deletions

View File

@ -44,6 +44,12 @@
# Set to 1 for GCC-4.8.2 and to 0 for Clang-3.5 (Ubuntu 14.04)
USE_GCC?=0
ifeq ($(PX4_DEBUG_LEVEL),)
VERBOSITY_LEVEL=
else
VERBOSITY_LEVEL=$(PX4_DEBUG_LEVEL)
endif
ifneq ($(USE_GCC),1)
HAVE_CLANG35:=$(shell clang-3.5 -dumpversion 2>/dev/null)
@ -121,6 +127,7 @@ $(error Board config does not define CONFIG_BOARD)
endif
ARCHDEFINES += -DCONFIG_ARCH_BOARD_$(CONFIG_BOARD) \
-Dnoreturn_function=__attribute__\(\(noreturn\)\) \
-D$(VERBOSITY_LEVEL) \
-I$(PX4_BASE)/src/modules/systemlib \
-I$(PX4_BASE)/src/lib/eigen \
-I$(PX4_BASE)/src/platforms/posix/include \
@ -296,7 +303,7 @@ endef
define COMPILEXX
@$(ECHO) "CXX: $1"
@$(MKDIR) -p $(dir $2)
@echo $(Q) $(CCACHE) $(CXX) -MD -c $(CXXFLAGS) $(abspath $1) -o $2
@$(Q) $(CCACHE) $(CXX) -MD -c $(CXXFLAGS) $(abspath $1) -o $2
$(Q) $(CCACHE) $(CXX) -MD -c $(CXXFLAGS) $(abspath $1) -o $2
endef