diff options
author | Mark Snelling <m.snelling@solaisecapital.com> | 2012-11-14 23:19:32 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-11-14 23:20:10 +0100 |
commit | 6d8443a24597f2dea7db431c9c6a722080a071d0 (patch) | |
tree | 88cc32f87000a71413989bcb29478142b2ddc4fe /winbuild | |
parent | 53c83ee3edc0a375843fca778315a55ce9c9690a (diff) |
winbuild: Fix PDB file output
And fix some newlines to be proper CRLF
Bug: http://curl.haxx.se/bug/view.cgi?id=3586741
Diffstat (limited to 'winbuild')
-rw-r--r-- | winbuild/Makefile.vc | 26 | ||||
-rw-r--r-- | winbuild/MakefileBuild.vc | 53 |
2 files changed, 47 insertions, 32 deletions
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc index 222576e01..bc93c4b50 100644 --- a/winbuild/Makefile.vc +++ b/winbuild/Makefile.vc @@ -32,7 +32,7 @@ CFGSET=true !MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
!MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
!MESSAGE DEBUG=<yes or no> - Debug builds
-!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others) +!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
!ERROR please choose a valid mode
!ENDIF
@@ -58,11 +58,11 @@ ENABLE_SSPI = $(USE_SSPI) !IFNDEF MACHINE
!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
MACHINE = x64
-!ELSE +!ELSE
MACHINE = x86
-!ENDIF -!ENDIF - +!ENDIF
+!ENDIF
+
!IFNDEF ENABLE_IDN
USE_IDN = true
!ELSEIF "$(ENABLE_IDN)"=="yes"
@@ -129,8 +129,8 @@ USE_SSH2 = true SSH2 = static
!ENDIF
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-$(MACHINE) - +CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
+
!IF "$(DEBUG)"=="yes"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE
@@ -179,18 +179,18 @@ CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
$(MODE):
- @SET DIROBJ=$(LIBCURL_DIROBJ) + @SET DIROBJ=$(LIBCURL_DIROBJ)
@SET MACRO_NAME=LIBCURL_OBJS
@SET OUTFILE=LIBCURL_OBJS.inc
@gen_resp_file.bat $(LIBCURL_OBJS)
- - @SET DIROBJ=$(CURL_DIROBJ) +
+ @SET DIROBJ=$(CURL_DIROBJ)
@SET MACRO_NAME=CURL_OBJS
@SET OUTFILE=CURL_OBJS.inc
@gen_resp_file.bat $(CURL_OBJS)
- - @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB) - @SET MACHINE=$(MACHINE) +
+ @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
+ @SET MACHINE=$(MACHINE)
@SET USE_IDN=$(USE_IDN)
@SET USE_IPV6=$(USE_IPV6)
@SET USE_SSPI=$(USE_SSPI)
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index 016ba67a9..7e2904bbe 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -66,13 +66,24 @@ LFLAGS_PDB = /incremental:no /opt:ref,icf CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
-WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib -LIB_NAME_STATIC = libcurl_a.lib
-LIB_NAME_STATIC_DEBUG = libcurl_a_debug.lib
-LIB_NAME_DLL = libcurl.dll
-LIB_NAME_IMP = libcurl.lib
-LIB_NAME_DLL_DEBUG = libcurl_debug.dll
-LIB_NAME_IMP_DEBUG = libcurl_debug.lib
+WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
+
+BASE_NAME = libcurl
+BASE_NAME_DEBUG = $(BASE_NAME)_debug
+BASE_NAME_STATIC = $(BASE_NAME)_a
+BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug
+
+LIB_NAME_STATIC = $(BASE_NAME_STATIC).lib
+LIB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).lib
+LIB_NAME_DLL = $(BASE_NAME).dll
+LIB_NAME_IMP = $(BASE_NAME).lib
+LIB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).dll
+LIB_NAME_IMP_DEBUG = $(BASE_NAME_DEBUG).lib
+
+PDB_NAME_STATIC = $(BASE_NAME_STATIC).pdb
+PDB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).pdb
+PDB_NAME_DLL = $(BASE_NAME).pdb
+PDB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).pdb
# CURL Command section
PROGRAM_NAME = curl.exe
@@ -149,8 +160,8 @@ USE_IDN = true !ENDIF
!IF "$(USE_IDN)"=="true"
-IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -WIN_LIBS = $(WIN_LIBS) Normaliz.lib +IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
+WIN_LIBS = $(WIN_LIBS) Normaliz.lib
!ENDIF
@@ -197,7 +208,7 @@ USE_WINSSL = $(USE_SSPI) USE_WINSSL = true
!ENDIF
- +
!IF "$(USE_WINSSL)"=="true"
!IF "$(USE_SSPI)"!="true"
!ERROR cannot build with WinSSL without SSPI
@@ -240,7 +251,7 @@ CFGSET = true !ERROR please choose a valid mode
!ENDIF
- +
# CURL_XX macros are for the curl.exe command
@@ -262,25 +273,29 @@ CURL_CC = $(CURL_CC) $(CURL_CFLAGS) !IF "$(AS_DLL)" == "true"
-LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
+LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
!IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_DLL_DEBUG)
LNK = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
+PDB = $(PDB_NAME_DLL_DEBUG)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
!ELSE
TARGET = $(LIB_NAME_DLL)
LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
+PDB = $(PDB_NAME_DLL)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
!ENDIF
-RESOURCE = $(LIB_DIROBJ)\libcurl.res
+RESOURCE = $(LIB_DIROBJ)\libcurl.res
# AS_DLL
!ELSE
!IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_STATIC_DEBUG)
+PDB = $(PDB_NAME_STATIC_DEBUG)
!ELSE
TARGET = $(LIB_NAME_STATIC)
+PDB = $(PDB_NAME_STATIC)
!ENDIF
LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
CC = $(CC) $(CFLAGS_LIBCURL_STATIC)
@@ -303,10 +318,10 @@ CFLAGS = $(CFLAGS) $(SSH2_CFLAGS) LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
!ENDIF
-!IF "$(USE_IDN)"=="true" -CFLAGS = $(CFLAGS) $(IDN_CFLAGS) -!ENDIF - +!IF "$(USE_IDN)"=="true"
+CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
+!ENDIF
+
!IF "$(USE_IPV6)"=="true"
CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
!ENDIF
@@ -320,7 +335,7 @@ CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS) !ENDIF
!IF "$(GEN_PDB)"=="true"
-CFLAGS = $(CFLAGS) $(CFLAGS_PDB)
+CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
!ENDIF
@@ -382,7 +397,7 @@ $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR) @echo LFLAGS: $(LFLAGS)
@echo GenPDB: $(GEN_PDB)
@echo Debug: $(DEBUG)
- @echo Machine: $(MACHINE) + @echo Machine: $(MACHINE)
$(LNK) $(LFLAGS) $(LIB_OBJS)
@echo Copying libs...
@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1
|