Makefile.am 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. # Copyright 2012-2013 Luke Dashjr
  2. # Copyright 2012 zefir
  3. # Copyright 2011-2013 Con Kolivas
  4. # Copyright 2013 James Z.M. Gao
  5. #
  6. # This program is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by the Free
  8. # Software Foundation; either version 3 of the License, or (at your option)
  9. # any later version. See COPYING for more details.
  10. ACLOCAL_AMFLAGS = -I m4
  11. EXTRA_DIST = example.conf m4/gnulib-cache.m4 linux-usb-bfgminer \
  12. api-example.php miner.php \
  13. API.class API.java api-example.c windows-build.txt \
  14. bitstreams/* README.FPGA README.RPC README.scrypt \
  15. README.ASIC \
  16. README.GPU \
  17. api-example.py
  18. SUBDIRS = lib ccan
  19. INCLUDES = -fno-strict-aliasing
  20. bin_PROGRAMS = bfgminer
  21. bin_SCRIPTS = $(top_srcdir)/*.cl
  22. bfgminer_LDFLAGS = $(PTHREAD_FLAGS)
  23. bfgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  24. @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  25. @UDEV_LIBS@ @LIBUSB_LIBS@ @MM_LIBS@ \
  26. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  27. bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @LIBUSB_CFLAGS@ @LIBCURL_CFLAGS@
  28. bfgminer_CPPFLAGS += @JANSSON_CFLAGS@
  29. bfgminer_CPPFLAGS += $(PTHREAD_FLAGS)
  30. bfgminer_CPPFLAGS += $(NCURSES_CPPFLAGS)
  31. bfgminer_LDADD += $(libblkmaker_LIBS)
  32. bfgminer_LDFLAGS += $(libblkmaker_LDFLAGS)
  33. bfgminer_CPPFLAGS += $(libblkmaker_CFLAGS)
  34. # common sources
  35. bfgminer_SOURCES := miner.c
  36. bfgminer_SOURCES += miner.h compat.h bench_block.h \
  37. deviceapi.c deviceapi.h \
  38. util.c util.h logging.h \
  39. sha2.c sha2.h api.c
  40. bfgminer_DEPENDENCIES =
  41. if NEED_LIBBLKMAKER
  42. SUBDIRS += libblkmaker
  43. if HAVE_CYGWIN
  44. bfgminer_DEPENDENCIES += cygblkmaker-0.1-0.dll cygblkmaker_jansson-0.1-0.dll
  45. cyg%.dll: libblkmaker/.libs/cyg%.dll
  46. cp -p $< $@
  47. endif
  48. endif
  49. bfgminer_SOURCES += logging.c
  50. # GPU sources, TODO: make them selectable
  51. # the GPU portion extracted from original main.c
  52. bfgminer_SOURCES += driver-opencl.h driver-opencl.c
  53. # the original GPU related sources, unchanged
  54. bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
  55. bfgminer_SOURCES += adl.c adl.h adl_functions.h
  56. bfgminer_SOURCES += *.cl
  57. if HAVE_SENSORS
  58. bfgminer_LDADD += $(sensors_LIBS)
  59. endif
  60. if HAS_SCRYPT
  61. bfgminer_SOURCES += scrypt.c scrypt.h
  62. endif
  63. if HAS_CPUMINE
  64. bfgminer_SOURCES += \
  65. sha256_generic.c sha256_via.c \
  66. sha256_cryptopp.c sha256_sse2_amd64.c \
  67. sha256_sse4_amd64.c \
  68. sha256_altivec_4way.c
  69. # the CPU portion extracted from original main.c
  70. bfgminer_SOURCES += driver-cpu.h driver-cpu.c
  71. if HAVE_SSE2
  72. bfgminer_LDADD += libsse2cpuminer.a
  73. noinst_LIBRARIES = libsse2cpuminer.a
  74. libsse2cpuminer_a_SOURCES = sha256_4way.c
  75. libsse2cpuminer_a_CFLAGS = $(bfgminer_CPPFLAGS) $(SSE2_CFLAGS)
  76. endif
  77. if HAS_YASM
  78. AM_CFLAGS = -DHAS_YASM
  79. if HAVE_x86_64
  80. SUBDIRS += x86_64
  81. bfgminer_LDADD += x86_64/libx8664.a
  82. else # HAVE_x86_64
  83. SUBDIRS += x86_32
  84. bfgminer_LDADD += x86_32/libx8632.a
  85. if HAVE_SSE2
  86. libsse2cpuminer_a_SOURCES += sha256_sse2_i386.c
  87. endif
  88. endif # HAVE_x86_64
  89. endif # HAS_YASM
  90. endif # HAS_CPUMINE
  91. if NEED_FPGAUTILS
  92. bfgminer_SOURCES += fpgautils.c fpgautils.h
  93. endif
  94. if NEED_DYNCLOCK
  95. bfgminer_SOURCES += dynclock.c dynclock.h
  96. endif
  97. if HAS_BITFORCE
  98. bfgminer_SOURCES += driver-bitforce.c
  99. if HAVE_WINDOWS
  100. else
  101. bin_PROGRAMS += bitforce-firmware-flash
  102. bitforce_firmware_flash_SOURCES = bitforce-firmware-flash.c
  103. endif
  104. endif
  105. if HAS_BF1
  106. bfgminer_SOURCES += driver-bf1.c
  107. endif
  108. if HAS_ICARUS
  109. bfgminer_SOURCES += driver-icarus.c icarus-common.h
  110. bfgminer_SOURCES += driver-cairnsmore.c
  111. endif
  112. if HAS_AVALON
  113. bfgminer_SOURCES += driver-avalon.c driver-avalon.h hexdump.c
  114. endif
  115. if HAS_MODMINER
  116. bfgminer_SOURCES += driver-modminer.c
  117. bitstreamsdir = $(bindir)/bitstreams
  118. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  119. endif
  120. if HAS_X6500
  121. bfgminer_SOURCES += driver-x6500.c ft232r.c ft232r.h jtag.c jtag.h
  122. bitstreamsdir = $(bindir)/bitstreams
  123. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  124. endif
  125. if HAS_ZTEX
  126. bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
  127. bitstreamsdir = $(bindir)/bitstreams
  128. dist_bitstreams_DATA = $(top_srcdir)/bitstreams/*
  129. endif
  130. bin_PROGRAMS += bfgminer-rpc
  131. bfgminer_rpc_SOURCES = api-example.c
  132. bfgminer_rpc_LDADD = @WS2_LIBS@