diff mbox

mcstrans: Allow overriding libsepol.a location during build

Message ID 20170623082033.19291-1-plautrba@redhat.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Petr Lautrbach June 23, 2017, 8:20 a.m. UTC
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 mcstrans/src/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stephen Smalley June 23, 2017, 12:16 p.m. UTC | #1
On Fri, 2017-06-23 at 10:20 +0200, Petr Lautrbach wrote:
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Thanks, applied.

> ---
>  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 $@ $<
diff mbox

Patch

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 $@ $<