1 AUTOMAKE_OPTIONS = foreign nostdinc
3 ACLOCAL_AMFLAGS = -I m4
5 # Specify our include paths here, and do it relative to $(top_srcdir) and
6 # $(top_builddir), to ensure that these paths which belong to the library
7 # being currently built and tested are searched before the library which
8 # might possibly already be installed in the system.
10 # When using the low-level hard-hacking memory leak tracking code from
11 # libcurl the generated curl/curlbuild.h file must also be reachable.
12 # Using the libcurl lowlevel code from within c-ares library is ugly and
13 # only works when c-ares is built and linked with a similarly debug-build
14 # libcurl, but we do this anyway for convenience.
16 # $(top_builddir)/../include/curl for generated curlbuild.h included from curl.h
17 # $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
18 # $(top_srcdir)/../include is for libcurl's external include files
19 # $(top_builddir)/../lib is for libcurl's generated lib/curl_config.h file
20 # $(top_srcdir)/../lib is for libcurl's lib/setup.h and other "private" files
21 # $(top_builddir) is for c-ares's generated ares_config.h file
22 # $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files
25 INCLUDES = -I$(top_builddir)/../include/curl \
26 -I$(top_builddir)/../include \
27 -I$(top_srcdir)/../include \
28 -I$(top_builddir)/../lib \
29 -I$(top_srcdir)/../lib \
33 INCLUDES = -I$(top_builddir) \
37 lib_LTLIBRARIES = libcares.la
39 man_MANS = $(MANPAGES)
41 MSVCFILES = vc/vc6aws.dsw vc/acountry/vc6acountry.dsp vc/adig/vc6adig.dsp \
42 vc/ahost/vc6ahost.dsp vc/cares/vc6cares.dsp vc/cares/vc6cares.dsw
47 PROGS = ahost adig acountry
50 noinst_PROGRAMS =$(PROGS)
52 # adig and ahost are just sample programs and thus not mentioned with the
53 # regular sources and headers
54 EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
55 Makefile.m32 Makefile.netware Makefile.msvc Makefile.Watcom $(man_MANS) \
56 config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
57 TODO ares_build.h.in $(PDFPAGES) cares.rc README.msvc $(MSVCFILES) \
58 $(CSOURCES) $(HHEADERS) config-dos.h
60 CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
62 DISTCLEANFILES = ares_build.h
64 pkgconfigdir = $(libdir)/pkgconfig
65 pkgconfig_DATA = libcares.pc
67 VER=-version-info 2:0:0
68 # This flag accepts an argument of the form current[:revision[:age]]. So,
69 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
72 # If either revision or age are omitted, they default to 0. Also note that age
73 # must be less than or equal to the current interface number.
75 # Here are a set of rules to help you update your library version information:
77 # 1.Start with version information of 0:0:0 for each libtool library.
79 # 2.Update the version information only immediately before a public release of
80 # your software. More frequent updates are unnecessary, and only guarantee
81 # that the current interface number gets larger faster.
83 # 3.If the library source code has changed at all since the last update, then
84 # increment revision (c:r+1:a)
86 # 4.If any interfaces have been added, removed, or changed since the last
87 # update, increment current, and set revision to 0. (c+1:r=0:a)
89 # 5.If any interfaces have been added since the last public release, then
90 # increment age. (c:r:a+1)
92 # 6.If any interfaces have been removed since the last public release, then
93 # set age to 0. (c:r:a=0)
97 # The -no-undefined flag is crucial for this to build fine on some platforms
101 libcares_la_LDFLAGS = $(UNDEF) $(VER)
103 # Add -Werror if defined
104 CFLAGS += @CARES_CFLAG_EXTRAS@
106 # Makefile.inc provides the CSOURCES and HHEADERS defines
109 libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
111 # where to install the c-ares headers
112 libcares_ladir = $(includedir)
113 # what headers to install on 'make install':
114 libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
115 ares_build.h ares_rules.h
117 ahost_SOURCES = ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
118 ahost_LDADD = $(top_builddir)/libcares.la
119 ahost_CFLAGS = $(AM_CFLAGS)
121 adig_SOURCES = adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
122 adig_LDADD = $(top_builddir)/libcares.la
123 adig_CFLAGS = $(AM_CFLAGS)
125 acountry_SOURCES = acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
126 acountry_LDADD = $(top_builddir)/libcares.la
127 acountry_CFLAGS = $(AM_CFLAGS)
130 SOURCEDMANPAGES = ares_init.3
132 clean-local: clean-sourced-manpages
134 clean-sourced-manpages:
135 @srcdmandir='$(SOURCEDMANDIR)'; \
136 echo "rm -rf $(top_builddir)/$$srcdmandir"; \
137 rm -rf $(top_builddir)/$$srcdmandir
139 sourced-manpages: clean-sourced-manpages
140 @srcdmandir='$(SOURCEDMANDIR)'; \
141 srcdmanfiles='$(SOURCEDMANPAGES)'; \
142 mkdir $(top_builddir)/$$srcdmandir; \
143 for file in $$srcdmanfiles; do \
144 if test -f $(top_srcdir)/$$file; then \
145 echo "cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file"; \
146 cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file; \
150 MAN2HTML = roffit --mandir=. < $< >$@
154 html: sourced-manpages $(HTMLPAGES)
159 pdf: sourced-manpages $(PDFPAGES)
162 @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
163 groff -Tps -man $< >$$foo.ps; \
164 ps2pdf $$foo.ps $@; \
166 echo "converted $< to $@")
168 # Make files named *.dist replace the file without .dist extension
170 find $(distdir) -name "*.dist" -exec rm {} \;
171 (distit=`find $(srcdir) -name "*.dist"`; \
172 for file in $$distit; do \
173 strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
174 cp $$file $(distdir)$$strip; \