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