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 11override CFLAGS += -I$(INCLUDEDIR) 12LDLIBS = -lsepol -L$(LIBDIR) 13 14PP_SRCS = $(wildcard *.c) 15PP_OBJS = $(patsubst %.c,%.o,$(PP_SRCS)) 16 17all: pp 18 19pp: $(PP_OBJS) 20 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) 21 22%.o: %.c 23 $(CC) $(CFLAGS) -c -o $@ $^ 24 25install: all 26 -mkdir -p $(HLLDIR) 27 install -m 755 pp $(HLLDIR) 28 29relabel: 30 31clean: 32 -rm -f pp $(PP_OBJS) 33 34indent: 35 ../../scripts/Lindent $(wildcard *.[ch]) 36