mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 07:23:34 +08:00
Refactor common make definitions to tools/Config.mk; Add verbosity option to build (Richard Cochran)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5160 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+32
-1
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
# Config.mk
|
||||
# Strip quotes from Kconfig strings.
|
||||
# Global build rules and macros.
|
||||
#
|
||||
# Author: Richard Cochran
|
||||
#
|
||||
@@ -39,3 +39,34 @@
|
||||
CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH)))
|
||||
CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP)))
|
||||
CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD)))
|
||||
|
||||
# Default build rules.
|
||||
|
||||
define PREPROCESS
|
||||
@echo "CPP: $1->$2"
|
||||
$(Q) $(CPP) $(CPPFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define COMPILE
|
||||
@echo "CC: $1"
|
||||
$(Q) $(CC) -c $(CFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define COMPILEXX
|
||||
@echo "CXX: $1"
|
||||
$(Q) $(CXX) -c $(CXXFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(CC) -c $(AFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
echo "AR: $2"; \
|
||||
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
|
||||
endef
|
||||
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.a
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user