2
0

Makefile.am 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at http://curl.haxx.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. ###########################################################################
  22. AUTOMAKE_OPTIONS = foreign nostdinc
  23. DOCS = README.encoding README.memoryleak README.ares README.curlx \
  24. README.hostip README.multi_socket README.httpauth README.pipelining \
  25. README.curl_off_t README.pingpong
  26. CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
  27. EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h \
  28. config-win32ce.h config-riscos.h config-mac.h curl_config.h.in \
  29. makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h \
  30. makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h \
  31. config-os400.h setup-os400.h config-symbian.h Makefile.Watcom \
  32. config-tpf.h $(DOCS) mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST) \
  33. firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \
  34. objnames-test08.sh objnames-test10.sh objnames.inc
  35. lib_LTLIBRARIES = libcurl.la
  36. if BUILD_UNITTESTS
  37. noinst_LTLIBRARIES = libcurlu.la
  38. else
  39. noinst_LTLIBRARIES =
  40. endif
  41. # This might hold -Werror
  42. CFLAGS += @CURL_CFLAG_EXTRAS@
  43. # Specify our include paths here, and do it relative to $(top_srcdir) and
  44. # $(top_builddir), to ensure that these paths which belong to the library
  45. # being currently built and tested are searched before the library which
  46. # might possibly already be installed in the system.
  47. #
  48. # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
  49. # $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
  50. # $(top_srcdir)/include is for libcurl's external include files
  51. # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
  52. # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
  53. # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
  54. # $(top_srcdir)/ares is for in-tree c-ares's external include files
  55. AM_CPPFLAGS = -I$(top_builddir)/include/curl \
  56. -I$(top_builddir)/include \
  57. -I$(top_srcdir)/include \
  58. -I$(top_builddir)/lib \
  59. -I$(top_srcdir)/lib
  60. if USE_EMBEDDED_ARES
  61. AM_CPPFLAGS += -I$(top_builddir)/ares \
  62. -I$(top_srcdir)/ares
  63. endif
  64. # Prevent LIBS from being used for all link targets
  65. LIBS = $(BLANK_AT_MAKETIME)
  66. if SONAME_BUMP
  67. #
  68. # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
  69. # it is. The problem is that we try to avoid the bump as hard as possible, but
  70. # yet it is still necessary for a few rare situations. The configure script will
  71. # attempt to figure out these situations, and it can be forced to consider this
  72. # to be such a case! See README.curl_off_t for further details.
  73. #
  74. # This conditional soname bump SHOULD be removed at next "proper" bump.
  75. #
  76. VERSIONINFO=-version-info 8:0:3
  77. else
  78. VERSIONINFO=-version-info 7:0:3
  79. endif
  80. # This flag accepts an argument of the form current[:revision[:age]]. So,
  81. # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
  82. # 1.
  83. #
  84. # Here's the simplified rule guide on how to change -version-info:
  85. # (current version is C:R:A)
  86. #
  87. # 1. if there are only source changes, use C:R+1:A
  88. # 2. if interfaces were added use C+1:0:A+1
  89. # 3. if interfaces were removed, then use C+1:0:0
  90. #
  91. # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
  92. AM_CPPFLAGS += -DBUILDING_LIBCURL
  93. AM_LDFLAGS =
  94. AM_CFLAGS =
  95. libcurl_la_CPPFLAGS_EXTRA =
  96. libcurl_la_LDFLAGS_EXTRA =
  97. libcurl_la_CFLAGS_EXTRA =
  98. if CURL_LT_SHLIB_USE_VERSION_INFO
  99. libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
  100. endif
  101. if CURL_LT_SHLIB_USE_NO_UNDEFINED
  102. libcurl_la_LDFLAGS_EXTRA += -no-undefined
  103. endif
  104. if CURL_LT_SHLIB_USE_MIMPURE_TEXT
  105. libcurl_la_LDFLAGS_EXTRA += -mimpure-text
  106. endif
  107. if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
  108. libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
  109. endif
  110. if USE_CPPFLAG_CURL_STATICLIB
  111. libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
  112. endif
  113. if DOING_CURL_SYMBOL_HIDING
  114. libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
  115. libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
  116. endif
  117. libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
  118. libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
  119. libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
  120. libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
  121. libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
  122. libcurlu_la_CFLAGS = $(AM_CFLAGS)
  123. # Makefile.inc provides the CSOURCES and HHEADERS defines
  124. include Makefile.inc
  125. libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
  126. libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
  127. checksrc:
  128. @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
  129. if CURLDEBUG
  130. # for debug builds, we scan the sources on all regular make invokes
  131. all-local: checksrc
  132. endif