File: Makefile

package info (click to toggle)
policycoreutils 2.0.49-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,024 kB
  • ctags: 677
  • sloc: ansic: 5,535; python: 2,125; sh: 452; makefile: 436
file content (39 lines) | stat: -rw-r--r-- 890 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Installation directories.
PREFIX ?= ${DESTDIR}/usr
SBINDIR ?= $(DESTDIR)/sbin
MANDIR = $(PREFIX)/share/man
LIBDIR ?= $(PREFIX)/lib

AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)

CFLAGS = -Werror -Wall -W
override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include
LDLIBS = -lselinux -lsepol -L$(LIBDIR)

ifeq (${AUDITH}, /usr/include/libaudit.h)
	override CFLAGS += -DUSE_AUDIT
	LDLIBS += -laudit
endif

all: setfiles restorecon

setfiles:  setfiles.o 

restorecon: setfiles
	ln -sf setfiles restorecon

install: all
	[ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8
	-mkdir -p $(SBINDIR)
	install -m 755 setfiles $(SBINDIR)
	(cd $(SBINDIR) && ln -sf setfiles restorecon)
	install -m 644 setfiles.8 restorecon.8 $(MANDIR)/man8

clean:
	rm -f setfiles restorecon *.o 

indent:
	../../scripts/Lindent $(wildcard *.[ch])

relabel: install
	/sbin/restorecon $(SBINDIR)/setfiles