File: Makefile

package info (click to toggle)
policycoreutils 2.0.82-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,584 kB
  • ctags: 727
  • sloc: ansic: 5,661; python: 2,427; sh: 474; makefile: 442
file content (35 lines) | stat: -rw-r--r-- 905 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
# Installation directories.
PREFIX ?= ${DESTDIR}/usr
SBINDIR ?= $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
INITDIR = $(DESTDIR)/etc/init.d
SELINUXDIR = $(DESTDIR)/etc/selinux

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

all: restorecond

restorecond:  restorecond.o utmpwatcher.o stringslist.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)

install: all
	[ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8
	-mkdir -p $(SBINDIR)
	install -m 755 restorecond $(SBINDIR)
	install -m 644 restorecond.8 $(MANDIR)/man8
	-mkdir -p $(INITDIR)
	install -m 755 restorecond.init $(INITDIR)/policycoreutils
	-mkdir -p $(SELINUXDIR)
	install -m 600 restorecond.conf $(SELINUXDIR)/restorecond.conf

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

clean:
	-rm -f restorecond *.o *~

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