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