Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Mock Turtle
Commits
68fcb2c2
Commit
68fcb2c2
authored
Oct 21, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: improve makefile
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
d7854f2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
Makefile
software/kernel/Makefile
+17
-12
No files found.
software/kernel/Makefile
View file @
68fcb2c2
...
...
@@ -3,19 +3,28 @@
# SPDX-FileCopyrightText: 2019 CERN
TOP_DIR
?=
$(
shell
pwd
)
/../../
TRTL
?=
$(TOP_DIR)
TRTL_SW
:=
$(TRTL)
/software
PREFIX
?=
/
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
-include
Makefile.specific
# include parent_common.mk for buildsystem's defines
REPO_PARENT
?=
$(TOD_DIR)
/../
-include
$(REPO_PARENT)/parent_common.mk
TRTL
?=
$(TOP_DIR)
include
$(TRTL)/common.mk
KVERSION
?=
$(
shell
uname
-r
)
LINUX
?=
/lib/modules/
$(KVERSION)
/build
DKMS
?=
0
GIT_VERSION
=
$(
shell
cd
$(src)
;
git describe
--always
--dirty
--long
--tags
)
VERSION
:=
$(
shell
git describe
--tags
--abbrev
=
0 |
tr
-d
'v'
)
all modules
:
hw_header
$(MAKE)
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
DKMS
=
$(DKMS)
modules
$(MAKE)
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
\
GIT_VERSION
=
$(GIT_VERSION)
\
DKMS
=
$(DKMS)
\
modules
hw_header
:
ifeq
($(DKMS),
0)
...
...
@@ -37,11 +46,7 @@ dkms_install: hw_header
@sed
-r
-i
-e
"s/@PKGVER@/$(VERSION)/"
$($@_dir)/dkms.conf
# be able to run the "clean" rule even if $(LINUX) is not valid
clean
:
rm
-rf
*
.o
*
~ .
*
.cmd
*
.ko
*
.mod.c .tmp_versions Module.symvers
\
Module.markers modules.order
coccicheck
:
$(MAKE)
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
coccicheck
coccicheck clean
:
$(MAKE)
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
INSTALL_MOD_PATH
=
$(PREFIX)
$@
.PHONY
:
headers
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