Makefile.am 2.9 KB

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