mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-13 09:34:54 +00:00
fcb5d5cc72
The toolchain automatically handles them and they break cross compiling. LDFLAGS should also come before object files, some flags (eg, -Wl,as-needed) can break things if they are in the wrong place) Gentoo-Bug: https://bugs.gentoo.org/500674 Signed-off-by: Jason Zaman <jason@perfinion.com>
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
PYTHON ?= python
|
|
|
|
# Installation directories.
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
BINDIR ?= $(PREFIX)/bin
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
DATADIR ?= $(PREFIX)/share
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LOCALEDIR ?= /usr/share/locale
|
|
BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
|
CFLAGS ?= -Wall -Werror -Wextra -W
|
|
override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared
|
|
|
|
BASHCOMPLETIONS=sepolicy-bash-completion.sh
|
|
|
|
all: python-build
|
|
|
|
python-build:
|
|
$(PYTHON) setup.py build
|
|
|
|
clean:
|
|
$(PYTHON) setup.py clean
|
|
-rm -rf build *~ \#* *pyc .#*
|
|
|
|
sepolgen:
|
|
ln -sf sepolicy sepolgen
|
|
|
|
test:
|
|
@$(PYTHON) test_sepolicy.py -v
|
|
|
|
install:
|
|
$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
|
[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
|
|
install -m 755 sepolicy.py $(BINDIR)/sepolicy
|
|
(cd $(BINDIR); ln -sf sepolicy sepolgen)
|
|
-mkdir -p $(MANDIR)/man8
|
|
install -m 644 *.8 $(MANDIR)/man8
|
|
-mkdir -p $(BASHCOMPLETIONDIR)
|
|
install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
|
|
|
|
relabel:
|