Commit 1bfe5b06 authored by Federico Vaga's avatar Federico Vaga

bld: add cppcheck

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 98f1bbb8
......@@ -3,7 +3,7 @@
DIRS = kernel tools
.PHONY: all clean modules install modules_install coccicheck $(DIRS)
.PHONY: all clean modules install modules_install coccicheck cppcheck $(DIRS)
all clean : $(DIRS)
install modules_install coccicheck modules: kernel
......@@ -13,6 +13,8 @@ modules: TARGET = modules
coccicheck: TARGET = coccicheck
install: TARGET = install
modules_install: TARGET = modules_install
cppcheck:
$(MAKE) -C tools $@
$(DIRS):
$(MAKE) -C $@ $(ENV_VAR) $(TARGET)
......@@ -57,10 +57,11 @@ SPI_ABS ?= $(abspath $(SPI))
VERSION = $(shell git describe --dirty --long --tags)
CHEBY ?= /usr/bin/cheby
CPPCHECK ?= cppcheck
all: modules
.PHONY: all modules clean help install modules_install coccicheck spec-core-fpga.h
.PHONY: all modules clean help install modules_install coccicheck spec-core-fpga.h cppcheck
spec-core-fpga.h:
ifeq ($(DKMS), 0)
......@@ -83,3 +84,7 @@ modules help coccicheck modules_install clean: spec-core-fpga.h
I2C_ABS=$(I2C_ABS) \
SPI_ABS=$(SPI_ABS) \
$@
INCLUDE := -I./
cppcheck:
$(CPPCHECK) -q $(INCLUDE) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
......@@ -33,4 +33,4 @@ install:
cppcheck:
$(CPPCHECK) -q $(INCLUDE) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
.PHONY=cppcheck
.PHONY: cppcheck
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