chiark / gitweb /
bfe4cf74af52f47da5027ef4eead30da331f44cc
[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+=-D_FILE_OFFSET_BITS=64
32
33 VOLUME_ID_OBJS=                                 \
34         volume_id/ext/ext.o                     \
35         volume_id/fat/fat.o                     \
36         volume_id/hfs/hfs.o                     \
37         volume_id/highpoint/highpoint.o         \
38         volume_id/iso9660/iso9660.o             \
39         volume_id/jfs/jfs.o                     \
40         volume_id/linux_raid/linux_raid.o       \
41         volume_id/linux_swap/linux_swap.o       \
42         volume_id/lvm/lvm.o                     \
43         volume_id/mac/mac.o                     \
44         volume_id/msdos/msdos.o                 \
45         volume_id/ntfs/ntfs.o                   \
46         volume_id/reiserfs/reiserfs.o           \
47         volume_id/udf/udf.o                     \
48         volume_id/ufs/ufs.o                     \
49         volume_id/xfs/xfs.o                     \
50         volume_id/cramfs/cramfs.o               \
51         volume_id/dasd/dasd.o                   \
52         volume_id/volume_id.o                   \
53         volume_id/util.o
54
55 VOLUME_ID_HEADERS=                              \
56         volume_id/ext/ext.h                     \
57         volume_id/fat/fat.h                     \
58         volume_id/hfs/hfs.h                     \
59         volume_id/highpoint/highpoint.h         \
60         volume_id/iso9660/iso9660.h             \
61         volume_id/jfs/jfs.h                     \
62         volume_id/linux_raid/linux_raid.h       \
63         volume_id/linux_swap/linux_swap.h       \
64         volume_id/lvm/lvm.h                     \
65         volume_id/mac/mac.h                     \
66         volume_id/msdos/msdos.h                 \
67         volume_id/ntfs/ntfs.h                   \
68         volume_id/reiserfs/reiserfs.h           \
69         volume_id/udf/udf.h                     \
70         volume_id/ufs/ufs.h                     \
71         volume_id/xfs/xfs.h                     \
72         volume_id/cramfs/cramfs.h               \
73         volume_id/dasd/dasd.h                   \
74         volume_id/volume_id.h                   \
75         volume_id/util.h
76
77 OBJS = udev_volume_id.o $(VOLUME_ID_OBJS) $(SYSFS)
78 HEADERS = $(VOLUME_ID_HEADERS)
79
80 $(OBJS): $(HEADERS)
81
82 .c.o:
83         $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
84
85 $(PROG): $(OBJS) $(HEADERS)
86         $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
87
88 clean:
89         rm -f $(PROG) $(OBJS)
90
91 spotless: clean
92
93 install: all
94         $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
95
96 uninstall:
97         - rm $(DESTDIR)$(sbindir)/$(PROG)