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