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