From 43c0d1f8898d3ed5d3a104ce599b9e09a7f39346 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 23 Jun 2017 10:20:33 +0200 Subject: [PATCH] mcstrans: Allow overriding libsepol.a location during build Signed-off-by: Petr Lautrbach --- mcstrans/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mcstrans/src/Makefile b/mcstrans/src/Makefile index 709e1e02..3f4a89c3 100644 --- a/mcstrans/src/Makefile +++ b/mcstrans/src/Makefile @@ -4,6 +4,7 @@ LIBDIR ?= $(PREFIX)/lib SBINDIR ?= $(DESTDIR)/sbin INITDIR ?= $(DESTDIR)/etc/rc.d/init.d SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd +LIBSEPOLA ?= $(LIBDIR)/libsepol.a PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC)) @@ -15,7 +16,7 @@ override CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 all: $(PROG) $(PROG): $(PROG_OBJS) - $(CC) $(LDFLAGS) -pie -o $@ $^ -lselinux -lcap -lpcre $(LIBDIR)/libsepol.a + $(CC) $(LDFLAGS) -pie -o $@ $^ -lselinux -lcap -lpcre $(LIBSEPOLA) %.o: %.c $(CC) $(CFLAGS) -fPIE -c -o $@ $<