From a3f33f996fb8f7b37f9643c0a46a2481f47e09a2 Mon Sep 17 00:00:00 2001 From: Andrey Mironov Date: Thu, 12 Apr 2018 10:03:50 +0300 Subject: [PATCH] Added release with debug info DEBUG type --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 96f214de8..e1dd4af37 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,10 @@ OPTIONS ?= # compile for OpenPilot BootLoader support OPBL ?= no -# Debugger optons, must be empty or GDB +# Debugger optons: +# empty - ordinary build with all optimizations enabled +# RELWITHDEBINFO - ordinary build with debug symbols and all optimizations enabled +# GDB - debug build with minimum number of optimizations DEBUG ?= # Insert the debugging hardfault debugger @@ -117,6 +120,9 @@ OPTIMISE_DEFAULT := -Og LTO_FLAGS := $(OPTIMISE_DEFAULT) DEBUG_FLAGS = -ggdb3 -DDEBUG else +ifeq ($(DEBUG),RELWITHDEBINFO) +DEBUG_FLAGS = -ggdb3 +endif OPTIMISATION_BASE := -flto -fuse-linker-plugin -ffast-math OPTIMISE_DEFAULT := -O2 OPTIMISE_SPEED := -Ofast