Makefile.am 21 KB

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