Makefile.am 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2011, 2012 INRIA
  4. #
  5. # StarPU 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. # StarPU 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. include $(top_srcdir)/starpu.mk
  16. TESTS =
  17. examplebindir = $(libdir)/starpu/plugin
  18. if STARPU_USE_CPU
  19. if STARPU_HAVE_WINDOWS
  20. check_PROGRAMS = $(TESTS)
  21. else
  22. check_PROGRAMS = $(LOADER) $(TESTS)
  23. endif
  24. if !STARPU_HAVE_WINDOWS
  25. ## test loader program
  26. LOADER = loader
  27. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  28. LOADER_BIN = $(abs_top_builddir)/gcc-plugin/examples/$(LOADER)
  29. loader_SOURCES = ../../tests/loader.c
  30. if STARPU_HAVE_AM111
  31. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  32. LOG_COMPILER = $(LOADER_BIN)
  33. else
  34. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  35. endif
  36. endif
  37. CLEANFILES = starpu_idle_microsec.log
  38. examplebin_PROGRAMS = \
  39. hello-starpu \
  40. matrix-mult \
  41. stencil5 \
  42. vector_scal/vector_scal
  43. #if !NO_BLAS_LIB
  44. #examplebin_PROGRAMS += \
  45. # cholesky/cholesky
  46. #endif !NO_BLAS_LIB
  47. endif STARPU_USE_CPU
  48. AM_LDFLAGS = $(top_builddir)/src/@LIBSTARPU_LINK@
  49. AM_LDFLAGS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
  50. AM_CPPFLAGS = \
  51. -I$(top_srcdir)/include \
  52. -I$(top_srcdir)/examples \
  53. $(STARPU_OPENCL_CPPFLAGS) $(STARPU_CUDA_CPPFLAGS)
  54. AM_CFLAGS = \
  55. -fplugin="$(builddir)/../src/.libs/starpu.so" \
  56. -fplugin-arg-starpu-include-dir="$(top_srcdir)/include" \
  57. -fplugin-arg-starpu-verbose \
  58. -Wall $(HWLOC_CFLAGS)
  59. #noinst_HEADERS = \
  60. # cholesky/cholesky.h \
  61. # cholesky/cholesky_kernels.h
  62. #if !NO_BLAS_LIB
  63. #cholesky_cholesky_SOURCES = \
  64. # cholesky/cholesky.c \
  65. # cholesky/cholesky_models.c \
  66. # cholesky/cholesky_kernels.c \
  67. # $(top_srcdir)/examples/common/blas.c
  68. #
  69. #cholesky_cholesky_LDADD = \
  70. # $(STARPU_BLAS_LDFLAGS)
  71. #endif
  72. vector_scal_vector_scal_SOURCES = vector_scal/vector_scal.c
  73. if STARPU_USE_CUDA
  74. vector_scal_vector_scal_SOURCES += vector_scal/vector_scal_cuda.cu
  75. if STARPU_COVERITY
  76. include $(top_srcdir)/starpu-mynvcc.mk
  77. else
  78. .cu.o:
  79. @echo " NVCC $@"
  80. @$(NVCC) $< -c -o $@ $(NVCCFLAGS) -I$(top_builddir)/include -I$(top_srcdir)/include
  81. endif
  82. else !STARPU_USE_CUDA
  83. EXTRA_DIST = vector_scal/vector_scal_cuda.cu
  84. endif
  85. TESTS += $(examplebin_PROGRAMS)