wg: use pkg-config in Makefile

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2016-07-06 23:51:00 +02:00
parent 4e04bee915
commit 7887d8024c
1 changed files with 2 additions and 1 deletions

View File

@ -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))