Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zio
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
misc
zio
Commits
21f5704d
Commit
21f5704d
authored
9 years ago
by
Adam Wujek
Committed by
Federico Vaga
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Makefile: split Makefile into Makefile and Kbuild
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
fd618751
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Kbuild
+29
-0
29 additions, 0 deletions
Kbuild
Makefile
+3
-31
3 additions, 31 deletions
Makefile
with
32 additions
and
31 deletions
Kbuild
0 → 100644
+
29
−
0
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
This diff is collapsed.
Click to expand it.
Makefile
+
3
−
31
View file @
21f5704d
LINUX
?=
/lib/modules/
$(
shell
uname
-r
)
/build
LINUX
?=
/lib/modules/
$(
shell
uname
-r
)
/build
zio-y
:=
core.o chardev.o sysfs.o misc.o
GIT_VERSION
:=
$(
shell git describe
--dirty
--long
--tags
)
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
# Extract major, minor and patch number
# 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_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_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
)
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=
export
GIT_VERSION
ccflags-y
+=
-I
$(
src
)
/include/
-DGIT_VERSION
=
\"
$(
GIT_VERSION
)
\"
export
ZIO_VERSION
ccflags-y
+=
$(
ZIO_VERSION
)
ccflags-$(CONFIG_ZIO_DEBUG)
+=
-DDEBUG
all
:
modules tools
all
:
modules tools
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment