2014-09-10 21:01:28 +02:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2010-06-10 22:35:55 +02:00
|
|
|
# Installation directories.
|
2011-09-19 22:38:33 +02:00
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
|
2011-09-19 17:23:03 +02:00
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
2010-06-10 22:35:55 +02:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
LOCALEDIR ?= /usr/share/locale
|
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2016-09-25 14:16:09 +02:00
|
|
|
override CFLAGS += -I$(PREFIX)/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
|
2014-05-12 19:19:20 +02:00
|
|
|
LDLIBS += -lselinux -lcap-ng -L$(LIBDIR)
|
2011-12-05 20:05:39 +01:00
|
|
|
SEUNSHARE_OBJS = seunshare.o
|
2010-06-10 22:35:55 +02:00
|
|
|
|
2011-08-15 19:56:02 +02:00
|
|
|
all: sandbox seunshare sandboxX.sh start
|
2010-06-10 22:35:55 +02:00
|
|
|
|
2011-12-05 20:05:39 +01:00
|
|
|
seunshare: $(SEUNSHARE_OBJS)
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
install: all
|
|
|
|
-mkdir -p $(BINDIR)
|
|
|
|
install -m 755 sandbox $(BINDIR)
|
|
|
|
-mkdir -p $(MANDIR)/man8
|
|
|
|
install -m 644 sandbox.8 $(MANDIR)/man8/
|
2011-08-15 19:56:02 +02:00
|
|
|
install -m 644 seunshare.8 $(MANDIR)/man8/
|
|
|
|
-mkdir -p $(MANDIR)/man5
|
2011-11-30 22:29:59 +01:00
|
|
|
install -m 644 sandbox.5 $(MANDIR)/man5/
|
2010-06-10 22:35:55 +02:00
|
|
|
-mkdir -p $(SBINDIR)
|
|
|
|
install -m 4755 seunshare $(SBINDIR)/
|
|
|
|
-mkdir -p $(SHAREDIR)
|
|
|
|
install -m 755 sandboxX.sh $(SHAREDIR)
|
2011-08-15 19:56:02 +02:00
|
|
|
install -m 755 start $(SHAREDIR)
|
2010-06-10 22:35:55 +02:00
|
|
|
-mkdir -p $(SYSCONFDIR)
|
2011-08-15 19:56:02 +02:00
|
|
|
install -m 644 sandbox.conf $(SYSCONFDIR)/sandbox
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
test:
|
2014-09-10 21:01:28 +02:00
|
|
|
@$(PYTHON) test_sandbox.py -v
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f seunshare *.o *~
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
relabel:
|