Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZIO
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
ZIO
Commits
5c18c1e5
Commit
5c18c1e5
authored
Oct 25, 2022
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bld: add cppcheck rule to Makefiles
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
83615054
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
Makefile
Makefile
+5
-1
Makefile
drivers/zio/Makefile
+5
-1
Makefile
tools/Makefile
+8
-0
No files found.
Makefile
View file @
5c18c1e5
...
...
@@ -14,7 +14,7 @@ modules:
$(MAKE)
-C
drivers/zio
.PHONY
:
tools
.PHONY
:
tools
cppcheck
tools
:
$(MAKE)
-C
tools
M
=
$(
shell
/bin/pwd
)
...
...
@@ -23,3 +23,7 @@ tools:
clean
:
$(MAKE)
-C
drivers/zio clean
$(MAKE)
-C
tools clean
cppcheck
:
$(MAKE)
-C
drivers/zio cppcheck
$(MAKE)
-C
tools cppcheck
drivers/zio/Makefile
View file @
5c18c1e5
...
...
@@ -7,6 +7,7 @@
REPO_PARENT
?=
$(
shell
pwd
)
/../../..
-include
$(REPO_PARENT)/parent_common.mk
CPPCHECK
?=
cppcheck
KVERSION
?=
$(
shell
uname
-r
)
KERNELSRC
?=
/lib/modules/
$(KVERSION)
/build
...
...
@@ -33,4 +34,7 @@ all: modules
modules coccicheck modules_install clean
:
$(MAKE)
-C
$(KERNELSRC)
M
=
$(
shell
/bin/pwd
)
$@
.PHONY
:
all clean coccicheck modules modules_install
cppcheck
:
$(CPPCHECK)
-q
-I
.
--suppress
=
missingIncludeSystem
--enable
=
all
*
.c
*
.h
--error-exitcode
=
1
.PHONY
:
all clean coccicheck cppcheck modules modules_install
tools/Makefile
View file @
5c18c1e5
...
...
@@ -14,9 +14,12 @@ ZIO_VERSION += -D__ZIO_MINOR_VERSION=$(shell echo $(GIT_VERSION) | cut -d '-' -f
ZIO_VERSION
+=
-D__ZIO_PATCH_VERSION
=
$(
shell
echo
$(GIT_VERSION)
|
cut
-d
'-'
-f
1 |
cut
-d
'.'
-f
3
;
)
CFLAGS
=
-I
$(M)
/include/
-Wall
-Werror
$(ZIO_VERSION)
$(EXTRACFLAGS)
INCLUDE
=
-I
$(M)
/include/
CFLAGS
=
$(INCLUDE)
-Wall
-Werror
$(ZIO_VERSION)
$(EXTRACFLAGS)
CFLAGS
+=
-DGIT_VERSION
=
\"
$(GIT_VERSION)
\"
CC
?=
$(CROSS_COMPILE)
gcc
CPPCHECK
?=
cppcheck
progs
:=
zio-dump
progs
+=
zio-cat-file
...
...
@@ -30,3 +33,8 @@ clean:
%
:
%.c
$(CC)
$(CFLAGS)
$^
-o
$@
cppcheck
:
$(CPPCHECK)
-q
$(INCLUDE)
--suppress
=
missingIncludeSystem
--enable
=
all
*
.c
*
.h
--error-exitcode
=
1
.PHONY
:
cppcheck"
\"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment