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