Commit 266c1405 authored by Mike Frysinger's avatar Mike Frysinger

get selinux build info via pkg-config

They've started linking libselinux against more things (like libpcre),
so use pkg-config to get its dependency info.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 49538121
......@@ -53,6 +53,12 @@ ifeq ($(HAVE_AFDECnet),1)
DNLIB = -ldnet
endif
ifeq ($(origin CC), undefined)
CC = gcc
endif
LD = $(CC)
PKG_CONFIG ?= pkg-config
# -------- end of user definitions --------
MAINTAINER = net-tools-devel@lists.sourceforge.net
......@@ -69,7 +75,10 @@ endif
NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
ifeq ($(HAVE_SELINUX),1)
SELIB += -lselinux
SE_PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags libselinux)
SE_PC_LIBS := $(shell $(PKG_CONFIG) --libs libselinux || echo -lselinux)
SELIB = $(PC_SELINUX)
CPPFLAGS += $(SE_PC_CFLAGS)
endif
CPPFLAGS += -I. -I$(TOPDIR)/include -I$(NET_LIB_PATH)
......@@ -77,11 +86,6 @@ LDFLAGS += -L$(NET_LIB_PATH)
SUBDIRS = man/ $(NET_LIB_PATH)/
ifeq ($(origin CC), undefined)
CC = gcc
endif
LD = $(CC)
NLIB = -l$(NET_LIB_NAME)
%.o: %.c config.h version.h intl.h lib/net-features.h $<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment