1 PYTHON ?= python 2 3 # Installation directories. 4 PREFIX ?= $(DESTDIR)/usr 5 SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig 6 LIBDIR ?= $(PREFIX)/lib 7 BINDIR ?= $(PREFIX)/bin 8 SBINDIR ?= $(PREFIX)/sbin 9 MANDIR ?= $(PREFIX)/share/man 10 LOCALEDIR ?= /usr/share/locale 11 SHAREDIR ?= $(PREFIX)/share/sandbox 12 override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W 13 override LDLIBS += -lselinux -lcap-ng 14 SEUNSHARE_OBJS = seunshare.o 15 16 all: sandbox seunshare sandboxX.sh start 17 18 seunshare: $(SEUNSHARE_OBJS) 19 20 install: all 21 -mkdir -p $(BINDIR) 22 install -m 755 sandbox $(BINDIR) 23 -mkdir -p $(MANDIR)/man8 24 install -m 644 sandbox.8 $(MANDIR)/man8/ 25 install -m 644 seunshare.8 $(MANDIR)/man8/ 26 -mkdir -p $(MANDIR)/man5 27 install -m 644 sandbox.5 $(MANDIR)/man5/ 28 -mkdir -p $(SBINDIR) 29 install -m 4755 seunshare $(SBINDIR)/ 30 -mkdir -p $(SHAREDIR) 31 install -m 755 sandboxX.sh $(SHAREDIR) 32 install -m 755 start $(SHAREDIR) 33 -mkdir -p $(SYSCONFDIR) 34 install -m 644 sandbox.conf $(SYSCONFDIR)/sandbox 35 36 test: 37 @$(PYTHON) test_sandbox.py -v 38 39 clean: 40 -rm -f seunshare *.o *~ 41 42 indent: 43 ../../scripts/Lindent $(wildcard *.[ch]) 44 45 relabel: 46