2008-08-19 19:30:36 +00:00
|
|
|
# Installation directories.
|
2011-09-19 20:38:33 +00:00
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
2008-08-19 19:30:36 +00:00
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
2011-08-03 15:40:47 +00:00
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
2008-08-19 19:30:36 +00:00
|
|
|
MANDIR = $(PREFIX)/share/man
|
2011-08-03 15:40:47 +00:00
|
|
|
AUTOSTARTDIR = $(DESTDIR)/etc/xdg/autostart
|
|
|
|
DBUSSERVICEDIR = $(DESTDIR)/usr/share/dbus-1/services
|
|
|
|
|
|
|
|
autostart_DATA = sealertauto.desktop
|
2008-08-19 19:30:36 +00:00
|
|
|
INITDIR = $(DESTDIR)/etc/rc.d/init.d
|
|
|
|
SELINUXDIR = $(DESTDIR)/etc/selinux
|
|
|
|
|
2011-08-03 15:40:47 +00:00
|
|
|
DBUSFLAGS = -DHAVE_DBUS -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include
|
|
|
|
DBUSLIB = -ldbus-glib-1 -ldbus-1
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
CFLAGS ?= -g -Werror -Wall -W
|
2011-08-03 15:40:47 +00:00
|
|
|
override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib/glib-2.0/include
|
|
|
|
|
|
|
|
LDLIBS += -lselinux $(DBUSLIB) -lglib-2.0 -L$(LIBDIR)
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
all: restorecond
|
|
|
|
|
2011-08-03 15:40:47 +00:00
|
|
|
restorecond.o utmpwatcher.o stringslist.o user.o watch.o: restorecond.h
|
|
|
|
|
|
|
|
restorecond: ../setfiles/restore.o restorecond.o utmpwatcher.o stringslist.o user.o watch.o
|
2008-08-19 19:30:36 +00:00
|
|
|
$(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)
|
2009-02-17 16:42:15 +00:00
|
|
|
install -m 755 restorecond.init $(INITDIR)/restorecond
|
2008-08-19 19:30:36 +00:00
|
|
|
-mkdir -p $(SELINUXDIR)
|
2011-08-03 15:40:47 +00:00
|
|
|
install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
|
|
|
|
install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
|
|
|
|
-mkdir -p $(AUTOSTARTDIR)
|
|
|
|
install -m 644 restorecond.desktop $(AUTOSTARTDIR)/restorecond.desktop
|
|
|
|
-mkdir -p $(DBUSSERVICEDIR)
|
|
|
|
install -m 600 org.selinux.Restorecond.service $(DBUSSERVICEDIR)/org.selinux.Restorecond.service
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
relabel: install
|
|
|
|
/sbin/restorecon $(SBINDIR)/restorecond
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f restorecond *.o *~
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|