1PYTHON ?= python 2 3# Installation directories. 4PREFIX ?= $(DESTDIR)/usr 5LIBDIR ?= $(PREFIX)/lib 6BINDIR ?= $(PREFIX)/bin 7DATADIR ?= $(PREFIX)/share 8MANDIR ?= $(PREFIX)/share/man 9LOCALEDIR ?= /usr/share/locale 10BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions 11SHAREDIR ?= $(PREFIX)/share/sandbox 12CFLAGS ?= -Wall -Werror -Wextra -W 13override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared 14 15BASHCOMPLETIONS=sepolicy-bash-completion.sh 16 17all: python-build 18 19python-build: 20 $(PYTHON) setup.py build 21 22clean: 23 $(PYTHON) setup.py clean 24 -rm -rf build *~ \#* *pyc .#* 25 26sepolgen: 27 ln -sf sepolicy sepolgen 28 29test: 30 @$(PYTHON) test_sepolicy.py -v 31 32install: 33 $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` 34 [ -d $(BINDIR) ] || mkdir -p $(BINDIR) 35 install -m 755 sepolicy.py $(BINDIR)/sepolicy 36 (cd $(BINDIR); ln -sf sepolicy sepolgen) 37 -mkdir -p $(MANDIR)/man8 38 install -m 644 *.8 $(MANDIR)/man8 39 -mkdir -p $(BASHCOMPLETIONDIR) 40 install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy 41 42relabel: 43