Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC Software Support
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
FMC Software Support
Commits
f1514fd3
Commit
f1514fd3
authored
Oct 12, 2023
by
Vaibhav Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Add/Update recipe for 'install'
Signed-off-by:
Vaibhav Gupta
<
vaibhav.gupta@cern.ch
>
parent
9a3d80e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
21 deletions
+29
-21
Makefile
tools/Makefile
+11
-8
Makefile
tools/lib/Makefile
+18
-13
No files found.
tools/Makefile
View file @
f1514fd3
...
...
@@ -8,8 +8,7 @@
-include
Makefile.specific
DESTDIR
?=
/usr/local/
LIB
=
./lib/
LIB
=
./lib
TOOLS
=
lsfmc
\
fmc-slot-eeprom
...
...
@@ -18,8 +17,7 @@ CFLAGS += -ggdb -I. -I$(LIB) -I../include/uapi/ -I../kernel -Wall -Werror $(EXTR
GIT_VERSION
:=
$(
shell
git describe
--dirty
--long
--tags
)
CFLAGS
+=
-DGIT_VERSION
=
"
\"
$(GIT_VERSION)
\"
"
LDFLAGS
+=
-L
$(LIB)
LDLIBS
+=
-lfmc
LDLIBS
+=
$(LIB)
/libfmc.a
CPPCHECK
?=
cppcheck
FLAWFINDER
?=
flawfinder
...
...
@@ -27,7 +25,7 @@ FLAWFINDER ?= flawfinder
all
:
$(TOOLS)
$(TOOLS)
:
$(
COMMON_SRCS:.c=.o) $(
LIB)/libfmc.a
$(TOOLS)
:
$(LIB)/libfmc.a
$(LIB)/libfmc.a
:
@
$(MAKE)
-C
$(
shell
dirname
$@)
...
...
@@ -36,9 +34,14 @@ clean cleanall:
@
$(MAKE)
-C
$(LIB)
$@
rm
-f
$(TOOLS)
install
:
install
-d
$(DESTDIR)
/bin
install
-D
$(TOOLS)
$(DESTDIR)
/bin
DESTDIR
?=
prefix
?=
/usr/local
exec_prefix
?=
$(prefix)
bindir
?=
$(exec_prefix)
/bin
install
:
all
mkdir
-m
0775
-p
$(DESTDIR)$(bindir)
install
-D
-t
$(DESTDIR)$(bindir)
-m
0755
$(TOOLS)
cppcheck
:
@
$(MAKE)
-C
$(LIB)
$@
...
...
tools/lib/Makefile
View file @
f1514fd3
...
...
@@ -22,14 +22,12 @@ CFLAGS += -fPIC
CFLAGS
+=
-DGIT_VERSION
=
"
\"
$(GIT_VERSION)
\"
"
CFLAGS
+=
$(EXTRACFLAGS)
DESTDIR
?=
/usr/local
CPPCHECK
?=
cppcheck
FLAWFINDER
?=
flawfinder
all
:
lib
lib
:
$(LIB) $(LIBS_XYZ)
lib
:
$(LIB) $(LIBS_XYZ)
$(LIBS)
%
:
%.c $(LIB)
$(CC)
$(CFLAGS)
$*
.c
$(LDFLAGS)
-o
$@
...
...
@@ -38,23 +36,30 @@ $(LIB): $(LOBJ)
$(AR)
r
$@
$^
$(LIBS_XYZ)
:
$(LIB)
$(CC)
-shared
-o
$@
-Wl
,--whole-archive,-soname,
$@
$^
-Wl
,--no-whole-archive
$(CC)
-shared
-o
$@
-Wl
,--whole-archive,-soname,
$(LIBS)
.
$(SO_VERSION_X)
$^
-Wl
,--no-whole-archive
$(LIBS)
:
$(LIBS_XYZ)
ln
-sf
$<
$@
clean cleanall
:
rm
-f
$(LIB)
$(LIBS_XYZ)
.depend
*
.o
*
~
rm
-f
$(LIB)
$(LIBS_XYZ)
$(LIBS)
.depend
*
.o
*
~
.depend
:
Makefile $(wildcard *.c *.h ../*.h)
$(CC)
$(CFLAGS)
-M
$
(
LOBJ:.o
=
.c
)
-o
$@
install
:
install
-d
$(DESTDIR)
/lib
install
-d
$(DESTDIR)
/include/fmc
install
-m
644
-D
$(LIB)
$(DESTDIR)/lib
install
-m
0755
$(LIBS_XYZ)
$(DESTDIR)/lib
install
-m
644
-D
libfmc.h
$(DESTDIR)/include/fmc
ln
-sf
$(LIBS_XYZ)
$(DESTDIR)/lib/$(LIBS).$(SO_VERSION_X)
ln
-sf
$(LIBS).$(SO_VERSION_X)
$(DESTDIR)/lib/$(LIBS)
DESTDIR
?=
prefix
?=
/usr/local
libdir
?=
$(prefix)
/lib
includedir
?=
$(prefix)
/include
install
:
$(LIB) $(LIBS) $(LIBS_XYZ)
mkdir
-m
0775
-p
$(DESTDIR)$(libdir)
$(DESTDIR)$(includedir)
/fmc/linux/ipmi
$(DESTDIR)$(includedir)
/fmc/fmc
install
-D
-t
$(DESTDIR)$(libdir)
-m
0644
$(LIB)
install
-D
-t
$(DESTDIR)$(libdir)
-m
0755
$(LIBS_XYZ)
install
-D
-t
$(DESTDIR)$(includedir)
/fmc/fmc
-m
0644 fmc/core.h
install
-D
-t
$(DESTDIR)$(includedir)
/fmc/linux/ipmi
-m
0644 ../../include/uapi/linux/ipmi/fru.h
cp
-d
$(LIBS)
$(DESTDIR)$(libdir)
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