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 # comment these out if you are not compiling in NFS support
28 NFS_OBJS
= nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
29 # uncomment this if you don't have libc-4.2 but do have the rpclib
30 GEN_FILES
= nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
32 # comment these out if you are not compiling in loop support
38 $(INSTALLDIR
) $(BINDIR
) $(SBINDIR
)
39 $(INSTALLSUID
) $(SUID_PROGS
) $(BINDIR
)
40 $(INSTALLBIN
) $(NOSUID_PROGS
) $(SBINDIR
)
41 (cd
$(SBINDIR
); ln
-sf swapon swapoff
)
42 $(INSTALLDIR
) $(MAN5DIR
) $(MAN8DIR
)
43 $(INSTALLMAN
) $(MAN5
) $(MAN5DIR
)
44 $(INSTALLMAN
) $(MAN8
) $(MAN8DIR
)
49 mount
: mount.o fstab.o sundries.o realpath.o mntent.o version.o \
50 mount_guess_fstype.o mount_by_label.o getusername.o \
51 $(LIB
)/setproctitle.o
$(NFS_OBJS
) $(LO_OBJS
)
54 umount
: umount.o fstab.o sundries.o realpath.o mntent.o getusername.o \
58 swapon
: swapon.o version.o
62 $(COMPILE
) -DMAIN lomount.c
-o
$@
67 mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o
: sundries.h
69 mount.o umount.o fstab.o sundries.o
: fstab.h
71 mount.o fstab.o mntent.o
: mntent.h
73 mount.o mount_guess_fstype.o
: mount_guess_fstype.h
75 mount.o
: $(LIB
)/setproctitle.h
77 mount.o umount.o getusername.o
: getusername.h
79 mount.o umount.o losetup.o lomount.o
: lomount.h loop.h
81 swapon.o
: swap_constants.h swapargs.h
83 sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
: nfsmount.h
85 umount.o
: mount_constants.h
87 mount.o mount_by_label.o mount_guess_fstype.o
: linux_fs.h
89 sundries.o realpath.o
: realpath.h
91 nfsmount_clnt.o
: nfsmount_clnt.c
92 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_clnt.c
94 nfsmount_xdr.o
: nfsmount_xdr.c
95 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_xdr.c
97 ifeq "$(HAVE_GOOD_RPC)" "yes"
98 nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
: nfsmount.x
99 rm -f nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
100 $(RPCGEN
) -h
-o nfsmount.h nfsmount.x
101 $(RPCGEN
) -c
-o nfsmount_xdr.c nfsmount.x
102 $(RPCGEN
) -l
-o nfsmount_clnt.c nfsmount.x
104 nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
:
105 cp
$(RPCSVCDIR
)/nfsmount.h .
106 cp
$(RPCSVCDIR
)/nfsmount_xdr.c .
107 cp
$(RPCSVCDIR
)/nfsmount_clnt.c .
110 nfsmount.o
: nfs_mount4.h
119 rm -f a.out core
*~
*.o swapargs.h
$(PROGS
) $(MAYBE
)
120 rm -f loop.h nfs_mountversion.h
122 clobber distclean realclean: clean