chiark / gitweb /
move some helpers from extras to /lib/udev
[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 etcdir =        ${prefix}/etc
15 sbindir =       ${prefix}/sbin
16 usrbindir =     ${prefix}/usr/bin
17 usrsbindir =    ${prefix}/usr/sbin
18 libudevdir =    ${prefix}/lib/udev
19 mandir =        ${prefix}/usr/share/man
20 configdir =     ${etcdir}/udev/
21
22 INSTALL = /usr/bin/install -c
23 INSTALL_PROGRAM = ${INSTALL}
24 INSTALL_DATA  = ${INSTALL} -m 644
25 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
26
27 all: $(PROG) $(MAN_PAGES)
28 .PHONY: all
29 .DEFAULT: all
30
31 %.o: %.c $(GEN_HEADERS)
32         $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
33
34 $(PROG): %: $(HEADERS) %.o $(OBJS)
35         $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
36 ifneq ($(strip $(STRIPCMD)),)
37         $(QUIET) $(STRIPCMD) $@
38 endif
39
40 # man pages
41 %.8: %.xml
42         xmlto man $?
43 .PRECIOUS: %.8
44
45 clean:
46         rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
47 .PHONY: clean
48
49 install-bin: all
50         $(INSTALL_PROGRAM) -D udev_run_devd $(DESTDIR)$(libudevdir)/udev_run_devd
51         $(INSTALL_PROGRAM) -D udev_run_hotplugd $(DESTDIR)$(libudevdir)/udev_run_hotplugd
52 .PHONY: install-bin
53
54 uninstall-bin:
55         - rm $(DESTDIR)$(libudevdir)/udev_run_devd
56         - rm $(DESTDIR)$(libudevdir)/udev_run_hotplugd
57 .PHONY: uninstall-bin
58
59 install-man:
60         @echo "Please create a man page for this tool."
61 .PHONY: uninstall-man
62
63 uninstall-man:
64         @echo "Please create a man page for this tool."
65 .PHONY: uninstall-man
66
67 install-config:
68         @echo "no config file to install"
69 .PHONY: install-config