1 # Makefile for udev_dbus
3 # Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
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.
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.
19 # override this to make udev look in a different location for it's config files
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/
33 INSTALL = /usr/bin/install -c
34 INSTALL_PROGRAM = ${INSTALL}
35 INSTALL_DATA = ${INSTALL} -m 644
36 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
38 override CFLAGS+=-Wall -fno-builtin
40 override CFLAGS += -DUSE_DBUS
41 override CFLAGS += $(shell pkg-config --cflags dbus-1)
42 override LDFLAGS += $(shell pkg-config --libs dbus-1)
46 $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) ../../udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
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
60 uninstall-dbus-policy:
61 - rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
62 - rm $(DESTDIR)$(devddir)/$(PROG).dev
63 - rm $(DESTDIR)$(usrsbindir)/$(PROG)
65 install: install-dbus-policy all
67 uninstall: uninstall-dbus-policy