Add libmnl flags in Makefile.linux_nft.

This commit is contained in:
Tomofumi Hayashi 2015-03-18 15:27:57 +09:00
parent 050845156a
commit cc0a6eecbb
1 changed files with 6 additions and 5 deletions

View File

@ -16,7 +16,7 @@
# (default INSTALLPREFIX is /usr) # (default INSTALLPREFIX is /usr)
# #
# #
CFLAGS = -O -g -DDEBUG CFLAGS = -O -g #-DDEBUG
CFLAGS ?= -Os CFLAGS ?= -Os
CFLAGS += -fno-strict-aliasing CFLAGS += -fno-strict-aliasing
CFLAGS += -fno-common CFLAGS += -fno-common
@ -53,10 +53,11 @@ PCFILE_FOUND := $(shell $(PKG_CONFIG) --exists libnftnl; echo $$?)
ifeq (${PCFILE_FOUND},0) ifeq (${PCFILE_FOUND},0)
CFLAGS += $(shell $(PKG_CONFIG) --cflags libnftnl) PKG_CONFIG_LIBS = libnftnl libmnl
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnftnl) CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libnftnl) LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libnftnl) LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other $(PKG_CONFIG_LIBS))
else else
ARCH ?= $(shell uname -m | grep -q "x86_64" && echo 64) ARCH ?= $(shell uname -m | grep -q "x86_64" && echo 64)