[yocto] [PATCH v3 2/5] Makefile: add debug target

Todor Minchev todor.minchev at linux.intel.com
Tue Feb 14 14:36:49 PST 2017


A debug version of the rmc binary can be built by using the debug
Makefile target. This will include debug symbols and will disable
compiler optimizations.

Example:

make debug

Signed-off-by: Todor Minchev <todor.minchev at linux.intel.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index c58047a..fdd936f 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ ALL_OBJS := $(RMC_TOOL_OBJ) $(RMC_LIB_OBJ)
 RMC_CFLAGS := -Wall -I$(TOPDIR)/inc
 
 all: rmc
+debug: RMC_CFLAGS += -DDEBUG -g -O0
+debug: rmc
 
 $(ALL_OBJS): %.o: %.c
 	$(CC) -c $(CFLAGS) $(RMC_CFLAGS) $< -o $@
-- 
2.11.1




More information about the yocto mailing list