wg: use pkg-config in Makefile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
4e04bee915
commit
7887d8024c
|
@ -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))
|
||||
|
||||
|
|
Reference in New Issue