Home | History | Annotate | Download | only in load_policy
      1 # Installation directories.
      2 PREFIX ?= $(DESTDIR)/usr
      3 SBINDIR ?= $(DESTDIR)/sbin
      4 USRSBINDIR ?= $(PREFIX)/sbin
      5 MANDIR ?= $(PREFIX)/share/man
      6 LOCALEDIR ?= /usr/share/locale
      7 
      8 CFLAGS ?= -Werror -Wall -W
      9 override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
     10 LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib
     11 
     12 TARGETS=$(patsubst %.c,%,$(wildcard *.c))
     13 
     14 all: $(TARGETS)
     15 
     16 install: 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 
     24 clean:
     25 	-rm -f $(TARGETS) *.o 
     26 
     27 indent:
     28 	../../scripts/Lindent $(wildcard *.[ch])
     29 
     30 relabel:
     31 	/sbin/restorecon $(SBINDIR)/load_policy 
     32