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