chiark / gitweb /
add "Persistent Device Naming" rules file for disks
[elogind.git] / extras / run_directory / Makefile
1 # Makefile for udev extra invoked from the udev main Makefile
2 #
3 # Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
4 #
5 # Released under the GNU General Public License, version 2.
6 #
7 PROG = udev_run_devd udev_run_hotplugd
8 OBJS = run_directory.o
9 HEADERS =
10 GEN_HEADERS =
11 MAN_PAGES =
12
13 prefix =
14 exec_prefix =   ${prefix}
15 etcdir =        ${prefix}/etc
16 sbindir =       ${exec_prefix}/sbin
17 usrbindir =     ${exec_prefix}/usr/bin
18 usrsbindir =    ${exec_prefix}/usr/sbin
19 mandir =        ${prefix}/usr/share/man
20 configdir =     ${etcdir}/udev/
21 srcdir = .
22
23 INSTALL = /usr/bin/install -c
24 INSTALL_PROGRAM = ${INSTALL}
25 INSTALL_DATA  = ${INSTALL} -m 644
26 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
27
28 all: $(PROG) $(MAN_PAGES)
29 .PHONY: all
30 .DEFAULT: all
31
32 %.o: %.c $(GEN_HEADERS)
33         $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
34
35 $(PROG): %: $(HEADERS) %.o $(OBJS)
36         $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
37         $(QUIET) $(STRIPCMD) $@
38
39 # man pages
40 %.8: %.xml
41         xmlto man $?
42 .PRECIOUS: %.8
43
44 clean:
45         rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
46 .PHONY: clean
47
48 install-bin: all
49         $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_devd
50         $(INSTALL_PROGRAM) udev_run_hotplugd $(DESTDIR)$(sbindir)/udev_run_hotplugd
51 .PHONY: install-bin
52
53 uninstall-bin:
54         - rm $(DESTDIR)$(sbindir)/udev_run_devd
55         - rm $(DESTDIR)$(sbindir)/udev_run_hotplugd
56 .PHONY: uninstall-bin
57
58 install-man:
59         @echo "Please create a man page for this tool."
60 .PHONY: uninstall-man
61
62 uninstall-man:
63         @echo "Please create a man page for this tool."
64 .PHONY: uninstall-man
65
66 install-config:
67         @echo "no config file to install"
68 .PHONY: install-config