Makefile.am 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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-cgminer \
  8. ADL_SDK/readme.txt api-example.php miner.php \
  9. API.class API.java api-example.c
  10. SUBDIRS = lib compat ccan
  11. INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES)
  12. bin_PROGRAMS = cgminer
  13. bin_SCRIPTS = *.cl
  14. cgminer_LDFLAGS = $(PTHREAD_FLAGS)
  15. cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
  16. @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
  17. @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
  18. cgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@
  19. # common sources
  20. cgminer_SOURCES := cgminer.c
  21. cgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
  22. util.c uthash.h logging.h \
  23. sha2.c sha2.h api.c
  24. cgminer_SOURCES += logging.c
  25. # GPU sources, TODO: make them selectable
  26. # the GPU portion extracted from original main.c
  27. cgminer_SOURCES += device-gpu.h device-gpu.c
  28. # the original GPU related sources, unchanged
  29. cgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
  30. cgminer_SOURCES += adl.c adl.h adl_functions.h
  31. cgminer_SOURCES += *.cl
  32. if HAS_CPUMINE
  33. # original CPU related sources, unchanged
  34. cgminer_SOURCES += \
  35. sha256_generic.c sha256_4way.c sha256_via.c \
  36. sha256_cryptopp.c sha256_sse2_amd64.c \
  37. sha256_sse4_amd64.c sha256_sse2_i386.c \
  38. sha256_altivec_4way.c
  39. # the CPU portion extracted from original main.c
  40. cgminer_SOURCES += device-cpu.h device-cpu.c
  41. if HAS_YASM
  42. AM_CFLAGS = -DHAS_YASM
  43. if HAVE_x86_64
  44. SUBDIRS += x86_64
  45. cgminer_LDADD += x86_64/libx8664.a
  46. else # HAVE_x86_64
  47. SUBDIRS += x86_32
  48. cgminer_LDADD += x86_32/libx8632.a
  49. endif # HAVE_x86_64
  50. endif # HAS_YASM
  51. endif # HAS_CPUMINE
  52. if HAS_BITFORCE
  53. cgminer_SOURCES += bitforce.c
  54. endif