chiark / gitweb /
[PATCH] let the extras/ programs build "pretty" also
[elogind.git] / extras / volume_id / Makefile
1 # Makefile for udev_volume_id
2 #
3 # Copyright (C) 2004 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 PROG = udev_volume_id
11
12 all:    $(PROG)
13
14 prefix =
15 exec_prefix =   ${prefix}
16 etcdir =        ${prefix}/etc
17 sbindir =       ${exec_prefix}/sbin
18 usrbindir =     ${exec_prefix}/usr/bin
19 usrsbindir =    ${exec_prefix}/usr/sbin
20 mandir =        ${prefix}/usr/share/man
21 devddir =       ${etcdir}/dev.d/default
22 configdir =     ${etcdir}/udev/
23 initdir =       ${etcdir}/init.d/
24 srcdir = .
25
26 INSTALL = /usr/bin/install -c
27 INSTALL_PROGRAM = ${INSTALL}
28 INSTALL_DATA  = ${INSTALL} -m 644
29 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
30
31 override CFLAGS+=-Wall -fno-builtin -Wchar-subscripts -Wmissing-declarations \
32                  -Wnested-externs -Wpointer-arith -Wcast-align \
33                  -Wsign-compare
34
35 override CFLAGS+=-D_FILE_OFFSET_BITS=64
36
37 SYSFS = ../../libsysfs/sysfs_bus.o      \
38         ../../libsysfs/sysfs_class.o    \
39         ../../libsysfs/sysfs_device.o   \
40         ../../libsysfs/sysfs_dir.o      \
41         ../../libsysfs/sysfs_driver.o   \
42         ../../libsysfs/sysfs_utils.o    \
43         ../../libsysfs/dlist.o
44
45
46
47 OBJS = volume_id.o udev_volume_id.o dasdlabel.o $(SYSFS)
48 HEADERS = volume_id.h dasdlabel.h
49
50 $(OBJS): $(HEADERS)
51
52 .c.o:
53         $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
54
55 $(PROG): $(OBJS) $(HEADERS)
56         $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
57
58 clean:
59         rm -f $(PROG) $(OBJS)
60
61 spotless: clean
62
63 install: all
64         $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(usrsbindir)/$(PROG)
65
66 uninstall:
67         - rm $(DESTDIR)$(usrsbindir)/$(PROG)
68