2013-10-07 10:10:06 -05:00
|
|
|
#
|
|
|
|
# @configure_input@
|
|
|
|
#
|
2014-02-25 07:12:33 -06:00
|
|
|
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
|
2014-02-20 08:12:19 -06:00
|
|
|
# All rights reserved.
|
2014-02-21 11:23:20 -06:00
|
|
|
#
|
2014-02-20 08:12:19 -06:00
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are met:
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
2014-02-25 07:23:19 -06:00
|
|
|
# * Neither the names of the copyright holders nor the
|
2014-02-20 08:12:19 -06:00
|
|
|
# names of its contributors may be used to endorse or promote products
|
|
|
|
# derived from this software without specific prior written permission.
|
2014-02-21 11:23:20 -06:00
|
|
|
#
|
2014-02-20 08:12:19 -06:00
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
|
|
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
package = @PACKAGE_NAME@
|
|
|
|
version = @PACKAGE_VERSION@
|
|
|
|
tarname = @PACKAGE_TARNAME@
|
|
|
|
distdir = $(tarname)-$(version)
|
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
# current:revision:age
|
|
|
|
# (binary-api-number):(which-binary-api-version):(how-many-nrs-backwardscompat)
|
2014-06-19 10:27:05 -05:00
|
|
|
# if source code changes increment revision
|
|
|
|
# if any interfaces have been added/removed/changed since last update then
|
|
|
|
# increment current and set revision to 0
|
|
|
|
# if any interfaces have been added since the last public release then increment age
|
|
|
|
# if any interfaces have been removed or changed since the last public release then
|
|
|
|
# set age to 0
|
2013-11-29 08:41:06 -06:00
|
|
|
# if api unchanged: no changes
|
|
|
|
# if api broken: current++ ; revision = 0; age = 0
|
|
|
|
# if programs compiled against existing library work and link with new
|
|
|
|
# version of library with new binary api: revision++; age++
|
|
|
|
libversion = 0:0:0
|
|
|
|
|
2013-10-07 10:10:06 -05:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
2013-11-29 08:41:06 -06:00
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
2014-01-22 18:55:04 -06:00
|
|
|
have_libevent = @have_libevent@
|
2014-02-06 10:07:04 -06:00
|
|
|
have_libuv = @have_libuv@
|
|
|
|
have_libev = @have_libev@
|
2013-11-29 08:41:06 -06:00
|
|
|
# datarootdir is here to please some checkers
|
|
|
|
datarootdir=@datarootdir@
|
|
|
|
INSTALL = @INSTALL@
|
2014-02-24 13:53:14 -06:00
|
|
|
LIBTOOL = ../libtool
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
2014-02-14 04:40:23 -06:00
|
|
|
CC=@CC@
|
2014-05-19 08:23:40 -05:00
|
|
|
CFLAGS=@CFLAGS@ -Wall -I$(srcdir) -I. -std=c99
|
2013-12-02 07:20:03 -06:00
|
|
|
LDFLAGS=@LDFLAGS@ @LIBS@
|
2014-02-21 11:23:20 -06:00
|
|
|
|
|
|
|
EXTENSION_LIBEVENT_LIB=@EXTENSION_LIBEVENT_LIB@
|
|
|
|
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
|
2014-03-06 10:43:18 -06:00
|
|
|
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
|
2014-02-21 11:23:20 -06:00
|
|
|
EXTENSION_LIBEV_LIB=@EXTENSION_LIBEV_LIB@
|
|
|
|
EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@
|
2014-03-06 10:43:18 -06:00
|
|
|
EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@
|
|
|
|
EXTENSION_LIBUV_LIB=@EXTENSION_LIBUV_LIB@
|
|
|
|
EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@
|
|
|
|
EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@
|
2014-02-21 11:23:20 -06:00
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
|
2014-02-19 09:56:00 -06:00
|
|
|
hostname.lo service.lo request-internal.lo util-internal.lo \
|
2014-07-01 16:31:40 -05:00
|
|
|
getdns_error.lo rr-dict.lo dnssec.lo const-info.lo ub_timed_resolve.lo
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
.SUFFIXES: .c .o .a .lo .h
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
.c.lo:
|
|
|
|
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2013-10-07 10:10:06 -05:00
|
|
|
default: all
|
|
|
|
|
2014-02-21 11:23:20 -06:00
|
|
|
all: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB)
|
2014-01-24 10:21:49 -06:00
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
install: libgetdns.la
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns
|
2014-05-21 08:42:58 -05:00
|
|
|
$(INSTALL) -m 644 getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h
|
2014-02-28 14:33:14 -06:00
|
|
|
$(INSTALL) -m 644 $(srcdir)/getdns/getdns_extra.h $(DESTDIR)$(includedir)/getdns/getdns_extra.h
|
2013-11-29 08:41:06 -06:00
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
|
|
|
|
$(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir)
|
2014-02-21 11:23:20 -06:00
|
|
|
if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEVENT_LIB) $(DESTDIR)$(libdir) ; fi
|
|
|
|
if test $(have_libuv) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libuv.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBUV_LIB) $(DESTDIR)$(libdir) ; fi
|
|
|
|
if test $(have_libev) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libev.h $(DESTDIR)$(includedir)/getdns/ ; $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEV_LIB) $(DESTDIR)$(libdir) ; fi
|
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
|
|
|
|
|
|
|
|
uninstall:
|
2014-01-22 18:55:04 -06:00
|
|
|
rm -rf $(DESTDIR)$(includedir)/getdns
|
2014-03-06 21:10:50 -06:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libgetdns.la
|
|
|
|
if test $(have_libevent) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEVENT_LIB) ; fi
|
|
|
|
if test $(have_libuv) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBUV_LIB) ; fi
|
|
|
|
if test $(have_libev) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEV_LIB) ; fi
|
2014-02-21 11:23:20 -06:00
|
|
|
|
|
|
|
libgetdns_ext_event.la: libgetdns.la extension/libevent.lo
|
2014-06-19 10:27:05 -05:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libevent.lo ./.libs/libgetdns.la $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libevent.symbols
|
2014-02-21 11:23:20 -06:00
|
|
|
|
|
|
|
libgetdns_ext_uv.la: libgetdns.la extension/libuv.lo
|
2014-06-19 10:27:05 -05:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libuv.lo ./.libs/libgetdns.la $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libuv.symbols
|
2014-05-21 03:13:02 -05:00
|
|
|
|
2014-02-21 11:23:20 -06:00
|
|
|
|
|
|
|
libgetdns_ext_ev.la: libgetdns.la extension/libev.lo
|
2014-06-19 10:27:05 -05:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libev.lo ./.libs/libgetdns.la $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libev.symbols
|
2014-05-21 03:13:02 -05:00
|
|
|
|
2013-11-29 08:41:06 -06:00
|
|
|
|
|
|
|
libgetdns.la: $(GETDNS_OBJ)
|
2014-06-19 10:27:05 -05:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/libgetdns.symbols
|
2014-05-21 03:13:02 -05:00
|
|
|
|
2013-10-07 10:10:06 -05:00
|
|
|
|
2014-02-04 07:10:14 -06:00
|
|
|
test: FORCE
|
2013-11-29 09:24:39 -06:00
|
|
|
cd test && $(MAKE) $@
|
|
|
|
|
2014-02-04 07:10:14 -06:00
|
|
|
example: FORCE
|
2014-01-22 18:55:04 -06:00
|
|
|
cd example && $(MAKE) $@
|
|
|
|
|
2013-10-07 10:10:06 -05:00
|
|
|
clean:
|
2013-10-30 02:05:31 -05:00
|
|
|
cd test && $(MAKE) $@
|
|
|
|
cd example && $(MAKE) $@
|
2014-05-21 08:57:14 -05:00
|
|
|
rm -f *.o *.lo extension/*.lo extension/*.o $(PROGRAMS) libgetdns.la libgetdns_ext_*.la
|
|
|
|
rm -rf .libs extension/.libs
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
distclean : clean
|
|
|
|
cd test && $(MAKE) $@
|
2014-05-21 08:42:58 -05:00
|
|
|
rmdir test 2>/dev/null || true
|
2013-10-07 10:10:06 -05:00
|
|
|
cd example && $(MAKE) $@
|
2014-05-21 08:42:58 -05:00
|
|
|
rmdir example 2>/dev/null || true
|
|
|
|
rm -f Makefile config.status config.log Doxyfile config.h getdns/Makefile getdns/getdns.h
|
|
|
|
rmdir getdns 2>/dev/null || true
|
2014-05-21 08:57:14 -05:00
|
|
|
rmdir extension 2>/dev/null || true
|
2013-10-07 10:10:06 -05:00
|
|
|
rm -Rf autom4te.cache
|
|
|
|
|
|
|
|
$(distdir): FORCE
|
|
|
|
mkdir -p $(distdir)/src
|
|
|
|
cp configure.ac $(distdir)
|
|
|
|
cp configure $(distdir)
|
|
|
|
cp Makefile.in $(distdir)
|
|
|
|
cp src/Makefile.in $(distdir)/src
|
|
|
|
|
|
|
|
distcheck: $(distdir).tar.gz
|
|
|
|
gzip -cd $(distdir).tar.gz | tar xvf -
|
|
|
|
cd $(distdir) && ./configure
|
|
|
|
cd $(distdir) && $(MAKE) all
|
|
|
|
cd $(distdir) && $(MAKE) check
|
|
|
|
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
|
|
|
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
|
|
|
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
|
|
|
if test "$${remaining}" -ne 0; then
|
|
|
|
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
cd $(distdir) && $(MAKE) clean
|
|
|
|
rm -rf $(distdir)
|
|
|
|
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
|
|
|
|
|
|
|
Makefile: Makefile.in ../config.status
|
|
|
|
cd .. && ./config.status $@
|
|
|
|
|
|
|
|
configure.status: configure
|
|
|
|
cd .. && ./config.status --recheck
|
|
|
|
|
2014-02-04 07:10:14 -06:00
|
|
|
.PHONY: clean test example
|
|
|
|
FORCE:
|