~ubuntu-branches/ubuntu/lucid/loop-aes-utils/lucid-security

« back to all changes in this revision

Viewing changes to mount/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Max Vozeler
  • Date: 2008-08-22 11:57:17 UTC
  • mfrom: (8.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080822115717-v8wfa8pxwlfvyje0
Tags: 2.13.1-4
* patches/losetup_add_option_f.dpatch: 
  - Added to support "find next free loop" in losetup.
    (closes: #495682)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
include ../make_include
2
 
include ../MCONFIG
3
 
 
4
 
DEFINES = -DHAVE_NFS $(BLKID_DEFINE)
5
 
 
6
 
RPCSVCDIR = rpcsvc
7
 
RPC_CFLAGS = -Wno-unused 
8
 
RPCGEN = rpcgen
9
 
 
10
 
COMPILE = $(CC) -c $(CFLAGS) $(DEFINES)
11
 
LINK = $(CC) $(LDFLAGS)
12
 
 
13
 
SUID_PROGS = mount umount
14
 
NOSUID_PROGS = swapon losetup
15
 
MAN5 = fstab.5 nfs.5
16
 
MAN8 = mount.8 swapoff.8 swapon.8 umount.8 losetup.8
17
 
 
18
 
ifeq "$(HAVE_PIVOT_ROOT)" "yes"
19
 
NOSUID_PROGS := $(NOSUID_PROGS) pivot_root
20
 
MAN8 := $(MAN8) pivot_root.8
21
 
endif
22
 
 
23
 
ifeq "$(HAVE_BLKID)" "yes"
24
 
BLKID_DEFINE = -DHAVE_BLKID
25
 
BLKID_LIB = -lblkid -luuid
26
 
endif
27
 
 
28
 
PROGS = $(SUID_PROGS) $(NOSUID_PROGS)
29
 
 
30
 
MAYBE = pivot_root swapoff
31
 
 
32
 
LO_OBJS = lomount.o $(LIB)/xstrncpy.o
33
 
NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
34
 
GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
35
 
 
36
 
all: $(PROGS)
37
 
 
38
 
install: $(PROGS)
39
 
        $(INSTALLDIR) $(BINDIR) $(SBINDIR)
40
 
        $(INSTALLSUID) $(SUID_PROGS) $(BINDIR)
41
 
        $(INSTALLBIN) $(NOSUID_PROGS) $(SBINDIR)
42
 
        (cd $(SBINDIR); ln -sf swapon swapoff)
43
 
        $(INSTALLDIR) $(MAN5DIR) $(MAN8DIR)
44
 
        $(INSTALLMAN) $(MAN5) $(MAN5DIR)
45
 
        $(INSTALLMAN) $(MAN8) $(MAN8DIR)
46
 
 
47
 
%.o: %.c
48
 
        $(COMPILE) $<
49
 
 
50
 
mount: mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o \
51
 
       get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o \
52
 
       getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) $(LO_OBJS)
53
 
        $(LINK) $^ -o $@ $(BLKID_LIB)
54
 
 
55
 
umount: umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o \
56
 
        getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o \
57
 
        version.o $(LIB)/env.o $(LO_OBJS)
58
 
        $(LINK) $^ -o $@ $(BLKID_LIB)
59
 
 
60
 
swapon: swapon.o version.o xmalloc.o \
61
 
        get_label_uuid.o mount_by_label.o mount_blkid.o
62
 
        $(LINK) $^ -o $@ $(BLKID_LIB)
63
 
 
64
 
main_losetup.o: lomount.c
65
 
        $(COMPILE) -DMAIN lomount.c -o $@
66
 
 
67
 
losetup: main_losetup.o $(LIB)/xstrncpy.o
68
 
        $(LINK) $^ -o $@
69
 
 
70
 
mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o: sundries.h
71
 
 
72
 
mount.o umount.o fstab.o sundries.o: fstab.h
73
 
 
74
 
mount.o fstab.o mntent.o: mntent.h
75
 
 
76
 
mount.o mount_guess_fstype.o: mount_guess_fstype.h
77
 
 
78
 
mount.o: $(LIB)/setproctitle.h
79
 
 
80
 
mount.o umount.o getusername.o: getusername.h
81
 
 
82
 
mount.o umount.o losetup.o lomount.o: lomount.h loop.h my_dev_t.h
83
 
 
84
 
swapon.o: swap_constants.h swapargs.h
85
 
 
86
 
sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o: nfsmount.h
87
 
 
88
 
umount.o: mount_constants.h
89
 
 
90
 
mount.o mount_blkid.o: mount_blkid.h
91
 
 
92
 
mount.o mount_by_label.o mount_guess_fstype.o: linux_fs.h
93
 
 
94
 
sundries.o realpath.o: realpath.h
95
 
 
96
 
nfsmount_clnt.o: nfsmount_clnt.c
97
 
        $(COMPILE) $(RPC_CFLAGS) nfsmount_clnt.c
98
 
 
99
 
nfsmount_xdr.o: nfsmount_xdr.c
100
 
        $(COMPILE) $(RPC_CFLAGS) nfsmount_xdr.c
101
 
 
102
 
ifeq "$(HAVE_GOOD_RPC)" "yes"
103
 
nfsmount.h: nfsmount.x
104
 
        rm -f nfsmount.h
105
 
        $(RPCGEN) -h -o nfsmount.h nfsmount.x
106
 
 
107
 
nfsmount_xdr.c: nfsmount.x
108
 
        rm -f nfsmount_xdr.c
109
 
        $(RPCGEN) -c -o nfsmount_xdr.c nfsmount.x
110
 
 
111
 
nfsmount_clnt.c: nfsmount.x
112
 
        rm -f nfsmount_clnt.c
113
 
        $(RPCGEN) -l -o nfsmount_clnt.c nfsmount.x
114
 
else
115
 
nfsmount.h:
116
 
        cp $(RPCSVCDIR)/nfsmount.h .
117
 
 
118
 
nfsmount_xdr.c:
119
 
        cp $(RPCSVCDIR)/nfsmount_xdr.c .
120
 
 
121
 
nfsmount_clnt.c:
122
 
        cp $(RPCSVCDIR)/nfsmount_clnt.c .
123
 
endif
124
 
 
125
 
nfsmount.o: nfs_mount4.h
126
 
 
127
 
swapargs.h:
128
 
        sh swap.configure
129
 
 
130
 
clean:
131
 
        rm -f a.out core *~ *.o swapargs.h $(PROGS) $(MAYBE)
132
 
        rm -f nfs_mountversion.h
133
 
 
134
 
clobber distclean realclean: clean
135
 
        rm -f $(GEN_FILES)