BFL USB build changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/Makefile.am b/Makefile.am
index 5f84628..b7f9063 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,10 @@ if NEED_FPGAUTILS
cgminer_SOURCES += fpgautils.c fpgautils.h
endif
+if NEED_USBUTILS_C
+cgminer_SOURCES += usbutils.c
+endif
+
if HAS_BITFORCE
cgminer_SOURCES += driver-bitforce.c
endif
@@ -91,7 +95,7 @@ cgminer_SOURCES += driver-icarus.c
endif
if HAS_MODMINER
-cgminer_SOURCES += driver-modminer.c usbutils.c
+cgminer_SOURCES += driver-modminer.c
bitstreamsdir = $(bindir)/bitstreams
dist_bitstreams_DATA = bitstreams/*
endif
diff --git a/configure.ac b/configure.ac
index 3b51f73..67a70be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,6 +273,7 @@ fi
AM_CONDITIONAL([NEED_FPGAUTILS], [test x$icarus$bitforce$modminer$ztex != xnononono])
+AM_CONDITIONAL([NEED_USBUTILS_C], [test x$bitforce$modminer != xnono])
AM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
@@ -321,7 +322,7 @@ fi
AM_CONDITIONAL([HAS_YASM], [test x$has_yasm = xtrue])
-if test "x$bitforce" != xno; then
+if test "x$icarus" != xno; then
AC_ARG_WITH([libudev], [AC_HELP_STRING([--without-libudev], [Autodetect FPGAs using libudev (default enabled)])],
[libudev=$withval],
[libudev=auto]
@@ -343,7 +344,7 @@ AM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])
PKG_PROG_PKG_CONFIG()
-if test "x$ztex$modminer" != xnono; then
+if test "x$ztex$modminer$bitforce" != xnonono; then
case $target in
*-*-freebsd*)
LIBUSB_LIBS="-lusb"
@@ -508,7 +509,7 @@ else
echo " Ztex.FPGAs...........: Disabled"
fi
-if test "x$bitforce" != xno; then
+if test "x$icarus" != xno; then
echo " libudev.detection....: $libudev"
fi