Makefile.am 23 KB

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