1# Installation directories.
2PREFIX ?= $(DESTDIR)/usr
3INCLUDEDIR ?= $(PREFIX)/include
4SBINDIR ?= $(PREFIX)/sbin
5MANDIR = $(PREFIX)/share/man
6LIBDIR ?= $(PREFIX)/lib
7BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
8
9CFLAGS ?= -Werror -Wall -W
10override CFLAGS += -I$(INCLUDEDIR)
11LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR)
12SETSEBOOL_OBJS = setsebool.o
13
14BASHCOMPLETIONS=setsebool-bash-completion.sh 
15
16all: setsebool
17
18setsebool: $(SETSEBOOL_OBJS)
19
20install: all
21	-mkdir -p $(SBINDIR)
22	install -m 755 setsebool $(SBINDIR)
23	-mkdir -p $(MANDIR)/man8
24	install -m 644 setsebool.8 $(MANDIR)/man8/
25	-mkdir -p $(BASHCOMPLETIONDIR)
26	install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/setsebool
27
28relabel:
29
30clean:
31	-rm -f setsebool *.o
32
33indent:
34	../../scripts/Lindent $(wildcard *.[ch])
35
36