Makefile.am 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. ACLOCAL_AMFLAGS = -I m4
  2. JANSSON_CPPFLAGS= -I$(top_builddir)/compat/jansson-2.9/src -I$(top_srcdir)/compat/jansson-2.9/src
  3. if WANT_USBUTILS
  4. USBUTILS_CPPFLAGS = -I$(top_builddir)/compat/libusb-1.0/libusb
  5. else
  6. USBUTILS_CPPFLAGS =
  7. endif
  8. if STATIC_CURL
  9. LIBCURL_CPPFLAGS = -DCURL_STATICLIB
  10. else
  11. LIBCURL_CPPFLAGS =
  12. endif
  13. EXTRA_DIST = example.conf linux-usb-cgminer \
  14. api-example.php miner.php \
  15. API.class API.java api-example.c windows-build.txt \
  16. bitstreams/README API-README FPGA-README \
  17. bitforce-firmware-flash.c hexdump.c ASIC-README \
  18. 01-cgminer.rules
  19. SUBDIRS = lib compat ccan
  20. cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fcommon -fno-strict-aliasing $(JANSSON_CPPFLAGS) $(USBUTILS_CPPFLAGS) $(LIBCURL_CPPFLAGS)
  21. bin_PROGRAMS = cgminer
  22. cgminer_LDFLAGS = $(PTHREAD_FLAGS)
  23. cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @LIBZ_LIBS@ @PTHREAD_LIBS@ \
  24. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  25. @LIBUSB_LIBS@ @MM_LIBS@ @RT_LIBS@ @LIBSYSTEMD_LIBS@ \
  26. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  27. cgminer_CPPFLAGS += -I$(top_builddir)/lib -I$(top_srcdir)/lib
  28. if !HAVE_WINDOWS
  29. cgminer_CPPFLAGS += @LIBCURL_CFLAGS@
  30. endif
  31. # common sources
  32. cgminer_SOURCES := cgminer.c
  33. cgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  34. util.c util.h uthash.h logging.h \
  35. sha2.c sha2.h api.c
  36. cgminer_SOURCES += logging.c
  37. cgminer_SOURCES += klist.h klist.c
  38. cgminer_SOURCES += noncedup.c
  39. if NEED_FPGAUTILS
  40. cgminer_SOURCES += fpgautils.c fpgautils.h
  41. endif
  42. if WANT_USBUTILS
  43. cgminer_SOURCES += usbutils.c usbutils.h
  44. endif
  45. if WANT_LIBBITFURY
  46. cgminer_SOURCES += libbitfury.c libbitfury.h mcp2210.c mcp2210.h
  47. endif
  48. if WANT_CRC16
  49. cgminer_SOURCES += crc16.c crc.h
  50. endif
  51. # Device drivers
  52. if HAS_AVALON
  53. cgminer_SOURCES += driver-avalon.c driver-avalon.h
  54. endif
  55. if HAS_KNC
  56. cgminer_SOURCES += driver-knc.c knc-asic.c knc-asic.h knc-transport.h knc-transport-spi.c
  57. cgminer_LDADD += -lz
  58. endif
  59. if HAS_BFLSC
  60. cgminer_SOURCES += driver-bflsc.c driver-bflsc.h
  61. endif
  62. if HAS_BITFORCE
  63. cgminer_SOURCES += driver-bitforce.c
  64. endif
  65. if HAS_HASHFAST
  66. cgminer_SOURCES += driver-hashfast.c driver-hashfast.h hf_protocol.h hf_protocol_be.h
  67. endif
  68. if HAS_HASHRATIO
  69. cgminer_SOURCES += driver-hashratio.c driver-hashratio.h
  70. endif
  71. if HAS_BITFURY
  72. cgminer_SOURCES += driver-bitfury.c driver-bitfury.h
  73. endif
  74. if HAS_BITFURY16
  75. cgminer_SOURCES += bf16-bitfury16.c bf16-bitfury16.h
  76. cgminer_SOURCES += bf16-brd-control.c bf16-brd-control.h
  77. cgminer_SOURCES += bf16-communication.c bf16-communication.h
  78. cgminer_SOURCES += bf16-ctrldevice.c bf16-ctrldevice.h
  79. cgminer_SOURCES += bf16-device.h
  80. cgminer_SOURCES += bf16-gpiodevice.c bf16-gpiodevice.h
  81. cgminer_SOURCES += bf16-mspcontrol.c bf16-mspcontrol.h
  82. cgminer_SOURCES += bf16-spidevice.c bf16-spidevice.h
  83. cgminer_SOURCES += bf16-uartdevice.c bf16-uartdevice.h
  84. cgminer_SOURCES += driver-bitfury16.c driver-bitfury16.h
  85. endif
  86. if HAS_BITMAIN_SOC
  87. cgminer_SOURCES += driver-btm-soc.c driver-btm-soc.h
  88. cgminer_SOURCES += bitmain-board-test.c bitmain-board-test.h
  89. endif
  90. if HAS_BITMINE_A1
  91. cgminer_SOURCES += driver-SPI-bitmine-A1.c
  92. cgminer_SOURCES += spi-context.c spi-context.h
  93. cgminer_SOURCES += A1-common.h
  94. cgminer_SOURCES += A1-board-selector.h
  95. cgminer_SOURCES += A1-board-selector-CCD.c A1-board-selector-CCR.c
  96. cgminer_SOURCES += A1-trimpot-mcp4x.h A1-trimpot-mcp4x.c
  97. cgminer_SOURCES += i2c-context.c i2c-context.h
  98. endif
  99. if HAS_DRAGONMINT_T1
  100. cgminer_SOURCES += driver-SPI-dragonmint-t1.c
  101. cgminer_SOURCES += dragonmint_t1.c
  102. cgminer_SOURCES += dm_temp_ctrl.c
  103. cgminer_SOURCES += dm_fan_ctrl.c
  104. cgminer_SOURCES += dm_compat.c
  105. endif
  106. if HAS_DRILLBIT
  107. cgminer_SOURCES += driver-drillbit.c driver-drillbit.h
  108. endif
  109. if HAS_ICARUS
  110. cgminer_SOURCES += driver-icarus.c
  111. endif
  112. if HAS_KLONDIKE
  113. cgminer_SOURCES += driver-klondike.c
  114. endif
  115. if HAS_COINTERRA
  116. cgminer_SOURCES += driver-cointerra.c driver-cointerra.h
  117. endif
  118. if HAS_SP10
  119. cgminer_SOURCES += driver-spondoolies-sp10.c driver-spondoolies-sp10.h \
  120. driver-spondoolies-sp10-p.c driver-spondoolies-sp10-p.h
  121. endif
  122. if HAS_SP30
  123. cgminer_SOURCES += driver-spondoolies-sp30.c driver-spondoolies-sp30.h \
  124. driver-spondoolies-sp30-p.c driver-spondoolies-sp30-p.h
  125. endif
  126. if HAS_BAB
  127. cgminer_SOURCES += driver-bab.c
  128. endif
  129. if HAS_AVALON2
  130. cgminer_SOURCES += driver-avalon2.c driver-avalon2.h
  131. endif
  132. if HAS_AVALON4
  133. cgminer_SOURCES += driver-avalon4.c driver-avalon4.h
  134. endif
  135. if HAS_AVALON7
  136. cgminer_SOURCES += driver-avalon7.c driver-avalon7.h
  137. endif
  138. if HAS_AVALON8
  139. cgminer_SOURCES += driver-avalon8.c driver-avalon8.h
  140. endif
  141. if HAS_AVALON9
  142. cgminer_SOURCES += driver-avalon9.c driver-avalon9.h
  143. endif
  144. if HAS_AVALONLC3
  145. cgminer_SOURCES += driver-avalonlc3.c driver-avalonlc3.h
  146. endif
  147. if NEED_I2C_CONTEXT
  148. cgminer_SOURCES += i2c-context.c
  149. endif
  150. if SUPPORT_SSP
  151. cgminer_SOURCES += libssplus.c
  152. endif
  153. if HAS_AVALON_MINER
  154. cgminer_SOURCES += driver-avalon-miner.c driver-avalon-miner.h
  155. endif
  156. if HAS_MINION
  157. cgminer_SOURCES += driver-minion.c
  158. endif
  159. if HAS_ANT_S1
  160. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  161. endif
  162. if HAS_ANT_S2
  163. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  164. endif
  165. if HAS_ANT_S3
  166. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  167. endif
  168. if HAS_MODMINER
  169. cgminer_SOURCES += driver-modminer.c
  170. bitstreamsdir = $(bindir)/bitstreams
  171. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/README
  172. endif
  173. if HAS_BLOCKERUPTER
  174. cgminer_SOURCES += driver-blockerupter.c driver-blockerupter.h
  175. endif
  176. if HAS_GEKKO
  177. cgminer_SOURCES += driver-gekko.c driver-gekko.h
  178. endif
  179. if HAS_BITAXE
  180. cgminer_SOURCES += driver-bitaxe.c driver-bitaxe.h
  181. endif