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
93190b2c
Commit
93190b2c
authored
May 07, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:lib: create symlink only if it does not exists (+rename variable)
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
1a15e35a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Makefile
software/lib/Makefile
+10
-10
No files found.
software/lib/Makefile
View file @
93190b2c
...
...
@@ -8,8 +8,7 @@ REPO_PARENT ?= ../..
-include
$(REPO_PARENT)/parent_common.mk
GIT_VERSION
:=
$(
shell
git describe
--dirty
--long
--tags
)
SO_VERSION
:=
$(
shell
git describe
--abbrev
=
0 |
grep
-o
-E
"[0-9]+
\.
[0-9]+
\.
[0-9]"
)
SO_VERSION_XYZ
:=
$(
shell
git describe
--abbrev
=
0 |
grep
-o
-E
"[0-9]+
\.
[0-9]+
\.
[0-9]"
)
PREFIX
?=
/usr/local
DESTLIBDIR
?=
$(PREFIX)
/lib
...
...
@@ -17,7 +16,7 @@ TRTL ?= ../..
TRTL_SW
=
$(TRTL)
/software
LIBS
=
libmockturtle.so
LIBS
V
=
$(LIBS)
.
$(SO_VERSION
)
LIBS
_XYZ
=
$(LIBS)
.
$(SO_VERSION_XYZ
)
LIB
=
libmockturtle.a
LOBJ
:=
libmockturtle.o
LOBJ
+=
libmockturtle-rt-msg.o
...
...
@@ -37,25 +36,26 @@ modules all: $(LIB) $(LIBS)
$(LIB)
:
$(LOBJ)
$(AR)
$(ARFLAGS)
$@
$^
$(LIBS
V
)
:
$(LIB)
$(LIBS
_XYZ
)
:
$(LIB)
$(CC)
-shared
-o
$@
-Wl
,--whole-archive,-soname,
$@
$^
-Wl
,--no-whole-archive
$(LIBS)
:
$(LIBS
V
)
$(LIBS)
:
$(LIBS
_XYZ
)
ln
-sf
$<
$@
clean
:
rm
-f
$(LIB)
$(LIBS)
$(LIBS
V
)
.depend
*
.o
*
~
rm
-f
$(LIB)
$(LIBS)
$(LIBS
_XYZ
)
.depend
*
.o
*
~
.depend
:
Makefile $(wildcard *.c *.h)
$(CC)
$(CFLAGS)
-M
$
(
LOBJ:.o
=
.c
)
-o
$@
install
:
install
:
$(LIB) $(LIBS_XYZ)
install
-d
$(DESTLIBDIR)
install
-D
$(LIB)
$(DESTLIBDIR)
install
-D
$(LIBS
V
)
$(DESTLIBDIR)
ln
-sf
$(LIBSV
)
$(DESTLIBDIR)
/
$(LIBS)
install
-D
$(LIBS
_XYZ
)
$(DESTLIBDIR)
test
-e
$(DESTLIBDIR)
/
$(LIBS)
||
ln
-s
$(LIBS_XYZ
)
$(DESTLIBDIR)
/
$(LIBS)
uninstall
:
rm
-f
$(DESTLIBDIR)
/
$(LIB)
$(DESTLIBDIR)
/
$(LIBS
)
$(DESTLIBDIR)
/
$(LIBSV
)
rm
-f
$(DESTLIBDIR)
/
$(LIB)
$(DESTLIBDIR)
/
$(LIBS
_XYZ
)
rmdir
--ignore-fail-on-non-empty
$(DESTLIBDIR)
modules_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