Makefile.am 3.7 KB

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