chiark / gitweb /
[PATCH] udev_dbus changes
[elogind.git] / extras / dbus / Makefile
1 # Makefile for udev_dbus
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 `true' to log the debug
11 # and make a unstripped, unoptimized  binary.
12 # Leave this set to `false' for production use.
13 DEBUG = false
14
15 PROG =  udev_dbus
16
17 all:    $(PROG)
18
19 # override this to make udev look in a different location for it's config files
20 prefix =
21 exec_prefix =   ${prefix}
22 etcdir =        ${prefix}/etc
23 sbindir =       ${exec_prefix}/sbin
24 usrbindir =     ${exec_prefix}/usr/bin
25 usrsbindir =    ${exec_prefix}/usr/sbin
26 mandir =        ${prefix}/usr/share/man
27 devddir =       ${etcdir}/dev.d/default
28 dbusdir =       ${etcdir}/dbus-1/system.d
29 configdir =     ${etcdir}/udev/
30 initdir =       ${etcdir}/init.d/
31 srcdir = .
32
33 INSTALL = /usr/bin/install -c
34 INSTALL_PROGRAM = ${INSTALL}
35 INSTALL_DATA  = ${INSTALL} -m 644
36 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
37
38 override CFLAGS+=-Wall -fno-builtin
39
40 override CFLAGS += -DUSE_DBUS
41 override CFLAGS += $(shell pkg-config --cflags dbus-1)
42 override LDFLAGS += $(shell pkg-config --libs dbus-1)
43 OBJS = udev_dbus.o
44
45 $(PROG): $(OBJS)
46         $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) ../../udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
47
48 clean:
49         rm -f $(PROG) $(OBJS)
50
51 spotless: clean
52
53
54 install-dbus-policy:
55         $(INSTALL) -d $(DESTDIR)$(dbusdir)
56         $(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf $(DESTDIR)$(dbusdir)
57         $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(usrsbindir)/$(PROG)
58         - ln -s -f $(DESTDIR)$(usrsbindir)/$(PROG) $(DESTDIR)$(devddir)/$(PROG).dev
59
60 uninstall-dbus-policy:
61         - rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
62         - rm $(DESTDIR)$(devddir)/$(PROG).dev
63         - rm $(DESTDIR)$(usrsbindir)/$(PROG)
64
65 install: install-dbus-policy all
66
67 uninstall: uninstall-dbus-policy
68