Makefile.am 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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
  23. ACLOCAL_AMFLAGS = -I m4
  24. CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
  25. CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
  26. CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
  27. CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
  28. CMake/Utilities.cmake include/curl/curlbuild.h.cmake
  29. VC6LIBDSP = vs/vc6/lib/vc6libcurl.dsp
  30. VC6LIBDSPHEAD = vs/t/lib/vc6_libcurl_dsp.head
  31. VC6LIBDSPFOOT = vs/t/lib/vc6_libcurl_dsp.foot
  32. VC8LIBPRJ = vs/vc8/lib/vc8libcurl.vcproj
  33. VC8LIBPRJHEAD = vs/t/lib/vc8_libcurl_prj.head
  34. VC8LIBPRJFOOT = vs/t/lib/vc8_libcurl_prj.foot
  35. VC_DIST = \
  36. vs/t/README \
  37. $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
  38. $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
  39. vs/vc6/vc6curl.dsw \
  40. vs/vc6/lib/vc6libcurl.dsw \
  41. vs/vc6/src/vc6curltool.dsw \
  42. vs/vc6/src/vc6curltool.dsp
  43. VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
  44. Makefile.am lib/Makefile.inc
  45. VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
  46. Makefile.am lib/Makefile.inc
  47. WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
  48. winbuild/MakefileBuild.vc winbuild/Makefile.vc \
  49. winbuild/Makefile.msvc.names
  50. EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
  51. RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
  52. $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
  53. CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
  54. bin_SCRIPTS = curl-config
  55. SUBDIRS = lib src include
  56. DIST_SUBDIRS = $(SUBDIRS) tests packages docs
  57. pkgconfigdir = $(libdir)/pkgconfig
  58. pkgconfig_DATA = libcurl.pc
  59. # List of libcurl source files required to generate VC IDE dsp and prj files
  60. include lib/Makefile.inc
  61. WIN32SOURCES = $(CSOURCES)
  62. WIN32HEADERS = $(HHEADERS) config-win32.h
  63. dist-hook:
  64. rm -rf $(top_builddir)/tests/log
  65. find $(distdir) -name "*.dist" -exec rm {} \;
  66. (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
  67. for file in $$distit; do \
  68. strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
  69. cp $$file $(distdir)$$strip; \
  70. done)
  71. html:
  72. cd docs; make html
  73. pdf:
  74. cd docs; make pdf
  75. check: test examples
  76. if CROSSCOMPILING
  77. test-full: test
  78. test-torture: test
  79. test:
  80. @echo "NOTICE: we can't run the tests when cross-compiling!"
  81. else
  82. test:
  83. @(cd tests; $(MAKE) all quiet-test)
  84. test-full:
  85. @(cd tests; $(MAKE) all full-test)
  86. test-torture:
  87. @(cd tests; $(MAKE) all torture-test)
  88. test-am:
  89. @(cd tests; $(MAKE) all am-test)
  90. endif
  91. examples:
  92. @(cd docs/examples; $(MAKE) check)
  93. # This is a hook to have 'make clean' also clean up the docs and the tests
  94. # dir. The extra check for the Makefiles being present is necessary because
  95. # 'make distcheck' will make clean first in these directories _before_ it runs
  96. # this hook.
  97. clean-local:
  98. @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
  99. @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
  100. #
  101. # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
  102. # must contain the following line:
  103. # %_topdir /home/loic/local/rpm
  104. # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
  105. #
  106. # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
  107. #
  108. # If additional configure flags are needed to build the package, add the
  109. # following in ~/.rpmmacros
  110. # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
  111. # and run make rpm in the following way:
  112. # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
  113. #
  114. rpms:
  115. $(MAKE) RPMDIST=curl rpm
  116. $(MAKE) RPMDIST=curl-ssl rpm
  117. rpm:
  118. RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
  119. cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
  120. cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
  121. rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
  122. mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
  123. mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
  124. #
  125. # Build a Solaris pkgadd format file
  126. # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
  127. # file (which ends up back in this directory).
  128. # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
  129. # pkgadd -d ./HAXXcurl-*
  130. #
  131. # gak - libtool requires an absoulte directory, hence the pwd below...
  132. pkgadd:
  133. umask 022 ; \
  134. make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
  135. cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
  136. cd $(srcdir)/packages/Solaris && $(MAKE) package
  137. #
  138. # Build a cygwin binary tarball installation file
  139. # resulting .tar.bz2 file will end up at packages/Win32/cygwin
  140. cygwinbin:
  141. $(MAKE) -C packages/Win32/cygwin cygwinbin
  142. # We extend the standard install with a custom hook:
  143. install-data-hook:
  144. cd include && $(MAKE) install
  145. cd docs && $(MAKE) install
  146. # We extend the standard uninstall with a custom hook:
  147. uninstall-hook:
  148. cd include && $(MAKE) uninstall
  149. cd docs && $(MAKE) uninstall
  150. ca-bundle: lib/mk-ca-bundle.pl
  151. @echo "generate a fresh ca-bundle.crt"
  152. @perl $< -b -l -u lib/ca-bundle.crt
  153. ca-firefox: lib/firefox-db2pem.sh
  154. @echo "generate a fresh ca-bundle.crt"
  155. ./lib/firefox-db2pem.sh lib/ca-bundle.crt
  156. checksrc:
  157. cd lib && $(MAKE) checksrc
  158. cd src && $(MAKE) checksrc
  159. .PHONY: vc6-ide
  160. vc6-ide:
  161. $(MAKE) $(VC6LIBDSP)
  162. $(VC6LIBDSP): $(VC6LIBDSP_DEPS)
  163. @(echo "generating '$(VC6LIBDSP)'"; \
  164. \
  165. for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
  166. test -d "$$dir" || mkdir "$$dir" || exit 1; \
  167. done; \
  168. \
  169. dir='..\..\..\lib\'; \
  170. body='$(VC6LIBDSP)'.body; \
  171. win32_srcs='$(WIN32SOURCES)'; \
  172. win32_hdrs='$(WIN32HEADERS)'; \
  173. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  174. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  175. \
  176. echo "# Begin Group \"Source Files\"" > $$body; \
  177. echo "" >> $$body; \
  178. echo "# PROP Default_Filter \"\"" >> $$body; \
  179. for file in $$sorted_srcs; do \
  180. echo "# Begin Source File" >> $$body; \
  181. echo "" >> $$body; \
  182. echo "SOURCE="$$dir$$file >> $$body; \
  183. echo "# End Source File" >> $$body; \
  184. done; \
  185. echo "# End Group" >> $$body; \
  186. echo "# Begin Group \"Header Files\"" >> $$body; \
  187. echo "" >> $$body; \
  188. echo "# PROP Default_Filter \"\"" >> $$body; \
  189. for file in $$sorted_hdrs; do \
  190. echo "# Begin Source File" >> $$body; \
  191. echo "" >> $$body; \
  192. echo "SOURCE="$$dir$$file >> $$body; \
  193. echo "# End Source File" >> $$body; \
  194. done; \
  195. echo "# End Group" >> $$body; \
  196. \
  197. awk '{ printf("%s\r\n", $$0); }' \
  198. $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
  199. > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
  200. \
  201. rm -f $$body)
  202. .PHONY: vc8-ide
  203. vc8-ide:
  204. $(MAKE) $(VC8LIBPRJ)
  205. $(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
  206. @(echo "generating '$(VC8LIBPRJ)'"; \
  207. \
  208. for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
  209. test -d "$$dir" || mkdir "$$dir" || exit 1; \
  210. done; \
  211. \
  212. dir='..\..\..\lib\'; \
  213. body='$(VC8LIBPRJ)'.body; \
  214. win32_srcs='$(WIN32SOURCES)'; \
  215. win32_hdrs='$(WIN32HEADERS)'; \
  216. sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
  217. sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
  218. \
  219. echo "%tab%%tab%<Filter Name=\"Source Files\">" > $$body; \
  220. for file in $$sorted_srcs; do \
  221. echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
  222. done; \
  223. echo "%tab%%tab%</Filter>" >> $$body; \
  224. echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
  225. for file in $$sorted_hdrs; do \
  226. echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
  227. done; \
  228. echo "%tab%%tab%</Filter>" >> $$body; \
  229. \
  230. awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
  231. $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
  232. > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \
  233. \
  234. rm -f $$body)