aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winbuild/BUILD.WINDOWS.txt1
-rw-r--r--winbuild/Makefile.vc14
-rw-r--r--winbuild/MakefileBuild.vc18
-rwxr-xr-xwinbuild/gen_resp_file.bat2
4 files changed, 17 insertions, 18 deletions
diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt
index 53030cb95..2485078c5 100644
--- a/winbuild/BUILD.WINDOWS.txt
+++ b/winbuild/BUILD.WINDOWS.txt
@@ -68,3 +68,4 @@ where <options> is one or many of:
ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
DEBUG=<yes or no> - Debug builds
+ MACHINE=<X86 or X64> - Target architecture (default is X86) \ No newline at end of file
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index 137be213a..fcffc7411 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -54,6 +54,10 @@ ENABLE_SSPI = $(USE_SSPI)
!ENDIF
# default options
+!IFNDEF MACHINE
+MACHINE = X86
+!ENDIF
+
!IFNDEF ENABLE_IDN
USE_IDN = true
!ELSEIF "$(ENABLE_IDN)"=="yes"
@@ -120,6 +124,8 @@ USE_SSH2 = true
SSH2 = static
!ENDIF
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-$(MACHINE)
+
!IF "$(DEBUG)"=="yes"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE
@@ -168,14 +174,18 @@ CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
$(MODE):
- @SET LIBCURL_DIROBJ=$(LIBCURL_DIROBJ)
+ @SET DIROBJ=$(LIBCURL_DIROBJ)
@SET MACRO_NAME=LIBCURL_OBJS
@SET OUTFILE=LIBCURL_OBJS.inc
@gen_resp_file.bat $(LIBCURL_OBJS)
- @SET LIBCURL_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 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 c5450c114..9ba6291f7 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -211,9 +211,6 @@ SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL
GEN_PDB = true
!ENDIF
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
!IFDEF EMBEND_MANIFEST
MANIFESTTOOL = mt -manifest $(DIRDIST)\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\$(PROGRAM_NAME);1
@@ -245,7 +242,7 @@ WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
!ERROR please choose a valid mode
!ENDIF
-CONFIG_NAME_LIB = libcurl
+
# CURL_XX macros are for the curl.exe command
@@ -255,14 +252,12 @@ CC = $(CC_DEBUG) $(RTLIB_DEBUG)
CURL_CC = $(CC)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE
RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
CC = $(CC_NODEBUG) $(RTLIB)
CURL_CC = $(CC)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
!ENDIF
CURL_CC = $(CURL_CC) $(CURL_CFLAGS)
@@ -280,7 +275,6 @@ LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
!ENDIF
RESOURCE = $(LIB_DIROBJ)\libcurl.res
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
# AS_DLL
!ELSE
@@ -292,7 +286,6 @@ TARGET = $(LIB_NAME_STATIC)
!ENDIF
LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
CC = $(CC) $(CFLAGS_LIBCURL_STATIC)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
# AS_DLL
!ENDIF
@@ -300,38 +293,32 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
!IF "$(USE_SSL)"=="true"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
!ENDIF
!IF "$(USE_ZLIB)"=="true"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
!ENDIF
!IF "$(USE_SSH2)"=="true"
CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
!ENDIF
!IF "$(USE_IPV6)"=="true"
CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
!ENDIF
!IF "$(USE_SSPI)"=="true"
CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
!ENDIF
!IF "$(USE_SPNEGO)"=="true"
CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-spnego
!ENDIF
!IF "$(USE_WINSSL)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
+#
!ENDIF
!IF "$(GEN_PDB)"=="true"
@@ -397,6 +384,7 @@ $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
@echo LFLAGS: $(LFLAGS)
@echo GenPDB: $(GEN_PDB)
@echo Debug: $(DEBUG)
+ @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
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
index c2fa66777..d08b01edc 100755
--- a/winbuild/gen_resp_file.bat
+++ b/winbuild/gen_resp_file.bat
@@ -1,6 +1,6 @@
@echo OFF
@del %OUTFILE%
@echo %MACRO_NAME% = \> %OUTFILE%
-@for %%i in (%*) do @echo %LIBCURL_DIROBJ%/%%i \>> %OUTFILE%
+@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE%
@echo. >> %OUTFILE%
:END