2013-10-07 10:10:06 -05:00
|
|
|
#
|
|
|
|
# @configure_input@
|
|
|
|
#
|
|
|
|
|
|
|
|
package = @PACKAGE_NAME@
|
|
|
|
version = @PACKAGE_VERSION@
|
|
|
|
tarname = @PACKAGE_TARNAME@
|
|
|
|
distdir = $(tarname)-$(version)
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
2013-11-29 08:41:06 -06:00
|
|
|
LIBTOOL = @libtool@
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
CC=gcc
|
2013-10-29 14:31:25 -05:00
|
|
|
CFLAGS=@CFLAGS@ -Wall -g -fPIC -I$(srcdir)/ -I$(srcdir)/../ -I/usr/local/include -std=c99 $(cflags)
|
2013-11-29 08:41:06 -06:00
|
|
|
LDFLAGS=@LDFLAGS@ -L. -L.. -L/usr/local/lib
|
2013-10-21 23:55:11 -05:00
|
|
|
LDLIBS=-lgetdns -lldns -levent_core -lunbound
|
2013-10-07 10:10:06 -05:00
|
|
|
PROGRAMS=tests_dict tests_list tests_stub_async tests_stub_sync
|
|
|
|
|
|
|
|
.SUFFIXES: .c .o .a .lo .h
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
all: $(PROGRAMS)
|
|
|
|
|
|
|
|
tests_dict: tests_dict.o testmessages.o
|
2013-11-29 08:41:06 -06:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ tests_dict.o testmessages.o
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
tests_list: tests_list.o testmessages.o
|
2013-11-29 08:41:06 -06:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ tests_list.o testmessages.o
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
tests_stub_async: tests_stub_async.o testmessages.o
|
2013-11-29 08:41:06 -06:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_async.o testmessages.o
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
tests_stub_sync: tests_stub_sync.o
|
2013-11-29 08:41:06 -06:00
|
|
|
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_sync.o
|
2013-10-07 10:10:06 -05:00
|
|
|
|
2013-11-29 09:24:39 -06:00
|
|
|
test:
|
|
|
|
./testscript.sh
|
|
|
|
@echo "All tests OK"
|
|
|
|
|
2013-10-07 10:10:06 -05:00
|
|
|
clean:
|
|
|
|
rm -f *.o $(PROGRAMS)
|
2013-11-29 08:41:06 -06:00
|
|
|
rm -rf .libs
|
2013-10-07 10:10:06 -05:00
|
|
|
|
|
|
|
distclean : clean
|
|
|
|
rm -f Makefile config.status config.log
|
|
|
|
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
|
|
|
|
|
2013-11-29 09:24:39 -06:00
|
|
|
.PHONY: clean test
|