# Make file for include directory
#
# Things you might want to change.  Pass them in on the command line:
# ROOT - should point to the root where the commands will be installed
#        (e.g. /deliver/INETSVCS/indnetwk)

ROOT=

PRODUCTS=/usr/include/exportent.h \
        /usr/include/des_crypt.h

# Defaults file containing the shell, compiler options, etc
BUILDRULES=/source/NFS/$(LOGNAME)/config/defaults

include ${BUILDRULES}

MKFLAGS=ROOT=${ROOT}

MAKE=/usr/ccs/bin/make ${MKFLAGS}

#Install database name
INSTALLDB=/source/NFS/$(LOGNAME)/config/installdb

#Script called to parse the install deliverable
INSTALLSCPT=/source/NFS/$(LOGNAME)/config/install_script

default: all

all: clean build install

clean:
	@echo "Cleaning the include directory."
	@(cd sys; ${MAKE} clean)
	@(cd rpcsvc; ${MAKE} clean)
	@(cd rpc; ${MAKE} clean)

build: 
	@echo "Building the include directory."
	@(cd sys; ${MAKE} build)
	@(cd rpcsvc; ${MAKE} build)
	@(cd rpc; ${MAKE} build)

install:
	echo "Installing the include directory."
	for file in $(PRODUCTS) ; do \
		 $(INSTALLSCPT) $$file $(INSTALLDB) ; \
	done
	@(cd sys; ${MAKE} install)
	@(cd rpcsvc; ${MAKE} install)
	@(cd rpc; ${MAKE} install)
