mirror of https://github.com/getdnsapi/getdns.git
125 lines
3.7 KiB
Makefile
125 lines
3.7 KiB
Makefile
#
|
|
# @configure_input@
|
|
#
|
|
|
|
package = @PACKAGE_NAME@
|
|
version = @PACKAGE_VERSION@
|
|
tarname = @PACKAGE_TARNAME@
|
|
distdir = $(tarname)-$(version)
|
|
|
|
# current:revision:age
|
|
# (binary-api-number):(which-binary-api-version):(how-many-nrs-backwardscompat)
|
|
# 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
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
includedir = @includedir@
|
|
have_libevent = @have_libevent@
|
|
have_libuv = @have_libuv@
|
|
have_libev = @have_libev@
|
|
# datarootdir is here to please some checkers
|
|
datarootdir=@datarootdir@
|
|
INSTALL = @INSTALL@
|
|
LIBTOOL = @libtool@
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
CC=@CC@
|
|
CFLAGS=@CFLAGS@ -Wall -I$(srcdir)/ -I/usr/local/include -std=c99
|
|
LDFLAGS=@LDFLAGS@ @LIBS@
|
|
EXTENSION_LIBEVENT_OBJ=@EXTENSION_LIBEVENT_OBJ@
|
|
EXTENSION_LIBUV_OBJ=@EXTENSION_LIBUV_OBJ@
|
|
EXTENSION_LIBEV_OBJ=@EXTENSION_LIBEV_OBJ@
|
|
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
|
|
hostname.lo service.lo request-internal.lo validate_dnssec.lo \
|
|
util-internal.lo getdns_error.lo rr-dict.lo validation-chain.lo \
|
|
const-info.lo \
|
|
$(EXTENSION_LIBEVENT_OBJ) $(EXTENSION_LIBUV_OBJ) $(EXTENSION_LIBEV_OBJ)
|
|
|
|
.SUFFIXES: .c .o .a .lo .h
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
.c.lo:
|
|
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
default: all
|
|
|
|
all: libgetdns.la
|
|
|
|
install: libgetdns.la
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns
|
|
$(INSTALL) -m 644 $(srcdir)/getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h
|
|
if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; fi
|
|
if test $(have_libuv) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libuv.h $(DESTDIR)$(includedir)/getdns/ ; fi
|
|
if test $(have_libev) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libev.h $(DESTDIR)$(includedir)/getdns/ ; fi
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
|
|
$(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir)
|
|
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
|
|
|
|
uninstall:
|
|
rm -rf $(DESTDIR)$(includedir)/getdns
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libgetdns.la
|
|
|
|
libgetdns.la: $(GETDNS_OBJ)
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined
|
|
|
|
test: FORCE
|
|
cd test && $(MAKE) $@
|
|
|
|
example: FORCE
|
|
cd example && $(MAKE) $@
|
|
|
|
clean:
|
|
cd test && $(MAKE) $@
|
|
cd example && $(MAKE) $@
|
|
rm -f *.o *.lo extension/*.lo $(PROGRAMS) libgetdns.la
|
|
rm -rf .libs
|
|
|
|
distclean : clean
|
|
cd test && $(MAKE) $@
|
|
cd example && $(MAKE) $@
|
|
rm -f Makefile config.status config.log Doxyfile
|
|
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
|
|
|
|
.PHONY: clean test example
|
|
FORCE:
|