Browse Source

Partial: Bugfix: Turn spidevc into lowl-spi to fix building the knc driver without the bitfury driver

Conflicts:
	Makefile.am
	configure.ac
	driver-bfx.c
Luke Dashjr 11 years ago
parent
commit
2d6bb29bfd
2 changed files with 14 additions and 1 deletions
  1. 5 1
      Makefile.am
  2. 9 0
      configure.ac

+ 5 - 1
Makefile.am

@@ -263,7 +263,7 @@ bfgminer_SOURCES += driver-bifury.c
 endif
 
 if HAS_BITFURY
-bfgminer_SOURCES += driver-bitfury.c driver-bitfury.h libbitfury.c libbitfury.h spidevc.h spidevc.c
+bfgminer_SOURCES += driver-bitfury.c driver-bitfury.h libbitfury.c libbitfury.h
 
 if HAS_BFSB
 bfgminer_SOURCES += driver-bfsb.c
@@ -300,6 +300,10 @@ bfgminer_SOURCES += lowl-hid.c lowl-hid.h
 bfgminer_CPPFLAGS += $(hidapi_CFLAGS)
 endif
 
+if NEED_BFG_LOWL_SPI
+bfgminer_SOURCES += spidevc.h spidevc.c
+endif
+
 bin_PROGRAMS += bfgminer-rpc
 bfgminer_rpc_SOURCES = api-example.c
 bfgminer_rpc_LDADD = @WS2_LIBS@

+ 9 - 0
configure.ac

@@ -122,6 +122,7 @@ need_dynclock=no
 need_lowl_vcom=no
 need_lowlevel=no
 need_lowl_hid=no
+need_lowl_spi=no
 need_lowl_usb=no
 have_cygwin=false
 have_win32=false
@@ -430,6 +431,7 @@ if test "x$knc" = xyes; then
 		#endif
 	])
 	AC_DEFINE([USE_KNC], [1], [Defined to 1 if KnC support is wanted])
+	need_lowl_spi=yes
 fi
 AM_CONDITIONAL([USE_KNC], [test x$knc = xyes])
 
@@ -649,6 +651,7 @@ AC_ARG_ENABLE([bitfury],
 	)
 if test "x$bitfury" = xyes; then
 	AC_DEFINE([USE_BITFURY], [1], [Defined to 1 if Bitfury support is wanted])
+	need_lowl_spi=yes
 fi
 AM_CONDITIONAL([HAS_BITFURY], [test x$bitfury = xyes])
 
@@ -905,6 +908,11 @@ if test "x$need_lowl_vcom" != "xno"; then
 	fi
 fi
 
+lowllist="$lowllist spi/need_lowl_spi"
+if test x$need_lowl_spi = xyes; then
+	AC_DEFINE([NEED_BFG_LOWL_SPI], [1], [Defined to 1 if lowlevel SPI drivers are being used])
+fi
+
 if test "x$need_lowl_usb" = "xno"; then
 	libusb=no
 	LIBUSB_LIBS=''
@@ -1170,6 +1178,7 @@ AM_CONDITIONAL([NEED_BFG_BINLOADER], [test x$need_binloader = xyes])
 AM_CONDITIONAL([NEED_DYNCLOCK], [test x$need_dynclock = xyes])
 AM_CONDITIONAL([NEED_BFG_LOWL_VCOM], [test x$need_lowl_vcom = xyes])
 AM_CONDITIONAL([NEED_BFG_LOWL_HID], [test x$need_lowl_hid = xyes])
+AM_CONDITIONAL([NEED_BFG_LOWL_SPI], [test x$need_lowl_spi = xyes])
 AM_CONDITIONAL([NEED_BFG_LOWLEVEL], [test x$need_lowlevel = xyes])
 AM_CONDITIONAL([HAS_SCRYPT], [test x$scrypt = xyes])
 AM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])