• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Installation directories.
2PREFIX ?= /usr
3LIBEXECDIR ?= $(PREFIX)/libexec
4HLLDIR ?= $(LIBEXECDIR)/selinux/hll
5
6CFLAGS ?= -Werror -Wall -W
7override LDLIBS += -lsepol
8
9PP_SRCS = $(sort $(wildcard *.c))
10PP_OBJS = $(patsubst %.c,%.o,$(PP_SRCS))
11
12all: pp
13
14pp: $(PP_OBJS)
15	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
16
17%.o: %.c
18	$(CC) $(CFLAGS) -c -o $@ $^
19
20install: all
21	-mkdir -p $(DESTDIR)$(HLLDIR)
22	install -m 755 pp $(DESTDIR)$(HLLDIR)
23
24relabel:
25
26clean:
27	-rm -f pp $(PP_OBJS)
28
29indent:
30	../../scripts/Lindent $(wildcard *.[ch])
31