Makefile.am 2.7 KB

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