Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
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
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
FMC TDC 1ns 5cha - Software
Commits
bf8c29c3
Commit
bf8c29c3
authored
Aug 06, 2014
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Makefile standardization
parents
0dacf4c4
3ff82975
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
16 deletions
+51
-16
Makefile
Makefile
+7
-1
Makefile
kernel/Makefile
+27
-11
ft-core.c
kernel/ft-core.c
+3
-0
Makefile
lib/Makefile
+1
-1
Makefile
tools/Makefile
+13
-3
No files found.
Makefile
View file @
bf8c29c3
...
...
@@ -10,6 +10,8 @@ all clean modules install modules_install: gitmodules
all modules
:
prereq
clean_all
:
clean prereq_clean
# a hack, to prevent compiling wr-nic.ko, which won't work on older kernels
CONFIG_WR_NIC
=
n
export
CONFIG_WR_NIC
...
...
@@ -23,7 +25,8 @@ gitmodules:
# The user can override, using environment variables, all these three:
FMC_BUS
?=
fmc-bus
ZIO
?=
zio
SUBMOD
=
$(FMC_BUS)
$(ZIO)
SPEC_SW
?=
spec-sw
SUBMOD
=
$(FMC_BUS)
$(ZIO)
$(SPEC_SW)
prereq
:
for
d
in
$(SUBMOD)
;
do
$(MAKE)
-C
$$
d
||
exit
1
;
done
...
...
@@ -35,3 +38,6 @@ prereq_install_warn:
prereq_install
:
for
d
in
$(SUBMOD)
;
do
$(MAKE)
-C
$$
d modules_install
||
exit
1
;
done
touch
.prereq_installed
prereq_clean
:
for
d
in
$(SUBMOD)
;
do
$(MAKE)
-C
$$
d clean
||
exit
1
;
done
kernel/Makefile
View file @
bf8c29c3
LINUX
?=
/lib/modules/
$(
shell
uname
-r
)
/build
ZIO
?=
$(M)
/../zio
FMC_BUS
?=
$(M)
/../fmc-bus
SPEC
?=
$(M)
/../spec-sw
KBUILD_EXTRA_SYMBOLS
:=
$(ZIO)
/Module.symvers
$(SPEC)
/kernel/Module.symvers
$(FMC_BUS)
/kernel/Module.symvers
ccflags-y
=
-I
$(ZIO)
/include
-I
$M
-I
$(FMC_BUS)
/kernel/include
-I
$(FMC_BUS)
/kernel/include/linux
-I
$(FMC_BUS)
/sdb-lib
-I
$(SPEC)
/kernel
#ccflags-y += -DDEBUG
ZIO
?=
$(src)
/../zio
FMC_BUS
?=
$(src)
/../fmc-bus
SPEC
?=
$(src)
/../spec-sw
KBUILD_EXTRA_SYMBOLS
:=
\
$(ZIO)
/Module.symvers
\
$(SPEC)
/kernel/Module.symvers
\
$(FMC_BUS)
/kernel/Module.symvers
GIT_VERSION
=
$(
shell
cd
$(src)
;
git describe
--always
--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
ccflags-y
=
-DGIT_VERSION
=
\"
$(GIT_VERSION)
\"
\
-I
$(src)
\
-I
$(ZIO)
/include
\
-I
$(FMC_BUS)
/kernel/include
\
-I
$(FMC_BUS)
/kernel/include/linux
\
-I
$(FMC_BUS)
/sdb-lib
\
-I
$(SPEC)
/kernel
ccflags-$(CONFIG_FMC_TDC_DEBUG)
+=
-DDEBUG
subdirs-ccflags-y
=
$
(
ccflags-y
)
obj-m
:=
fmc-tdc.o
fmc-tdc-objs
=
acam.o calibration.o fmc-util.o ft-spec.o
\
ft-svec.o ft-core.o onewire.o ft-time.o ft-irq.o ft-zio.o
\
ft-svec.o ft-core.o onewire.o ft-time.o ft-irq.o ft-zio.o
\
../fmc-bus/sdb-lib/access.o ../fmc-bus/sdb-lib/glue.o
all
:
modules
...
...
kernel/ft-core.c
View file @
bf8c29c3
...
...
@@ -390,4 +390,7 @@ static void ft_exit(void)
module_init
(
ft_init
);
module_exit
(
ft_exit
);
MODULE_VERSION
(
GIT_VERSION
);
MODULE_LICENSE
(
"GPL and additional rights"
);
/* LGPL */
CERN_SUPER_MODULE
;
lib/Makefile
View file @
bf8c29c3
...
...
@@ -6,7 +6,7 @@ ZIO ?= ../zio
LIB
=
libfmctdc.a
LOBJ
:=
fmctdc-lib.o
CFLAGS
=
-Wall
-ggdb
-O2
-I
../kernel
-I
$(ZIO)
/include
CFLAGS
=
-Wall
-ggdb
-O2
-I
../kernel
-I
$(ZIO)
/include
$(EXTRACFLAGS)
DESTDIR
?=
/usr/local
...
...
tools/Makefile
View file @
bf8c29c3
DESTDIR
?=
/usr/local/
LIBTDC
=
../lib/
TESTS
=
fmc-tdc-list
\
fmc-tdc-term
\
fmc-tdc-read
\
...
...
@@ -5,10 +8,10 @@ TESTS = fmc-tdc-list \
fmc-tdc-temperature
\
fmc-tdc-time
CFLAGS
=
-I
.
-I
../lib
-I
../kernel
-Wall
CFLAGS
=
-I
.
-I
$(LIBTDC)
-I
../kernel
-Wall
$(EXTRACFLAGS)
COMMON_SRCS
=
test-common.c
LDFLAGS
=
-L
../lib
-lfmctdc
LDFLAGS
=
-L
$(LIBTDC)
-lfmctdc
all
:
$(TESTS)
...
...
@@ -17,4 +20,11 @@ all: $(TESTS)
clean
:
rm
-f
$(TESTS)
test-common.o
\ No newline at end of file
rm
-f
$(TESTS)
test-common.o
# make nothing for modules_install, but avoid errors
modules_install
:
install
:
install
-d
$(DESTDIR)
/bin
install
-D
$(TESTS)
$(DESTDIR)
/bin
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