[dpdk-dev] [PATCH] mk: add debug target

Ferruh Yigit ferruh.yigit at intel.com
Sat Dec 16 01:13:50 CET 2017


Add "debug" target to build library with debug symbols and optimization
disabled.

This is shortcut for exiting method to compile with
EXTRA_CFLAGS="-O0 -g3"

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 doc/build-sdk-quick.txt | 1 +
 mk/rte.sdkroot.mk       | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt
index ff297806a..619430e1b 100644
--- a/doc/build-sdk-quick.txt
+++ b/doc/build-sdk-quick.txt
@@ -7,6 +7,7 @@ Build commands
 	defconfig        auto-select target template based on arch, OS, etc.
 	all              same as build (default rule)
 	build            build in a configured directory
+	debug            build library with debug symbols
 	clean            remove files but keep configuration
 	install T=       configure, build and install a target in DESTDIR
 	install          install optionally staged in DESTDIR
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index e2e3effa8..c55680420 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -123,6 +123,10 @@ gcov gcovclean:
 examples examples_clean:
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkexamples.mk $@
 
+.PHONY: debug
+debug:
+	$(Q)$(MAKE) EXTRA_CFLAGS="-O0 -g3"
+
 # all other build targets
 %:
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
-- 
2.14.3



More information about the dev mailing list