mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-10 06:37:29 +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>
32 lines
788 B
Makefile
32 lines
788 B
Makefile
# Installation directories.
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
SBINDIR ?= $(DESTDIR)/sbin
|
|
USRSBINDIR ?= $(PREFIX)/sbin
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LOCALEDIR ?= /usr/share/locale
|
|
|
|
CFLAGS ?= -Werror -Wall -W
|
|
override CFLAGS += $(LDFLAGS) -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
|
LDLIBS += -lsepol -lselinux
|
|
|
|
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
|
|
|
all: $(TARGETS)
|
|
|
|
install: all
|
|
-mkdir -p $(SBINDIR)
|
|
install -m 755 $(TARGETS) $(SBINDIR)
|
|
test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
|
|
install -m 644 load_policy.8 $(MANDIR)/man8/
|
|
-mkdir -p $(USRSBINDIR)
|
|
-ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy
|
|
|
|
clean:
|
|
-rm -f $(TARGETS) *.o
|
|
|
|
indent:
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
relabel:
|
|
/sbin/restorecon $(SBINDIR)/load_policy
|