mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-23 14:32:08 +00:00
mcstrans: Allow overriding libsepol.a location during build
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
2c651e0a28
commit
43c0d1f889
@ -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 $@ $<
|
||||||
|
Loading…
Reference in New Issue
Block a user