Makefile.am 3.5 KB

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