Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FMC Software Support
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Projects
FMC Software Support
Commits
f1514fd3
Commit
f1514fd3
authored
1 year ago
by
Vaibhav Gupta
Browse files
Options
Downloads
Patches
Plain Diff
tools: Add/Update recipe for 'install'
Signed-off-by:
Vaibhav Gupta
<
vaibhav.gupta@cern.ch
>
parent
9a3d80e9
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
tools/Makefile
+11
-8
11 additions, 8 deletions
tools/Makefile
tools/lib/Makefile
+18
-13
18 additions, 13 deletions
tools/lib/Makefile
with
29 additions
and
21 deletions
tools/Makefile
+
11
−
8
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
)
$@
...
...
This diff is collapsed.
Click to expand it.
tools/lib/Makefile
+
18
−
13
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
:
...
...
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