chiark / gitweb /
[PATCH] udev_selinux changes
[elogind.git] / extras / selinux / Makefile
1 # Makefile for udev_selinux
2 #
3 # Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
8 #
9
10 # Set the following to control the use of syslog
11 # Set it to `false' to remove all logging
12 USE_LOG = true
13
14 # Set the following to `true' to log the debug
15 # and make a unstripped, unoptimized  binary.
16 # Leave this set to `false' for production use.
17 DEBUG = false
18
19 PROG = udev_selinux
20
21 DESTDIR =
22
23 # override this to make udev look in a different location for it's config files
24 prefix =
25 exec_prefix =   ${prefix}
26 etcdir =        ${prefix}/etc
27 sbindir =       ${exec_prefix}/sbin
28 usrbindir =     ${exec_prefix}/usr/bin
29 usrsbindir =    ${exec_prefix}/usr/sbin
30 mandir =        ${prefix}/usr/share/man
31 devddir =       ${etcdir}/dev.d/default
32 hotplugdir =    ${etcdir}/hotplug.d/default
33 configdir =     ${etcdir}/udev/
34 initdir =       ${etcdir}/init.d/
35 srcdir = .
36
37 INSTALL = /usr/bin/install -c
38 INSTALL_PROGRAM = ${INSTALL}
39 INSTALL_DATA  = ${INSTALL} -m 644
40 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
41
42 all: $(PROG)
43
44 OBJS = udev_selinux.o
45
46 override CFLAGS  += -DUSE_SELINUX
47 override LIB_OBJS += -lselinux
48
49 $(PROG): $(OBJS)
50         $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) ../../udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
51
52 clean:
53         rm -f $(PROG) $(OBJS)
54
55 spotless: clean
56
57 install: all
58         $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
59         - ln -s -f $(DESTDIR)$(sbindir)/$(PROG) $(DESTDIR)$(devddir)/$(PROG).dev
60
61 uninstall:
62         - rm $(DESTDIR)$(devddir)/$(PROG).dev
63         - rm $(DESTDIR)$(sbindir)/$(PROG)
64