# Make file for cmds/libc/yp 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= 

OBJS= yp_bind.o yp_update.o yp_match.o ypprot_err.o yp_enum.o yp_order.o \
	ypv1_xdr.o yp_all.o yp_master.o ypupdate_prot_xdr.o yperrstrng.o \
	ypxdr.o

CCFLAGS= $(CFLAGS)

TARGETS = ../libc.a

#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}

#Commands used by this Makefile
CP=/usr/bin/cp
MV=/usr/bin/mv
CHMOD=/usr/bin/chmod

default: all

all: clean build install

clean:
	$(RM) -f *.o 

build: yp.libc 

yp.libc: $(TARGETS)

$(TARGETS):  $(OBJS)
	$(CP) $(TARGETS) ../libc.tmp
	$(MV) -f ../libc.tmp $(TARGETS)
	$(CHMOD) u+w $(TARGETS)
	$(ECHO) "adding to $(TARGETS)"
	ar r $(TARGETS) $(OBJS)
	$(CHMOD) 664 $(TARGETS)

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

install:
