chiark / gitweb /
1b48719c61798720442e4bc1772154d6910fdb58
[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 ifneq ($(strip $(STRIPCMD)),)
38         $(QUIET) $(STRIPCMD) $@
39 endif
40
41 # man pages
42 %.8: %.xml
43         xmlto man $?
44 .PRECIOUS: %.8
45
46 clean:
47         rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
48 .PHONY: clean
49
50 install-bin: all
51         $(INSTALL_PROGRAM) udev_run_devd $(DESTDIR)$(sbindir)/udev_run_devd
52         $(INSTALL_PROGRAM) udev_run_hotplugd $(DESTDIR)$(sbindir)/udev_run_hotplugd
53 .PHONY: install-bin
54
55 uninstall-bin:
56         - rm $(DESTDIR)$(sbindir)/udev_run_devd
57         - rm $(DESTDIR)$(sbindir)/udev_run_hotplugd
58 .PHONY: uninstall-bin
59
60 install-man:
61         @echo "Please create a man page for this tool."
62 .PHONY: uninstall-man
63
64 uninstall-man:
65         @echo "Please create a man page for this tool."
66 .PHONY: uninstall-man
67
68 install-config:
69         @echo "no config file to install"
70 .PHONY: install-config