Makefile.am 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. ACLOCAL_AMFLAGS = -I m4
  2. JANSSON_CPPFLAGS= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/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. # Device drivers
  47. if HAS_AVALON
  48. cgminer_SOURCES += driver-avalon.c driver-avalon.h
  49. endif
  50. if HAS_KNC
  51. cgminer_SOURCES += driver-knc-spi-fpga.c
  52. endif
  53. if HAS_BFLSC
  54. cgminer_SOURCES += driver-bflsc.c driver-bflsc.h
  55. endif
  56. if HAS_BITFORCE
  57. cgminer_SOURCES += driver-bitforce.c
  58. endif
  59. if HAS_HASHFAST
  60. cgminer_SOURCES += driver-hashfast.c driver-hashfast.h hf_protocol.h hf_protocol_be.h
  61. endif
  62. if HAS_BITFURY
  63. cgminer_SOURCES += driver-bitfury.c driver-bitfury.h
  64. endif
  65. if HAS_BITMINE_A1
  66. cgminer_SOURCES += driver-SPI-bitmine-A1.c
  67. cgminer_SOURCES += spi-context.c spi-context.h
  68. cgminer_SOURCES += A1-common.h
  69. cgminer_SOURCES += A1-board-selector.h
  70. cgminer_SOURCES += A1-board-selector-CCD.c A1-board-selector-CCR.c
  71. cgminer_SOURCES += A1-trimpot-mcp4x.h A1-trimpot-mcp4x.c
  72. cgminer_SOURCES += i2c-context.c i2c-context.h
  73. endif
  74. if HAS_DRILLBIT
  75. cgminer_SOURCES += driver-drillbit.c driver-drillbit.h
  76. endif
  77. if HAS_ICARUS
  78. cgminer_SOURCES += driver-icarus.c
  79. endif
  80. if HAS_KLONDIKE
  81. cgminer_SOURCES += driver-klondike.c
  82. endif
  83. if HAS_COINTERRA
  84. cgminer_SOURCES += driver-cointerra.c driver-cointerra.h
  85. endif
  86. if HAS_SPONDOOLIES
  87. cgminer_SOURCES += driver-spondoolies.c driver-spondoolies.h \
  88. mg_proto_parser.c mg_proto_parser.h
  89. endif
  90. if HAS_BAB
  91. cgminer_SOURCES += driver-bab.c
  92. endif
  93. if HAS_AVALON2
  94. cgminer_SOURCES += driver-avalon2.c driver-avalon2.h crc16.c crc.h
  95. endif
  96. if HAS_MINION
  97. cgminer_SOURCES += driver-minion.c
  98. endif
  99. if HAS_ANT_S1
  100. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  101. endif
  102. if HAS_ANT_S2
  103. cgminer_SOURCES += driver-bitmain.c driver-bitmain.h
  104. endif
  105. if HAS_MODMINER
  106. cgminer_SOURCES += driver-modminer.c
  107. bitstreamsdir = $(bindir)/bitstreams
  108. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/README
  109. endif
  110. if HAS_GRIDSEED
  111. cgminer_SOURCES += driver-gridseed.c driver-gridseed.h
  112. endif
  113. if HAS_ZEUS
  114. cgminer_SOURCES += driver-zeus.c driver-zeus.h
  115. endif
  116. if HAS_LKETC
  117. cgminer_SOURCES += driver-lketc.c driver-lketc.h
  118. endif