3e558a7d1b
- Update libsepol dependency to 2.5 - Update Makefile to build the man page when just running 'make' https://marc.info/?l=selinux&m=145220517200709&w=2 Reported-by: Nicolas Iooss <nicolas.iooss@m4x.org> Signed-off-by: Steve Lawrence <slawrence@tresys.com>
49 lines
1 KiB
Makefile
49 lines
1 KiB
Makefile
PREFIX ?= $(DESTDIR)/usr
|
|
BINDIR ?= $(PREFIX)/bin
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
INCLUDEDIR ?= $(PREFIX)/include
|
|
|
|
LDLIBS = -lsepol -L$(LIBDIR)
|
|
SECILC = secilc
|
|
SECILC_SRCS := secilc.c
|
|
SECILC_OBJS := $(patsubst %.c,%.o,$(SECILC_SRCS))
|
|
|
|
# The secilc man page:
|
|
MANPAGE = secilc.8
|
|
XMLTO = xmlto
|
|
|
|
CFLAGS ?= -Wall -Wshadow -Wextra -Wundef -Wmissing-format-attribute -Wcast-align -Wstrict-prototypes -Wpointer-arith -Wunused
|
|
|
|
override CFLAGS += -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
|
all: $(SECILC) man
|
|
|
|
$(SECILC): $(SECILC_OBJS)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
|
|
|
test: $(SECILC)
|
|
./$(SECILC) test/policy.cil
|
|
|
|
man: $(MANPAGE).xml
|
|
$(XMLTO) man $(MANPAGE).xml
|
|
|
|
install: all man
|
|
-mkdir -p $(BINDIR)
|
|
-mkdir -p $(MANDIR)/man8
|
|
install -m 755 $(SECILC) $(BINDIR)
|
|
install -m 644 $(MANPAGE) $(MANDIR)/man8
|
|
|
|
doc:
|
|
$(MAKE) -C docs
|
|
|
|
clean:
|
|
rm -f $(SECILC)
|
|
rm -f $(SECILC_OBJS)
|
|
rm -f policy.*
|
|
rm -f file_contexts
|
|
rm -f $(MANPAGE)
|
|
|
|
relabel:
|
|
|
|
.PHONY: all clean test install doc relabel man
|