Makefile.am 23 KB

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