Browse Source

Bugfix: cpu: Only build libsse2cpuminer iff yasm is available and targetting x86_32

Luke Dashjr 12 years ago
parent
commit
e432407c2e
1 changed files with 7 additions and 5 deletions
  1. 7 5
      Makefile.am

+ 7 - 5
Makefile.am

@@ -78,15 +78,11 @@ bfgminer_SOURCES	+= \
 		  sha256_sse4_amd64.c 	\
 		  sha256_altivec_4way.c
 
-bfgminer_LDADD += libsse2cpuminer.a
-noinst_LIBRARIES = libsse2cpuminer.a
-libsse2cpuminer_a_SOURCES = sha256_4way.c sha256_sse2_i386.c
-libsse2cpuminer_a_CFLAGS = $(bfgminer_CPPFLAGS) -msse2
-
 # the CPU portion extracted from original main.c
 bfgminer_SOURCES += driver-cpu.h driver-cpu.c
 
 if HAS_YASM
+
 AM_CFLAGS	= -DHAS_YASM
 if HAVE_x86_64
 SUBDIRS		+= x86_64
@@ -94,6 +90,12 @@ bfgminer_LDADD	+= x86_64/libx8664.a
 else # HAVE_x86_64
 SUBDIRS		+= x86_32
 bfgminer_LDADD	+= x86_32/libx8632.a
+
+bfgminer_LDADD += libsse2cpuminer.a
+noinst_LIBRARIES = libsse2cpuminer.a
+libsse2cpuminer_a_SOURCES = sha256_4way.c sha256_sse2_i386.c
+libsse2cpuminer_a_CFLAGS = $(bfgminer_CPPFLAGS) -msse2
+
 endif # HAVE_x86_64
 endif # HAS_YASM
 endif # HAS_CPUMINE