2014-01-24 21:25:06 +00:00
|
|
|
# Installation directories.
|
2018-02-14 09:57:09 +00:00
|
|
|
PREFIX ?= /usr
|
2014-01-24 21:25:06 +00:00
|
|
|
LIBEXECDIR ?= $(PREFIX)/libexec
|
|
|
|
HLLDIR ?= $(LIBEXECDIR)/selinux/hll
|
|
|
|
|
|
|
|
CFLAGS ?= -Werror -Wall -W
|
2017-06-20 15:16:41 +00:00
|
|
|
override LDLIBS += -lsepol
|
2014-01-24 21:25:06 +00:00
|
|
|
|
2017-05-30 14:21:32 +00:00
|
|
|
PP_SRCS = $(sort $(wildcard *.c))
|
2014-01-24 21:25:06 +00:00
|
|
|
PP_OBJS = $(patsubst %.c,%.o,$(PP_SRCS))
|
|
|
|
|
|
|
|
all: pp
|
|
|
|
|
|
|
|
pp: $(PP_OBJS)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $^
|
|
|
|
|
|
|
|
install: all
|
2018-02-14 09:57:09 +00:00
|
|
|
-mkdir -p $(DESTDIR)$(HLLDIR)
|
|
|
|
install -m 755 pp $(DESTDIR)$(HLLDIR)
|
2014-01-24 21:25:06 +00:00
|
|
|
|
|
|
|
relabel:
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f pp $(PP_OBJS)
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|