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