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