2010-06-10 20:35:55 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= ${DESTDIR}/usr
|
|
|
|
INITDIR ?= ${DESTDIR}/etc/rc.d/init.d/
|
|
|
|
SYSCONFDIR ?= ${DESTDIR}/etc/sysconfig
|
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
LOCALEDIR ?= /usr/share/locale
|
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2011-08-26 19:26:25 +00:00
|
|
|
override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra
|
2011-08-03 19:09:22 +00:00
|
|
|
LDLIBS += -lcgroup -lselinux -lcap-ng
|
2010-06-10 20:35:55 +00:00
|
|
|
|
2011-08-15 17:56:02 +00:00
|
|
|
all: sandbox seunshare sandboxX.sh start
|
2010-06-10 20:35:55 +00:00
|
|
|
|
|
|
|
seunshare: seunshare.o $(EXTRA_OBJS)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
-mkdir -p $(BINDIR)
|
|
|
|
install -m 755 sandbox $(BINDIR)
|
|
|
|
-mkdir -p $(MANDIR)/man8
|
|
|
|
install -m 644 sandbox.8 $(MANDIR)/man8/
|
2011-08-15 17:56:02 +00:00
|
|
|
install -m 644 seunshare.8 $(MANDIR)/man8/
|
|
|
|
-mkdir -p $(MANDIR)/man5
|
|
|
|
install -m 644 sandbox.conf.5 $(MANDIR)/man5/
|
2010-06-10 20:35:55 +00:00
|
|
|
-mkdir -p $(SBINDIR)
|
|
|
|
install -m 4755 seunshare $(SBINDIR)/
|
|
|
|
-mkdir -p $(SHAREDIR)
|
|
|
|
install -m 755 sandboxX.sh $(SHAREDIR)
|
2011-08-15 17:56:02 +00:00
|
|
|
install -m 755 start $(SHAREDIR)
|
2010-06-10 20:35:55 +00:00
|
|
|
-mkdir -p $(INITDIR)
|
|
|
|
install -m 755 sandbox.init $(INITDIR)/sandbox
|
|
|
|
-mkdir -p $(SYSCONFDIR)
|
2011-08-15 17:56:02 +00:00
|
|
|
install -m 644 sandbox.conf $(SYSCONFDIR)/sandbox
|
2010-06-10 20:35:55 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
@python test_sandbox.py -v
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f seunshare *.o *~
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
relabel:
|