Makefile.am 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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/* README.FPGA README.RPC README.scrypt \
  6. README.GPU \
  7. api-example.py
  8. SUBDIRS = lib ccan
  9. INCLUDES = -fno-strict-aliasing
  10. bin_PROGRAMS = bfgminer
  11. bin_SCRIPTS = $(top_srcdir)/*.cl
  12. bfgminer_LDFLAGS = $(PTHREAD_FLAGS)
  13. bfgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  14. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  15. @UDEV_LIBS@ @LIBUSB_LIBS@ @MM_LIBS@ \
  16. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  17. bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @LIBUSB_CFLAGS@ @LIBCURL_CFLAGS@
  18. bfgminer_CPPFLAGS += @JANSSON_CFLAGS@
  19. bfgminer_CPPFLAGS += $(PTHREAD_FLAGS)
  20. bfgminer_CPPFLAGS += $(NCURSES_CPPFLAGS)
  21. bfgminer_LDADD += $(libblkmaker_LIBS)
  22. bfgminer_LDFLAGS += $(libblkmaker_LDFLAGS)
  23. bfgminer_CPPFLAGS += $(libblkmaker_CFLAGS)
  24. # common sources
  25. bfgminer_SOURCES := miner.c
  26. bfgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  27. deviceapi.c deviceapi.h \
  28. util.c util.h uthash.h logging.h \
  29. sha2.c sha2.h api.c
  30. bfgminer_DEPENDENCIES =
  31. if NEED_LIBBLKMAKER
  32. SUBDIRS += libblkmaker
  33. if HAVE_CYGWIN
  34. bfgminer_DEPENDENCIES += cygblkmaker-0.1-0.dll cygblkmaker_jansson-0.1-0.dll
  35. cyg%.dll: libblkmaker/.libs/cyg%.dll
  36. cp -p $< $@
  37. endif
  38. endif
  39. bfgminer_SOURCES += logging.c
  40. # GPU sources, TODO: make them selectable
  41. # the GPU portion extracted from original main.c
  42. bfgminer_SOURCES += driver-opencl.h driver-opencl.c
  43. # the original GPU related sources, unchanged
  44. bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
  45. bfgminer_SOURCES += adl.c adl.h adl_functions.h
  46. bfgminer_SOURCES += *.cl
  47. if HAVE_SENSORS
  48. bfgminer_LDADD += $(sensors_LIBS)
  49. endif
  50. if HAS_SCRYPT
  51. bfgminer_SOURCES += scrypt.c scrypt.h
  52. endif
  53. if HAS_CPUMINE
  54. bfgminer_SOURCES += \
  55. sha256_generic.c sha256_via.c \
  56. sha256_cryptopp.c sha256_sse2_amd64.c \
  57. sha256_sse4_amd64.c \
  58. sha256_altivec_4way.c
  59. # the CPU portion extracted from original main.c
  60. bfgminer_SOURCES += driver-cpu.h driver-cpu.c
  61. if HAVE_SSE2
  62. bfgminer_LDADD += libsse2cpuminer.a
  63. noinst_LIBRARIES = libsse2cpuminer.a
  64. libsse2cpuminer_a_SOURCES = sha256_4way.c
  65. libsse2cpuminer_a_CFLAGS = $(bfgminer_CPPFLAGS) $(SSE2_CFLAGS)
  66. endif
  67. if HAS_YASM
  68. AM_CFLAGS = -DHAS_YASM
  69. if HAVE_x86_64
  70. SUBDIRS += x86_64
  71. bfgminer_LDADD += x86_64/libx8664.a
  72. else # HAVE_x86_64
  73. SUBDIRS += x86_32
  74. bfgminer_LDADD += x86_32/libx8632.a
  75. if HAVE_SSE2
  76. libsse2cpuminer_a_SOURCES += sha256_sse2_i386.c
  77. endif
  78. endif # HAVE_x86_64
  79. endif # HAS_YASM
  80. endif # HAS_CPUMINE
  81. if NEED_FPGAUTILS
  82. bfgminer_SOURCES += fpgautils.c fpgautils.h
  83. endif
  84. if NEED_DYNCLOCK
  85. bfgminer_SOURCES += dynclock.c dynclock.h
  86. endif
  87. if HAS_BITFORCE
  88. bfgminer_SOURCES += driver-bitforce.c
  89. if HAVE_WINDOWS
  90. else
  91. bin_PROGRAMS += bitforce-firmware-flash
  92. bitforce_firmware_flash_SOURCES = bitforce-firmware-flash.c
  93. endif
  94. endif
  95. if HAS_ICARUS
  96. bfgminer_SOURCES += driver-icarus.c icarus-common.h
  97. bfgminer_SOURCES += driver-cairnsmore.c
  98. endif
  99. if HAS_AVALON
  100. bfgminer_SOURCES += driver-avalon.c driver-avalon.h hexdump.c
  101. endif
  102. if HAS_MODMINER
  103. bfgminer_SOURCES += driver-modminer.c
  104. bitstreamsdir = $(bindir)/bitstreams
  105. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  106. endif
  107. if HAS_X6500
  108. bfgminer_SOURCES += driver-x6500.c ft232r.c ft232r.h jtag.c jtag.h
  109. bitstreamsdir = $(bindir)/bitstreams
  110. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  111. endif
  112. if HAS_ZTEX
  113. bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
  114. bitstreamsdir = $(bindir)/bitstreams
  115. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  116. endif
  117. bin_PROGRAMS += bfgminer-rpc
  118. bfgminer_rpc_SOURCES = api-example.c
  119. bfgminer_rpc_LDADD = @WS2_LIBS@