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