Makefile.am 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. bfgminer_LDADD += libsse2cpuminer.a
  60. noinst_LIBRARIES = libsse2cpuminer.a
  61. libsse2cpuminer_a_SOURCES = sha256_4way.c sha256_sse2_i386.c
  62. libsse2cpuminer_a_CFLAGS = $(bfgminer_CPPFLAGS) -msse2
  63. # the CPU portion extracted from original main.c
  64. bfgminer_SOURCES += driver-cpu.h driver-cpu.c
  65. if HAS_YASM
  66. AM_CFLAGS = -DHAS_YASM
  67. if HAVE_x86_64
  68. SUBDIRS += x86_64
  69. bfgminer_LDADD += x86_64/libx8664.a
  70. else # HAVE_x86_64
  71. SUBDIRS += x86_32
  72. bfgminer_LDADD += x86_32/libx8632.a
  73. endif # HAVE_x86_64
  74. endif # HAS_YASM
  75. endif # HAS_CPUMINE
  76. if NEED_FPGAUTILS
  77. bfgminer_SOURCES += fpgautils.c fpgautils.h
  78. endif
  79. if NEED_DYNCLOCK
  80. bfgminer_SOURCES += dynclock.c dynclock.h
  81. endif
  82. if HAS_BITFORCE
  83. bfgminer_SOURCES += driver-bitforce.c
  84. if HAVE_WINDOWS
  85. else
  86. bin_PROGRAMS += bitforce-firmware-flash
  87. bitforce_firmware_flash_SOURCES = bitforce-firmware-flash.c
  88. endif
  89. endif
  90. if HAS_ICARUS
  91. bfgminer_SOURCES += driver-icarus.c icarus-common.h
  92. bfgminer_SOURCES += driver-cairnsmore.c
  93. endif
  94. if HAS_AVALON
  95. bfgminer_SOURCES += driver-avalon.c driver-avalon.h hexdump.c
  96. endif
  97. if HAS_MODMINER
  98. bfgminer_SOURCES += driver-modminer.c
  99. bitstreamsdir = $(bindir)/bitstreams
  100. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  101. endif
  102. if HAS_X6500
  103. bfgminer_SOURCES += driver-x6500.c ft232r.c ft232r.h jtag.c jtag.h
  104. bitstreamsdir = $(bindir)/bitstreams
  105. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  106. endif
  107. if HAS_ZTEX
  108. bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
  109. bitstreamsdir = $(bindir)/bitstreams
  110. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  111. endif
  112. bin_PROGRAMS += bfgminer-rpc
  113. bfgminer_rpc_SOURCES = api-example.c
  114. bfgminer_rpc_LDADD = @WS2_LIBS@