1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

winbuild: Fix PDB file output

And fix some newlines to be proper CRLF

Bug: http://curl.haxx.se/bug/view.cgi?id=3586741
This commit is contained in:
Mark Snelling 2012-11-14 23:19:32 +01:00 committed by Daniel Stenberg
parent 53c83ee3ed
commit 6d8443a245
2 changed files with 47 additions and 32 deletions

View File

@ -32,7 +32,7 @@ CFGSET=true
!MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes !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 GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
!MESSAGE DEBUG=<yes or no> - Debug builds !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 !ERROR please choose a valid mode
!ENDIF !ENDIF
@ -58,11 +58,11 @@ ENABLE_SSPI = $(USE_SSPI)
!IFNDEF MACHINE !IFNDEF MACHINE
!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64" !IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
MACHINE = x64 MACHINE = x64
!ELSE !ELSE
MACHINE = x86 MACHINE = x86
!ENDIF !ENDIF
!ENDIF !ENDIF
!IFNDEF ENABLE_IDN !IFNDEF ENABLE_IDN
USE_IDN = true USE_IDN = true
!ELSEIF "$(ENABLE_IDN)"=="yes" !ELSEIF "$(ENABLE_IDN)"=="yes"
@ -129,8 +129,8 @@ USE_SSH2 = true
SSH2 = static SSH2 = static
!ENDIF !ENDIF
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-$(MACHINE) CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
!IF "$(DEBUG)"=="yes" !IF "$(DEBUG)"=="yes"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE !ELSE
@ -179,18 +179,18 @@ CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\ DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
$(MODE): $(MODE):
@SET DIROBJ=$(LIBCURL_DIROBJ) @SET DIROBJ=$(LIBCURL_DIROBJ)
@SET MACRO_NAME=LIBCURL_OBJS @SET MACRO_NAME=LIBCURL_OBJS
@SET OUTFILE=LIBCURL_OBJS.inc @SET OUTFILE=LIBCURL_OBJS.inc
@gen_resp_file.bat $(LIBCURL_OBJS) @gen_resp_file.bat $(LIBCURL_OBJS)
@SET DIROBJ=$(CURL_DIROBJ) @SET DIROBJ=$(CURL_DIROBJ)
@SET MACRO_NAME=CURL_OBJS @SET MACRO_NAME=CURL_OBJS
@SET OUTFILE=CURL_OBJS.inc @SET OUTFILE=CURL_OBJS.inc
@gen_resp_file.bat $(CURL_OBJS) @gen_resp_file.bat $(CURL_OBJS)
@SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB) @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
@SET MACHINE=$(MACHINE) @SET MACHINE=$(MACHINE)
@SET USE_IDN=$(USE_IDN) @SET USE_IDN=$(USE_IDN)
@SET USE_IPV6=$(USE_IPV6) @SET USE_IPV6=$(USE_IPV6)
@SET USE_SSPI=$(USE_SSPI) @SET USE_SSPI=$(USE_SSPI)

View File

@ -66,13 +66,24 @@ LFLAGS_PDB = /incremental:no /opt:ref,icf
CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
LIB_NAME_STATIC = libcurl_a.lib
LIB_NAME_STATIC_DEBUG = libcurl_a_debug.lib BASE_NAME = libcurl
LIB_NAME_DLL = libcurl.dll BASE_NAME_DEBUG = $(BASE_NAME)_debug
LIB_NAME_IMP = libcurl.lib BASE_NAME_STATIC = $(BASE_NAME)_a
LIB_NAME_DLL_DEBUG = libcurl_debug.dll BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug
LIB_NAME_IMP_DEBUG = libcurl_debug.lib
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 # CURL Command section
PROGRAM_NAME = curl.exe PROGRAM_NAME = curl.exe
@ -149,8 +160,8 @@ USE_IDN = true
!ENDIF !ENDIF
!IF "$(USE_IDN)"=="true" !IF "$(USE_IDN)"=="true"
IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
WIN_LIBS = $(WIN_LIBS) Normaliz.lib WIN_LIBS = $(WIN_LIBS) Normaliz.lib
!ENDIF !ENDIF
@ -197,7 +208,7 @@ USE_WINSSL = $(USE_SSPI)
USE_WINSSL = true USE_WINSSL = true
!ENDIF !ENDIF
!IF "$(USE_WINSSL)"=="true" !IF "$(USE_WINSSL)"=="true"
!IF "$(USE_SSPI)"!="true" !IF "$(USE_SSPI)"!="true"
!ERROR cannot build with WinSSL without SSPI !ERROR cannot build with WinSSL without SSPI
@ -240,7 +251,7 @@ CFGSET = true
!ERROR please choose a valid mode !ERROR please choose a valid mode
!ENDIF !ENDIF
# CURL_XX macros are for the curl.exe command # CURL_XX macros are for the curl.exe command
@ -262,25 +273,29 @@ CURL_CC = $(CURL_CC) $(CURL_CFLAGS)
!IF "$(AS_DLL)" == "true" !IF "$(AS_DLL)" == "true"
LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET) LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
!IF "$(DEBUG)"=="yes" !IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_DLL_DEBUG) TARGET = $(LIB_NAME_DLL_DEBUG)
LNK = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_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) CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
!ELSE !ELSE
TARGET = $(LIB_NAME_DLL) TARGET = $(LIB_NAME_DLL)
LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP) LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
PDB = $(PDB_NAME_DLL)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP) CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
!ENDIF !ENDIF
RESOURCE = $(LIB_DIROBJ)\libcurl.res RESOURCE = $(LIB_DIROBJ)\libcurl.res
# AS_DLL # AS_DLL
!ELSE !ELSE
!IF "$(DEBUG)"=="yes" !IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_STATIC_DEBUG) TARGET = $(LIB_NAME_STATIC_DEBUG)
PDB = $(PDB_NAME_STATIC_DEBUG)
!ELSE !ELSE
TARGET = $(LIB_NAME_STATIC) TARGET = $(LIB_NAME_STATIC)
PDB = $(PDB_NAME_STATIC)
!ENDIF !ENDIF
LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET) LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
CC = $(CC) $(CFLAGS_LIBCURL_STATIC) CC = $(CC) $(CFLAGS_LIBCURL_STATIC)
@ -303,10 +318,10 @@ CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS) LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
!ENDIF !ENDIF
!IF "$(USE_IDN)"=="true" !IF "$(USE_IDN)"=="true"
CFLAGS = $(CFLAGS) $(IDN_CFLAGS) CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
!ENDIF !ENDIF
!IF "$(USE_IPV6)"=="true" !IF "$(USE_IPV6)"=="true"
CFLAGS = $(CFLAGS) $(IPV6_CFLAGS) CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
!ENDIF !ENDIF
@ -320,7 +335,7 @@ CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS)
!ENDIF !ENDIF
!IF "$(GEN_PDB)"=="true" !IF "$(GEN_PDB)"=="true"
CFLAGS = $(CFLAGS) $(CFLAGS_PDB) CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
LFLAGS = $(LFLAGS) $(LFLAGS_PDB) LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
!ENDIF !ENDIF
@ -382,7 +397,7 @@ $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
@echo LFLAGS: $(LFLAGS) @echo LFLAGS: $(LFLAGS)
@echo GenPDB: $(GEN_PDB) @echo GenPDB: $(GEN_PDB)
@echo Debug: $(DEBUG) @echo Debug: $(DEBUG)
@echo Machine: $(MACHINE) @echo Machine: $(MACHINE)
$(LNK) $(LFLAGS) $(LIB_OBJS) $(LNK) $(LFLAGS) $(LIB_OBJS)
@echo Copying libs... @echo Copying libs...
@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1 @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1