2 exec_prefix = @
exec_prefix@
4 includedir = @
includedir@
7 INSTALLCMD
= @
install@
-c
9 ENABLE_EXAMPLES
=@ENABLE_EXAMPLES@
12 CFLAGS
=@CFLAGS@
-g
-O0
-fPIC
-Wall
-W
-I.
-Iinclude
-Imount
-Infs
-Iportmap
-Irquota
"-D_U_=__attribute__((unused))" -D_FILE_OFFSET_BITS
=64
17 ifeq ("$(is_darwin)","yes")
18 LIBNFS_SO_NAME
=libnfs
.1.dylib
19 LIBNFS_SO
=lib
/libnfs.
$(VERSION
).dylib
20 LDFLAGS
+=@CFLAGS@
-dynamiclib
21 RPCGEN_DEF
=-DU_INT64_PLATTFORM_TYPE
="u_int64_t"
23 LIBNFS_SO_NAME
=libnfs.so
.1
24 LIBNFS_SO
=lib
/libnfs.so.
$(VERSION
)
25 LDFLAGS
+=@CFLAGS@
-shared
-Wl
,-soname
=$(LIBNFS_SO_NAME
)
28 LIB_OBJS
= lib
/pdu.o lib
/init.o lib
/socket.o \
29 lib
/libnfs.o lib
/libnfs-sync.o
32 mount
/libnfs-raw-mount.o mount
/mount.o \
33 portmap
/libnfs-raw-portmap.o portmap
/portmap.o \
34 nfs
/libnfs-raw-nfs.o nfs
/nfs.o \
35 rquota
/libnfs-raw-rquota.o rquota
/rquota.o
37 ifeq ("$(ENABLE_EXAMPLES)","yes")
38 EXAMPLES
=bin
/nfsclient-raw bin
/nfsclient-async bin
/nfsclient-sync bin
/nfsclient-bcast bin
/nfsclient-listservers
41 all: $(LIBNFS_SO
) $(EXAMPLES
)
43 bin
/nfsclient-async
: examples
/nfsclient-async.c
$(LIBNFS_A
)
45 $(CC
) $(CFLAGS
) -o
$@ examples
/nfsclient-async.c
$(LIBNFS_A
) $(LIBS
)
47 bin
/nfsclient-sync
: examples
/nfsclient-sync.c
$(LIBNFS_A
)
49 $(CC
) $(CFLAGS
) -o
$@ examples
/nfsclient-sync.c
$(LIBNFS_A
) $(LIBS
)
51 bin
/nfsclient-raw
: examples
/nfsclient-raw.c
$(LIBNFS_A
)
53 $(CC
) $(CFLAGS
) -o
$@ examples
/nfsclient-raw.c
$(LIBNFS_A
) $(LIBS
)
55 bin
/nfsclient-bcast
: examples
/nfsclient-bcast.c
$(LIBNFS_A
)
57 $(CC
) $(CFLAGS
) -o
$@ examples
/nfsclient-bcast.c
$(LIBNFS_A
) $(LIBS
)
59 bin
/nfsclient-listservers
: examples
/nfsclient-listservers.c
$(LIBNFS_A
)
61 $(CC
) $(CFLAGS
) -o
$@ examples
/nfsclient-listservers.c
$(LIBNFS_A
) $(LIBS
)
63 $(LIBNFS_A
): $(LIBNFS_OBJS
) $(LIB_OBJS
)
64 @echo Creating library
$@
65 ar r
$(LIBNFS_A
) $(LIBNFS_OBJS
) $(LIB_OBJS
)
68 $(LIBNFS_SO
): $(LIBNFS_OBJS
) $(LIB_OBJS
)
69 @echo Creating shared library
$@
70 $(CC
) $(LDFLAGS
) -o
$@
$(LIBNFS_OBJS
) $(LIB_OBJS
)
72 portmap
/libnfs-raw-portmap.h
: portmap
/portmap.x
74 rpcgen
$(RPCGEN_DEF
) -h portmap
/portmap.x
> portmap
/libnfs-raw-portmap.h
76 portmap
/libnfs-raw-portmap.c
: portmap
/portmap.x
78 rpcgen
$(RPCGEN_DEF
) -c portmap
/portmap.x | sed
-e
"s/#include \".*portmap.h\"/#include \"libnfs-raw-portmap.h\"/" > portmap
/libnfs-raw-portmap.c
80 portmap
/libnfs-raw-portmap.o
: portmap
/libnfs-raw-portmap.c portmap
/libnfs-raw-portmap.h
82 $(CC
) $(CFLAGS
) -c portmap
/libnfs-raw-portmap.c
-o
$@
84 mount
/libnfs-raw-mount.h
: mount
/mount.x
86 rpcgen
$(RPCGEN_DEF
) -h mount
/mount.x
> mount
/libnfs-raw-mount.h
88 mount
/libnfs-raw-mount.c
: mount
/mount.x
90 rpcgen
$(RPCGEN_DEF
) -c mount
/mount.x | sed
-e
"s/#include \".*mount.h\"/#include \"libnfs-raw-mount.h\"/" > mount
/libnfs-raw-mount.c
92 mount
/libnfs-raw-mount.o
: mount
/libnfs-raw-mount.c mount
/libnfs-raw-mount.h
94 $(CC
) $(CFLAGS
) -c mount
/libnfs-raw-mount.c
-o
$@
96 nfs
/libnfs-raw-nfs.h
: nfs
/nfs.x
98 rpcgen
$(RPCGEN_DEF
) -h nfs
/nfs.x
> nfs
/libnfs-raw-nfs.h
100 nfs
/libnfs-raw-nfs.c
: nfs
/nfs.x
102 rpcgen
$(RPCGEN_DEF
) -c nfs
/nfs.x | sed
-e
"s/#include \".*nfs.h\"/#include \"libnfs-raw-nfs.h\"/" > nfs
/libnfs-raw-nfs.c
104 nfs
/libnfs-raw-nfs.o
: nfs
/libnfs-raw-nfs.c nfs
/libnfs-raw-nfs.h
106 $(CC
) $(CFLAGS
) -c nfs
/libnfs-raw-nfs.c
-o
$@
108 rquota
/libnfs-raw-rquota.h
: rquota
/rquota.x
110 rpcgen
$(RPCGEN_DEF
) -h rquota
/rquota.x
> rquota
/libnfs-raw-rquota.h
112 rquota
/libnfs-raw-rquota.c
: rquota
/rquota.x
114 rpcgen
$(RPCGEN_DEF
) -c rquota
/rquota.x | sed
-e
"s/#include \".*rquota.h\"/#include \"libnfs-raw-rquota.h\"/" > rquota
/libnfs-raw-rquota.c
116 rquota
/libnfs-raw-rquota.o
: rquota
/libnfs-raw-rquota.c rquota
/libnfs-raw-rquota.h
118 $(CC
) $(CFLAGS
) -c rquota
/libnfs-raw-rquota.c
-o
$@
120 install: $(LIBNFS_A
) $(LIBNFS_SO
)
121 mkdir
-p
$(DESTDIR
)$(libdir)
122 $(INSTALLCMD
) -m
755 $(LIBNFS_SO
) $(DESTDIR
)$(libdir)
123 $(INSTALLCMD
) -m
755 $(LIBNFS_A
) $(DESTDIR
)$(libdir)
125 mkdir
-p
$(DESTDIR
)$(includedir)/nfsc
126 $(INSTALLCMD
) -m
644 include/libnfs.h
$(DESTDIR
)$(includedir)/nfsc
127 $(INSTALLCMD
) -m
644 include/libnfs-private.h
$(DESTDIR
)$(includedir)/nfsc
128 $(INSTALLCMD
) -m
644 mount
/libnfs-raw-mount.h
$(DESTDIR
)$(includedir)/nfsc
129 $(INSTALLCMD
) -m
644 nfs
/libnfs-raw-nfs.h
$(DESTDIR
)$(includedir)/nfsc
130 $(INSTALLCMD
) -m
644 portmap
/libnfs-raw-portmap.h
$(DESTDIR
)$(includedir)/nfsc
133 rm -f config.h config.log config.status configure Makefile
137 rm -f lib
/*.o lib
/*.a
$(LIBNFS_SO
)
138 rm -f mount
/*.o mount
/libnfs-raw-mount.h mount
/libnfs-raw-mount.c
139 rm -f nfs
/*.o nfs
/libnfs-raw-nfs.h nfs
/libnfs-raw-nfs.c
140 rm -f portmap
/*.o portmap
/libnfs-raw-portmap.h portmap
/libnfs-raw-portmap.c
141 rm -f rquota
/*.o rquota
/libnfs-raw-rquota.h rquota
/libnfs-raw-rquota.c
142 rm -f nfsclient-raw nfsclient-async nfsclient-sync