CC=cc
CFLAGS=-O -I.

#Solaris flags
CFLAGS=-I. -DSVR4
LIBS=-lsocket -lnsl -lresolv

LHAND_SOURCES=mount_clnt.c mount_xdr.c nfs_prot_clnt.c nfs_prot_xdr.c lhand.c clnt_tcp.c pmap_getport.c sroute.c
LHAND_OBJECTS=mount_clnt.o mount_xdr.o nfs_prot_clnt.o nfs_prot_xdr.o lhand.o clnt_tcp.o pmap_getport.o sroute.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

lhand:	$(LHAND_OBJECTS)
	$(CC) -g -o lhand $(LHAND_OBJECTS) $(LIBS)

clean:
	rm -f lhand $(LHAND_OBJECTS) $(RPCGEN_MOUNT) $(RPCGEN_NFS_PROT) core

$(RPCGEN_MOUNT):; rpcgen mount.x
$(RPCGEN_NFS_PROT):; rpcgen nfs_prot.x
