diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-06 23:51:00 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-06 23:51:00 +0200 |
commit | 7887d8024cc075b092cf063577db22c8e280dcdb (patch) | |
tree | 559fb131257713f25c04e11e400f8f8d6a36bf85 /src/Makefile | |
parent | contrib: organize example scripts and add synergy (diff) | |
download | wireguard-tools-7887d8024cc075b092cf063577db22c8e280dcdb.tar.xz wireguard-tools-7887d8024cc075b092cf063577db22c8e280dcdb.zip |
wg: use pkg-config in Makefile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index 4eddd25..060ae18 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,10 +4,11 @@ BINDIR ?= $(PREFIX)/bin LIBDIR ?= $(PREFIX)/lib MANDIR ?= $(PREFIX)/share/man +CFLAGS += $(shell pkg-config --cflags libmnl 2>/dev/null) CFLAGS += -std=gnu11 CFLAGS += -pedantic -Wall -Wextra CFLAGS += -MMD -LDLIBS += -lresolv -lmnl +LDLIBS += -lresolv $(shell pkg-config --libs libmnl 2>/dev/null || echo -lmnl) wg: $(patsubst %.c,%.o,$(wildcard *.c)) |