
INCL= ../include
LIB= ../libsres
CFLAGS_EX=-I$(INCL) -I. -I../libsres -D_GNU_SOURCE 

SRC=  	val_resquery.c \
	val_support.c \
	val_cache.c \
	val_context.c \
	val_crypto.c \
	val_verify.c \
	val_parse.c \
	val_policy.c \
	val_log.c \
	val_x_query.c \
	val_assertion.c\
	val_get_rrset.c \
	val_getaddrinfo.c \
	val_gethostbyname.c \
    val_dane.c

# can't use gmake conventions to translate SRC -> OBJ for portability
OBJ=  	val_resquery.o \
	val_support.o \
	val_cache.o \
	val_context.o \
	val_crypto.o \
	val_verify.o \
	val_parse.o \
	val_policy.o \
	val_log.o \
	val_x_query.o \
	val_assertion.o\
	val_get_rrset.o \
	val_getaddrinfo.o \
	val_gethostbyname.o \
    val_dane.o

LOBJ=  	val_resquery.lo \
	val_support.lo \
	val_cache.lo \
	val_context.lo \
	val_crypto.lo \
	val_verify.lo \
	val_parse.lo \
	val_policy.lo \
	val_log.lo \
	val_x_query.lo \
	val_assertion.lo\
	val_get_rrset.lo \
	val_getaddrinfo.lo \
	val_gethostbyname.lo \
    val_dane.lo

LSRES=../libsres/libsres.la

LIBVAL=libval$(LIBVAL_SUFFIX).la

LT_DIR= .libs

all: $(LIBVAL)

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

$(LIBVAL): $(LOBJ)
	$(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES)

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