1*c2c66affSColin Finck# client/Makefile - client program(s) Makefile 2*c2c66affSColin Finck# 3*c2c66affSColin Finck# This file is 4*c2c66affSColin Finck# Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk> 5*c2c66affSColin Finck# 6*c2c66affSColin Finck# It is part of adns, which is 7*c2c66affSColin Finck# Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk> 8*c2c66affSColin Finck# Copyright (C) 1999-2000 Tony Finch <dot@dotat.at> 9*c2c66affSColin Finck# 10*c2c66affSColin Finck# This program is free software; you can redistribute it and/or modify 11*c2c66affSColin Finck# it under the terms of the GNU General Public License as published by 12*c2c66affSColin Finck# the Free Software Foundation; either version 2, or (at your option) 13*c2c66affSColin Finck# any later version. 14*c2c66affSColin Finck# 15*c2c66affSColin Finck# This program is distributed in the hope that it will be useful, 16*c2c66affSColin Finck# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*c2c66affSColin Finck# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*c2c66affSColin Finck# GNU General Public License for more details. 19*c2c66affSColin Finck# 20*c2c66affSColin Finck# You should have received a copy of the GNU General Public License 21*c2c66affSColin Finck# along with this program; if not, write to the Free Software Foundation, 22*c2c66affSColin Finck# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23*c2c66affSColin Finck 24*c2c66affSColin Fincksrcdir= @srcdir@ 25*c2c66affSColin FinckVPATH= @srcdir@ 26*c2c66affSColin Finck 27*c2c66affSColin FinckPROGS_SYSDEP= @PROGS_HAVE_TSEARCH@ 28*c2c66affSColin FinckENABLE_DYNAMIC= @ENABLE_DYNAMIC@ 29*c2c66affSColin Finck 30*c2c66affSColin FinckPROGRAMS= adnslogres adnshost $(PROGS_SYSDEP) 31*c2c66affSColin FinckPROGRAMS_LOCAL= fanftest adnstest 32*c2c66affSColin FinckPROGRAMS_ALL= $(PROGRAMS) $(PROGRAMS_LOCAL) 33*c2c66affSColin Finck 34*c2c66affSColin FinckSTATIC_LIB= $(ADNSDIR)/libadns.a 35*c2c66affSColin Finck 36*c2c66affSColin Finckifeq ($(ENABLE_DYNAMIC),elf) 37*c2c66affSColin FinckDYNAMIC_DEP= $(srcdir)/../dynamic/$(SHLIBFILE) 38*c2c66affSColin FinckDYNAMIC_LINK= -L$(srcdir)/../dynamic -ladns 39*c2c66affSColin FinckDYNAMIC_SUFFIX= _s 40*c2c66affSColin Finckelse 41*c2c66affSColin FinckDYNAMIC_DEP= $(STATIC_LIB) 42*c2c66affSColin FinckDYNAMIC_LINK= $(STATIC_LIB) 43*c2c66affSColin FinckDYNAMIC_SUFFIX= 44*c2c66affSColin Finckendif 45*c2c66affSColin Finck 46*c2c66affSColin FinckTARG_INSTALL= $(PROGRAMS) 47*c2c66affSColin FinckTARG_LOCAL= $(addsuffix $(DYNAMIC_SUFFIX), $(PROGRAMS_ALL)) 48*c2c66affSColin FinckTARGETS= $(TARG_LOCAL) $(TARG_INSTALL) 49*c2c66affSColin Finckinclude $(srcdir)/../settings.make 50*c2c66affSColin Finck 51*c2c66affSColin FinckDIRCFLAGS= -I$(srcdir)/../src 52*c2c66affSColin Finck 53*c2c66affSColin FinckTARG_OBJS= $(addsuffix .o, $(PROGRAMS_ALL)) 54*c2c66affSColin FinckADH_OBJS= adh-main.o adh-opts.o adh-query.o 55*c2c66affSColin FinckALL_OBJS= $(ADH_OBJS) $(TARG_OBJS) 56*c2c66affSColin Finck 57*c2c66affSColin FinckADNSDIR= $(srcdir)/../src/ 58*c2c66affSColin Finck 59*c2c66affSColin Finckall: $(TARGETS) 60*c2c66affSColin Finck 61*c2c66affSColin Finckinstall: $(TARG_INSTALL) 62*c2c66affSColin Finck set -xe; for f in $(TARG_INSTALL); \ 63*c2c66affSColin Finck do $(INSTALL_PROGRAM) $$f $(bin_dir)/$$f; done 64*c2c66affSColin Finck 65*c2c66affSColin Finckuninstall: 66*c2c66affSColin Finck for f in $(TARGETS); do rm -f $(bin_dir)/$$f; done 67*c2c66affSColin Finck 68*c2c66affSColin Finckadnshost: $(ADH_OBJS) $(DYNAMIC_DEP) 69*c2c66affSColin Finck $(CC) $(LDFLAGS) $(ADH_OBJS) $(DYNAMIC_LINK) -o $@ $(LDLIBS) 70*c2c66affSColin Finck 71*c2c66affSColin Finckadnshost_s: $(ADH_OBJS) $(STATIC_LIB) 72*c2c66affSColin Finck $(CC) $(LDFLAGS) $(ADH_OBJS) $(STATIC_LIB) -o $@ $(LDLIBS) 73*c2c66affSColin Finck 74*c2c66affSColin Finck$(ADH_OBJS): adnshost.h 75*c2c66affSColin Finck$(ALL_OBJS): $(ADNSDIR)/adns.h $(ADNSDIR)/config.h 76*c2c66affSColin Finckadnsresfilter.o: $(ADNSDIR)/tvarith.h 77*c2c66affSColin Finck 78*c2c66affSColin Finck%: %.o $(DYNAMIC_DEP) 79*c2c66affSColin Finck $(CC) $(LDFLAGS) $< $(DYNAMIC_LINK) -o $@ $(LDLIBS) 80*c2c66affSColin Finck 81*c2c66affSColin Finck%_s: %.o $(STATIC_LIB) 82*c2c66affSColin Finck $(CC) $(LDFLAGS) $< $(STATIC_LIB) -o $@ $(LDLIBS) 83