2010-07-21 19:40:00 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
2016-11-16 14:05:19 +00:00
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
2017-06-20 14:49:57 +00:00
|
|
|
SBINDIR ?= $(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
|
2017-06-20 15:16:41 +00:00
|
|
|
override LDLIBS += -lselinux -lpcre
|
2010-07-21 19:40:00 +00:00
|
|
|
|
2017-05-30 14:21:32 +00:00
|
|
|
TARGETS=$(patsubst %.c,%,$(sort $(wildcard *.c)))
|
2010-07-21 19:40:00 +00:00
|
|
|
|
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
|
2017-06-20 14:49:57 +00:00
|
|
|
-mkdir -p $(SBINDIR)
|
|
|
|
install -m 755 $(TARGETS) $(SBINDIR)
|
2010-07-21 19:40:00 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
./mlstrans-test-runner.py ../test/*.test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) *.o *~ \#*
|
|
|
|
|
|
|
|
relabel:
|
|
|
|
|