Development discussion of WireGuard
 help / color / mirror / Atom feed
* [WireGuard] [PATCH] tools: allow better build system configuration
@ 2016-11-02 10:31 Marc-Antoine Perennou
  2016-11-02 10:36 ` Jason A. Donenfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Marc-Antoine Perennou @ 2016-11-02 10:31 UTC (permalink / raw)
  To: wireguard

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/tools/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/tools/Makefile b/src/tools/Makefile
index fc0c0f3..92e0528 100644
--- a/src/tools/Makefile
+++ b/src/tools/Makefile
@@ -4,6 +4,8 @@ BINDIR ?= $(PREFIX)/bin
 LIBDIR ?= $(PREFIX)/lib
 MANDIR ?= $(PREFIX)/share/man
 RUNSTATEDIR ?= /var/run
+PKG_CONFIG ?= pkg-config
+INSTALL_STRIP_OPT ?= -s
 
 CFLAGS ?= -O3
 CFLAGS += -std=gnu11
@@ -12,8 +14,8 @@ CFLAGS += -MMD -MP
 CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR)\""
 LDLIBS += -lresolv
 ifeq ($(shell uname -s),Linux)
-LIBMNL_CFLAGS := $(shell pkg-config --cflags libmnl 2>/dev/null)
-LIBMNL_LDLIBS := $(shell pkg-config --libs libmnl 2>/dev/null || echo -lmnl)
+LIBMNL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libmnl 2>/dev/null)
+LIBMNL_LDLIBS := $(shell $(PKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl)
 CFLAGS += $(LIBMNL_CFLAGS)
 LDLIBS += $(LIBMNL_LDLIBS)
 endif
@@ -24,7 +26,7 @@ clean:
 	rm -f wg *.o *.d
 
 install: wg
-	install -v -d "$(DESTDIR)$(BINDIR)" && install -s -m 0755 -v wg "$(DESTDIR)$(BINDIR)/wg"
+	install -v -d "$(DESTDIR)$(BINDIR)" && install $(INSTALL_STRIP_OPT) -m 0755 -v wg "$(DESTDIR)$(BINDIR)/wg"
 	install -v -d "$(DESTDIR)$(MANDIR)/man8" && install -m 0644 -v wg.8 "$(DESTDIR)$(MANDIR)/man8/wg.8"
 
 check: clean
-- 
2.10.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-02 10:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-02 10:31 [WireGuard] [PATCH] tools: allow better build system configuration Marc-Antoine Perennou
2016-11-02 10:36 ` Jason A. Donenfeld
2016-11-02 10:41   ` Marc-Antoine Perennou
2016-11-02 10:42     ` Jason A. Donenfeld
2016-11-02 10:45       ` Marc-Antoine Perennou
2016-11-02 10:52         ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).