Makefile.am 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. TESTS =
  16. examplebindir = $(libdir)/starpu/plugin
  17. if STARPU_USE_CPU
  18. if STARPU_HAVE_WINDOWS
  19. check_PROGRAMS = $(TESTS)
  20. else
  21. check_PROGRAMS = $(LOADER) $(TESTS)
  22. endif
  23. if !STARPU_HAVE_WINDOWS
  24. ## test loader program
  25. LOADER = loader
  26. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  27. LOADER_BIN = $(abs_top_builddir)/gcc-plugin/examples/$(LOADER)
  28. loader_SOURCES = ../../tests/loader.c
  29. if STARPU_HAVE_AM111
  30. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  31. LOG_COMPILER = $(LOADER_BIN)
  32. else
  33. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  34. endif
  35. endif
  36. CLEANFILES = starpu_idle_microsec.log
  37. examplebin_PROGRAMS = \
  38. hello-starpu \
  39. matrix-mult \
  40. stencil5 \
  41. vector_scal/vector_scal
  42. #if !NO_BLAS_LIB
  43. #examplebin_PROGRAMS += \
  44. # cholesky/cholesky
  45. #endif !NO_BLAS_LIB
  46. endif STARPU_USE_CPU
  47. AM_LDFLAGS = $(top_builddir)/src/@LIBSTARPU_LINK@
  48. AM_LDFLAGS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
  49. AM_CPPFLAGS = \
  50. -I$(top_srcdir)/include \
  51. -I$(top_srcdir)/examples \
  52. $(STARPU_OPENCL_CPPFLAGS) $(STARPU_CUDA_CPPFLAGS)
  53. AM_CFLAGS = \
  54. -fplugin="$(builddir)/../src/.libs/starpu.so" \
  55. -fplugin-arg-starpu-include-dir="$(top_srcdir)/include" \
  56. -fplugin-arg-starpu-verbose \
  57. -Wall $(HWLOC_CFLAGS)
  58. #noinst_HEADERS = \
  59. # cholesky/cholesky.h \
  60. # cholesky/cholesky_kernels.h
  61. #if !NO_BLAS_LIB
  62. #cholesky_cholesky_SOURCES = \
  63. # cholesky/cholesky.c \
  64. # cholesky/cholesky_models.c \
  65. # cholesky/cholesky_kernels.c \
  66. # $(top_srcdir)/examples/common/blas.c
  67. #
  68. #cholesky_cholesky_LDADD = \
  69. # $(STARPU_BLAS_LDFLAGS)
  70. #endif
  71. vector_scal_vector_scal_SOURCES = vector_scal/vector_scal.c
  72. if STARPU_USE_CUDA
  73. vector_scal_vector_scal_SOURCES += vector_scal/vector_scal_cuda.cu
  74. .cu.o:
  75. $(NVCC) $< -c -o $@ $(NVCCFLAGS) \
  76. -I$(top_builddir)/include -I$(top_srcdir)/include
  77. else !STARPU_USE_CUDA
  78. EXTRA_DIST = vector_scal/vector_scal_cuda.cu
  79. endif
  80. TESTS += $(examplebin_PROGRAMS)
  81. showcheck:
  82. -cat $(TEST_LOGS) /dev/null
  83. ! grep -q "ERROR: AddressSanitizer: " $(TEST_LOGS) /dev/null
  84. ! grep -q "WARNING: AddressSanitizer: " $(TEST_LOGS) /dev/null
  85. ! grep -q "ERROR: ThreadSanitizer: " $(TEST_LOGS) /dev/null
  86. ! grep -q "WARNING: ThreadSanitizer: " $(TEST_LOGS) /dev/null
  87. RET=0 ; \
  88. for i in $(SUBDIRS) ; do \
  89. make -C $$i showcheck || RET=1 ; \
  90. done ; \
  91. exit $$RET