mcstrans: Allow overriding libsepol.a location during build

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
Petr Lautrbach 2017-06-23 10:20:33 +02:00 committed by Stephen Smalley
parent 2c651e0a28
commit 43c0d1f889

View File

@ -4,6 +4,7 @@ LIBDIR ?= $(PREFIX)/lib
SBINDIR ?= $(DESTDIR)/sbin SBINDIR ?= $(DESTDIR)/sbin
INITDIR ?= $(DESTDIR)/etc/rc.d/init.d INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd
LIBSEPOLA ?= $(LIBDIR)/libsepol.a
PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c
PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC)) PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))
@ -15,7 +16,7 @@ override CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
all: $(PROG) all: $(PROG)
$(PROG): $(PROG_OBJS) $(PROG): $(PROG_OBJS)
$(CC) $(LDFLAGS) -pie -o $@ $^ -lselinux -lcap -lpcre $(LIBDIR)/libsepol.a $(CC) $(LDFLAGS) -pie -o $@ $^ -lselinux -lcap -lpcre $(LIBSEPOLA)
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -fPIE -c -o $@ $< $(CC) $(CFLAGS) -fPIE -c -o $@ $<