Makefile.am 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 8:0:3
  90. else
  91. VERSIONINFO=-version-info 7:0:3
  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. # Prevent global LIBS from influencing lib build targets
  118. LIBS = $(BLANK_AT_MAKETIME)
  119. libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
  120. if DOING_CURL_SYMBOL_HIDING
  121. libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS
  122. libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING)
  123. else
  124. libcurl_la_CPPFLAGS = $(AM_CPPFLAGS)
  125. libcurl_la_CFLAGS = $(AM_CFLAGS)
  126. endif
  127. # unit testing static library built only along with unit tests
  128. if BUILD_UNITTESTS
  129. noinst_LTLIBRARIES = libcurlu.la
  130. else
  131. noinst_LTLIBRARIES =
  132. endif
  133. libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS
  134. libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS)
  135. libcurlu_la_CFLAGS = $(AM_CFLAGS)
  136. # Makefile.inc provides the CSOURCES and HHEADERS defines
  137. include Makefile.inc
  138. libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
  139. libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
  140. WIN32SOURCES = $(CSOURCES)
  141. WIN32HEADERS = $(HHEADERS) config-win32.h
  142. DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
  143. VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
  144. $(DSP): msvcproj.head msvcproj.foot Makefile.am
  145. echo "creating $(DSP)"
  146. @(cp $(srcdir)/msvcproj.head $(DSP); \
  147. echo "# Begin Group \"Source Files\"" $(DSPOUT); \
  148. echo "" $(DSPOUT); \
  149. echo "# PROP Default_Filter \"\"" $(DSPOUT); \
  150. win32_srcs='$(WIN32SOURCES)'; \
  151. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  152. for file in $$sorted_srcs; do \
  153. echo "# Begin Source File" $(DSPOUT); \
  154. echo "" $(DSPOUT); \
  155. echo "SOURCE=.\\"$$file $(DSPOUT); \
  156. echo "# End Source File" $(DSPOUT); \
  157. done; \
  158. echo "# End Group" $(DSPOUT); \
  159. echo "# Begin Group \"Header Files\"" $(DSPOUT); \
  160. echo "" $(DSPOUT); \
  161. echo "# PROP Default_Filter \"\"" $(DSPOUT); \
  162. win32_hdrs='$(WIN32HEADERS)'; \
  163. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  164. for file in $$sorted_hdrs; do \
  165. echo "# Begin Source File" $(DSPOUT); \
  166. echo "" $(DSPOUT); \
  167. echo "SOURCE=.\\"$$file $(DSPOUT); \
  168. echo "# End Source File" $(DSPOUT); \
  169. done; \
  170. echo "# End Group" $(DSPOUT); \
  171. cat $(srcdir)/msvcproj.foot $(DSPOUT) )
  172. $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
  173. echo "creating $(VCPROJ)"
  174. @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
  175. win32_srcs='$(WIN32SOURCES)'; \
  176. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  177. for file in $$sorted_srcs; do \
  178. echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
  179. done; \
  180. echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
  181. win32_hdrs='$(WIN32HEADERS)'; \
  182. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  183. for file in $$sorted_hdrs; do \
  184. echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
  185. done; \
  186. cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
  187. checksrc:
  188. @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
  189. if CURLDEBUG
  190. # for debug builds, we scan the sources on all regular make invokes
  191. all-local: checksrc
  192. endif