1 include ..
/make_include
4 CFLAGS
= -I
$(LIB
) $(OPT
)
5 WARNFLAGS
= -Wall
-Wstrict-prototypes
-Wmissing-prototypes
9 RPC_CFLAGS
= -Wno-unused
12 COMPILE
= $(CC
) -c
$(WARNFLAGS
) $(CFLAGS
) $(DEFINES
)
13 LINK
= $(CC
) $(LDFLAGS
)
15 SUID_PROGS
= mount umount
16 NOSUID_PROGS
= swapon losetup
17 PROGS
= $(SUID_PROGS
) $(NOSUID_PROGS
)
19 MAN8
= mount
.8 swapoff
.8 swapon
.8 umount
.8 losetup
.8
21 # comment these out if you are not compiling in NFS support
22 NFS_OBJS
= nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
23 # uncomment this if you don't have libc-4.2 but do have the rpclib
24 GEN_FILES
= nfsmount.x nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
26 # comment these out if you are not compiling in loop support
32 $(INSTALLDIR
) $(BINDIR
) $(SBINDIR
)
33 $(INSTALLSUID
) -s
$(SUID_PROGS
) $(BINDIR
)
34 $(INSTALLBIN
) -s
$(NOSUID_PROGS
) $(SBINDIR
)
35 (cd
$(SBINDIR
); ln
-sf swapon swapoff
)
36 $(INSTALLDIR
) $(MAN5DIR
) $(MAN8DIR
)
37 $(INSTALLMAN
) $(MAN5
) $(MAN5DIR
)
38 $(INSTALLMAN
) $(MAN8
) $(MAN8DIR
)
43 mount
: mount.o fstab.o sundries.o realpath.o mntent.o version.o \
44 mount_guess_fstype.o mount_by_label.o getusername.o \
45 $(LIB
)/setproctitle.o
$(NFS_OBJS
) $(LO_OBJS
)
48 umount
: umount.o fstab.o sundries.o realpath.o mntent.o getusername.o \
52 swapon
: swapon.o version.o
58 mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o
: sundries.h
60 mount.o umount.o fstab.o sundries.o
: fstab.h
62 mount.o fstab.o mntent.o
: mntent.h
64 mount.o mount_guess_fstype.o
: mount_guess_fstype.h
66 mount.o
: $(LIB
)/setproctitle.h
68 mount.o umount.o getusername.o
: getusername.h
70 mount.o umount.o losetup.o lomount.o
: lomount.h loop.h
72 swapon.o
: swap_constants.h swapargs.h
74 sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
: nfsmount.h
76 umount.o
: mount_constants.h
78 mount.o mount_by_label.o mount_guess_fstype.o
: linux_fs.h
80 sundries.o realpath.o
: realpath.h
82 nfsmount_clnt.o
: nfsmount_clnt.c
83 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_clnt.c
85 nfsmount_xdr.o
: nfsmount_xdr.c
86 $(COMPILE
) $(RPC_CFLAGS
) nfsmount_xdr.c
88 # rpcgen generates files that do not compile - use the pregenerated ones
89 # nfsmount.h nfsmount_xdr.c nfsmount_clnt.c: nfsmount.x
90 # rm -f nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
91 # $(RPCGEN) -h -o nfsmount.h nfsmount.x
92 # $(RPCGEN) -c -o nfsmount_xdr.c nfsmount.x
93 # $(RPCGEN) -l -o nfsmount_clnt.c nfsmount.x
96 cp
$(RPCSVCDIR
)/nfsmount.x .
98 nfsmount.o
: nfs_mountversion.h nfs_mount3.h
100 NFSMOUNTH
=/usr
/include/linux
/nfs_mount.h
103 rm -f nfs_mountversion.h
104 if
[ -f
$(NFSMOUNTH
) ]; then \
105 grep NFS_MOUNT_VERSION
$(NFSMOUNTH
) \
106 | sed
-e
's/NFS/KERNEL_NFS/'; \
108 echo
'#define KERNEL_NFS_MOUNT_VERSION 0'; \
109 fi
> nfs_mountversion.h
118 rm -f a.out core
*~
*.o swapargs.h
$(PROGS
) swapoff
119 rm -f loop.h nfs_mountversion.h
121 clobber distclean realclean: clean