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