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
21f5704d
Commit
21f5704d
authored
Oct 16, 2015
by
Adam Wujek
💬
Committed by
Federico Vaga
Nov 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile: split Makefile into Makefile and Kbuild
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
fd618751
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
31 deletions
+32
-31
Kbuild
Kbuild
+29
-0
Makefile
Makefile
+3
-31
No files found.
Kbuild
0 → 100644
View file @
21f5704d
zio-y := core.o chardev.o sysfs.o misc.o
zio-y += bus.o objects.o helpers.o dma.o
zio-y += buffers/zio-buf-kmalloc.o triggers/zio-trig-user.o
# Waiting for Kconfig...
CONFIG_ZIO_SNIFF_DEV:=y
zio-$(CONFIG_ZIO_SNIFF_DEV) += sniff-dev.o
obj-m = zio.o
obj-m += drivers/
obj-m += buffers/
obj-m += triggers/
# src is defined byt the kernel Makefile, but we want to use it also in our
# local Makefile (tools, lib)
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef CONFIG_CSM_VERSION
ccflags-y += -D"CERN_SUPER_MODULE=MODULE_VERSION(\"$(CONFIG_CSM_VERSION)\")"
else
ccflags-y += -DCERN_SUPER_MODULE=""
endif
# WARNING: the line below doesn't work in-kernel if you compile with O=
ccflags-y += -I$(src)/include/ -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += $(ZIO_VERSION)
ccflags-$(CONFIG_ZIO_DEBUG) += -DDEBUG
Makefile
View file @
21f5704d
LINUX
?=
/lib/modules/
$(
shell
uname
-r
)
/build
zio-y
:=
core.o chardev.o sysfs.o misc.o
zio-y
+=
bus.o objects.o helpers.o dma.o
zio-y
+=
buffers/zio-buf-kmalloc.o triggers/zio-trig-user.o
# Waiting for Kconfig...
CONFIG_ZIO_SNIFF_DEV
:=
y
zio-$(CONFIG_ZIO_SNIFF_DEV)
+=
sniff-dev.o
obj-m
=
zio.o
obj-m
+=
drivers/
obj-m
+=
buffers/
obj-m
+=
triggers/
# src is defined byt the kernel Makefile, but we want to use it also in our
# local Makefile (tools, lib)
src
?=
$(
shell
pwd
)
GIT_VERSION
:=
$(
shell
cd
$(src)
;
git describe
--dirty
--long
--tags
)
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef
CONFIG_CSM_VERSION
ccflags-y
+=
-D
"CERN_SUPER_MODULE=MODULE_VERSION(
\"
$(CONFIG_CSM_VERSION)
\"
)"
else
ccflags-y
+=
-DCERN_SUPER_MODULE
=
""
endif
GIT_VERSION
:=
$(
shell
git describe
--dirty
--long
--tags
)
# Extract major, minor and patch number
ZIO_VERSION
:=
-D__ZIO_MAJOR_VERSION
=
$(
shell
echo
$(GIT_VERSION)
|
cut
-d
'-'
-f
2 |
cut
-d
'.'
-f
1
;
)
ZIO_VERSION
+=
-D__ZIO_MINOR_VERSION
=
$(
shell
echo
$(GIT_VERSION)
|
cut
-d
'-'
-f
2 |
cut
-d
'.'
-f
2
;
)
ZIO_VERSION
+=
-D__ZIO_PATCH_VERSION
=
$(
shell
echo
$(GIT_VERSION)
|
cut
-d
'-'
-f
3
)
export
ZIO_VERSION
# WARNING: the line below doesn't work in-kernel if you compile with O=
ccflags-y
+=
-I
$(src)
/include/
-DGIT_VERSION
=
\"
$(GIT_VERSION)
\"
ccflags-y
+=
$(ZIO_VERSION)
ccflags-$(CONFIG_ZIO_DEBUG)
+=
-DDEBUG
export
GIT_VERSION
export
ZIO_VERSION
all
:
modules tools
...
...
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