Imported Upstream version 1.17.1
[platform/upstream/c-ares.git] / src / lib / Makefile.am
1 AUTOMAKE_OPTIONS = foreign subdir-objects nostdinc 1.9.6
2 ACLOCAL_AMFLAGS = -I m4 --install
3
4 # Specify our include paths here, and do it relative to $(top_srcdir) and
5 # $(top_builddir), to ensure that these paths which belong to the library
6 # being currently built and tested are searched before the library which
7 # might possibly already be installed in the system.
8
9 AM_CPPFLAGS = -I$(top_builddir)/include \
10               -I$(top_builddir)/src/lib \
11               -I$(top_srcdir)/include
12
13 lib_LTLIBRARIES = libcares.la
14
15 man_MANS = $(MANPAGES)
16
17 # adig and ahost are just sample programs and thus not mentioned with the
18 # regular sources and headers
19 EXTRA_DIST = Makefile.inc config-win32.h CMakeLists.txt \
20   ares_config.h.in ares_config.h.cmake cares.rc \
21   $(CSOURCES) $(HHEADERS) config-dos.h
22
23 DISTCLEANFILES = ares_config.h
24
25 DIST_SUBDIRS =
26
27 AM_LDFLAGS =
28
29 libcares_la_LDFLAGS_EXTRA =
30
31 if CARES_LT_SHLIB_USE_VERSION_INFO
32 libcares_la_LDFLAGS_EXTRA += -version-info @CARES_VERSION_INFO@
33 endif
34
35 if CARES_LT_SHLIB_USE_NO_UNDEFINED
36 libcares_la_LDFLAGS_EXTRA += -no-undefined
37 endif
38
39 if CARES_LT_SHLIB_USE_MIMPURE_TEXT
40 libcares_la_LDFLAGS_EXTRA += -mimpure-text
41 endif
42
43 libcares_la_LDFLAGS = $(AM_LDFLAGS) $(libcares_la_LDFLAGS_EXTRA)
44
45 # Add -Werror if defined
46 CFLAGS += @CARES_CFLAG_EXTRAS@
47
48 if USE_CPPFLAG_CARES_STATICLIB
49 AM_CPPFLAGS += $(CPPFLAG_CARES_STATICLIB)
50 endif
51
52 libcares_la_CFLAGS_EXTRA =
53
54 libcares_la_CPPFLAGS_EXTRA = -DCARES_BUILDING_LIBRARY
55
56 if DOING_CARES_SYMBOL_HIDING
57 libcares_la_CFLAGS_EXTRA += $(CFLAG_CARES_SYMBOL_HIDING)
58 libcares_la_CPPFLAGS_EXTRA += -DCARES_SYMBOL_HIDING
59 endif
60
61 @CODE_COVERAGE_RULES@
62 libcares_la_LDFLAGS += $(CODE_COVERAGE_LDFLAGS)
63 libcares_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS)
64
65 libcares_la_CFLAGS = $(AM_CFLAGS) $(libcares_la_CFLAGS_EXTRA)
66
67 libcares_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcares_la_CPPFLAGS_EXTRA)
68
69 # Makefile.inc provides the CSOURCES and HHEADERS defines
70 include Makefile.inc
71
72 libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)