From: Petteri Aimonen Date: Sat, 9 Mar 2013 11:09:14 +0000 (+0200) Subject: Add option to run the tests with mudflap to detect pointer errors. X-Git-Tag: 5.0.2~186^2~395 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=60109c0be1c8b21b38f08b50db36577921eaca7f;p=apps%2Fagl-service-can-low-level.git Add option to run the tests with mudflap to detect pointer errors. --- diff --git a/tests/Makefile b/tests/Makefile index 181628a2..40fcabe0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -22,6 +22,14 @@ ifneq (,$(findstring clang,$(CC_VERSION))) CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wconversion endif +# Also use mudflap if it is available +# To enable, run with make -B USE_MUDFLAP=y +USE_MUDFLAP ?= n +ifeq ($(USE_MUDFLAP),y) + CFLAGS += -fmudflap + LDFLAGS += -lmudflap -fmudflap +endif + all: breakpoints $(TESTS) run_unittests clean: