Makefile.am 28 KB

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