2008-08-19 21:30:36 +02:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
BINDIR ?= $(PREFIX)/sbin
|
2009-05-07 22:05:05 +02:00
|
|
|
_BINDIR ?= $(DESTDIR)/sbin
|
2008-08-19 21:30:36 +02:00
|
|
|
|
2011-12-05 19:44:51 +01:00
|
|
|
CFLAGS ?= -Werror -Wall -W
|
2008-08-19 21:30:36 +02:00
|
|
|
override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
|
|
|
|
LDLIBS += -L../src -lselinux -L$(LIBDIR)
|
|
|
|
|
|
|
|
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
|
2009-05-07 22:05:05 +02:00
|
|
|
|
|
|
|
|
2008-08-19 21:30:36 +02:00
|
|
|
ifeq ($(DISABLE_AVC),y)
|
|
|
|
UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel
|
|
|
|
endif
|
|
|
|
ifeq ($(DISABLE_BOOL),y)
|
|
|
|
UNUSED_TARGETS+=getsebool togglesebool
|
|
|
|
endif
|
2009-05-07 22:05:05 +02:00
|
|
|
TARGETS:= $(filter-out $(UNUSED_TARGETS) matchpathcon, $(TARGETS))
|
2008-08-19 21:30:36 +02:00
|
|
|
|
2009-05-07 22:05:05 +02:00
|
|
|
all: $(TARGETS) matchpathcon
|
2008-08-19 21:30:36 +02:00
|
|
|
|
|
|
|
install: all
|
|
|
|
-mkdir -p $(BINDIR)
|
|
|
|
install -m 755 $(TARGETS) $(BINDIR)
|
2009-05-07 22:05:05 +02:00
|
|
|
-mkdir -p $(_BINDIR)
|
|
|
|
install -m 755 matchpathcon $(_BINDIR)
|
|
|
|
(cd $(BINDIR); ln -fs ../../sbin/matchpathcon)
|
2008-08-19 21:30:36 +02:00
|
|
|
clean:
|
2009-05-07 22:05:05 +02:00
|
|
|
rm -f $(TARGETS) matchpathcon *.o *~
|
2008-08-19 21:30:36 +02:00
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
relabel:
|
|
|
|
|