ipv4 quadonly, make test program compile
[adns] / regress / Makefile.in
CommitLineData
39f45e7e 1# regress/Makefile[.in] - regression test Makefile
e9d74277 2#
39f45e7e 3# This file is part of adns, which is
4# Copyright (C) 1997-2000,2003,2006 Ian Jackson
5# Copyright (C) 1999-2000,2003,2006 Tony Finch
6# Copyright (C) 1991 Massachusetts Institute of Technology
7# (See the file INSTALL for full details.)
e9d74277 8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2, or (at your option)
12# any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software Foundation,
21# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
72cdc702 23srcdir= @srcdir@
24VPATH= @srcdir@
25
4b30caad 26PROGS_SYSDEP= @PROGS_HAVE_TSEARCH@
27
28CLIENTS= adnstest adnshost adnslogres $(PROGS_SYSDEP)
09aee00b 29AUTOCHDRS= harness.h hsyscalls.h hredirect.h
30AUTOCSRCS= hrecord.c hplayback.c hcommon.c
34d5f7a9 31include ../settings.make
72cdc702 32include $(srcdir)/../src/adns.make
33
34d5f7a9 34DIRCFLAGS= -I../src -I$(srcdir) -I$(srcdir)/../src
e9d74277 35
09aee00b 36HCPPFLAGS= -DADNS_REGRESS_TEST -I.
e9d74277 37
09aee00b 38REDIRLIBOBJS= $(addsuffix _d.o, $(basename $(LIBOBJS)))
39HARNLOBJS= hcommon.o $(REDIRLIBOBJS)
40TARGETS= $(addsuffix _record, $(CLIENTS)) $(addsuffix _playback, $(CLIENTS))
41ADH_OBJS= adh-main_c.o adh-opts_c.o adh-query_c.o
42ALL_OBJS= $(HARNLOBJS) dtest.o hrecord.o hplayback.o
e9d74277 43
09aee00b 44.PRECIOUS: $(AUTOCSRCS) $(AUTOCHDRS)
45
46all install uninstall: $(TARGETS)
e9d74277 47
48check: $(TARGETS)
34d5f7a9 49 srcdir=$(srcdir) $(srcdir)/checkall
e9d74277 50
09aee00b 51LINK_CMD= $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
52
53%_record: %_c.o hrecord.o $(HARNLOBJS)
54 $(LINK_CMD)
55
56%_playback: %_c.o hplayback.o $(HARNLOBJS)
57 $(LINK_CMD)
c94dad84 58
09aee00b 59adnshost_%: $(ADH_OBJS) h%.o $(HARNLOBJS)
60 $(LINK_CMD)
e9d74277 61
09aee00b 62%_d.o: $(srcdir)/../src/%.c hredirect.h
78502989 63 $(CC) $(CFLAGS) $(HCPPFLAGS) -c -g -o $@ $<
e9d74277 64
09aee00b 65%_c.o: $(srcdir)/../client/%.c hredirect.h
78502989 66 $(CC) $(CFLAGS) $(HCPPFLAGS) -I $(srcdir)/../src -c -g -o $@ $<
2c7b101b 67
09aee00b 68$(ALL_OBJS): $(srcdir)/../src/adns.h $(srcdir)/../src/internal.h
69$(ALL_OBJS): harness.h hsyscalls.h
70$(ADH_OBJS): $(srcdir)/../client/adnshost.h
e9d74277 71
ff9a573e 72%:: %.m4 -I$(srcdir) hmacros.i4 hsyscalls.i4
72cdc702 73 $(M4) -P $< >$@-a.new
e9d74277 74 sed -e 's/hm_comma/,/g; s/hm_squote/'\''/g; /^[ ]*$$/d' <$@-a.new >$@-b.new
75 @mv -f $@-b.new $@; rm -f $@-a.new