selinux/policycoreutils/secon/Makefile
Jason Zaman fcb5d5cc72 Makefiles: drop -L/-I to system paths
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>
2017-04-25 08:27:05 -04:00

38 lines
941 B
Makefile

# secon tool - command-line context
PREFIX ?= $(DESTDIR)/usr
INCLUDEDIR ?= $(PREFIX)/include
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man
LIBDIR ?= $(PREFIX)/lib
WARNS=-Werror -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal
VERSION = $(shell cat ../VERSION)
CFLAGS ?= $(WARNS) -O1
override CFLAGS += -DVERSION=\"$(VERSION)\"
LDLIBS = -lselinux
all: secon
secon: secon.o
install-nogui: install
install: all
install -m 755 secon $(BINDIR);
test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
install -m 644 secon.1 $(MANDIR)/man1
relabel:
/sbin/restorecon $(BINDIR)/secon
clean:
rm -f *.o core* secon *~ *.bak
indent:
../../scripts/Lindent $(wildcard *.[ch])
bare: clean
.PHONY: clean bare