2008-08-19 19:30:36 +00:00
|
|
|
# secon tool - command-line context
|
2018-12-25 15:25:05 +00:00
|
|
|
LINGUAS ?= ru
|
2018-02-14 09:57:09 +00:00
|
|
|
PREFIX ?= /usr
|
2008-08-19 19:30:36 +00:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
|
|
|
|
WARNS=-Werror -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal
|
|
|
|
VERSION = $(shell cat ../VERSION)
|
|
|
|
CFLAGS ?= $(WARNS) -O1
|
2017-04-24 17:59:56 +00:00
|
|
|
override CFLAGS += -DVERSION=\"$(VERSION)\"
|
2017-06-20 15:16:41 +00:00
|
|
|
override LDLIBS += -lselinux
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
all: secon
|
|
|
|
|
|
|
|
secon: secon.o
|
|
|
|
|
|
|
|
install-nogui: install
|
|
|
|
|
|
|
|
install: all
|
2018-02-14 09:57:09 +00:00
|
|
|
install -m 755 secon $(DESTDIR)$(BINDIR);
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2018-02-14 09:57:09 +00:00
|
|
|
test -d $(DESTDIR)$(MANDIR)/man1 || install -m 755 -d $(DESTDIR)$(MANDIR)/man1
|
|
|
|
install -m 644 secon.1 $(DESTDIR)$(MANDIR)/man1
|
2018-12-25 15:25:05 +00:00
|
|
|
for lang in $(LINGUAS) ; do \
|
|
|
|
if [ -e $${lang} ] ; then \
|
|
|
|
test -d $(DESTDIR)$(MANDIR)/$${lang}/man1 || install -m 755 -d $(DESTDIR)$(MANDIR)/$${lang}/man1 ; \
|
|
|
|
install -m 644 $${lang}/*.1 $(DESTDIR)$(MANDIR)/$${lang}/man1/ ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
relabel:
|
2018-02-14 09:57:09 +00:00
|
|
|
/sbin/restorecon $(DESTDIR)$(BINDIR)/secon
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o core* secon *~ *.bak
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
bare: clean
|
|
|
|
|
|
|
|
.PHONY: clean bare
|