Home | History | Annotate | Download | only in sepolicy
      1 PYTHON ?= python
      2 
      3 # Installation directories.
      4 PREFIX ?= $(DESTDIR)/usr
      5 SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
      6 LIBDIR ?= $(PREFIX)/lib
      7 BINDIR ?= $(PREFIX)/bin
      8 SBINDIR ?= $(PREFIX)/sbin
      9 DATADIR ?= $(PREFIX)/share
     10 MANDIR ?= $(PREFIX)/share/man
     11 LOCALEDIR ?= /usr/share/locale
     12 BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
     13 SHAREDIR ?= $(PREFIX)/share/sandbox
     14 CFLAGS ?= -Wall -Werror -Wextra -W
     15 override CFLAGS += -I$(PREFIX)/include -DPACKAGE="policycoreutils" -DSHARED -shared
     16 
     17 BASHCOMPLETIONS=sepolicy-bash-completion.sh
     18 
     19 all: python-build
     20 
     21 python-build:
     22 	$(PYTHON) setup.py build
     23 
     24 clean:
     25 	$(PYTHON) setup.py clean
     26 	-rm -rf build *~ \#* *pyc .#*
     27 
     28 sepolgen:
     29 	ln -sf sepolicy sepolgen
     30 
     31 test:
     32 	@$(PYTHON) test_sepolicy.py -v
     33 
     34 install:
     35 	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
     36 	[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
     37 	install -m 755 sepolicy.py $(BINDIR)/sepolicy
     38 	(cd $(BINDIR); ln -sf sepolicy sepolgen)
     39 	-mkdir -p $(MANDIR)/man8
     40 	install -m 644 *.8 $(MANDIR)/man8
     41 	-mkdir -p $(BASHCOMPLETIONDIR)
     42 	install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
     43 
     44 relabel:
     45