# Make file for cmds/usr.etc/yp/mknetid 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/NFS/indnetwk)

ROOT=

PRODUCTS= /usr/sbin/mknetid

INCLUDES= -I/source/NFS/$(LOGNAME)/include -I/usr/include

CCFLAGS= $(INCLUDES) $(CFLAGS)

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

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

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

include ${BUILDRULES}

default: all

all: clean build install

clean: 
	$(RM) -f *.o
	$(RM) -f mknetid

build: mknetid

mknetid: getname.o
	$(ECHO) "Building mknetid..."
	$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ mknetid.c getname.o $(RPCSVC_LIB) $(MP_LIB)

getname.o:  getname.c
	$(CC) $(CCFLAGS) $(LDFLAGS) -c getname.c $(RPCSVC_LIB) $(MP_LIB)

install:
	for file in $(PRODUCTS) ; do \
	$(INSTALLSCPT) $$file $(INSTALLDB) ;  \
	done
 
