• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Installation directories.
2LINGUAS ?= ru
3PREFIX ?= /usr
4SBINDIR ?= $(PREFIX)/sbin
5MANDIR = $(PREFIX)/share/man
6
7CFLAGS ?= -Werror -Wall -W
8override LDLIBS += -lsepol -lselinux -lsemanage
9SEMODULE_OBJS = semodule.o
10
11all: semodule genhomedircon
12
13semodule: $(SEMODULE_OBJS)
14
15genhomedircon:
16	ln -sf semodule genhomedircon
17
18install: all
19	-mkdir -p $(DESTDIR)$(SBINDIR)
20	install -m 755 semodule $(DESTDIR)$(SBINDIR)
21	(cd $(DESTDIR)$(SBINDIR); ln -sf semodule genhomedircon)
22	test -d $(DESTDIR)$(MANDIR)/man8 || install -m 755 -d $(DESTDIR)$(MANDIR)/man8
23	install -m 644 semodule.8 $(DESTDIR)$(MANDIR)/man8/
24	install -m 644 genhomedircon.8 $(DESTDIR)$(MANDIR)/man8/
25	for lang in $(LINGUAS) ; do \
26		if [ -e $${lang} ] ; then \
27			test -d $(DESTDIR)$(MANDIR)/$${lang}/man8 || install -m 755 -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
28			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
29		fi ; \
30	done
31
32relabel:
33
34clean:
35	-rm -f semodule *.o genhomedircon
36
37indent:
38	../../scripts/Lindent $(wildcard *.[ch])
39
40