buildconf.bat for CVS-tree c-ares
[platform/upstream/curl.git] / ares / Makefile.am
1 AUTOMAKE_OPTIONS = foreign nostdinc
2
3 ACLOCAL_AMFLAGS = -I m4
4
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.
9 #
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.
15 #
16 # $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
17 # $(top_builddir) is for c-ares's generated config.h file
18 # $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files
19
20 if CURLDEBUG
21 INCLUDES = -I$(top_builddir)/../include \
22            -I$(top_builddir)            \
23            -I$(top_srcdir)
24 else
25 INCLUDES = -I$(top_builddir) \
26            -I$(top_srcdir)
27 endif
28
29 lib_LTLIBRARIES = libcares.la
30
31 man_MANS = $(MANPAGES)
32
33 MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \
34  vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw
35
36 if DEBUGBUILD
37 PROGS =
38 else
39 PROGS = ahost adig acountry
40 endif
41
42 noinst_PROGRAMS =$(PROGS)
43
44 # adig and ahost are just sample programs and thus not mentioned with the
45 # regular sources and headers
46 EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj         \
47  Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES)       \
48  config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
49  TODO ares_build.h.in buildconf.bat
50
51 DISTCLEANFILES = ares_build.h
52
53 pkgconfigdir = $(libdir)/pkgconfig
54 pkgconfig_DATA = libcares.pc
55
56 VER=-version-info 2:0:0
57 # This flag accepts an argument of the form current[:revision[:age]]. So,
58 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
59 # 1.
60 #
61 # If either revision or age are omitted, they default to 0. Also note that age
62 # must be less than or equal to the current interface number.
63 #
64 # Here are a set of rules to help you update your library version information: 
65 #
66 # 1.Start with version information of 0:0:0 for each libtool library.
67 #
68 # 2.Update the version information only immediately before a public release of
69 # your software. More frequent updates are unnecessary, and only guarantee
70 # that the current interface number gets larger faster.
71 #
72 # 3.If the library source code has changed at all since the last update, then
73 # increment revision (c:r+1:a)
74 #
75 # 4.If any interfaces have been added, removed, or changed since the last
76 # update, increment current, and set revision to 0. (c+1:r=0:a)
77 #
78 # 5.If any interfaces have been added since the last public release, then
79 # increment age. (c:r:a+1)
80 #
81 # 6.If any interfaces have been removed since the last public release, then
82 # set age to 0. (c:r:a=0)
83 #
84
85 if NO_UNDEFINED
86 # The -no-undefined flag is crucial for this to build fine on some platforms
87 UNDEF = -no-undefined
88 endif
89
90
91 libcares_la_LDFLAGS = $(UNDEF) $(VER)
92
93 # Makefile.inc provides the CSOURCES and HHEADERS defines
94 include Makefile.inc
95
96 libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
97
98 # where to install the c-ares headers
99 libcares_ladir = $(includedir)
100 # what headers to install on 'make install':
101 libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
102         ares_build.h ares_rules.h
103
104 ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
105 ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
106
107 adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
108 adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
109
110 acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
111 acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
112
113 # Make files named *.dist replace the file without .dist extension
114 dist-hook:
115         find $(distdir) -name "*.dist" -exec rm {} \;
116         (distit=`find $(srcdir) -name "*.dist"`; \
117         for file in $$distit; do \
118           strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
119           cp $$file $(distdir)$$strip; \
120         done)