Makefile.am 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ACLOCAL_AMFLAGS = -I m4
  2. if WANT_JANSSON
  3. JANSSON_INCLUDES= -I$(top_srcdir)/compat/jansson
  4. else
  5. JANSSON_INCLUDES=
  6. endif
  7. EXTRA_DIST = example.conf m4/gnulib-cache.m4 linux-usb-bfgminer \
  8. ADL_SDK/readme.txt api-example.php miner.php \
  9. API.class API.java api-example.c windows-build.txt \
  10. bitstreams/* API-README FPGA-README SCRYPT-README
  11. SUBDIRS = lib compat ccan
  12. INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) $(USB_FLAGS)
  13. bin_PROGRAMS = bfgminer
  14. bin_SCRIPTS = *.cl
  15. bfgminer_LDFLAGS = $(PTHREAD_FLAGS)
  16. bfgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  17. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  18. @UDEV_LIBS@ @USB_LIBS@ \
  19. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  20. bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
  21. # common sources
  22. bfgminer_SOURCES := miner.c
  23. bfgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  24. util.c uthash.h logging.h \
  25. sha2.c sha2.h api.c
  26. bfgminer_SOURCES += logging.c
  27. # GPU sources, TODO: make them selectable
  28. # the GPU portion extracted from original main.c
  29. bfgminer_SOURCES += driver-opencl.h driver-opencl.c
  30. # the original GPU related sources, unchanged
  31. bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
  32. bfgminer_SOURCES += adl.c adl.h adl_functions.h
  33. bfgminer_SOURCES += *.cl
  34. if HAS_CPUMINE
  35. # original CPU related sources, unchanged
  36. bfgminer_SOURCES += \
  37. sha256_generic.c sha256_4way.c sha256_via.c \
  38. sha256_cryptopp.c sha256_sse2_amd64.c \
  39. sha256_sse4_amd64.c sha256_sse2_i386.c \
  40. sha256_altivec_4way.c
  41. # the CPU portion extracted from original main.c
  42. bfgminer_SOURCES += driver-cpu.h driver-cpu.c
  43. if HAS_SCRYPT
  44. bfgminer_SOURCES += scrypt.c
  45. endif
  46. if HAS_YASM
  47. AM_CFLAGS = -DHAS_YASM
  48. if HAVE_x86_64
  49. SUBDIRS += x86_64
  50. bfgminer_LDADD += x86_64/libx8664.a
  51. else # HAVE_x86_64
  52. SUBDIRS += x86_32
  53. bfgminer_LDADD += x86_32/libx8632.a
  54. endif # HAVE_x86_64
  55. endif # HAS_YASM
  56. endif # HAS_CPUMINE
  57. if NEED_FPGAUTILS
  58. bfgminer_SOURCES += fpgautils.c fpgautils.h
  59. endif
  60. if HAS_BITFORCE
  61. bfgminer_SOURCES += driver-bitforce.c
  62. endif
  63. if HAS_ICARUS
  64. bfgminer_SOURCES += driver-icarus.c
  65. endif
  66. if HAS_MODMINER
  67. bfgminer_SOURCES += driver-modminer.c
  68. bitstreamsdir = $(bindir)/bitstreams
  69. dist_bitstreams_DATA = bitstreams/*
  70. endif
  71. if HAS_ZTEX
  72. bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
  73. bitstreamsdir = $(bindir)/bitstreams
  74. dist_bitstreams_DATA = bitstreams/*
  75. endif