1 include ..
/make_include
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 PROGS
= $(SUID_PROGS
) $(NOSUID_PROGS
)
25 MAYBE
= pivot_root swapoff
27 LO_OBJS
= lomount.o
$(LIB
)/xstrncpy.o
28 NFS_OBJS
= nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
29 GEN_FILES
= nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
34 $(INSTALLDIR
) $(BINDIR
) $(SBINDIR
)
35 $(INSTALLSUID
) $(SUID_PROGS
) $(BINDIR
)
36 $(INSTALLBIN
) $(NOSUID_PROGS
) $(SBINDIR
)
37 (cd
$(SBINDIR
); ln
-sf swapon swapoff
)
38 $(INSTALLDIR
) $(MAN5DIR
) $(MAN8DIR
)
39 $(INSTALLMAN
) $(MAN5
) $(MAN5DIR
)
40 $(INSTALLMAN
) $(MAN8
) $(MAN8DIR
)
45 mount
: mount.o fstab.o sundries.o realpath.o mntent.o version.o \
46 mount_guess_fstype.o mount_by_label.o getusername.o \
47 $(LIB
)/setproctitle.o
$(NFS_OBJS
) $(LO_OBJS
)
50 umount
: umount.o fstab.o sundries.o realpath.o mntent.o getusername.o \
54 swapon
: swapon.o version.o
57 main_losetup.o
: lomount.c
58 $(COMPILE
) -DMAIN lomount.c
-o
$@
60 losetup
: main_losetup.o
$(LIB
)/xstrncpy.o
63 mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o
: sundries.h
65 mount.o umount.o fstab.o sundries.o
: fstab.h
67 mount.o fstab.o mntent.o
: mntent.h
69 mount.o mount_guess_fstype.o
: mount_guess_fstype.h
71 mount.o
: $(LIB
)/setproctitle.h
73 mount.o umount.o getusername.o
: getusername.h
75 mount.o umount.o losetup.o lomount.o
: lomount.h loop.h
77 swapon.o
: swap_constants.h swapargs.h
79 sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
: nfsmount.h
81 umount.o
: mount_constants.h
83 mount.o mount_by_label.o mount_guess_fstype.o
: linux_fs.h
85 sundries.o realpath.o
: realpath.h
87 nfsmount_clnt.o
: nfsmount_clnt.c
88 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_clnt.c
90 nfsmount_xdr.o
: nfsmount_xdr.c
91 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_xdr.c
93 ifeq "$(HAVE_GOOD_RPC)" "yes"
94 nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
: nfsmount.x
95 rm -f nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
96 $(RPCGEN
) -h
-o nfsmount.h nfsmount.x
97 $(RPCGEN
) -c
-o nfsmount_xdr.c nfsmount.x
98 $(RPCGEN
) -l
-o nfsmount_clnt.c nfsmount.x
100 nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
:
101 cp
$(RPCSVCDIR
)/nfsmount.h .
102 cp
$(RPCSVCDIR
)/nfsmount_xdr.c .
103 cp
$(RPCSVCDIR
)/nfsmount_clnt.c .
106 nfsmount.o
: nfs_mount4.h
115 rm -f a.out core
*~
*.o swapargs.h
$(PROGS
) $(MAYBE
)
116 rm -f loop.h nfs_mountversion.h
118 clobber distclean realclean: clean