chiark / gitweb /
99aa33d8fb7cc6710058815d7ebcd9f22892463b
[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 mandir =        ${prefix}/usr/share/man
26 hotplugdir =    ${etcdir}/hotplug.d/default
27 dbusdir =       ${etcdir}/dbus-1/system.d
28 configdir =     ${etcdir}/udev/
29 initdir =       ${etcdir}/init.d/
30 srcdir = .
31
32 INSTALL = /usr/bin/install -c
33 INSTALL_PROGRAM = ${INSTALL}
34 INSTALL_DATA  = ${INSTALL} -m 644
35 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
36
37 override CFLAGS+=-Wall -fno-builtin
38
39 override CFLAGS += -DUSE_DBUS
40 override CFLAGS += $(shell pkg-config --cflags dbus-1)
41 override LDFLAGS += $(shell pkg-config --libs dbus-1)
42 OBJS = udev_dbus.o
43
44 $(PROG): $(OBJS)
45         $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) ../../udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
46
47 clean:
48         rm -f $(PROG) $(OBJS)
49
50 spotless: clean
51
52
53 install-dbus-policy:
54         $(INSTALL) -d $(DESTDIR)$(dbusdir)
55         $(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf $(DESTDIR)$(dbusdir)
56
57 uninstall-dbus-policy:
58         - rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
59
60 install: install-dbus-policy all
61
62 uninstall: uninstall-dbus-policy
63