#
# Copyright (c) 1988 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of California at Berkeley. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#	from @(#)Makefile	5.16 (Berkeley) 3/14/88
#
####
#### Updated 3/27/89 for 'dig' version 1.0 at University of Southern
#### California Information Sciences Institute (USC-ISI).
####
#### Modified & distributed with 'dig' version 2.0 from USC-ISI (9/1/90).
####
####


SRCS=	herror.c res_comp.c res_debug.c res_init.c res_mkquery.c res_query.c \
	res_send.c strcasecmp.c gethostnamadr.c sethostent.c qtime.c
OBJS=	herror.o res_comp.o res_debug.o res_init.o res_mkquery.o res_query.o \
	res_send.o strcasecmp.o gethostnamadr.o sethostent.o qtime.o
DEFS=	-DDEBUG
AR=ar crus
RANLIB=echo
DEBUG=
#DEBUG=-g
RESOLV=resolv.a
LDLIBS=-lsocket
CFLAGS=-O2 -fno-strength-reduce ${DEBUG} ${DEFS}

dig.exe: $(RESOLV) dig.c list.o Makefile options.c
	${CC} ${CFLAGS} dig.c -L. -lresolv $(LDLIBS) list.o -s -o dig.exe

$(RESOLV): ${OBJS}
	$(AR) $(RESOLV) ${OBJS}
	$(RANLIB) $(RESOLV)

.c.o:
	${CC} ${CFLAGS} -c $*.c

dig.local: dig.c list.o options.c
	${CC} ${CFLAGS} -DRESLOCAL dig.c -lresolv list.o -o dig.local

dig.dbx: libresolv.a dig.c list.o Makefile
	${CC} -g ${DEFS} dig.c -L. -lresolv list.o -o dig

clean:
	rm -f *.o errs a.out core tags

depend:
	mkdep -f Makefile.resolv ${CFLAGS} ${SRCS}



