Makefile.am 3.2 KB

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