Makefile.am 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ACLOCAL_AMFLAGS = -I m4
  2. if WANT_JANSSON
  3. JANSSON_INCLUDES= -I$(top_srcdir)/compat/jansson
  4. else
  5. JANSSON_INCLUDES=
  6. endif
  7. EXTRA_DIST = example.conf m4/gnulib-cache.m4 linux-usb-bfgminer \
  8. ADL_SDK/readme.txt api-example.php miner.php \
  9. API.class API.java api-example.c windows-build.txt \
  10. bitstreams/* API-README FPGA-README
  11. SUBDIRS = lib compat ccan
  12. INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) $(USB_FLAGS)
  13. bin_PROGRAMS = bfgminer
  14. bin_SCRIPTS = *.cl
  15. bfgminer_LDFLAGS = $(PTHREAD_FLAGS)
  16. bfgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  17. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  18. @TIMER_LIBS@ \
  19. @UDEV_LIBS@ @USB_LIBS@ \
  20. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  21. bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
  22. # common sources
  23. bfgminer_SOURCES := miner.c
  24. bfgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  25. util.c uthash.h logging.h \
  26. sha2.c sha2.h api.c
  27. bfgminer_SOURCES += logging.c
  28. # GPU sources, TODO: make them selectable
  29. # the GPU portion extracted from original main.c
  30. bfgminer_SOURCES += driver-opencl.h driver-opencl.c
  31. # the original GPU related sources, unchanged
  32. bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
  33. bfgminer_SOURCES += adl.c adl.h adl_functions.h
  34. bfgminer_SOURCES += *.cl
  35. if HAS_CPUMINE
  36. # original CPU related sources, unchanged
  37. bfgminer_SOURCES += \
  38. sha256_generic.c sha256_4way.c sha256_via.c \
  39. sha256_cryptopp.c sha256_sse2_amd64.c \
  40. sha256_sse4_amd64.c sha256_sse2_i386.c \
  41. sha256_altivec_4way.c
  42. # the CPU portion extracted from original main.c
  43. bfgminer_SOURCES += driver-cpu.h driver-cpu.c
  44. if HAS_YASM
  45. AM_CFLAGS = -DHAS_YASM
  46. if HAVE_x86_64
  47. SUBDIRS += x86_64
  48. bfgminer_LDADD += x86_64/libx8664.a
  49. else # HAVE_x86_64
  50. SUBDIRS += x86_32
  51. bfgminer_LDADD += x86_32/libx8632.a
  52. endif # HAVE_x86_64
  53. endif # HAS_YASM
  54. endif # HAS_CPUMINE
  55. if NEED_FPGAUTILS
  56. bfgminer_SOURCES += fpgautils.c fpgautils.h
  57. endif
  58. if HAS_BITFORCE
  59. bfgminer_SOURCES += driver-bitforce.c
  60. endif
  61. if HAS_ICARUS
  62. bfgminer_SOURCES += driver-icarus.c
  63. endif
  64. if HAS_MODMINER
  65. bfgminer_SOURCES += driver-modminer.c
  66. bitstreamsdir = $(bindir)/bitstreams
  67. dist_bitstreams_DATA = bitstreams/*
  68. endif
  69. if HAS_ZTEX
  70. bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
  71. bitstreamsdir = $(bindir)/bitstreams
  72. dist_bitstreams_DATA = bitstreams/*
  73. endif