Skip compilation of unused assembly sources

This commit is contained in:
pooler 2013-10-04 14:58:03 +02:00
parent 93120a697d
commit 3737e48b40
2 changed files with 15 additions and 8 deletions

View file

@ -15,8 +15,16 @@ bin_PROGRAMS = minerd
minerd_SOURCES = elist.h miner.h compat.h \
cpu-miner.c util.c \
sha2.c sha2-arm.S sha2-x86.S sha2-x64.S \
scrypt.c scrypt-arm.S scrypt-x86.S scrypt-x64.S
sha2.c scrypt.c
if ARCH_x86
minerd_SOURCES += sha2-x86.S scrypt-x86.S
endif
if ARCH_x86_64
minerd_SOURCES += sha2-x64.S scrypt-x64.S
endif
if ARCH_ARM
minerd_SOURCES += sha2-arm.S scrypt-arm.S
endif
minerd_LDFLAGS = $(PTHREAD_FLAGS)
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
minerd_CPPFLAGS = @LIBCURL_CPPFLAGS@

View file

@ -42,13 +42,11 @@ case $target in
i*86-*-*)
have_x86=true
;;
x86_64-*-*)
have_x86=true
x86_64-*-*|amd64-*-*)
have_x86_64=true
;;
amd64-*-*)
have_x86=true
have_x86_64=true
arm*-*-*)
have_arm=true
;;
esac
@ -63,7 +61,7 @@ case $target in
;;
esac
if test x$have_x86 = xtrue
if test x$have_x86 = xtrue -o x$have_x86_64 = xtrue
then
AC_MSG_CHECKING(whether we can compile AVX code)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("vmovdqa %ymm0, %ymm1");])],
@ -102,6 +100,7 @@ AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
AM_CONDITIONAL([ARCH_x86], [test x$have_x86 = xtrue])
AM_CONDITIONAL([ARCH_x86_64], [test x$have_x86_64 = xtrue])
AM_CONDITIONAL([ARCH_ARM], [test x$have_arm = xtrue])
if test x$request_jansson = xtrue
then