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