From 99adc6aca733c1fb14afdc71ba94df98edeeb9bd Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 25 May 2018 10:33:40 -0700 Subject: [PATCH] rma_reset: allow building with debug options When invoking make with DEBUG=1 add '-g -O0' to the compiler invocation to facilitate debugging with gdb. BRANCH=none BUG=b:73296606 TEST=verified that building with DEBUG=1 adds '-g -O0' to the compiler invocation. Change-Id: Idd80bd481091b91683200c78fe49dc7e9783a730 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/1073755 Reviewed-by: Randall Spangler --- extra/rma_reset/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extra/rma_reset/Makefile b/extra/rma_reset/Makefile index f779d70a7c..d693f6427c 100644 --- a/extra/rma_reset/Makefile +++ b/extra/rma_reset/Makefile @@ -9,8 +9,6 @@ OBJS := curve25519.o curve25519-generic.o sha256.o base32.o LIBS := LFLAGS := CFLAGS := -std=gnu99 \ - -g3 \ - -O3 \ -Wall \ -Werror \ -Wpointer-arith \ @@ -21,6 +19,11 @@ CFLAGS := -std=gnu99 \ -Wredundant-decls \ -Wmissing-declarations +ifeq ($(DEBUG),1) +CFLAGS += -g -O0 +else +CFLAGS += -O3 +endif # # Add libusb-1.0 required flags #