mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-13 06:01:03 +00:00
VS2010 build: Added library building instructions.
This commit is contained in:
parent
922bf25075
commit
70845714b5
5
winbuild/.gitignore
vendored
5
winbuild/.gitignore
vendored
@ -73,3 +73,8 @@ packages/
|
||||
#Library archives
|
||||
*.zip
|
||||
*.rar
|
||||
|
||||
#Library binaries
|
||||
*.dll
|
||||
*.a
|
||||
|
||||
|
494
winbuild/MakefileBuild.vc
Normal file
494
winbuild/MakefileBuild.vc
Normal file
@ -0,0 +1,494 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1999 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for building libcurl with MSVC 6, 7, 8, 9, 10, 11 and 12
|
||||
#
|
||||
# Usage: see usage message below
|
||||
# Should be invoked from winbuild directory
|
||||
# Edit the paths and desired library name
|
||||
# SSL path is only required if you intend compiling
|
||||
# with SSL.
|
||||
#
|
||||
# This make file leaves the result either a .lib or .dll file
|
||||
# in the \lib directory. It should be called from the \lib
|
||||
# directory.
|
||||
#
|
||||
# An option would have been to allow the source directory to
|
||||
# be specified, but I saw no requirement.
|
||||
#
|
||||
# Another option would have been to leave the .lib and .dll
|
||||
# files in the "cfg" directory, but then the make file
|
||||
# in \src would need to be changed.
|
||||
#
|
||||
##############################################################
|
||||
|
||||
CFGSET=FALSE
|
||||
WINBUILD_DIR=`cd`
|
||||
ZIP = zip.exe
|
||||
|
||||
!IF "$(VC)"=="6"
|
||||
CC_NODEBUG = cl.exe /O2 /DNDEBUG
|
||||
CC_DEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
|
||||
CFLAGS = /I. /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
|
||||
!ELSE
|
||||
CC_NODEBUG = cl.exe /O2 /DNDEBUG
|
||||
CC_DEBUG = cl.exe /Od /D_DEBUG /RTC1 /Z7 /LDd /W3
|
||||
CFLAGS = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
|
||||
!ENDIF
|
||||
|
||||
LFLAGS = /nologo /machine:$(MACHINE)
|
||||
LNKDLL = link.exe /DLL
|
||||
LNKLIB = link.exe /lib
|
||||
|
||||
CFLAGS_PDB = /Zi
|
||||
LFLAGS_PDB = /incremental:no /opt:ref,icf
|
||||
|
||||
CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
|
||||
|
||||
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
|
||||
CURL_CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c
|
||||
CURL_LFLAGS = /nologo /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
|
||||
CURL_RESFLAGS = /i../include
|
||||
|
||||
#############################################################
|
||||
## Nothing more to do below this line!
|
||||
LIBCURL_SRC_DIR = ..\lib
|
||||
CURL_SRC_DIR = ..\src
|
||||
|
||||
!IFNDEF WITH_DEVEL
|
||||
WITH_DEVEL = ../../deps
|
||||
!ENDIF
|
||||
DEVEL_INCLUDE = $(WITH_DEVEL)/include
|
||||
DEVEL_LIB = $(WITH_DEVEL)/lib/VC/static
|
||||
DEVEL_BIN = $(WITH_DEVEL)/bin
|
||||
|
||||
CFLAGS = $(CFLAGS) /I"$(DEVEL_INCLUDE)"
|
||||
LFLAGS = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"
|
||||
|
||||
# Runtime library configuration
|
||||
!IF "$(MODE)"=="static"
|
||||
RTLIB = /MT
|
||||
RTLIB_DEBUG = /MTd
|
||||
RTLIB_SUFFIX = MT
|
||||
!ELSE
|
||||
RTLIB = /MD
|
||||
RTLIB_DEBUG = /MDd
|
||||
RTLIB_SUFFIX = MD
|
||||
!ENDIF
|
||||
|
||||
!IF "$(DEBUG)"=="yes"
|
||||
RTLIB_SUFFIX = $(RTLIB_SUFFIX)d
|
||||
!ENDIF
|
||||
|
||||
!IF "$(WITH_SSL)"=="dll"
|
||||
SSL_LIBS = libeay32.lib ssleay32.lib
|
||||
USE_SSL = true
|
||||
SSL = dll
|
||||
!ELSEIF "$(WITH_SSL)"=="static"
|
||||
SSL_LIBS = libeay32$(RTLIB_SUFFIX).lib ssleay32$(RTLIB_SUFFIX).lib gdi32.lib user32.lib
|
||||
USE_SSL = true
|
||||
SSL = static
|
||||
!ENDIF
|
||||
|
||||
!IFDEF USE_SSL
|
||||
SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(WITH_ZLIB)"=="dll"
|
||||
ZLIB_LIBS = zlib.lib
|
||||
USE_ZLIB = true
|
||||
ZLIB = dll
|
||||
!ELSEIF "$(WITH_ZLIB)"=="static"
|
||||
ZLIB_LIBS = zlib_a.lib
|
||||
USE_ZLIB = true
|
||||
ZLIB = static
|
||||
!ENDIF
|
||||
|
||||
!IFDEF USE_ZLIB
|
||||
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(WITH_SSH2)"=="dll"
|
||||
SSH2_LIBS = libssh2.lib
|
||||
USE_SSH2 = true
|
||||
SSH2 = dll
|
||||
!ELSEIF "$(WITH_SSH2)"=="static"
|
||||
SSH2_LIBS = libssh2_a.lib user32.lib
|
||||
USE_SSH2 = true
|
||||
SSH2 = static
|
||||
!ENDIF
|
||||
|
||||
!IFDEF USE_SSH2
|
||||
SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2
|
||||
SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(WITH_DEVEL)/include/libssh2
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFNDEF USE_IDN
|
||||
USE_IDN = true
|
||||
!ELSEIF "$(USE_IDN)"=="yes"
|
||||
USE_IDN = true
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_IDN)"=="true"
|
||||
IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
|
||||
WIN_LIBS = $(WIN_LIBS) Normaliz.lib
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFNDEF USE_IPV6
|
||||
USE_IPV6 = true
|
||||
!ELSEIF "$(USE_IPV6)"=="yes"
|
||||
USE_IPV6 = true
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_IPV6)"=="true"
|
||||
IPV6_CFLAGS = $(IPV6_CFLAGS) /DUSE_IPV6
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFNDEF USE_SSPI
|
||||
USE_SSPI = true
|
||||
!ELSEIF "$(USE_SSPI)"=="yes"
|
||||
USE_SSPI = true
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SSPI)"=="true"
|
||||
SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_WINDOWS_SSPI
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFNDEF USE_SPNEGO
|
||||
USE_SPNEGO = true
|
||||
!ELSEIF "$(USE_SPNEGO)"=="yes"
|
||||
USE_SPNEGO = true
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SPNEGO)"=="true"
|
||||
SPNEGO_CFLAGS = $(SPNEGO_CFLAGS) /DHAVE_SPNEGO
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFNDEF USE_WINSSL
|
||||
!IF "$(USE_SSL)"=="true"
|
||||
USE_WINSSL = false
|
||||
!ELSE
|
||||
USE_WINSSL = $(USE_SSPI)
|
||||
!ENDIF
|
||||
!ELSEIF "$(USE_WINSSL)"=="yes"
|
||||
USE_WINSSL = true
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(USE_WINSSL)"=="true"
|
||||
!IF "$(USE_SSPI)"!="true"
|
||||
!ERROR cannot build with WinSSL without SSPI
|
||||
!ENDIF
|
||||
SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(GEN_PDB)"=="yes"
|
||||
GEN_PDB = true
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IFDEF EMBEND_MANIFEST
|
||||
MANIFESTTOOL = mt -manifest $(DIRDIST)\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\$(PROGRAM_NAME);1
|
||||
!ENDIF
|
||||
|
||||
!IF "$(MODE)"=="static"
|
||||
TARGET = $(LIB_NAME_STATIC)
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
|
||||
AS_DLL = false
|
||||
CFGSET = true
|
||||
!ELSEIF "$(MODE)"=="dll"
|
||||
TARGET = $(LIB_NAME_DLL)
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
|
||||
AS_DLL = true
|
||||
CFGSET = true
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFGSET)" == "FALSE"
|
||||
!ERROR please choose a valid mode
|
||||
!ENDIF
|
||||
|
||||
|
||||
|
||||
# CURL_XX macros are for the curl.exe command
|
||||
|
||||
!IF "$(DEBUG)"=="yes"
|
||||
RC_FLAGS = /dDEBUGBUILD=1 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
|
||||
CC = $(CC_DEBUG) $(RTLIB_DEBUG)
|
||||
|
||||
CURL_CC = $(CC)
|
||||
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc
|
||||
!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
|
||||
!ENDIF
|
||||
|
||||
CURL_CC = $(CURL_CC) $(CURL_CFLAGS)
|
||||
|
||||
!IF "$(AS_DLL)" == "true"
|
||||
|
||||
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
|
||||
|
||||
# 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)
|
||||
|
||||
# AS_DLL
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SSL)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
|
||||
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_ZLIB)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
|
||||
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SSH2)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
|
||||
LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_IDN)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_IPV6)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SSPI)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(USE_SPNEGO)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(GEN_PDB)"=="true"
|
||||
CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
|
||||
LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
|
||||
!ENDIF
|
||||
|
||||
LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
|
||||
CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
|
||||
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
|
||||
|
||||
#
|
||||
# curl.exe
|
||||
#
|
||||
CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"
|
||||
|
||||
#!IF "$(CFG)" == "release-ssh2-ssl-dll-zlib"
|
||||
#TARGET = $(LIB_NAME_STATIC)
|
||||
#LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBS) $(SSH2LIBS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) $(LFLAGSSSH) /out:$(LIB_DIROBJ)\$(TARGET)
|
||||
#CC = $(CCNODBG) $(RTLIB) $(SSL_CFLAGS) $(ZLIB_CFLAGS) $(CFLAGSLIB) $(SSH2_CFLAGS)
|
||||
#CFGSET = TRUE
|
||||
#!ENDIF
|
||||
|
||||
#######################
|
||||
# Only the clean target can be used if a config was not provided.
|
||||
#
|
||||
!IF "$(CFGSET)" == "FALSE"
|
||||
clean:
|
||||
@-erase /s *.dll 2> NUL
|
||||
@-erase /s *.exp 2> NUL
|
||||
@-erase /s *.idb 2> NUL
|
||||
@-erase /s *.lib 2> NUL
|
||||
@-erase /s *.obj 2> NUL
|
||||
@-erase /s *.pch 2> NUL
|
||||
@-erase /s *.pdb 2> NUL
|
||||
@-erase /s *.res 2> NUL
|
||||
!ELSE
|
||||
# A mode was provided, so the library can be built.
|
||||
#
|
||||
!include CURL_OBJS.inc
|
||||
!include LIBCURL_OBJS.inc
|
||||
|
||||
!IF "$(AS_DLL)" == "true"
|
||||
LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)
|
||||
!ELSE
|
||||
LIB_OBJS = $(LIBCURL_OBJS)
|
||||
!ENDIF
|
||||
|
||||
EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
|
||||
|
||||
all : $(TARGET) $(PROGRAM_NAME)
|
||||
|
||||
package: $(TARGET)
|
||||
@cd $(DIRDIST)
|
||||
@-$(ZIP) -9 -q -r ..\$(CONFIG_NAME_LIB).zip .>nul 2<&1
|
||||
@cd $(MAKEDIR)
|
||||
|
||||
$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
|
||||
@echo Using SSL: $(USE_SSL)
|
||||
@echo Using SSH2: $(USE_SSH2)
|
||||
@echo Using ZLIB: $(USE_ZLIB)
|
||||
@echo Using IDN: $(USE_IDN)
|
||||
@echo Using IPv6: $(USE_IPV6)
|
||||
@echo Using SSPI: $(USE_SSPI)
|
||||
@echo Using SPNEGO: $(USE_SPNEGO)
|
||||
@echo Using WinSSL: $(USE_WINSSL)
|
||||
@echo CFLAGS: $(CFLAGS)
|
||||
@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
|
||||
@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC) $(DIRDIST)\lib\ /y >nul 2<&1
|
||||
@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1
|
||||
@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1
|
||||
@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP) $(DIRDIST)\lib\ /y >nul 2<&1
|
||||
@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1
|
||||
@-copy $(LIB_DIROBJ)\*.exp $(DIRDIST)\lib /y >nul 2<&1
|
||||
@-copy $(LIB_DIROBJ)\*.pdb $(DIRDIST)\lib /y >nul 2<&1
|
||||
@-copy ..\include\curl\*.h $(DIRDIST)\include\curl\ /y >nul 2<&1
|
||||
|
||||
$(LIB_OBJS): $(LIB_DIROBJ) $(DIRDIST)
|
||||
|
||||
$(DIRDIST):
|
||||
@if not exist "$(DIRDIST)\bin" mkdir $(DIRDIST)\bin
|
||||
@if not exist "$(DIRDIST)\include" mkdir $(DIRDIST)\include
|
||||
@if not exist "$(DIRDIST)\include\curl" mkdir $(DIRDIST)\include\curl
|
||||
@if not exist "$(DIRDIST)\lib" mkdir $(DIRDIST)\lib
|
||||
|
||||
$(LIB_DIROBJ):
|
||||
@if not exist "$(LIB_DIROBJ)" mkdir $(LIB_DIROBJ)
|
||||
@if not exist "$(LIB_DIROBJ)\vtls" mkdir $(LIB_DIROBJ)\vtls
|
||||
|
||||
$(CURL_DIROBJ):
|
||||
@if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)
|
||||
# we need a lib dir for the portability functions from libcurl
|
||||
# we use the .c directly here
|
||||
@if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)\lib
|
||||
|
||||
.SUFFIXES: .c .obj .res
|
||||
|
||||
{$(LIBCURL_SRC_DIR)\}.c{$(LIB_DIROBJ)\}.obj:
|
||||
$(CC) $(CFLAGS) /Fo"$@" $<
|
||||
|
||||
{$(LIBCURL_SRC_DIR)\vtls\}.c{$(LIB_DIROBJ)\vtls\}.obj:
|
||||
$(CC) $(CFLAGS) /Fo"$@" $<
|
||||
|
||||
$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc
|
||||
rc $(RC_FLAGS)
|
||||
|
||||
#
|
||||
# curl.exe
|
||||
#
|
||||
|
||||
|
||||
!IF "$(MODE)"=="static"
|
||||
!IF "$(DEBUG)"=="yes"
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC_DEBUG)
|
||||
!ELSE
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
|
||||
!ENDIF
|
||||
!ELSEIF "$(MODE)"=="dll"
|
||||
!IF "$(DEBUG)"=="yes"
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP_DEBUG)
|
||||
!ELSE
|
||||
CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
CURL_FROM_LIBCURL=$(CURL_DIROBJ)\tool_hugehelp.obj \
|
||||
$(CURL_DIROBJ)\nonblock.obj \
|
||||
$(CURL_DIROBJ)\rawstr.obj \
|
||||
$(CURL_DIROBJ)\strtoofft.obj
|
||||
|
||||
$(PROGRAM_NAME): $(CURL_DIROBJ) $(CURL_FROM_LIBCURL) $(EXE_OBJS)
|
||||
$(CURL_LINK) $(CURL_LFLAGS) $(CURL_LIBCURL_LIBNAME) $(WIN_LIBS) $(CURL_FROM_LIBCURL) $(EXE_OBJS)
|
||||
$(MANIFESTTOOL)
|
||||
|
||||
{$(CURL_SRC_DIR)\}.c{$(CURL_DIROBJ)\}.obj:
|
||||
$(CC) $(CURL_CFLAGS) /Fo"$@" $<
|
||||
|
||||
$(CURL_DIROBJ)\tool_hugehelp.obj: $(CURL_SRC_DIR)\tool_hugehelp.c
|
||||
$(CURL_CC) $(CURL_CFLAGS) /Zm200 /Fo"$@" $(CURL_SRC_DIR)\tool_hugehelp.c
|
||||
$(CURL_DIROBJ)\nonblock.obj: ../lib/nonblock.c
|
||||
$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/nonblock.c
|
||||
$(CURL_DIROBJ)\rawstr.obj: ../lib/rawstr.c
|
||||
$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/rawstr.c
|
||||
$(CURL_DIROBJ)\strtoofft.obj: ../lib/strtoofft.c
|
||||
$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/strtoofft.c
|
||||
$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
|
||||
rc $(CURL_RC_FLAGS)
|
||||
|
||||
!ENDIF # End of case where a config was provided.
|
63
winbuild/README.txt
Normal file
63
winbuild/README.txt
Normal file
@ -0,0 +1,63 @@
|
||||
Installing dependencies
|
||||
-----------------------
|
||||
|
||||
1. PThreads
|
||||
-----------
|
||||
- download ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
|
||||
- extract dll, include and lib folders from Pre-built.2 to winbuild/dist
|
||||
|
||||
|
||||
2. Install AMD APP SDK (OpenCL), latest version
|
||||
-----------------------------------------------
|
||||
- go to http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/ and download appropriate version (x86/x64) and install
|
||||
- copy C:\Program Files (x86)\AMD APP SDK\2.9\lib\x86\OpenCL.lib to winbuild/dist/lib/x86/
|
||||
- copy C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86\OpenCL.dll to winbuild/dist/dll/x86/
|
||||
- copy C:\Program Files (x86)\AMD APP SDK\2.9\lib\x86_64\OpenCL.lib to winbuild/dist/lib/x64/
|
||||
- copy C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86_64\OpenCL.dll to winbuild/dist/dll/x64/
|
||||
- copy C:\Program Files (x86)\AMD APP SDK\2.9\include\* winbuild/dist/include/
|
||||
|
||||
|
||||
3. PDCurses
|
||||
-----------
|
||||
- download source http://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/pdcurs34.zip/download and extract it somewhere
|
||||
- copy curses.h to winbuild\dist\include\
|
||||
x86 version:
|
||||
- open Visual Studio Command Prompt (x86)
|
||||
- go to win32 folder
|
||||
- execute: nmake -f vcwin32.mak WIDE=1 UTF8=1 pdcurses.lib
|
||||
- copy newly created pdcurses.lib to winbuild\dist\lib\x86\ folder
|
||||
x64 version:
|
||||
- open Visual Studio Command Prompt (x64)
|
||||
- go to win32 folder
|
||||
- edit vcwin32.mak end change line:
|
||||
cvtres /MACHINE:IX86 /NOLOGO /OUT:pdcurses.obj pdcurses.res
|
||||
to
|
||||
cvtres /MACHINE:X64 /NOLOGO /OUT:pdcurses.obj pdcurses.res
|
||||
- execute: nmake -f vcwin32.mak WIDE=1 UTF8=1 pdcurses.lib
|
||||
- copy newly created pdcurses.lib to winbuild\dist\lib\x64\ folder
|
||||
|
||||
|
||||
3. OpenSSL (needed for Curl)
|
||||
----------------------------
|
||||
- go to http://slproweb.com/products/Win32OpenSSL.html and download latest full installer x86 and/or x64 (not light version)
|
||||
- install to default location (e.g C:\OpenSSL-Win32 or C:\OpenSSL-Win64) and select bin/ folder when asked
|
||||
- install Visual C++ (x86/x64) Redistributables if needed
|
||||
|
||||
4. Curl
|
||||
-------
|
||||
- go to http://curl.haxx.se/download.html and download latest source and extract it somewhere
|
||||
- replace original curl winbuild\MakefileBuild.vc with provided winbuild\MakefileBuild.vc (corrected paths and static library names for VC)
|
||||
|
||||
x86 version:
|
||||
- open Visual Studio Command Prompt (x86)
|
||||
- go to winbuild folder and execute:
|
||||
nmake -f Makefile.vc mode=static VC=10 WITH_DEVEL=C:\OpenSSL-Win32 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x86
|
||||
- copy builds\libcurl-vc10-x86-release-static-ssl-static-spnego\lib\libcurl_a.lib to winbuild\dist\lib\x86
|
||||
- copy builds\libcurl-vc10-x86-release-static-ssl-static-spnego\include\* winbuild\dist\include\
|
||||
|
||||
x64 version:
|
||||
- open Visual Studio Command Prompt (x64)
|
||||
- go to winbuild folder and execute:
|
||||
nmake -f Makefile.vc mode=static VC=10 WITH_DEVEL=C:\OpenSSL-Win64 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x64
|
||||
- copy builds\libcurl-vc10-x64-release-static-ssl-static-spnego\lib\libcurl_a.lib to winbuild\dist\lib\x64
|
||||
- copy builds\libcurl-vc10-x64-release-static-ssl-static-spnego\include\* winbuild\dist\include\
|
4
winbuild/dist/include/config.h
vendored
4
winbuild/dist/include/config.h
vendored
@ -223,16 +223,14 @@ inline void* memmem (void* buf, size_t buflen, void* pat, size_t patlen)
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
|
||||
// Libraries to include
|
||||
#pragma comment(lib, "wsock32.lib")
|
||||
#pragma comment(lib, "pthreadVC2.lib")
|
||||
#pragma comment(lib, "jansson.lib")
|
||||
#pragma comment(lib, "OpenCL.lib")
|
||||
|
||||
#ifdef HAVE_LIBCURL
|
||||
#define CURL_STATICLIB 1
|
||||
#pragma comment(lib, "libcurl.lib")
|
||||
#pragma comment(lib, "libcurl_a.lib")
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURSES
|
||||
|
12
winbuild/dist/include/curl/curlver.h
vendored
12
winbuild/dist/include/curl/curlver.h
vendored
@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -26,16 +26,16 @@
|
||||
a script at release-time. This was made its own header file in 7.11.2 */
|
||||
|
||||
/* This is the global package copyright */
|
||||
#define LIBCURL_COPYRIGHT "1996 - 2013 Daniel Stenberg, <daniel@haxx.se>."
|
||||
#define LIBCURL_COPYRIGHT "1996 - 2014 Daniel Stenberg, <daniel@haxx.se>."
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.34.0"
|
||||
#define LIBCURL_VERSION "7.35.0"
|
||||
|
||||
/* The numeric version number is also available "in parts" by using these
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 34
|
||||
#define LIBCURL_VERSION_MINOR 35
|
||||
#define LIBCURL_VERSION_PATCH 0
|
||||
|
||||
/* This is the numeric version of the libcurl version number, meant for easier
|
||||
@ -53,7 +53,7 @@
|
||||
and it is always a greater number in a more recent release. It makes
|
||||
comparisons with greater than and less than work.
|
||||
*/
|
||||
#define LIBCURL_VERSION_NUM 0x072200
|
||||
#define LIBCURL_VERSION_NUM 0x072300
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
@ -64,6 +64,6 @@
|
||||
*
|
||||
* "Mon Feb 12 11:35:33 UTC 2007"
|
||||
*/
|
||||
#define LIBCURL_TIMESTAMP "Tue Dec 17 07:51:08 UTC 2013"
|
||||
#define LIBCURL_TIMESTAMP "Wed Jan 29 07:09:27 UTC 2014"
|
||||
|
||||
#endif /* __CURL_CURLVER_H */
|
||||
|
7
winbuild/dist/include/curses.h
vendored
7
winbuild/dist/include/curses.h
vendored
@ -1,10 +1,3 @@
|
||||
#ifndef PDC_DLL_BUILD
|
||||
# define PDC_DLL_BUILD
|
||||
#endif
|
||||
#ifndef PDC_WIDE
|
||||
# define PDC_WIDE
|
||||
#endif
|
||||
|
||||
/* Public Domain Curses */
|
||||
|
||||
/* $Id: curses.h,v 1.295 2008/07/15 17:13:25 wmcbrine Exp $ */
|
||||
|
58
winbuild/dist/include/panel.h
vendored
58
winbuild/dist/include/panel.h
vendored
@ -1,58 +0,0 @@
|
||||
/* Public Domain Curses */
|
||||
|
||||
/* $Id: panel.h,v 1.19 2008/07/13 16:08:16 wmcbrine Exp $ */
|
||||
|
||||
/*----------------------------------------------------------------------*
|
||||
* Panels for PDCurses *
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __PDCURSES_PANEL_H__
|
||||
#define __PDCURSES_PANEL_H__ 1
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct panelobs
|
||||
{
|
||||
struct panelobs *above;
|
||||
struct panel *pan;
|
||||
} PANELOBS;
|
||||
|
||||
typedef struct panel
|
||||
{
|
||||
WINDOW *win;
|
||||
int wstarty;
|
||||
int wendy;
|
||||
int wstartx;
|
||||
int wendx;
|
||||
struct panel *below;
|
||||
struct panel *above;
|
||||
const void *user;
|
||||
struct panelobs *obscure;
|
||||
} PANEL;
|
||||
|
||||
int bottom_panel(PANEL *pan);
|
||||
int del_panel(PANEL *pan);
|
||||
int hide_panel(PANEL *pan);
|
||||
int move_panel(PANEL *pan, int starty, int startx);
|
||||
PANEL *new_panel(WINDOW *win);
|
||||
PANEL *panel_above(const PANEL *pan);
|
||||
PANEL *panel_below(const PANEL *pan);
|
||||
int panel_hidden(const PANEL *pan);
|
||||
const void *panel_userptr(const PANEL *pan);
|
||||
WINDOW *panel_window(const PANEL *pan);
|
||||
int replace_panel(PANEL *pan, WINDOW *win);
|
||||
int set_panel_userptr(PANEL *pan, const void *uptr);
|
||||
int show_panel(PANEL *pan);
|
||||
int top_panel(PANEL *pan);
|
||||
void update_panels(void);
|
||||
|
||||
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PDCURSES_PANEL_H__ */
|
@ -1,8 +1,6 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sgminer", "sgminer.vcxproj", "{CCA64DCD-6401-42A3-ABC3-89E48A36D239}"
|
||||
EndProject
|
||||
Global
|
||||
@ -13,8 +11,8 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.Build.0 = Release|Win32
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|x64.Build.0 = Debug|x64
|
||||
{CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
@ -65,7 +65,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)output\x86\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)output\x86\$(Configuration)\obj\</IntDir>
|
||||
<IntDir>$(SolutionDir)output\x86\obj\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
@ -75,12 +75,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)output\x86\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)output\x86\$(Configuration)\obj\</IntDir>
|
||||
<IntDir>$(SolutionDir)output\x86\obj\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)output\x64\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)output\x64\$(Configuration)\obj\</IntDir>
|
||||
<IntDir>$(SolutionDir)output\x64\obj\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@ -105,6 +105,13 @@
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /y $(ProjectDir)\dist\dll\x86\pthreadsVC2.dll $(OutDir)</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>del /f "$(OutDir)*.exe"
|
||||
del /f "$(OutDir)*.dll"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@ -129,6 +136,13 @@
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /y $(ProjectDir)\dist\dll\x64\pthreadsVC2.dll $(OutDir)</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>del /f "$(OutDir)*.exe"
|
||||
del /f "$(OutDir)*.dll"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@ -155,6 +169,15 @@
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y "$(ProjectDir)\dist\dll\x86\pthreadVC2.dll" "$(OutDir)"
|
||||
xcopy /Y /E /I "$(ProjectDir)..\kernel" "$(OutDir)\kernel"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>del /f "$(OutDir)*.exe"
|
||||
del /f "$(OutDir)*.dll"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@ -184,6 +207,15 @@
|
||||
<LinkTimeCodeGeneration>
|
||||
</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y "$(ProjectDir)\dist\dll\x64\pthreadVC2.dll" "$(OutDir)"
|
||||
xcopy /Y /E /I "$(ProjectDir)..\kernel" "$(OutDir)\kernel"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>del /f "$(OutDir)*.exe"
|
||||
del /f "$(OutDir)*.dll"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\adl.c">
|
||||
@ -238,6 +270,9 @@
|
||||
<ClInclude Include="..\warn-on-use.h" />
|
||||
<ClInclude Include="dist\include\config.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="README.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -161,4 +161,7 @@
|
||||
<Filter>Libraries\jansson</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="README.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user