2019-10-24 18:59:12 +02:00
|
|
|
From 060b9b4147f6e5ff386a8b017796118d783e59fa Mon Sep 17 00:00:00 2001
|
2019-10-22 20:17:31 +02:00
|
|
|
From: Matt Weber <matthew.weber@rockwellcollins.com>
|
2019-10-24 18:59:12 +02:00
|
|
|
Date: Tue, 22 Oct 2019 12:44:30 -0500
|
|
|
|
Subject: [PATCH] Makefile: cleanup install for rebuilds
|
2019-10-22 20:17:31 +02:00
|
|
|
|
|
|
|
Support the ability to rebuild and redeploy without a clean. This
|
2019-10-24 18:59:12 +02:00
|
|
|
required some force linking and man archive creation.
|
2019-10-22 20:17:31 +02:00
|
|
|
|
|
|
|
Provide the ability to override the stripping of the shared lib for
|
|
|
|
cases where a embedded target build may want to control stripping
|
|
|
|
or provide cross arch tools.
|
|
|
|
|
|
|
|
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
|
2019-10-24 18:59:12 +02:00
|
|
|
Signed-off-by: Stephan Mueller <smueller@chronox.de>
|
|
|
|
[Retrieved from:
|
|
|
|
https://github.com/smuellerDD/jitterentropy-library/commit/060b9b4147f6e5ff386a8b017796118d783e59fa]
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
2019-10-22 20:17:31 +02:00
|
|
|
---
|
2019-10-24 18:59:12 +02:00
|
|
|
Makefile | 10 ++++++----
|
|
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
2019-10-22 20:17:31 +02:00
|
|
|
|
|
|
|
diff --git a/Makefile b/Makefile
|
2019-10-24 18:59:12 +02:00
|
|
|
index 4ff069b..2e78607 100644
|
2019-10-22 20:17:31 +02:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -14,6 +14,8 @@ LIBDIR := lib
|
|
|
|
# include target directory
|
|
|
|
INCDIR := include
|
|
|
|
|
|
|
|
+INSTALL_STRIP ?= install -s
|
|
|
|
+
|
|
|
|
NAME := jitterentropy
|
|
|
|
LIBMAJOR=$(shell cat jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}')
|
|
|
|
LIBMINOR=$(shell cat jitterentropy-base.c | grep define | grep MINVERSION | awk '{print $$3}')
|
2019-10-24 18:59:12 +02:00
|
|
|
@@ -58,15 +60,15 @@ cppcheck:
|
2019-10-22 20:17:31 +02:00
|
|
|
install:
|
|
|
|
install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
|
|
|
|
install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
|
|
|
|
- gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
|
|
|
|
+ gzip -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
|
|
|
|
install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
|
|
|
- install -m 0755 -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
|
|
|
+ $(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
|
2019-10-24 18:59:12 +02:00
|
|
|
install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
|
2019-10-22 20:17:31 +02:00
|
|
|
install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
|
|
|
install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
|
|
|
$(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
|
|
|
- ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
|
|
|
- ln -s lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
|
|
|
+ ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
|
|
|
+ ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@- $(RM) $(NAME)
|