mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-23 11:39:50 +00:00
mcstrans/utils: make "make all" use $DESTDIR
When running "make all" in the root directory on a system where SELinux is not installed and where $DESTDIR targets a directory where the libraries have been installed, the build fails in mcstrans/utils with the following error: transcon.c:7:10: fatal error: 'selinux/selinux.h' file not found and then: /usr/bin/ld: cannot find -lselinux Fix this by adding -I$(PREFIX)/include to CFLAGS and -L$(LIBDIR) to LDLIBS like other subdirectories do. While at it, remove the useless -L../src parameter. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
fb237459c8
commit
a206297ece
@ -4,8 +4,8 @@ LIBDIR ?= $(PREFIX)/lib
|
||||
BINDIR ?= $(PREFIX)/sbin
|
||||
|
||||
CFLAGS ?= -Wall
|
||||
override CFLAGS += -I../src -D_GNU_SOURCE
|
||||
LDLIBS += -L../src ../src/mcstrans.o ../src/mls_level.o -lselinux -lpcre $(LIBDIR)/libsepol.a
|
||||
override CFLAGS += -I../src -I$(PREFIX)/include -D_GNU_SOURCE
|
||||
LDLIBS += -L$(LIBDIR) ../src/mcstrans.o ../src/mls_level.o -lselinux -lpcre $(LIBDIR)/libsepol.a
|
||||
|
||||
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user