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