#
#	System V NFS - Release 3.2/V3
#
#	Copyright 1986, 1987, 1988 Lachman Associates, Incorporated (LAI)
#
#	All Rights Reserved.
#
#	The copyright above and this notice must be preserved in all
#	copies of this source code.  The copyright above does not
#	evidence any actual or intended publication of this source
#	code.
#
#	This is unpublished proprietary trade secret source code of
#	Lachman Associates.  This source code may not be copied,
#	disclosed, distributed, demonstrated or licensed except as
#	expressly authorized by Lachman Associates.
#
#
#      @(#)showmount.mk	3.6 LAI System V NFS Release 3.2/V3	source

#	Makefile for showmount


ROOT=
INCRT=$(ROOT)/usr/include
BROOT=$(ROOT)
INSDIR=$(BROOT)/etc
ITCPSYS=$(INCRT)
ITCPHEAD=$(INCRT)
INFSSYS=$(INCRT)
INFSHEAD=$(INCRT)
DASHH=
DASHO=-O
CFLAGS=$(DASHH) $(DASHO) $(MORECPP) -I$(INCRT)

#SOCKLIB = -lsock	# SUNXPRT
#SOCKLIB = -lsocket	# LAI Streams TCP/IP Product
SOCKLIB = -lbsd	# Opus BSD library
RPCLIB = -lrpc
RPCSVCLIB = -lrpcsvc
YPLIB = -lyp
LDLIBS = $(RPCLIB) $(RPCSVCLIB) $(YPLIB) $(SOCKLIB)
LDFLAGS = $(LDLIBS)

STRIP = strip

SIZE = size

MAKEFILE = showmount.mk

MAINS = showmount

OBJECTS =  showmount.o

SOURCES =  showmount.o

ALL:		$(MAINS)

showmount:	$(OBJECTS)
	$(CC) -o showmount $(OBJECTS) $(LDFLAGS)

showmount.o:	$(INCRT)/stdio.h \
	$(INFSHEAD)/rpc/rpc.h \
	$(INFSHEAD)/rpc/netdb.h \
	$(INFSSYS)/sys/fs/nfs/time.h \
	$(INCRT)/sys/errno.h \
	$(INFSSYS)/sys/fs/nfs/nfs.h \
	$(INFSHEAD)/rpcsvc/mount.h

GLOBALINCS = $(INCRT)/stdio.h \
	$(INFSHEAD)/rpc/rpc.h \
	$(INFSHEAD)/rpc/netdb.h \
	$(INFSSYS)/sys/fs/nfs/time.h \
	$(INCRT)/sys/errno.h \
	$(INFSSYS)/sys/fs/nfs/nfs.h \
	$(INFSHEAD)/rpcsvc/mount.h

clean:
	rm -f $(OBJECTS)

clobber: clean
	rm -f $(MAINS)

newmakefile:
	makefile -m -f $(MAKEFILE)  -s INCRT $(INCRT)
#bottom#

all : ALL

install: ALL
	cpset $(MAINS) $(INSDIR)

size: ALL
	$(SIZE) $(MAINS)

strip: ALL
	$(STRIP) $(MAINS)

#	These targets are useful but optional

partslist:
	@echo $(MAKEFILE) $(SOURCES) $(LOCALINCS)  |  tr ' ' '\012'  |  sort

productdir:
	@echo $(INSDIR) | tr ' ' '\012' | sort

product:
	@echo $(MAINS)  |  tr ' ' '\012'  | \
	sed 's;^;$(INSDIR)/;'

srcaudit:
	@fileaudit $(MAKEFILE) $(LOCALINCS) $(SOURCES) -o $(OBJECTS) $(MAINS)
