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
ac799b8e
Commit
ac799b8e
authored
Oct 09, 2023
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bld: bring build system to a more standard state
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a65393e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
Makefile
Makefile
+3
-10
Makefile
drivers/zio/Makefile
+1
-0
Makefile
tools/Makefile
+15
-3
No files found.
Makefile
View file @
ac799b8e
...
...
@@ -3,13 +3,8 @@
# SPDX-License-Identifier: CC0-1.0
-include
Makefile.specific
# include parent_common.mk for buildsystem's defines
# It allows you to inherit an environment configuration from larger project
REPO_PARENT
?=
$(
shell
pwd
)
/..
-include
$(REPO_PARENT)/parent_common.mk
C_DIRS
=
drivers/zio
\
tools
...
...
@@ -17,16 +12,14 @@ DIRS = $(C_DIRS) \
Documentation/core-api/zio
\
Documentation/core-api/zio/img/Makefile
all clean
:
$(
DIRS)
all clean
install
:
$(C_
DIRS)
clean
:
TARGET = clean
install
:
TARGET = install
$(DIRS)
:
$(MAKE)
-C
$@
$(TARGET)
modules modules_install
:
$(MAKE)
-C
drivers/zio
$@
flawfinder cppcheck
:
for
d
in
$(C_DIRS)
;
do
$(MAKE)
-C
$$
d
$@
||
exit
1
;
done
.PHONY
:
all clean modules modules_install
cppcheck flawfinder
.PHONY
:
all clean modules modules_install
install cppcheck flawfinder $(DIRS)
drivers/zio/Makefile
View file @
ac799b8e
...
...
@@ -34,6 +34,7 @@ all: modules
modules coccicheck modules_install clean
:
$(MAKE)
-C
$(KERNELSRC)
M
=
$(
shell
/bin/pwd
)
$@
install
:
modules_install
cppcheck
:
$(CPPCHECK)
-q
-I
.
--suppress
=
missingIncludeSystem
--enable
=
all
*
.c
*
.h
...
...
tools/Makefile
View file @
ac799b8e
...
...
@@ -14,7 +14,7 @@ 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
;
)
INCLUDE
=
-I
$(M)
/include/
CFLAGS
=
$(INCLUDE)
-Wall
-Werror
$(ZIO_VERSION)
$(EXTRACFLAGS)
CFLAGS
+
=
$(INCLUDE)
-Wall
-Werror
$(ZIO_VERSION)
$(EXTRACFLAGS)
CFLAGS
+=
-DGIT_VERSION
=
\"
$(GIT_VERSION)
\"
CC
?=
$(CROSS_COMPILE)
gcc
...
...
@@ -26,7 +26,7 @@ progs += zio-cat-file
progs
+=
test-dtc
# The following is ugly, please forgive me by now
user
:
$(progs)
all
:
$(progs)
clean
:
rm
-f
$(progs)
*
~
*
.o
...
...
@@ -34,10 +34,22 @@ clean:
%
:
%.c
$(CC)
$(CFLAGS)
$^
-o
$@
# make nothing for modules_install, but avoid errors
modules_install
:
DESTDIR
?=
prefix
?=
/usr/local
exec_prefix
?=
$(prefix)
bindir
?=
$(exec_prefix)
/bin
install
:
$(progs)
mkdir
-m
0775
-p
$(DESTDIR)$(bindir)
install
-D
-t
$(DESTDIR)$(bindir)
-m
0755
$^
cppcheck
:
$(CPPCHECK)
-q
$(INCLUDE)
--suppress
=
missingIncludeSystem
--enable
=
all
*
.c
*
.h
flawfinder
:
$(FLAWFINDER)
-SQDC
--error-level
=
4 .
.PHONY
:
flawfinder cppcheck
.PHONY
:
all clean install modules_install
flawfinder 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