summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-05-25 10:33:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-26 00:21:45 -0700
commit99adc6aca733c1fb14afdc71ba94df98edeeb9bd (patch)
tree5a0f50589793cc57f0e67db775e40fd1c33d6e8a /extra
parent1910779d4185d4806bae1a3a1e21da3bc22f4e1e (diff)
downloadchrome-ec-99adc6aca733c1fb14afdc71ba94df98edeeb9bd.tar.gz
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 <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1073755 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r--extra/rma_reset/Makefile7
1 files 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
#