2014-01-24 21:25:06 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
INCLUDEDIR ?= $(PREFIX)/include
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR = $(PREFIX)/share/man
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
LIBEXECDIR ?= $(PREFIX)/libexec
|
|
|
|
HLLDIR ?= $(LIBEXECDIR)/selinux/hll
|
|
|
|
|
|
|
|
CFLAGS ?= -Werror -Wall -W
|
2017-04-24 17:59:56 +00:00
|
|
|
LDLIBS = -lsepol
|
2014-01-24 21:25:06 +00:00
|
|
|
|
|
|
|
PP_SRCS = $(wildcard *.c)
|
|
|
|
PP_OBJS = $(patsubst %.c,%.o,$(PP_SRCS))
|
|
|
|
|
|
|
|
all: pp
|
|
|
|
|
|
|
|
pp: $(PP_OBJS)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $^
|
|
|
|
|
|
|
|
install: all
|
|
|
|
-mkdir -p $(HLLDIR)
|
|
|
|
install -m 755 pp $(HLLDIR)
|
|
|
|
|
|
|
|
relabel:
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f pp $(PP_OBJS)
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|