No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 23KB

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