mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-12 09:05:00 +00:00
fc7a4e0798
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
37 lines
921 B
Makefile
37 lines
921 B
Makefile
# Installation directories.
|
|
PREFIX ?= /usr
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
TARGETS=transcon untranscon
|
|
|
|
# If no specific libsepol.a is specified, fall back on LDFLAGS search path
|
|
# Otherwise, as $(LIBSEPOLA) already appears in the dependencies, there
|
|
# is no need to define a value for LDLIBS_LIBSEPOLA
|
|
ifeq ($(LIBSEPOLA),)
|
|
LDLIBS_LIBSEPOLA := -l:libsepol.a
|
|
endif
|
|
|
|
all: $(TARGETS)
|
|
|
|
transcon: transcon.o ../src/mcstrans.o ../src/mls_level.o $(LIBSEPOLA)
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lpcre -lselinux $(LDLIBS_LIBSEPOLA)
|
|
|
|
untranscon: untranscon.o ../src/mcstrans.o ../src/mls_level.o $(LIBSEPOLA)
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lpcre -lselinux $(LDLIBS_LIBSEPOLA)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -D_GNU_SOURCE -I../src -fPIE -c -o $@ $<
|
|
|
|
install: all
|
|
-mkdir -p $(DESTDIR)$(SBINDIR)
|
|
install -m 755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
|
|
|
test:
|
|
./mlstrans-test-runner.py ../test/*.test
|
|
|
|
clean:
|
|
rm -f $(TARGETS) *.o *~ \#*
|
|
|
|
relabel:
|
|
|