# Copyright (C) 1999-2001  Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

# $Id: Makefile.in,v 1.15.4.1 2001/01/09 22:52:51 bwelling Exp $

srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

@BIND9_VERSION@

@LIBOMAPI_API@

@BIND9_INCLUDES@

CINCLUDES =	-I./include \
		-I${srcdir}/include \
		${DNS_INCLUDES} \
		${ISC_INCLUDES}

CDEFINES =
CWARNINGS =

# Alphabetically
OBJS =		auth.@O@ connection.@O@ data.@O@ generic.@O@ handle.@O@ \
		lib.@O@ listener.@O@ message.@O@ object.@O@ protocol.@O@ \
		result.@O@ string.@O@ value.@O@ version.@O@

# Alphabetically
SRCS =		auth.c connection.c data.c generic.c handle.c \
		lib.c listener.c message.c object.c protocol.c \
		result.c string.c value.c version.c

LIBS =		@LIBS@

SUBDIRS =	include
TARGETS =	timestamp

@BIND9_MAKE_RULES@

version.@O@: version.c
	${LIBTOOL} ${CC} ${ALL_CFLAGS} \
		-DVERSION=\"${VERSION}\" \
		-DLIBINTERFACE=${LIBINTERFACE} \
		-DLIBREVISION=${LIBREVISION} \
		-DLIBAGE=${LIBAGE} \
		-c ${srcdir}/version.c

libomapi.@SA@: ${OBJS}
	${AR} ${ARFLAGS} $@ ${OBJS}
	${RANLIB} $@

libomapi.la: ${OBJS}
	${LIBTOOL} --mode=link \
		${CC} ${ALL_CFLAGS} -o libomapi.la -rpath ${libdir} \
		-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
		${OBJS} ${LIBS}

timestamp: libomapi.@A@
	touch timestamp

installdirs:
	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}

install:: timestamp installdirs
	${LIBTOOL} ${INSTALL_DATA} libomapi.@A@ ${DESTDIR}${libdir}

clean distclean::
	rm -f libomapi.@A@ libomapi.la timestamp
