Commit b469bcce authored by Federico Vaga's avatar Federico Vaga

bld: add cppcheck

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f9b2ede6
......@@ -6,7 +6,7 @@ all: kernel tools
DIRS =kernel tools
.PHONY: all clean modules install modules_install $(DIRS)
.PHONY: all clean modules install modules_install cppcheck $(DIRS)
install modules_install:
......@@ -20,3 +20,6 @@ modules_install: TARGET = modules_install
$(DIRS):
$(MAKE) -C $@ $(TARGET)
cppcheck:
@$(MAKE) -C tools $@
......@@ -65,4 +65,4 @@ clean:
Module.markers modules.order
cppcheck:
$(CPPCHECK) -q -I. -I$(ZIO_ABS)/include -I$(FMC_BUS_ABS)/ --enable=all *.c *.h
$(CPPCHECK) -q -I. -I$(ZIO_ABS)/include -I$(FMC_BUS_ABS)/ --suppress=missingIncludeSystem --enable=all *.c *.h
......@@ -14,6 +14,7 @@ GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -I../kernel -Wno-trigraphs -Wall -Werror -ggdb -O2 $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
CPPCHECK ?= cppcheck
CC ?= $(CROSS_COMPILE)gcc
progs := fau-trg-config
......@@ -37,3 +38,6 @@ install:
# we need this as we are out of the kernel
%: %.c
$(CC) $(CFLAGS) $^ -o $@
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment