-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
73 lines (59 loc) · 1.98 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Makefile
#
#
# Copyright (c) 1990-1998 by Leendert van Doorn <leendert@paramecium.org>
# Copyright (c) 2013 by Michael Brown, Net Direct <michael@netdirect.ca>
#
# For solaris 2.x you need
# CFLAGS=-DSYSV
# LIBS=-lsocket -L/usr/ucblib -R/usr/ucblib -lrpcsoc -lnsl
#
# For AIX you need
# CFLAGS=-DAIX
# LIBS=
#
# For Linux you need (don't use the GNU lines below)
# CFLAGS=-DREADLINE -I/usr/local/include
# LIBS=-L/usr/local/lib -lreadline -lhistory -lncurses
#
# For GNU readline support you need to add
# CFLAGS=-DREADLINE -I/usr/local/include
# LIBS=-L/usr/local/lib -lreadline -lhistory -ltermlib
#
# uncomment the following 4 lines for Solaris 2.x
#CC = gcc
#CFLAGS = -DSYSV -DREADLINE -I/usr/local/include
#LIBS = -lsocket -L/usr/ucblib -R/usr/ucblib -lrpcsoc -lnsl \
# -L/usr/local/lib -lreadline -lhistory -ltermlib
# uncomment the following 3 lines for AIX
#CC = gcc
#CFLAGS = -DAIX
#LIBS =
# uncomment the following 3 lines for linux (tested on 2.0.33/redhat 5)
CC = gcc
CFLAGS = -g -DREADLINE -I/usr/local/include
LIBS = -L/usr/local/lib -lreadline -lhistory -lncurses
RPCGEN = rpcgen
RGFLAGS = -C
NFS_OBJECTS = mount_clnt.o mount_xdr.o nfs_prot_clnt.o nfs_prot_xdr.o nfsshell.o
STEAL_OBJECTS = steal.o nfs_prot_clnt.o nfs_prot_xdr.o
RPCGEN_MOUNT = mount.h mount_clnt.c mount_svc.c mount_xdr.c
RPCGEN_NFS_PROT = nfs_prot.h nfs_prot_clnt.c nfs_prot_svc.c nfs_prot_xdr.c
nfsshell: $(NFS_OBJECTS)
$(CC) -g -o nfsshell $(NFS_OBJECTS) $(LIBS)
steal: $(STEAL_OBJECTS)
$(CC) -g -o steal $(STEAL_OBJECTS) $(LIBS)
lint-nfs:
lint nfsshell.c mount_clnt.c mount_xdr.c
lint-steal:
lint steal.c nfs_prot_clnt.c nfs_prot_xdr.c
tar: clean
(cd ..; tar cvf nfsshell.tar nfs; gzip -9f nfsshell.tar; \
uuencode nfsshell.tar.gz < nfsshell.tar.gz > nfsshell.tar.gz.uue)
clean:
rm -f nfsshell steal $(NFS_OBJECTS) $(STEAL_OBJECTS)
clobber: clean
rm -f $(RPCGEN_MOUNT) $(RPCGEN_NFS_PROT)
$(RPCGEN_MOUNT):; $(RPCGEN) $(RGFLAGS) mount.x
$(RPCGEN_NFS_PROT):; $(RPCGEN) $(RGFLAGS) nfs_prot.x