Makefile.am 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. ACLOCAL_AMFLAGS = -I m4
  2. JANSSON_CPPFLAGS= -I$(top_builddir)/compat/jansson-2.6/src -I$(top_srcdir)/compat/jansson-2.6/src
  3. if WANT_USBUTILS
  4. USBUTILS_CPPFLAGS = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb
  5. else
  6. USBUTILS_CPPFLAGS =
  7. endif
  8. EXTRA_DIST = example.conf linux-usb-cgminer \
  9. api-example.php miner.php \
  10. API.class API.java api-example.c windows-build.txt \
  11. bitstreams/README API-README FPGA-README \
  12. bitforce-firmware-flash.c hexdump.c ASIC-README \
  13. 01-cgminer.rules
  14. SUBDIRS = lib compat ccan
  15. cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) $(USBUTILS_CPPFLAGS)
  16. bin_PROGRAMS = cgminer
  17. cgminer_LDFLAGS = $(PTHREAD_FLAGS)
  18. cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  19. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  20. @LIBUSB_LIBS@ @LIBUDEV_LIBS@ @MM_LIBS@ @RT_LIBS@ \
  21. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  22. cgminer_CPPFLAGS += -I$(top_builddir)/lib -I$(top_srcdir)/lib
  23. if !HAVE_WINDOWS
  24. cgminer_CPPFLAGS += @LIBCURL_CFLAGS@
  25. endif
  26. # common sources
  27. cgminer_SOURCES := cgminer.c
  28. cgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  29. util.c util.h uthash.h logging.h \
  30. sha2.c sha2.h api.c
  31. cgminer_SOURCES += logging.c
  32. cgminer_SOURCES += klist.h klist.c
  33. cgminer_SOURCES += noncedup.c
  34. if HAS_SCRYPT
  35. cgminer_SOURCES += scrypt.c scrypt.h
  36. endif
  37. if NEED_FPGAUTILS
  38. cgminer_SOURCES += fpgautils.c fpgautils.h
  39. endif
  40. if WANT_USBUTILS
  41. cgminer_SOURCES += usbutils.c usbutils.h
  42. endif
  43. if WANT_LIBBITFURY
  44. cgminer_SOURCES += libbitfury.c libbitfury.h mcp2210.c mcp2210.h
  45. endif
  46. if WANT_CRC16
  47. cgminer_SOURCES += crc16.c crc.h
  48. endif
  49. # Device drivers
  50. if HAS_AVALON
  51. cgminer_SOURCES += driver-avalon.c driver-avalon.h
  52. endif
  53. if HAS_KNC
  54. cgminer_SOURCES += driver-knc.c knc-asic.c knc-asic.h knc-transport.h knc-transport-spi.c
  55. cgminer_LDADD += -lz
  56. endif
  57. if HAS_BFLSC
  58. cgminer_SOURCES += driver-bflsc.c driver-bflsc.h
  59. endif
  60. if HAS_BITFORCE
  61. cgminer_SOURCES += driver-bitforce.c
  62. endif
  63. if HAS_HASHFAST
  64. cgminer_SOURCES += driver-hashfast.c driver-hashfast.h hf_protocol.h hf_protocol_be.h
  65. endif
  66. if HAS_HASHRATIO
  67. cgminer_SOURCES += driver-hashratio.c driver-hashratio.h
  68. endif
  69. if HAS_BITFURY
  70. cgminer_SOURCES += driver-bitfury.c driver-bitfury.h
  71. endif
  72. if HAS_BITMINE_A1
  73. cgminer_SOURCES += driver-SPI-bitmine-A1.c
  74. cgminer_SOURCES += spi-context.c spi-context.h
  75. cgminer_SOURCES += A1-common.h
  76. cgminer_SOURCES += A1-board-selector.h
  77. cgminer_SOURCES += A1-board-selector-CCD.c A1-board-selector-CCR.c
  78. cgminer_SOURCES += A1-trimpot-mcp4x.h A1-trimpot-mcp4x.c
  79. cgminer_SOURCES += i2c-context.c i2c-context.h
  80. endif
  81. if HAS_DRILLBIT
  82. cgminer_SOURCES += driver-drillbit.c driver-drillbit.h
  83. endif
  84. if HAS_ICARUS
  85. cgminer_SOURCES += driver-icarus.c
  86. endif
  87. if HAS_KLONDIKE
  88. cgminer_SOURCES += driver-klondike.c
  89. endif
  90. if HAS_COINTERRA
  91. cgminer_SOURCES += driver-cointerra.c driver-cointerra.h
  92. endif
  93. if HAS_SP10
  94. cgminer_SOURCES += driver-spondoolies-sp10.c driver-spondoolies-sp10.h \
  95. driver-spondoolies-sp10-p.c driver-spondoolies-sp10-p.h
  96. endif
  97. if HAS_SP30
  98. cgminer_SOURCES += driver-spondoolies-sp30.c driver-spondoolies-sp30.h \
  99. driver-spondoolies-sp30-p.c driver-spondoolies-sp30-p.h
  100. endif
  101. if HAS_BAB
  102. cgminer_SOURCES += driver-bab.c
  103. endif
  104. if HAS_AVALON2
  105. cgminer_SOURCES += driver-avalon2.c driver-avalon2.h
  106. endif
  107. if HAS_MINION
  108. cgminer_SOURCES += driver-minion.c
  109. endif
  110. if HAS_ANT_S1
  111. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  112. endif
  113. if HAS_ANT_S2
  114. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  115. endif
  116. if HAS_MODMINER
  117. cgminer_SOURCES += driver-modminer.c
  118. bitstreamsdir = $(bindir)/bitstreams
  119. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/README
  120. endif
  121. if HAS_GRIDSEED
  122. cgminer_SOURCES += driver-gridseed.c driver-gridseed.h
  123. endif
  124. if HAS_ZEUS
  125. cgminer_SOURCES += driver-zeus.c driver-zeus.h
  126. endif
  127. if HAS_LKETC
  128. cgminer_SOURCES += driver-lketc.c driver-lketc.h
  129. endif
  130. if HAS_BLOCKERUPTER
  131. cgminer_SOURCES += driver-blockerupter.c driver-blockerupter.h
  132. endif