# Make file for cmds/usr.etc/yp/revnetgroup 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/revnetgroup

SRCS=	revnetgrp.c getgroup.c table.c util.c

OBJS=	revnetgrp.o getgroup.o table.o util.o

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 revnetgroup

.c.o:
	$(CC) $(CCFLAGS) -c $*.c

build: revnetgroup

revnetgroup: $(OBJS)
	$(ECHO) "Building revnetgroup..."
	$(CC) $(CCFLAGS) $(LDFLAGS) -o revnetgroup $(OBJS)

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