1 include ..
/make_include
4 DEFINES
= -DHAVE_NFS
$(BLKID_DEFINE
)
7 RPC_CFLAGS
= -Wno-unused
10 COMPILE
= $(CC
) -c
$(CFLAGS
) $(DEFINES
)
11 LINK
= $(CC
) $(LDFLAGS
)
13 SUID_PROGS
= mount umount
14 NOSUID_PROGS
= swapon losetup
16 MAN8
= mount
.8 swapoff
.8 swapon
.8 umount
.8 losetup
.8
18 ifeq "$(HAVE_PIVOT_ROOT)" "yes"
19 NOSUID_PROGS
:= $(NOSUID_PROGS
) pivot_root
20 MAN8
:= $(MAN8
) pivot_root
.8
23 ifeq "$(HAVE_BLKID)" "yes"
24 BLKID_DEFINE
= -DHAVE_BLKID
25 BLKID_LIB
= -lblkid
-luuid
28 PROGS
= $(SUID_PROGS
) $(NOSUID_PROGS
)
30 MAYBE
= pivot_root swapoff
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
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
)
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
)
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
)
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
)
64 main_losetup.o
: lomount.c
65 $(COMPILE
) -DMAIN lomount.c
-o
$@
67 losetup
: main_losetup.o
$(LIB
)/xstrncpy.o
70 mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o
: sundries.h
72 mount.o umount.o fstab.o sundries.o
: fstab.h
74 mount.o fstab.o mntent.o
: mntent.h
76 mount.o mount_guess_fstype.o
: mount_guess_fstype.h
78 mount.o
: $(LIB
)/setproctitle.h
80 mount.o umount.o getusername.o
: getusername.h
82 mount.o umount.o losetup.o lomount.o
: lomount.h loop.h my_dev_t.h
84 swapon.o
: swap_constants.h swapargs.h
86 sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
: nfsmount.h
88 umount.o
: mount_constants.h
90 mount.o mount_blkid.o
: mount_blkid.h
92 mount.o mount_by_label.o mount_guess_fstype.o
: linux_fs.h
94 sundries.o realpath.o
: realpath.h
96 nfsmount_clnt.o
: nfsmount_clnt.c
97 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_clnt.c
99 nfsmount_xdr.o
: nfsmount_xdr.c
100 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_xdr.c
102 ifeq "$(HAVE_GOOD_RPC)" "yes"
103 nfsmount.h
: nfsmount.x
105 $(RPCGEN
) -h
-o nfsmount.h nfsmount.x
107 nfsmount_xdr.c
: nfsmount.x
109 $(RPCGEN
) -c
-o nfsmount_xdr.c nfsmount.x
111 nfsmount_clnt.c
: nfsmount.x
112 rm -f nfsmount_clnt.c
113 $(RPCGEN
) -l
-o nfsmount_clnt.c nfsmount.x
116 cp
$(RPCSVCDIR
)/nfsmount.h .
119 cp
$(RPCSVCDIR
)/nfsmount_xdr.c .
122 cp
$(RPCSVCDIR
)/nfsmount_clnt.c .
125 nfsmount.o
: nfs_mount4.h
131 rm -f a.out core
*~
*.o swapargs.h
$(PROGS
) $(MAYBE
)
132 rm -f nfs_mountversion.h
134 clobber distclean realclean: clean