mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-23 22:42:06 +00:00
f8532f1773
This patch solves the following issues: - The pkg-config files generates odd paths when using DESTDIR without PREFIX - DESTDIR is needed during compile time to compute library and header paths which it should not. - Installing with both DESTDIR and PREFIX set gives us odd paths - Make usage of DESTDIR and PREFIX more standard Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
26 lines
434 B
Makefile
26 lines
434 B
Makefile
# Installation directories.
|
|
PREFIX ?= /usr
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
CFLAGS ?= -Wall -Werror
|
|
override CFLAGS += -I../include
|
|
override LDFLAGS += -L../src
|
|
override LDLIBS += -lsepol
|
|
|
|
TARGETS=$(patsubst %.c,%,$(sort $(wildcard *.c)))
|
|
|
|
all: $(TARGETS)
|
|
|
|
install: all
|
|
-mkdir -p $(DESTDIR)$(BINDIR)
|
|
install -m 755 $(TARGETS) $(DESTDIR)$(BINDIR)
|
|
|
|
clean:
|
|
-rm -f $(TARGETS) *.o
|
|
|
|
indent:
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
relabel:
|
|
|