1 # Installation directories. 2 PREFIX ?= $(DESTDIR)/usr 3 LIBDIR ?= $(PREFIX)/lib 4 BINDIR ?= $(PREFIX)/sbin 5 LIBSEPOLA ?= $(LIBDIR)/libsepol.a 6 7 CFLAGS ?= -Wall 8 override CFLAGS += -I../src -I$(PREFIX)/include -D_GNU_SOURCE 9 LDLIBS += -L$(LIBDIR) -lselinux -lpcre 10 11 TARGETS=$(patsubst %.c,%,$(wildcard *.c)) 12 13 all: $(TARGETS) 14 15 $(TARGETS): ../src/mcstrans.o ../src/mls_level.o $(LIBSEPOLA) 16 17 install: all 18 -mkdir -p $(BINDIR) 19 install -m 755 $(TARGETS) $(BINDIR) 20 21 test: 22 ./mlstrans-test-runner.py ../test/*.test 23 24 clean: 25 rm -f $(TARGETS) *.o *~ \#* 26 27 relabel: 28 29