# the resulting Makefile is built from  TOPSRCDIR/Makefile.top and Makefile.in

SRC=	ns_name.c	\
    ns_netint.c \
	res_support.c	\
	res_debug.c	\
	nsap_addr.c \
	ns_print.c	\
	base64.c	\
	ns_samedomain.c	\
	ns_parse.c	\
	ns_ttl.c	\
	res_comp.c	\
	res_mkquery.c 	\
	res_io_manager.c \
	res_tsig.c	\
	res_query.c	

# can't use gmake conventions to translate SRC -> OBJ for portability
OBJ=	ns_name.o	\
    ns_netint.o \
	res_support.o	\
	res_debug.o	\
	nsap_addr.o \
	ns_print.o	\
	base64.o	\
	ns_samedomain.o	\
	ns_parse.o	\
	ns_ttl.o	\
	res_comp.o	\
	res_mkquery.o 	\
	res_io_manager.o \
	res_tsig.o	\
	res_query.o	

LOBJ=	ns_name.lo	\
    ns_netint.lo \
	res_support.lo	\
	res_debug.lo	\
	nsap_addr.lo \
	ns_print.lo	\
	base64.lo	\
	ns_samedomain.lo \
	ns_parse.lo	\
	ns_ttl.lo	\
	res_comp.lo	\
	res_mkquery.lo 	\
	res_io_manager.lo \
	res_tsig.lo	\
	res_query.lo	

LIBRES= libsres.la

INCLUDE= ../include
CFLAGS_EX=-I$(INCLUDE)

LT_DIR= .libs

all: $(LIBRES)

clean:
	$(RM) -f $(OBJ) $(LOBJ) $(LIBRES) $(LIBSRESSO)
	$(RM) -rf $(LT_DIR)

$(LIBRES): $(LOBJ)
	$(LIBTOOLLD) -o $@ $(LOBJ) 

install:
	$(MKPATH) $(DESTDIR)$(libdir)
	$(LIBTOOLIN) $(LIBRES) $(DESTDIR)$(libdir)
	$(LIBTOOLFN) $(DESTDIR)$(libdir)
	$(MKPATH) $(DESTDIR)$(includedir)
	$(INSTALL) -m 644 ../include/validator/resolver.h \
	  $(DESTDIR)$(includedir)
