Makefile.am 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # StarPU
  3. # Copyright (C) INRIA 2009 (see AUTHORS file)
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. #
  17. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include
  18. lib_LTLIBRARIES = libstarpufft.la
  19. EXTRA_DIST = \
  20. starpufft.h \
  21. float.h \
  22. double.h \
  23. cudax_kernels.h \
  24. starpufftx.c \
  25. starpufftx1d.c \
  26. starpufftx2d.c \
  27. cuda_kernels.cu \
  28. cudaf_kernels.cu \
  29. cudax_kernels.cu \
  30. testx.c \
  31. testx_threads.c \
  32. testf_threads.c \
  33. test_threads.c
  34. libstarpufft_la_SOURCES = starpufft.c starpufftf.c starpufft_common.c
  35. libstarpufft_la_LIBADD = $(top_builddir)/src/libstarpu.la $(FFTW_LIBS) $(FFTWF_LIBS)
  36. libstarpufft_la_CFLAGS = $(FFTWF_CFLAGS)
  37. if STARPU_USE_CUDA
  38. # TODO define NVCCFLAGS
  39. NVCC ?= nvcc
  40. NVCCFLAGS += -Xcompiler -fPIC -Xlinker -fPIC
  41. cudaf_kernels.o: cudaf_kernels.cu
  42. $(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I${includedir}
  43. libstarpufft_la_SOURCES += cudaf_kernels.cu
  44. am_libstarpufft_la_OBJECTS = cudaf_kernels.o starpufftf.lo starpufft_common.lo
  45. if STARPU_HAVE_CUFFTDOUBLECOMPLEX
  46. cuda_kernels.o: cuda_kernels.cu
  47. $(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I${includedir} -arch sm_13
  48. libstarpufft_la_SOURCES += cuda_kernels.cu
  49. am_libstarpufft_la_OBJECTS += cuda_kernels.o starpufft.lo
  50. endif
  51. libstarpufft_la_LIBADD += -lcufft
  52. endif
  53. check_PROGRAMS = testf
  54. testf_LDADD = libstarpufft.la $(top_builddir)/src/libstarpu.la $(FFTWF_LIBS)
  55. # If we don't have CUDA, we assume that we have fftw available in double
  56. # precision anyway, we just want to make sure that if CUFFT is used, it also
  57. # supports double precision.
  58. if !STARPU_USE_CUDA
  59. check_PROGRAMS += test
  60. test_LDADD = libstarpufft.la $(top_builddir)/src/libstarpu.la $(FFTW_LIBS)
  61. else
  62. if STARPU_HAVE_CUFFTDOUBLECOMPLEX
  63. check_PROGRAMS += test
  64. test_LDADD = libstarpufft.la $(top_builddir)/src/libstarpu.la $(FFTW_LIBS)
  65. endif
  66. endif
  67. #check_PROGRAMS += test_threads testf_threads
  68. #test_threads_LDADD = libstarpufft.la $(top_builddir)/src/libstarpu.la -lfftw3_threads
  69. #testf_threads_LDADD = libstarpufft.la $(top_builddir)/src/libstarpu.la -lfftw3f_threads