2010-07-21 19:40:00 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
2016-11-16 14:05:19 +00:00
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
2010-07-21 19:40:00 +00:00
|
|
|
BINDIR ?= $(PREFIX)/sbin
|
2017-01-14 14:38:25 +00:00
|
|
|
LIBSEPOLA ?= $(LIBDIR)/libsepol.a
|
2010-07-21 19:40:00 +00:00
|
|
|
|
|
|
|
CFLAGS ?= -Wall
|
2017-04-24 17:59:56 +00:00
|
|
|
override CFLAGS += -I../src -D_GNU_SOURCE
|
|
|
|
LDLIBS += -lselinux -lpcre
|
2010-07-21 19:40:00 +00:00
|
|
|
|
|
|
|
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
|
|
|
|
2017-01-14 14:38:25 +00:00
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
$(TARGETS): ../src/mcstrans.o ../src/mls_level.o $(LIBSEPOLA)
|
2010-07-21 19:40:00 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
-mkdir -p $(BINDIR)
|
|
|
|
install -m 755 $(TARGETS) $(BINDIR)
|
|
|
|
|
|
|
|
test:
|
|
|
|
./mlstrans-test-runner.py ../test/*.test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) *.o *~ \#*
|
|
|
|
|
|
|
|
relabel:
|
|
|
|
|