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