#
# Sun RPC is a product of Sun Microsystems, Inc. and is provided for
# unrestricted use provided that this legend is included on all tape
# media and as a part of the software program in whole or part.  Users
# may copy or modify Sun RPC without charge, but are not authorized
# to license or distribute it to anyone else except as part of a product or
# program developed by the user or with the express written consent of
# Sun Microsystems, Inc.
#
# SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
# WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
# PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
#
# Sun RPC is provided with no support and without any obligation on the
# part of Sun Microsystems, Inc. to assist in its use, correction,
# modification or enhancement.
#
# SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
# INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
# OR ANY PART THEREOF.
#
# In no event will Sun Microsystems, Inc. be liable for any lost revenue
# or profits or other special, indirect and consequential damages, even if
# Sun has been advised of the possibility of such damages.
#
# Sun Microsystems, Inc.
# 2550 Garcia Avenue
# Mountain View, California  94043
#
# @(#)Makefile 1.35 91/03/11 TIRPC 1.0 <MODIFIED>
#
# Copyright (c) 1988, 1989, 1990 by Sun Microsystems, Inc.
#
# To build and install Transport Independent RPC (TI RPC).
#
#
DESTDIR=/usr/onctk
#
# These can be built without an install having been done.
#
all:
	cd tirpc;	$(MAKE) -e all
	cd rpcgen;	$(MAKE) -e all
	cd n2a;		$(MAKE) -e all
	cd rpcsvc;	$(MAKE) -e all
	cd doc;		$(MAKE) -e all
#
# The RPC library (librpc) must be installed before the programs that link
# with it can be built.  All binaries that link with librpc must have
# LD_LIBRARY_PATH set as shown below during their build.
#
# Note the exeption to the DESTDIR convention for the install directory.
#
install:	$(DESTDIR) FORCE
	cd tirpc;	$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd rpcgen;	$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd rpcgen.new;	$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd rpcsvc;	$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd n2a;		$(MAKE) -e install DESTDIR=$(DESTDIR)
	LD_LIBRARY_PATH=$(DESTDIR)/lib; export LD_LIBRARY_PATH; \
	cd rpcbind;	$(MAKE) -e install DESTDIR=$(DESTDIR); cd ..;\
	cd rpcinfo;	$(MAKE) -e install DESTDIR=$(DESTDIR); cd ..;\
	cd services;	$(MAKE) -e install DESTDIR=$(DESTDIR); cd ..;\
	cd keyserv;	$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd sys;		$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd man;		$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd etc;		$(MAKE) -e install DESTDIR=$(DESTDIR)
	cd install;     $(MAKE) -e install DESTDIR=$(DESTDIR)

$(DESTDIR):
	-mkdir $@

international:
	@echo "Internationalization is not supported in this release"

clean:
	cd tirpc;	$(MAKE) -e clean
	cd rpcgen;	$(MAKE) -e clean
	cd n2a;		$(MAKE) -e clean
	cd rpcsvc;	$(MAKE) -e clean
	cd rpcbind;	$(MAKE) -e clean
	cd rpcinfo;	$(MAKE) -e clean
	cd services;	$(MAKE) -e clean
	cd keyserv;	$(MAKE) -e clean
	cd demo;	$(MAKE) -e clean
	cd doc;		$(MAKE) -e clean
	cd sys;         $(MAKE) -e clean

#
# The tirpc and n2a libraries must be installed before building the demos
#
demo:	FORCE
	cd demo;	$(MAKE) -e

FORCE:
