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