Makefile.am 4.0 KB

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