38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
|
From 58e01a3e2f0c7f84a9942e34ef31ef17182e243f Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||
|
Date: Wed, 22 Apr 2020 09:53:52 +0200
|
||
|
Subject: [PATCH 2/2] introduce LDFLAGS
|
||
|
|
||
|
With an LDFLAGS variable distributions can pass their system-wide linker
|
||
|
options to the build.
|
||
|
|
||
|
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1552658
|
||
|
---
|
||
|
Makefile | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/Makefile b/Makefile
|
||
|
index 700783a..4495356 100644
|
||
|
--- a/Makefile
|
||
|
+++ b/Makefile
|
||
|
@@ -8,6 +8,7 @@ VERSION = 2.1.0
|
||
|
VERM = $(shell echo $(VERSION) | cut -d '.' -f 1)
|
||
|
DOCDIR ?= /usr/share/doc/packages/
|
||
|
CFLAGS ?= -g -Wall -O2
|
||
|
+LDFLAGS ?=
|
||
|
CFILES = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c \
|
||
|
query_capacity_sysfs.c query_capacity_hypfs.c query_capacity_sthyi.c
|
||
|
OBJECTS = $(patsubst %.c,%.o,$(CFILES))
|
||
|
@@ -41,7 +42,7 @@ libqc.a: $(OBJECTS)
|
||
|
$(AR) rcs $@ $^
|
||
|
|
||
|
libqc.so.$(VERSION): $(OBJECTS)
|
||
|
- $(LINK) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@
|
||
|
+ $(LINK) $(LDFLAGS) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@
|
||
|
-rm libqc.so.$(VERM) 2>/dev/null
|
||
|
ln -s libqc.so.$(VERSION) libqc.so.$(VERM)
|
||
|
|
||
|
--
|
||
|
2.21.1
|
||
|
|