Makefile.am 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2018, 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 https://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/CurlTests.c CMake/FindGSS.cmake CMake/OtherTests.cmake \
  26. CMake/Platforms/WindowsCache.cmake CMake/Utilities.cmake \
  27. CMake/Macros.cmake \
  28. CMake/CurlSymbolHiding.cmake CMake/FindCARES.cmake \
  29. CMake/FindLibSSH2.cmake CMake/FindNGHTTP2.cmake \
  30. CMake/FindMbedTLS.cmake CMake/cmake_uninstall.cmake.in \
  31. CMake/curl-config.cmake.in
  32. VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
  33. VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
  34. VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
  35. VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl
  36. VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist
  37. VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
  38. VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
  39. VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
  40. VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
  41. VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl
  42. VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist
  43. VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
  44. VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
  45. VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
  46. VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
  47. VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl
  48. VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist
  49. VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
  50. VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
  51. VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
  52. VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
  53. VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl
  54. VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist
  55. VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
  56. VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
  57. VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
  58. VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
  59. VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl
  60. VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist
  61. VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
  62. VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
  63. VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
  64. VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
  65. VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl
  66. VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist
  67. VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
  68. VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
  69. VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
  70. VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
  71. VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl
  72. VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist
  73. VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
  74. VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
  75. VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
  76. VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
  77. VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl
  78. VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist
  79. VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
  80. VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl
  81. VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist
  82. VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc
  83. VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl
  84. VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist
  85. VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc
  86. VC15_LIBTMPL = projects/Windows/VC15/lib/libcurl.tmpl
  87. VC15_LIBVCXPROJ = projects/Windows/VC15/lib/libcurl.vcxproj.dist
  88. VC15_LIBVCXPROJ_DEPS = $(VC15_LIBTMPL) Makefile.am lib/Makefile.inc
  89. VC15_SRCTMPL = projects/Windows/VC15/src/curl.tmpl
  90. VC15_SRCVCXPROJ = projects/Windows/VC15/src/curl.vcxproj.dist
  91. VC15_SRCVCXPROJ_DEPS = $(VC15_SRCTMPL) Makefile.am src/Makefile.inc
  92. VC_DIST = projects/README \
  93. projects/build-openssl.bat \
  94. projects/build-wolfssl.bat \
  95. projects/checksrc.bat \
  96. projects/Windows/VC6/curl-all.dsw \
  97. projects/Windows/VC6/lib/libcurl.dsw \
  98. projects/Windows/VC6/src/curl.dsw \
  99. projects/Windows/VC7/curl-all.sln \
  100. projects/Windows/VC7/lib/libcurl.sln \
  101. projects/Windows/VC7/src/curl.sln \
  102. projects/Windows/VC7.1/curl-all.sln \
  103. projects/Windows/VC7.1/lib/libcurl.sln \
  104. projects/Windows/VC7.1/src/curl.sln \
  105. projects/Windows/VC8/curl-all.sln \
  106. projects/Windows/VC8/lib/libcurl.sln \
  107. projects/Windows/VC8/src/curl.sln \
  108. projects/Windows/VC9/curl-all.sln \
  109. projects/Windows/VC9/lib/libcurl.sln \
  110. projects/Windows/VC9/src/curl.sln \
  111. projects/Windows/VC10/curl-all.sln \
  112. projects/Windows/VC10/lib/libcurl.sln \
  113. projects/Windows/VC10/lib/libcurl.vcxproj.filters \
  114. projects/Windows/VC10/src/curl.sln \
  115. projects/Windows/VC10/src/curl.vcxproj.filters \
  116. projects/Windows/VC11/curl-all.sln \
  117. projects/Windows/VC11/lib/libcurl.sln \
  118. projects/Windows/VC11/lib/libcurl.vcxproj.filters \
  119. projects/Windows/VC11/src/curl.sln \
  120. projects/Windows/VC11/src/curl.vcxproj.filters \
  121. projects/Windows/VC12/curl-all.sln \
  122. projects/Windows/VC12/lib/libcurl.sln \
  123. projects/Windows/VC12/lib/libcurl.vcxproj.filters \
  124. projects/Windows/VC12/src/curl.sln \
  125. projects/Windows/VC12/src/curl.vcxproj.filters \
  126. projects/Windows/VC14/curl-all.sln \
  127. projects/Windows/VC14/lib/libcurl.sln \
  128. projects/Windows/VC14/lib/libcurl.vcxproj.filters \
  129. projects/Windows/VC14/src/curl.sln \
  130. projects/Windows/VC14/src/curl.vcxproj.filters \
  131. projects/Windows/VC15/curl-all.sln \
  132. projects/Windows/VC15/lib/libcurl.sln \
  133. projects/Windows/VC15/lib/libcurl.vcxproj.filters \
  134. projects/Windows/VC15/src/curl.sln \
  135. projects/Windows/VC15/src/curl.vcxproj.filters \
  136. projects/generate.bat \
  137. projects/wolfssl_options.h \
  138. projects/wolfssl_override.props
  139. WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
  140. winbuild/MakefileBuild.vc winbuild/Makefile.vc
  141. PLAN9_DIST = plan9/include/mkfile \
  142. plan9/include/mkfile \
  143. plan9/mkfile.proto \
  144. plan9/mkfile \
  145. plan9/BUILD.PLAN9.txt \
  146. plan9/lib/mkfile.inc \
  147. plan9/lib/mkfile \
  148. plan9/src/mkfile.inc \
  149. plan9/src/mkfile
  150. EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
  151. RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
  152. scripts/updatemanpages.pl $(CMAKE_DIST) \
  153. $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \
  154. lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl
  155. CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
  156. $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \
  157. $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \
  158. $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \
  159. $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ)
  160. bin_SCRIPTS = curl-config
  161. SUBDIRS = lib src
  162. DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
  163. pkgconfigdir = $(libdir)/pkgconfig
  164. pkgconfig_DATA = libcurl.pc
  165. # List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files
  166. include lib/Makefile.inc
  167. include src/Makefile.inc
  168. dist-hook:
  169. rm -rf $(top_builddir)/tests/log
  170. find $(distdir) -name "*.dist" -exec rm {} \;
  171. (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
  172. for file in $$distit; do \
  173. strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
  174. cp -p $$file $(distdir)$$strip; \
  175. done)
  176. html:
  177. cd docs && $(MAKE) html
  178. pdf:
  179. cd docs && $(MAKE) pdf
  180. check: test examples check-docs
  181. if CROSSCOMPILING
  182. test-full: test
  183. test-torture: test
  184. test:
  185. @echo "NOTICE: we can't run the tests when cross-compiling!"
  186. else
  187. test:
  188. @(cd tests; $(MAKE) all quiet-test)
  189. test-full:
  190. @(cd tests; $(MAKE) all full-test)
  191. test-nonflaky:
  192. @(cd tests; $(MAKE) all nonflaky-test)
  193. test-torture:
  194. @(cd tests; $(MAKE) all torture-test)
  195. test-event:
  196. @(cd tests; $(MAKE) all event-test)
  197. test-am:
  198. @(cd tests; $(MAKE) all am-test)
  199. endif
  200. examples:
  201. @(cd docs/examples; $(MAKE) check)
  202. check-docs:
  203. @(cd docs/libcurl; $(MAKE) check)
  204. # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
  205. # must contain the following line:
  206. # %_topdir /home/loic/local/rpm
  207. # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
  208. #
  209. # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
  210. #
  211. # If additional configure flags are needed to build the package, add the
  212. # following in ~/.rpmmacros
  213. # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
  214. # and run make rpm in the following way:
  215. # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
  216. #
  217. rpms:
  218. $(MAKE) RPMDIST=curl rpm
  219. $(MAKE) RPMDIST=curl-ssl rpm
  220. rpm:
  221. RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
  222. cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
  223. cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
  224. rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
  225. mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
  226. mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
  227. #
  228. # Build a Solaris pkgadd format file
  229. # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
  230. # file (which ends up back in this directory).
  231. # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
  232. # pkgadd -d ./HAXXcurl-*
  233. #
  234. # gak - libtool requires an absolute directory, hence the pwd below...
  235. pkgadd:
  236. umask 022 ; \
  237. $(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
  238. cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
  239. cd $(srcdir)/packages/Solaris && $(MAKE) package
  240. #
  241. # Build a cygwin binary tarball installation file
  242. # resulting .tar.bz2 file will end up at packages/Win32/cygwin
  243. cygwinbin:
  244. $(MAKE) -C packages/Win32/cygwin cygwinbin
  245. # We extend the standard install with a custom hook:
  246. install-data-hook:
  247. cd include && $(MAKE) install
  248. cd docs && $(MAKE) install
  249. cd docs/libcurl && $(MAKE) install
  250. # We extend the standard uninstall with a custom hook:
  251. uninstall-hook:
  252. cd include && $(MAKE) uninstall
  253. cd docs && $(MAKE) uninstall
  254. cd docs/libcurl && $(MAKE) uninstall
  255. ca-bundle: lib/mk-ca-bundle.pl
  256. @echo "generating a fresh ca-bundle.crt"
  257. @perl $< -b -l -u lib/ca-bundle.crt
  258. ca-firefox: lib/firefox-db2pem.sh
  259. @echo "generating a fresh ca-bundle.crt"
  260. ./lib/firefox-db2pem.sh lib/ca-bundle.crt
  261. checksrc:
  262. cd lib && $(MAKE) checksrc
  263. cd src && $(MAKE) checksrc
  264. cd tests && $(MAKE) checksrc
  265. cd include/curl && $(MAKE) checksrc
  266. cd docs/examples && $(MAKE) checksrc
  267. .PHONY: vc-ide
  268. vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
  269. $(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \
  270. $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \
  271. $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
  272. $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
  273. $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \
  274. $(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS)
  275. @(win32_lib_srcs='$(LIB_CFILES)'; \
  276. win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
  277. win32_lib_rc='$(LIB_RCFILES)'; \
  278. win32_lib_vauth_srcs='$(LIB_VAUTH_CFILES)'; \
  279. win32_lib_vauth_hdrs='$(LIB_VAUTH_HFILES)'; \
  280. win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \
  281. win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \
  282. win32_src_srcs='$(CURL_CFILES)'; \
  283. win32_src_hdrs='$(CURL_HFILES)'; \
  284. win32_src_rc='$(CURL_RCFILES)'; \
  285. win32_src_x_srcs='$(CURLX_CFILES)'; \
  286. win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
  287. \
  288. sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
  289. sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
  290. sorted_lib_vauth_srcs=`for file in $$win32_lib_vauth_srcs; do echo $$file; done | sort`; \
  291. sorted_lib_vauth_hdrs=`for file in $$win32_lib_vauth_hdrs; do echo $$file; done | sort`; \
  292. sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \
  293. sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
  294. sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
  295. sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
  296. sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
  297. sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
  298. \
  299. awk_code='\
  300. function gen_element(type, dir, file)\
  301. {\
  302. sub(/vauth\//, "", file);\
  303. sub(/vtls\//, "", file);\
  304. \
  305. spaces=" ";\
  306. if(dir == "lib\\vauth" || dir == "lib\\vtls")\
  307. tabs=" ";\
  308. else\
  309. tabs=" ";\
  310. \
  311. if(type == "dsp") {\
  312. printf("# Begin Source File\r\n");\
  313. printf("\r\n");\
  314. printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\
  315. printf("# End Source File\r\n");\
  316. }\
  317. else if(type == "vcproj1") {\
  318. printf("%s<File\r\n", tabs);\
  319. printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\">\r\n",\
  320. tabs, dir, file);\
  321. printf("%s</File>\r\n", tabs);\
  322. }\
  323. else if(type == "vcproj2") {\
  324. printf("%s<File\r\n", tabs);\
  325. printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\"\r\n",\
  326. tabs, dir, file);\
  327. printf("%s>\r\n", tabs);\
  328. printf("%s</File>\r\n", tabs);\
  329. }\
  330. else if(type == "vcxproj") {\
  331. i = index(file, ".");\
  332. ext = substr(file, i == 0 ? 0 : i + 1);\
  333. \
  334. if(ext == "c")\
  335. printf("%s<ClCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
  336. spaces, dir, file);\
  337. else if(ext == "h")\
  338. printf("%s<ClInclude Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
  339. spaces, dir, file);\
  340. else if(ext == "rc")\
  341. printf("%s<ResourceCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
  342. spaces, dir, file);\
  343. }\
  344. }\
  345. \
  346. {\
  347. \
  348. if($$0 == "CURL_LIB_C_FILES") {\
  349. split(lib_srcs, arr);\
  350. for(val in arr) gen_element(proj_type, "lib", arr[val]);\
  351. }\
  352. else if($$0 == "CURL_LIB_H_FILES") {\
  353. split(lib_hdrs, arr);\
  354. for(val in arr) gen_element(proj_type, "lib", arr[val]);\
  355. }\
  356. else if($$0 == "CURL_LIB_RC_FILES") {\
  357. split(lib_rc, arr);\
  358. for(val in arr) gen_element(proj_type, "lib", arr[val]);\
  359. }\
  360. else if($$0 == "CURL_LIB_VAUTH_C_FILES") {\
  361. split(lib_vauth_srcs, arr);\
  362. for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
  363. }\
  364. else if($$0 == "CURL_LIB_VAUTH_H_FILES") {\
  365. split(lib_vauth_hdrs, arr);\
  366. for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
  367. }\
  368. else if($$0 == "CURL_LIB_VTLS_C_FILES") {\
  369. split(lib_vtls_srcs, arr);\
  370. for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
  371. }\
  372. else if($$0 == "CURL_LIB_VTLS_H_FILES") {\
  373. split(lib_vtls_hdrs, arr);\
  374. for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
  375. }\
  376. else if($$0 == "CURL_SRC_C_FILES") {\
  377. split(src_srcs, arr);\
  378. for(val in arr) gen_element(proj_type, "src", arr[val]);\
  379. }\
  380. else if($$0 == "CURL_SRC_H_FILES") {\
  381. split(src_hdrs, arr);\
  382. for(val in arr) gen_element(proj_type, "src", arr[val]);\
  383. }\
  384. else if($$0 == "CURL_SRC_RC_FILES") {\
  385. split(src_rc, arr);\
  386. for(val in arr) gen_element(proj_type, "src", arr[val]);\
  387. }\
  388. else if($$0 == "CURL_SRC_X_C_FILES") {\
  389. split(src_x_srcs, arr);\
  390. for(val in arr) {\
  391. sub(/..\/lib\//, "", arr[val]);\
  392. gen_element(proj_type, "lib", arr[val]);\
  393. }\
  394. }\
  395. else if($$0 == "CURL_SRC_X_H_FILES") {\
  396. split(src_x_hdrs, arr);\
  397. for(val in arr) {\
  398. sub(/..\/lib\//, "", arr[val]);\
  399. gen_element(proj_type, "lib", arr[val]);\
  400. }\
  401. }\
  402. else\
  403. printf("%s\r\n", $$0);\
  404. }';\
  405. \
  406. echo "generating '$(VC6_LIBDSP)'"; \
  407. awk -v proj_type=dsp \
  408. -v lib_srcs="$$sorted_lib_srcs" \
  409. -v lib_hdrs="$$sorted_lib_hdrs" \
  410. -v lib_rc="$$win32_lib_rc" \
  411. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  412. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  413. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  414. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  415. "$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \
  416. \
  417. echo "generating '$(VC6_SRCDSP)'"; \
  418. awk -v proj_type=dsp \
  419. -v src_srcs="$$sorted_src_srcs" \
  420. -v src_hdrs="$$sorted_src_hdrs" \
  421. -v src_rc="$$win32_src_rc" \
  422. -v src_x_srcs="$$sorted_src_x_srcs" \
  423. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  424. "$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \
  425. \
  426. echo "generating '$(VC7_LIBVCPROJ)'"; \
  427. awk -v proj_type=vcproj1 \
  428. -v lib_srcs="$$sorted_lib_srcs" \
  429. -v lib_hdrs="$$sorted_lib_hdrs" \
  430. -v lib_rc="$$win32_lib_rc" \
  431. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  432. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  433. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  434. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  435. "$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \
  436. \
  437. echo "generating '$(VC7_SRCVCPROJ)'"; \
  438. awk -v proj_type=vcproj1 \
  439. -v src_srcs="$$sorted_src_srcs" \
  440. -v src_hdrs="$$sorted_src_hdrs" \
  441. -v src_rc="$$win32_src_rc" \
  442. -v src_x_srcs="$$sorted_src_x_srcs" \
  443. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  444. "$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \
  445. \
  446. echo "generating '$(VC71_LIBVCPROJ)'"; \
  447. awk -v proj_type=vcproj1 \
  448. -v lib_srcs="$$sorted_lib_srcs" \
  449. -v lib_hdrs="$$sorted_lib_hdrs" \
  450. -v lib_rc="$$win32_lib_rc" \
  451. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  452. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  453. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  454. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  455. "$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \
  456. \
  457. echo "generating '$(VC71_SRCVCPROJ)'"; \
  458. awk -v proj_type=vcproj1 \
  459. -v src_srcs="$$sorted_src_srcs" \
  460. -v src_hdrs="$$sorted_src_hdrs" \
  461. -v src_rc="$$win32_src_rc" \
  462. -v src_x_srcs="$$sorted_src_x_srcs" \
  463. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  464. "$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \
  465. \
  466. echo "generating '$(VC8_LIBVCPROJ)'"; \
  467. awk -v proj_type=vcproj2 \
  468. -v lib_srcs="$$sorted_lib_srcs" \
  469. -v lib_hdrs="$$sorted_lib_hdrs" \
  470. -v lib_rc="$$win32_lib_rc" \
  471. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  472. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  473. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  474. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  475. "$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \
  476. \
  477. echo "generating '$(VC8_SRCVCPROJ)'"; \
  478. awk -v proj_type=vcproj2 \
  479. -v src_srcs="$$sorted_src_srcs" \
  480. -v src_hdrs="$$sorted_src_hdrs" \
  481. -v src_rc="$$win32_src_rc" \
  482. -v src_x_srcs="$$sorted_src_x_srcs" \
  483. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  484. "$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \
  485. \
  486. echo "generating '$(VC9_LIBVCPROJ)'"; \
  487. awk -v proj_type=vcproj2 \
  488. -v lib_srcs="$$sorted_lib_srcs" \
  489. -v lib_hdrs="$$sorted_lib_hdrs" \
  490. -v lib_rc="$$win32_lib_rc" \
  491. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  492. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  493. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  494. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  495. "$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \
  496. \
  497. echo "generating '$(VC9_SRCVCPROJ)'"; \
  498. awk -v proj_type=vcproj2 \
  499. -v src_srcs="$$sorted_src_srcs" \
  500. -v src_hdrs="$$sorted_src_hdrs" \
  501. -v src_rc="$$win32_src_rc" \
  502. -v src_x_srcs="$$sorted_src_x_srcs" \
  503. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  504. "$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \
  505. \
  506. echo "generating '$(VC10_LIBVCXPROJ)'"; \
  507. awk -v proj_type=vcxproj \
  508. -v lib_srcs="$$sorted_lib_srcs" \
  509. -v lib_hdrs="$$sorted_lib_hdrs" \
  510. -v lib_rc="$$win32_lib_rc" \
  511. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  512. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  513. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  514. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  515. "$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \
  516. \
  517. echo "generating '$(VC10_SRCVCXPROJ)'"; \
  518. awk -v proj_type=vcxproj \
  519. -v src_srcs="$$sorted_src_srcs" \
  520. -v src_hdrs="$$sorted_src_hdrs" \
  521. -v src_rc="$$win32_src_rc" \
  522. -v src_x_srcs="$$sorted_src_x_srcs" \
  523. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  524. "$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
  525. \
  526. echo "generating '$(VC11_LIBVCXPROJ)'"; \
  527. awk -v proj_type=vcxproj \
  528. -v lib_srcs="$$sorted_lib_srcs" \
  529. -v lib_hdrs="$$sorted_lib_hdrs" \
  530. -v lib_rc="$$win32_lib_rc" \
  531. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  532. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  533. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  534. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  535. "$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \
  536. \
  537. echo "generating '$(VC11_SRCVCXPROJ)'"; \
  538. awk -v proj_type=vcxproj \
  539. -v src_srcs="$$sorted_src_srcs" \
  540. -v src_hdrs="$$sorted_src_hdrs" \
  541. -v src_rc="$$win32_src_rc" \
  542. -v src_x_srcs="$$sorted_src_x_srcs" \
  543. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  544. "$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
  545. \
  546. echo "generating '$(VC12_LIBVCXPROJ)'"; \
  547. awk -v proj_type=vcxproj \
  548. -v lib_srcs="$$sorted_lib_srcs" \
  549. -v lib_hdrs="$$sorted_lib_hdrs" \
  550. -v lib_rc="$$win32_lib_rc" \
  551. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  552. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  553. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  554. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  555. "$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \
  556. \
  557. echo "generating '$(VC12_SRCVCXPROJ)'"; \
  558. awk -v proj_type=vcxproj \
  559. -v src_srcs="$$sorted_src_srcs" \
  560. -v src_hdrs="$$sorted_src_hdrs" \
  561. -v src_rc="$$win32_src_rc" \
  562. -v src_x_srcs="$$sorted_src_x_srcs" \
  563. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  564. "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \
  565. \
  566. echo "generating '$(VC14_LIBVCXPROJ)'"; \
  567. awk -v proj_type=vcxproj \
  568. -v lib_srcs="$$sorted_lib_srcs" \
  569. -v lib_hdrs="$$sorted_lib_hdrs" \
  570. -v lib_rc="$$win32_lib_rc" \
  571. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  572. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  573. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  574. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  575. "$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \
  576. \
  577. echo "generating '$(VC14_SRCVCXPROJ)'"; \
  578. awk -v proj_type=vcxproj \
  579. -v src_srcs="$$sorted_src_srcs" \
  580. -v src_hdrs="$$sorted_src_hdrs" \
  581. -v src_rc="$$win32_src_rc" \
  582. -v src_x_srcs="$$sorted_src_x_srcs" \
  583. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  584. "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \
  585. \
  586. echo "generating '$(VC15_LIBVCXPROJ)'"; \
  587. awk -v proj_type=vcxproj \
  588. -v lib_srcs="$$sorted_lib_srcs" \
  589. -v lib_hdrs="$$sorted_lib_hdrs" \
  590. -v lib_rc="$$win32_lib_rc" \
  591. -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
  592. -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
  593. -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
  594. -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
  595. "$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \
  596. \
  597. echo "generating '$(VC15_SRCVCXPROJ)'"; \
  598. awk -v proj_type=vcxproj \
  599. -v src_srcs="$$sorted_src_srcs" \
  600. -v src_hdrs="$$sorted_src_hdrs" \
  601. -v src_rc="$$win32_src_rc" \
  602. -v src_x_srcs="$$sorted_src_x_srcs" \
  603. -v src_x_hdrs="$$sorted_src_x_hdrs" \
  604. "$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };)
  605. tidy:
  606. (cd src && $(MAKE) tidy)
  607. (cd lib && $(MAKE) tidy)