mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-29 00:32:46 +00:00
e4d693ae87
This fixes the build with "make PYTHON=python2" on systems where python is python3. For PYLIBVER and PYTHONLIBDIR definitions, I tested Python 2.5, 2.6, 2.7, 3.3 and 3.4. For each of them, these commands print the expected result: python -c 'import sys;print("python%d.%d" % sys.version_info[0:2])'" python -c "from distutils.sysconfig import *;print(get_python_lib(1))" Acked-by: Steve Lawrence <slawrence@tresys.com>
46 lines
1.1 KiB
Makefile
46 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
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LOCALEDIR ?= /usr/share/locale
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
|
override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
|
|
LDLIBS += -lselinux -lcap-ng -L$(LIBDIR)
|
|
SEUNSHARE_OBJS = seunshare.o
|
|
|
|
all: sandbox seunshare sandboxX.sh start
|
|
|
|
seunshare: $(SEUNSHARE_OBJS)
|
|
|
|
install: all
|
|
-mkdir -p $(BINDIR)
|
|
install -m 755 sandbox $(BINDIR)
|
|
-mkdir -p $(MANDIR)/man8
|
|
install -m 644 sandbox.8 $(MANDIR)/man8/
|
|
install -m 644 seunshare.8 $(MANDIR)/man8/
|
|
-mkdir -p $(MANDIR)/man5
|
|
install -m 644 sandbox.5 $(MANDIR)/man5/
|
|
-mkdir -p $(SBINDIR)
|
|
install -m 4755 seunshare $(SBINDIR)/
|
|
-mkdir -p $(SHAREDIR)
|
|
install -m 755 sandboxX.sh $(SHAREDIR)
|
|
install -m 755 start $(SHAREDIR)
|
|
-mkdir -p $(SYSCONFDIR)
|
|
install -m 644 sandbox.conf $(SYSCONFDIR)/sandbox
|
|
|
|
test:
|
|
@$(PYTHON) test_sandbox.py -v
|
|
|
|
clean:
|
|
-rm -f seunshare *.o *~
|
|
|
|
indent:
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
relabel:
|