# Make file for bind/res 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=

SRC             = gethost.c \
                  herror.c \
                  res_comp.c res_debug.c res_init.c \
                  res_mkqry.c res_query.c res_send.c _res.c

INCLUDES=-I../include /usr/include

LIBRESOLV       = gethost.o herror.o res_comp.o res_debug.o res_init.o \
                  res_mkqry.o res_query.o res_send.o _res.o

CCFLAGS=$(INCLUDES) -DHP_NFS $(CFLAGS)

#Commands used by this Makefile
AR=/usr/ccs/bin/ar

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

include ${BUILDRULES}

default: all

all: clean build install

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

gethost.o: named/gethost.c
	$(CC) $(CCFLAGS) -c named/gethost.c
clean:
	$(RM) -f *.o
	$(RM) -f *.b
	$(RM) -f a.out
	$(RM) -f libresolv.a

build: libresolv.a 

libresolv.a: $(LIBRESOLV)
	$(AR) cru $@ $(LIBRESOLV)

install:
