1# Installation directories. 2PREFIX ?= $(DESTDIR)/usr 3SBINDIR ?= $(DESTDIR)/sbin 4USRSBINDIR ?= $(PREFIX)/sbin 5MANDIR ?= $(PREFIX)/share/man 6LOCALEDIR ?= /usr/share/locale 7 8CFLAGS ?= -Werror -Wall -W 9override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" 10LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib 11 12TARGETS=$(patsubst %.c,%,$(wildcard *.c)) 13 14all: $(TARGETS) 15 16install: all 17 -mkdir -p $(SBINDIR) 18 install -m 755 $(TARGETS) $(SBINDIR) 19 test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8 20 install -m 644 load_policy.8 $(MANDIR)/man8/ 21 -mkdir -p $(USRSBINDIR) 22 -ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy 23 24clean: 25 -rm -f $(TARGETS) *.o 26 27indent: 28 ../../scripts/Lindent $(wildcard *.[ch]) 29 30relabel: 31 /sbin/restorecon $(SBINDIR)/load_policy 32