Browse Source

Explicitly link in ws2_32 on the windows build and update README file on how to compile successfully on windows.

Con Kolivas 14 years ago
parent
commit
f062765c94
3 changed files with 8 additions and 3 deletions
  1. 1 1
      Makefile.am
  2. 4 2
      README
  3. 3 0
      configure.ac

+ 1 - 1
Makefile.am

@@ -26,7 +26,7 @@ cgminer_SOURCES	= elist.h miner.h compat.h bench_block.h	\
 		  phatk110816.cl poclbm110816.cl
 		  phatk110816.cl poclbm110816.cl
 
 
 cgminer_LDFLAGS	= $(PTHREAD_FLAGS)
 cgminer_LDFLAGS	= $(PTHREAD_FLAGS)
-cgminer_LDADD	= @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ lib/libgnu.a ccan/libccan.a
+cgminer_LDADD	= @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ lib/libgnu.a ccan/libccan.a
 cgminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib
 cgminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib
 
 
 if HAVE_x86_64
 if HAVE_x86_64

+ 4 - 2
README

@@ -56,13 +56,15 @@ Basic WIN32 build instructions (on Fedora 13; requires mingw32):
 	./mknsis.sh
 	./mknsis.sh
 	
 	
 Native WIN32 build instructions (on mingw32, on windows):
 Native WIN32 build instructions (on mingw32, on windows):
-	Install AMD APP sdk, latest version
+	Install the Microsoft platform SDK
+	Install AMD APP sdk, latest version (only if you want GPU mining)
 	(Do NOT install the ati amd sdk if you are on nvidia)
 	(Do NOT install the ati amd sdk if you are on nvidia)
 	Install mingw32
 	Install mingw32
 	Install libcurl, copy libcurl.m4 into /mingw/share/aclocal
 	Install libcurl, copy libcurl.m4 into /mingw/share/aclocal
+	Install pkg-config, copy pkg.m4 into /mingw/share/aclocal
 	Run:
 	Run:
 	autoreconf -fvi
 	autoreconf -fvi
-	CFLAGS="-O2 -Wall -msse2 -I<path to AMD APP include>" LDFLAGS="-L<path to AMD APP lib/x86>" ./configure
+	CFLAGS="-O2 -msse2" ./configure
 	make
 	make
 
 
 Usage instructions:  Run "cgminer --help" to see options.
 Usage instructions:  Run "cgminer --help" to see options.

+ 3 - 0
configure.ac

@@ -28,6 +28,7 @@ AC_FUNC_ALLOCA
 have_win32=false
 have_win32=false
 PTHREAD_FLAGS="-pthread"
 PTHREAD_FLAGS="-pthread"
 OPENCL_FLAGS="-lOpenCL"
 OPENCL_FLAGS="-lOpenCL"
+WS2_LIBS=""
 
 
 case $target in
 case $target in
   x86_64-*)
   x86_64-*)
@@ -43,6 +44,7 @@ case $target in
     have_x86_64=false
     have_x86_64=false
     have_win32=true
     have_win32=true
     PTHREAD_FLAGS=""
     PTHREAD_FLAGS=""
+    WS2_LIBS="-lws2_32"
     ;;
     ;;
   *-*-darwin*)
   *-*-darwin*)
     OPENCL_FLAGS="-framework OpenCL"
     OPENCL_FLAGS="-framework OpenCL"
@@ -167,6 +169,7 @@ AC_SUBST(PTHREAD_FLAGS)
 AC_SUBST(PTHREAD_LIBS)
 AC_SUBST(PTHREAD_LIBS)
 AC_SUBST(NCURSES_LIBS)
 AC_SUBST(NCURSES_LIBS)
 AC_SUBST(PDCURSES_LIBS)
 AC_SUBST(PDCURSES_LIBS)
+AC_SUBST(WS2_LIBS)
 
 
 AC_CONFIG_FILES([
 AC_CONFIG_FILES([
 	Makefile
 	Makefile