2
0

Makefile.am 23 KB

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