]> granicus.if.org Git - curl/commitdiff
Added some hacks in order to build with VC from git.
authorGuenter Knauf <lists@gknw.net>
Wed, 1 Sep 2010 22:22:41 +0000 (00:22 +0200)
committerGuenter Knauf <lists@gknw.net>
Wed, 1 Sep 2010 22:22:41 +0000 (00:22 +0200)
Adam Light posted this patch to the list which enables builds from
git with VC versions other than vc6; also he added a vc10 target.

Makefile.dist
maketgz

index f9f6b5fbe785b6f26ff699c0ec27f0ec5d9e4a7e..1ad2c6649f01c971bdfc635d4f3a63af564b2405 100644 (file)
@@ -96,13 +96,13 @@ mingw32-clean:
        $(MAKE) -C lib -f Makefile.m32 clean
        $(MAKE) -C src -f Makefile.m32 clean
 
-vc-clean:
+vc-clean: $(VC)
        cd lib
        nmake -f Makefile.$(VC) clean
        cd ..\src
        nmake -f Makefile.$(VC) clean
 
-vc-all:
+vc-all: $(VC)
        cd lib
        nmake -f Makefile.$(VC) cfg=release
        nmake -f Makefile.$(VC) cfg=release-ssl
@@ -127,85 +127,85 @@ vc-all:
        nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
        nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
 
-vc:
+vc: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release
        cd ..\src
        nmake /f Makefile.$(VC)
 
-vc-x64:
+vc-x64: $(VC)
        cd lib
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
        cd ..\src
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
 
-vc-zlib:
+vc-zlib: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-zlib
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-zlib
 
-vc-ssl:
+vc-ssl: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-ssl
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-ssl
 
-vc-ssl-zlib:
+vc-ssl-zlib: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-ssl-zlib
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-ssl-zlib
 
-vc-x64-ssl-zlib:
+vc-x64-ssl-zlib: $(VC)
        cd lib
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
        cd ..\src
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
 
-vc-ssl-dll:
+vc-ssl-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-ssl-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-ssl-dll
 
-vc-dll-ssl-dll:
+vc-dll-ssl-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
 
-vc-dll:
+vc-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-dll
 
-vc-dll-zlib-dll:
+vc-dll-zlib-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
 
-vc-dll-ssl-dll-zlib-dll:
+vc-dll-ssl-dll-zlib-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
 
-vc-ssl-dll-zlib-dll:
+vc-ssl-dll-zlib-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
 
-vc-zlib-dll:
+vc-zlib-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-zlib-dll
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-zlib-dll
 
-vc-sspi:
+vc-sspi: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
        cd ..\src
@@ -267,6 +267,8 @@ linux: all
 
 linux-ssl: ssl
 
+# We don't need to do anything for vc6.
+vc6:
 
 vc8: lib/Makefile.vc8 src/Makefile.vc8
 
@@ -289,6 +291,17 @@ src/Makefile.vc9: src/Makefile.vc6
        @echo "generate $@"
        @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
 
+# VC10 makefiles are for use with VS2010
+vc10: lib/Makefile.vc10 src/Makefile.vc10
+
+lib/Makefile.vc10: lib/Makefile.vc6
+       @echo "generate $@"
+       @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" lib/Makefile.vc6 > lib/Makefile.vc10
+
+src/Makefile.vc10: src/Makefile.vc6
+       @echo "generate $@"
+       @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" src/Makefile.vc6 > src/Makefile.vc10
+
 ca-bundle: lib/mk-ca-bundle.pl
        @echo "generate a fresh ca-bundle.crt"
        @perl $< -b -l -u lib/ca-bundle.crt
diff --git a/maketgz b/maketgz
index d4bcd269a63efa46994ac85ff20904b9857a8f94..b2a09be48dd8d04e5f01d6dbe90599456e0a36ec 100755 (executable)
--- a/maketgz
+++ b/maketgz
@@ -60,8 +60,8 @@ sed -e 's/^#define LIBCURL_VERSION .*/#define LIBCURL_VERSION "'$libversion'"/g'
 # Replace version number in header file:
 sed 's/#define CURL_VERSION .*/#define CURL_VERSION "'$curlversion'"/g' $CHEADER >$CHEADER.dist
 
-# Generate VC8 and VC9 versions from the VC6 Makefile versions
-for ver in vc8 vc9; do
+# Generate VC8, VC9, and VC10 versions from the VC6 Makefile versions
+for ver in vc8 vc9 vc10; do
   make -f Makefile.dist $ver
   mv src/Makefile.$ver src/Makefile.$ver.dist
   mv lib/Makefile.$ver lib/Makefile.$ver.dist