• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# secon tool - command-line context
2LINGUAS ?= ru
3PREFIX ?= /usr
4BINDIR ?= $(PREFIX)/bin
5MANDIR ?= $(PREFIX)/share/man
6
7WARNS=-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
8VERSION = $(shell cat ../VERSION)
9CFLAGS ?= $(WARNS) -O1
10override CFLAGS += -DVERSION=\"$(VERSION)\"
11override LDLIBS += -lselinux
12
13all: secon
14
15secon: secon.o
16
17install-nogui: install
18
19install: all
20	install -m 755 secon $(DESTDIR)$(BINDIR);
21
22	test -d $(DESTDIR)$(MANDIR)/man1 || install -m 755 -d $(DESTDIR)$(MANDIR)/man1
23	install -m 644 secon.1 $(DESTDIR)$(MANDIR)/man1
24	for lang in $(LINGUAS) ; do \
25		if [ -e $${lang} ] ; then \
26			test -d $(DESTDIR)$(MANDIR)/$${lang}/man1 || install -m 755 -d $(DESTDIR)$(MANDIR)/$${lang}/man1 ; \
27			install -m 644 $${lang}/*.1 $(DESTDIR)$(MANDIR)/$${lang}/man1/ ; \
28		fi ; \
29	done
30
31relabel:
32	/sbin/restorecon $(DESTDIR)$(BINDIR)/secon
33
34clean:
35	rm -f *.o core* secon *~ *.bak
36
37indent:
38	../../scripts/Lindent $(wildcard *.[ch])
39
40bare: clean
41
42.PHONY: clean bare
43