wg: abstract pkg-config to PKG_CONFIG
Distros like Exherbo have multitarget setups with toolnames prefixed by the arch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
971c792ba9
commit
a97901e4fd
|
@ -4,6 +4,7 @@ BINDIR ?= $(PREFIX)/bin
|
|||
LIBDIR ?= $(PREFIX)/lib
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
RUNSTATEDIR ?= /var/run
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
CFLAGS ?= -O3
|
||||
CFLAGS += -std=gnu11
|
||||
|
@ -12,8 +13,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
|
||||
|
|
Loading…
Reference in New Issue