chiark / gitweb /
0562073c8ffc41d74f42e43b6bf1d431bc07c58e
[elogind.git] / extras / run_directory / Makefile
1 # Makefile for run_directory
2 #
3 # Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
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 DEVD = udev_run_devd
11 HOTPLUGD = udev_run_hotplugd
12
13 all:    $(DEVD) $(HOTPLUGD)
14
15 prefix =
16 exec_prefix =   ${prefix}
17 etcdir =        ${prefix}/etc
18 sbindir =       ${exec_prefix}/sbin
19 usrbindir =     ${exec_prefix}/usr/bin
20 usrsbindir =    ${exec_prefix}/usr/sbin
21 mandir =        ${prefix}/usr/share/man
22 devddir =       ${etcdir}/dev.d/default
23 configdir =     ${etcdir}/udev/
24 initdir =       ${etcdir}/init.d/
25 srcdir = .
26
27 INSTALL = /usr/bin/install -c
28 INSTALL_PROGRAM = ${INSTALL}
29 INSTALL_DATA  = ${INSTALL} -m 644
30 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
31
32 override CFLAGS+=-D_FILE_OFFSET_BITS=64
33
34 OBJS = ../../udev.a ../../libsysfs/sysfs.a
35
36 .c.o:
37         $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
38
39 $(DEVD): $(HEADERS) $(DEVD).o run_directory.o
40         $(QUIET) $(LD) $(LDFLAGS) -o $(DEVD) $(DEVD).o run_directory.o $(OBJS)
41
42 $(HOTPLUGD): $(HEADERS) $(HOTPLUGD).o run_directory.o
43         $(QUIET) $(LD) $(LDFLAGS) -o $(HOTPLUGD) $(HOTPLUGD).o run_directory.o $(OBJS)
44
45 clean:
46         rm -f $(DEVD) $(HOTPLUGD) run_directory.o
47
48 spotless: clean
49
50 install: all
51         $(INSTALL_PROGRAM) $(DEVD) $(DESTDIR)$(sbindir)/$(DEVD)
52         $(INSTALL_PROGRAM) $(HOTPLUGD) $(DESTDIR)$(sbindir)/$(HOTPLUGD)
53
54 uninstall:
55         - rm $(DESTDIR)$(sbindir)/$(DEVD)