Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
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
White Rabbit Trigger Distribution
Commits
9aa35a96
Commit
9aa35a96
authored
Sep 28, 2023
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bld: use common software build pipeline
parent
a0aacfbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
30 deletions
+31
-30
.gitlab-ci.yml
.gitlab-ci.yml
+5
-13
Makefile
software/lib/Makefile
+26
-17
No files found.
.gitlab-ci.yml
View file @
9aa35a96
...
...
@@ -10,17 +10,9 @@ variables:
include
:
-
project
:
'
be-cem-edl/evergreen/gitlab-ci'
ref
:
master
file
:
-
'
edl-gitlab-ci.yml'
file
:
'
edl-gitlab-ci.yml'
build-centos-7
:
interruptible
:
true
stage
:
build
image
:
name
:
gitlab-registry.cern.ch/be-cem-edl/evergreen/gitlab-ci/build-fec-sw:latest
script
:
-
make -C software
artifacts
:
paths
:
-
include/
-
software/lib/
software_build
:
extends
:
.build_fec_os_sw
variables
:
EDL_CI_SW_PATHS
:
$CI_PROJECT_DIR/software
software/lib/Makefile
View file @
9aa35a96
...
...
@@ -12,20 +12,28 @@
REPO_PARENT
?=
..
-include
$(REPO_PARENT)/parent_common.mk
GIT_VERSION
:=
$(
shell
git describe
--always
--dirty
--long
--tags
)
SO_VERSION_XYZ
:=
$(
shell
git describe
--tags
--abbrev
=
0 |
grep
-o
-E
"[0-9]+
\.
[0-9]+
\.
[0-9]"
)
GIT_VERSION
?=
$(
shell
git describe
--dirty
--long
--tags
--always
|
tr
-d
"v"
)
VER_MAJOR
=
$
(
word 1,
$
(
subst ., ,
$(GIT_VERSION)
))
VER_MINOR
=
$
(
word 2,
$
(
subst ., ,
$(GIT_VERSION)
))
VER_PATCH
=
$
(
word 1,
$
(
subst -, ,
$
(
word 3,
$
(
subst ., ,
$(GIT_VERSION)
))))
ifeq
($(SO_VERSION_XYZ),)
SO_VERSION_XYZ
:=
0
SO_VERSION_XYZ
=
$(VER_MAJOR)
.
$(VER_MINOR)
.
$(VER_PATCH)
SO_VERSION_X
=
$(VER_MAJOR)
ifeq
($(SO_VERSION_X),)
SO_VERSION_X
:=
0
endif
PREFIX
?=
/usr/local
DESTLIBDIR
?=
$(PREFIX)
/lib
DESTDIR
?=
prefix
?=
/usr/local
libdir
?=
$(prefix)
/lib
includedir
?=
$(prefix)
/include
WRTD_DEP_TRTL
?=
../../dependencies/mock-turtle/
LIBSO
=
libwrtd.so
LIBSO_XYZ
=
$(LIBSO)
.
$(SO_VERSION_XYZ)
LIBSO_X
=
$(LIBSO)
.
$(SO_VERSION_X)
LIB
=
libwrtd.a
OBJS
:=
libwrtd.o libwrtd-internal.o libwrtd-attributes.o libwrtd-reconfigure.o
...
...
@@ -38,30 +46,31 @@ CFLAGS += -DVERSION="\"$(GIT_VERSION)\""
CFLAGS
+=
$(EXTRACFLAGS)
ARFLAGS
=
rcv
all
:
$(LIB) $(LIBSO)
all
:
$(LIB) $(LIBSO)
$(LIBSO_XYZ)
$(LIB)
:
$(OBJS)
$(AR)
$(ARFLAGS)
$@
$^
$(LIBSO_XYZ)
:
$(OBJS)
$(CC)
-shared
$^
-L
$(WRTD_DEP_TRTL)
/software/lib
-lmockturtle
-o
$@
$(CC)
-shared
$^
-
Wl
,-soname,
$(LIBSO_X)
-
L
$(WRTD_DEP_TRTL)
/software/lib
-lmockturtle
-o
$@
$(LIBSO)
:
$(LIBSO_XYZ)
ln
-sf
$<
$@
clean
:
rm
-f
$(LIB)
$(LIBSO)
$(LIBSO_XYZ)
*
.d
*
.o
*
~
rm
-f
$(LIB)
$(LIBSO)
$(LIBSO_XYZ)
$(OBJS)
*
.d
*
.o
*
.so
*
*
~
%.o
:
%.c
$(CC)
-c
$(CFLAGS)
-MMD
$<
-o
$@
install
:
$(LIBSO) $(LIBSO_XYZ)
install
-d
$(DESTLIBDIR)
install
-m
0755
$(LIBSO_XYZ)
$(DESTLIBDIR)
ln
-sf
$(LIBSO_XYZ)
$(DESTLIBDIR)
/
$(LIBSO)
uninstall
:
rm
-f
$(DESTLIBDIR)
/
$(LIBSO)
$(DESTLIBDIR)
/
$(LIBSO_XYZ)
rmdir
--ignore-fail-on-non-empty
$(DESTLIBDIR)
deploy deploy-libwrtd
:
install
install
:
$(LIBSO) $(LIBSO_XYZ) $(LIB)
mkdir
-m
0775
-p
$(DESTDIR)
{
$(libdir)
,
$(includedir)
}
install
-D
-t
$(DESTDIR)$(libdir)
-m
0755
$(LIBSO_XYZ)
install
-D
-t
$(DESTDIR)$(libdir)
-m
0644
$(LIB)
install
-D
-t
$(DESTDIR)$(includedir)
-m
0644 libwrtd.h ../include/wrtd-common.h
cp
-d
$(LIBSO)
$(DESTDIR)$(libdir)
-include
$(wildcard
*.d)
.PHONY
:
install
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