Browse Source

configure: Accept --enable-titan=CONTROLLER to select controller

Luke Dashjr 11 years ago
parent
commit
3b2847e274
2 changed files with 11 additions and 2 deletions
  1. 1 1
      README.ASIC
  2. 10 1
      configure.ac

+ 1 - 1
README.ASIC

@@ -217,7 +217,7 @@ Build instructions:
 git clone git@github.com:KnCMiner/bfgminer.git
 cd bfgminer
 ./autogen.sh
-./configure --enable-scrypt --enable-titan --disable-other-drivers --without-libusb --disable-gridseed CFLAGS="-g -Iuthash/src -DCONTROLLER_BOARD_RPI"
+./configure --enable-scrypt --enable-titan --disable-other-drivers CFLAGS="-Iuthash/src"
 make
 sudo /etc/init.d/bfgminer.sh restart
 screen -r

+ 10 - 1
configure.ac

@@ -790,7 +790,12 @@ AC_ARG_ENABLE([titan],
 	[titan=$enableval],
 	[titan=$ddno]
 	)
-if test "x$titan" = xyes; then
+if test "x$titan" != xno && test "x$titan" != xauto; then
+	titan_controller=$titan
+	if test "x$titan" = xyes; then
+		titan_controller=RPI
+	fi
+	titan=yes
 	if test "x$scrypt" = "xno"; then
 		AC_MSG_ERROR([You explicitly enabled KnC Titan, but did not enable scrypt])
 	fi
@@ -809,6 +814,10 @@ if test "x$titan" = xyes; then
 		#endif
 	])
 	AC_DEFINE([USE_TITAN], [1], [Defined to 1 if KnC Titan support is wanted])
+	AC_DEFINE_UNQUOTED([CONTROLLER_BOARD_$titan_controller],[1])
+	AH_TEMPLATE([CONTROLLER_BOARD_BACKPLANE])
+	AH_TEMPLATE([CONTROLLER_BOARD_BBB])
+	AH_TEMPLATE([CONTROLLER_BOARD_RPI])
 fi
 AM_CONDITIONAL([USE_TITAN], [test x$titan = xyes])