1 # Makefile[.in] - top-level Makefile
3 # This file is part of adns, which is Copyright Ian Jackson
4 # and contributors (see the file INSTALL for full details).
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation.
21 # Remember to change ADNS_VERSION_STRING in client/client.h too, and
22 # possibly library soname (MAJOR and MINOR in common.make.in).
28 ENABLE_DYNAMIC= @ENABLE_DYNAMIC@
29 ifeq ($(ENABLE_DYNAMIC),elf)
30 SUBDIRS_DYNAMIC=dynamic
37 SUBDIRS= src $(SUBDIRS_DYNAMIC) client regress
39 all install uninstall clean distclean mostlyclean maintainer-clean distprep:
40 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
43 all-here install-here uninstall-here distprep-here: README
45 clean-here mostlyclean-here:
46 rm -f *~ ./#*# core *.orig *.rej adns-*.tar.gz
47 rm -rf dist_tmp web adnshost.txt
49 distclean-here maintainer-clean-here: clean-here
50 rm -f settings.make common.make
51 rm -f config.cache config.log config.status Makefile
54 $(MAKE) INSTALL_PROGRAM_FLAGS=-s
56 dist_tmp=dist_tmp/adns-$(DISTVERSION)
59 mkdir dist_tmp $(dist_tmp)
60 find \( -name .git -o -name dist_tmp* \) -prune -o -type d -print | \
61 sed -e 's#.*#mkdir -p $(dist_tmp)/&#' | sh
62 find \( -name .git -o -name dist_tmp* \) -prune -o -type f -print | \
63 sed -e 's#.*#ln & $(dist_tmp)/&#' | sh
64 $(MAKE) -C dist_tmp/adns-$(DISTVERSION) distclean
65 cd dist_tmp && tar cf ../$(dist_tmp).tar `basename $(dist_tmp)`
66 gzip -9 $(dist_tmp).tar
67 mv $(dist_tmp).tar.gz .
70 client/adnshost_s --help >$@.tmp && mv -f $@.tmp $@
72 web-install: adnshost.txt
73 test -e $(WEBDIR) || mkdir $(WEBDIR)
74 $(INSTALL_DATA) $(srcdir)/README.html $(DESTDIR)$(WEBDIR)/
75 $(INSTALL_DATA) $(srcdir)/src/adns.h $(DESTDIR)$(WEBDIR)/adns.h.txt
76 $(INSTALL_DATA) COPYING $(DESTDIR)$(WEBDIR)/COPYING.txt
77 $(INSTALL_DATA) adnshost.txt $(DESTDIR)$(WEBDIR)/
80 $(MAKE) -C regress check
83 lynx -dump -number_links -cfg=/dev/null $(srcdir)/README.html >README.tmp
84 mv -f README.tmp $(srcdir)/README
89 .PHONY: install #people with case-insensitive filesystems lose otherwise!