From 9cf3364c1072f62f8f11e1e07e226f11fbc0d6e2 Mon Sep 17 00:00:00 2001 From: Peter Wittich Date: Fri, 10 May 2019 11:31:15 -0400 Subject: [PATCH] makefile updates uniform handling of size command --- makedefs | 5 ++++- projects/Makefile | 4 ++-- projects/project0/Makefile | 3 --- projects/project2/Makefile | 4 ---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/makedefs b/makedefs index cd778ae3..c4060086 100644 --- a/makedefs +++ b/makedefs @@ -222,7 +222,7 @@ ${COMPILER}${SUFFIX}/%.a: @${AR} -cr ${@} ${^} # -# The rule for linking the application. +# The rule for linking the application. Also includes a SZ command # ${COMPILER}${SUFFIX}/%.axf: @if [ 'x${SCATTERgcc_${notdir ${@:.axf=}}}' = x ]; \ @@ -234,12 +234,14 @@ ${COMPILER}${SUFFIX}/%.axf: if [ 'x${VERBOSE}' = x ]; \ then \ echo " LD ${@} ${LNK_SCP}"; \ + echo " SZ ${@}"; \ else \ echo ${LD} -T $${ldname} \ --entry ${ENTRY_${notdir ${@:.axf=}}} \ ${LDFLAGSgcc_${notdir ${@:.axf=}}} \ ${LDFLAGS} -o ${@} $(filter %.o %.a, ${^}) \ '${LIBM}' '${LIBC}' '${LIBGCC}'; \ + echo ${SIZE} ${@} ; \ fi; \ ${LD} -T $${ldname} \ --entry ${ENTRY_${notdir ${@:.axf=}}} \ @@ -247,5 +249,6 @@ ${COMPILER}${SUFFIX}/%.axf: ${LDFLAGS} -o ${@} $(filter %.o %.a, ${^}) \ '${LIBM}' '${LIBC}' '${LIBGCC}' @${OBJCOPY} -O binary ${@} ${@:.axf=.bin} + @${SIZE} ${@} endif diff --git a/projects/Makefile b/projects/Makefile index 4af6fdba..53f74ff3 100644 --- a/projects/Makefile +++ b/projects/Makefile @@ -5,10 +5,10 @@ DIRS=blinky uart_echo project0 project2 #i2c-sensors all: @for d in ${DIRS}; do \ - make -C $$d ;\ + ${MAKE} -s -C $$d ;\ done clean: @for d in ${DIRS}; do \ - make -C $$d clean ;\ + ${MAKE} -s -C $$d clean ;\ done diff --git a/projects/project0/Makefile b/projects/project0/Makefile index 2bcfd3ca..eafe9b61 100644 --- a/projects/project0/Makefile +++ b/projects/project0/Makefile @@ -55,7 +55,6 @@ IPATH+=${ROOT} # all: ${COMPILER} all: ${COMPILER}/project0.axf -all: size # # The rule to clean out all the build products. @@ -70,8 +69,6 @@ ${COMPILER}: @mkdir -p ${COMPILER} -size: ${COMPILER}/project0.axf - ${SIZE} $< # diff --git a/projects/project2/Makefile b/projects/project2/Makefile index 4dbe015c..67a9db1c 100644 --- a/projects/project2/Makefile +++ b/projects/project2/Makefile @@ -50,7 +50,6 @@ IPATH+=${FREERTOS_PLUS_ROOT}/FreeRTOS-Plus-CLI # all: ${COMPILER} all: ${COMPILER}/project2.axf -all: size # # The rule to clean out all the build products. @@ -65,9 +64,6 @@ ${COMPILER}: @mkdir -p ${COMPILER} -size: ${COMPILER}/project2.axf - ${SIZE} $< - # # Rules for building the project #p