Makefile.am 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2012, 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. DSP = vc6libcurl.dsp
  24. VCPROJ = libcurl.vcproj
  25. DOCS = README.encoding README.memoryleak README.ares README.curlx \
  26. README.hostip README.multi_socket README.httpauth README.pipelining \
  27. README.curl_off_t README.pingpong
  28. CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
  29. EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP) \
  30. vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
  31. config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist \
  32. libcurl.rc config-amigaos.h makefile.amiga \
  33. Makefile.netware nwlib.c nwos.c msvcproj.head msvcproj.foot \
  34. config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
  35. Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
  36. mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h \
  37. Makefile.vxworks config-vms.h checksrc.pl
  38. CLEANFILES = $(DSP) $(VCPROJ)
  39. lib_LTLIBRARIES = libcurl.la
  40. LIBCURL_LIBS = @LIBCURL_LIBS@
  41. # This might hold -Werror
  42. CFLAGS += @CURL_CFLAG_EXTRAS@
  43. CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
  44. # Specify our include paths here, and do it relative to $(top_srcdir) and
  45. # $(top_builddir), to ensure that these paths which belong to the library
  46. # being currently built and tested are searched before the library which
  47. # might possibly already be installed in the system.
  48. #
  49. # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
  50. # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
  51. # $(top_srcdir)/include is for libcurl's external include files
  52. # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
  53. # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
  54. # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
  55. # $(top_srcdir)/ares is for in-tree c-ares's external include files
  56. if USE_EMBEDDED_ARES
  57. AM_CPPFLAGS = -I$(top_builddir)/include/curl \
  58. -I$(top_builddir)/include \
  59. -I$(top_srcdir)/include \
  60. -I$(top_builddir)/lib \
  61. -I$(top_srcdir)/lib \
  62. -I$(top_builddir)/ares \
  63. -I$(top_srcdir)/ares
  64. else
  65. AM_CPPFLAGS = -I$(top_builddir)/include/curl \
  66. -I$(top_builddir)/include \
  67. -I$(top_srcdir)/include \
  68. -I$(top_builddir)/lib \
  69. -I$(top_srcdir)/lib
  70. endif
  71. # Mostly for Windows build targets, when building libcurl library
  72. if USE_CPPFLAG_BUILDING_LIBCURL
  73. AM_CPPFLAGS += -DBUILDING_LIBCURL
  74. endif
  75. # Mostly for Windows build targets, when building static libcurl
  76. if USE_CPPFLAG_CURL_STATICLIB
  77. AM_CPPFLAGS += -DCURL_STATICLIB
  78. endif
  79. if SONAME_BUMP
  80. #
  81. # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
  82. # it is. The problem is that we try to avoid the bump as hard as possible, but
  83. # yet it is still necessary for a few rare situations. The configure script will
  84. # attempt to figure out these situations, and it can be forced to consider this
  85. # to be such a case! See README.curl_off_t for further details.
  86. #
  87. # This conditional soname bump SHOULD be removed at next "proper" bump.
  88. #
  89. VERSIONINFO=-version-info 7:0:2
  90. else
  91. VERSIONINFO=-version-info 6:0:2
  92. endif
  93. # This flag accepts an argument of the form current[:revision[:age]]. So,
  94. # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
  95. # 1.
  96. #
  97. # Here's the simplified rule guide on how to change -version-info:
  98. # (current version is C:R:A)
  99. #
  100. # 1. if there are only source changes, use C:R+1:A
  101. # 2. if interfaces were added use C+1:0:A+1
  102. # 3. if interfaces were removed, then use C+1:0:0
  103. #
  104. # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
  105. if NO_UNDEFINED
  106. # The -no-undefined flag is crucial to build fine on some platforms
  107. UNDEF = -no-undefined
  108. endif
  109. if MIMPURE
  110. # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
  111. # allocatable but non-writable sections" problems.
  112. MIMPURE = -mimpure-text
  113. endif
  114. if VERSIONED_SYMBOLS
  115. VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
  116. endif
  117. libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
  118. if DOING_CURL_SYMBOL_HIDING
  119. libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS
  120. libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING)
  121. else
  122. libcurl_la_CPPFLAGS = $(AM_CPPFLAGS)
  123. libcurl_la_CFLAGS = $(AM_CFLAGS)
  124. endif
  125. # unit testing static library built only along with unit tests
  126. if BUILD_UNITTESTS
  127. noinst_LTLIBRARIES = libcurlu.la
  128. else
  129. noinst_LTLIBRARIES =
  130. endif
  131. libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS
  132. libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS)
  133. libcurlu_la_CFLAGS = $(AM_CFLAGS)
  134. # Makefile.inc provides the CSOURCES and HHEADERS defines
  135. include Makefile.inc
  136. libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
  137. libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
  138. WIN32SOURCES = $(CSOURCES)
  139. WIN32HEADERS = $(HHEADERS) config-win32.h
  140. DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
  141. VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
  142. $(DSP): msvcproj.head msvcproj.foot Makefile.am
  143. echo "creating $(DSP)"
  144. @(cp $(srcdir)/msvcproj.head $(DSP); \
  145. echo "# Begin Group \"Source Files\"" $(DSPOUT); \
  146. echo "" $(DSPOUT); \
  147. echo "# PROP Default_Filter \"\"" $(DSPOUT); \
  148. win32_srcs='$(WIN32SOURCES)'; \
  149. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  150. for file in $$sorted_srcs; do \
  151. echo "# Begin Source File" $(DSPOUT); \
  152. echo "" $(DSPOUT); \
  153. echo "SOURCE=.\\"$$file $(DSPOUT); \
  154. echo "# End Source File" $(DSPOUT); \
  155. done; \
  156. echo "# End Group" $(DSPOUT); \
  157. echo "# Begin Group \"Header Files\"" $(DSPOUT); \
  158. echo "" $(DSPOUT); \
  159. echo "# PROP Default_Filter \"\"" $(DSPOUT); \
  160. win32_hdrs='$(WIN32HEADERS)'; \
  161. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  162. for file in $$sorted_hdrs; do \
  163. echo "# Begin Source File" $(DSPOUT); \
  164. echo "" $(DSPOUT); \
  165. echo "SOURCE=.\\"$$file $(DSPOUT); \
  166. echo "# End Source File" $(DSPOUT); \
  167. done; \
  168. echo "# End Group" $(DSPOUT); \
  169. cat $(srcdir)/msvcproj.foot $(DSPOUT) )
  170. $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
  171. echo "creating $(VCPROJ)"
  172. @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
  173. win32_srcs='$(WIN32SOURCES)'; \
  174. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  175. for file in $$sorted_srcs; do \
  176. echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
  177. done; \
  178. echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
  179. win32_hdrs='$(WIN32HEADERS)'; \
  180. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  181. for file in $$sorted_hdrs; do \
  182. echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
  183. done; \
  184. cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
  185. checksrc:
  186. @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
  187. if CURLDEBUG
  188. # for debug builds, we scan the sources on all regular make invokes
  189. all-local: checksrc
  190. endif