Makefile.am 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2010-2012 Université de Bordeaux 1
  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. AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  16. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) @LIBS@
  17. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  18. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
  19. if USE_MPI
  20. LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  21. AM_CPPFLAGS += -I$(top_srcdir)/mpi/include
  22. endif
  23. CC = $(CC_OR_MPICC)
  24. if STARPU_USE_CUDA
  25. NVCCFLAGS += $(HWLOC_CFLAGS)
  26. .cu.cubin:
  27. $(MKDIR_P) `dirname $@`
  28. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  29. .cu.o:
  30. $(MKDIR_P) `dirname $@`
  31. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(NVCCFLAGS)
  32. endif
  33. ###################
  34. # stencil example #
  35. ###################
  36. check_PROGRAMS = \
  37. stencil
  38. examplebindir = $(libdir)/starpu/examples/stencil
  39. examplebin_PROGRAMS = \
  40. stencil
  41. stencil_SOURCES = \
  42. life.c \
  43. stencil-kernels.c \
  44. stencil-tasks.c \
  45. stencil-blocks.c \
  46. stencil.c
  47. noinst_HEADERS = \
  48. stencil.h \
  49. shadow.h
  50. if STARPU_USE_CUDA
  51. stencil_SOURCES += \
  52. life_cuda.cu \
  53. shadow.cu
  54. endif
  55. if STARPU_USE_OPENCL
  56. stencil_SOURCES += \
  57. life_opencl.c \
  58. shadow_opencl.c
  59. endif
  60. outs = \
  61. 0.5.out \
  62. 0.out \
  63. 1.out \
  64. 2.out \
  65. 3.out \
  66. 4.out \
  67. 6.out \
  68. mpi.out
  69. EXTRA_DIST = $(outs) results run README
  70. pics: $(outs:.out=.xpm)
  71. CLEANFILES = *.xpm
  72. .out.out2:
  73. grep '^|' $< | tr -d ' ' > $@
  74. .out2.xpm:
  75. ( width=$$(expr $$(head -n 1 < $< | wc -c) - 1) ; \
  76. height=`wc -l < $<` ; \
  77. echo "/* XPM */" ; \
  78. echo "static char * test_xpm[] = {" ; \
  79. echo "\"$$width $$height 9 1\"," ; \
  80. echo "\"_ c None\"," ; \
  81. echo "\"0 c #FF0000\"," ; \
  82. echo "\"1 c #00FF00\"," ; \
  83. echo "\"2 c #0000FF\"," ; \
  84. echo "\"3 c #FFFF00\"," ; \
  85. echo "\"4 c #FF00FF\"," ; \
  86. echo "\"5 c #00FFFF\"," ; \
  87. echo "\"| c #FFFFFF\"," ; \
  88. echo "\"* c #000000\"," ; \
  89. < $< sed -e 's/^/"/' -e 's/$$/",/' | sed -e '$$s/",$$/"};/' ) > $@
  90. view:
  91. feh --zoom 800 -F 0.xpm 0.5.xpm 1.xpm 2.xpm 3.xpm 4.xpm 6.xpm mpi.xpm
  92. showcheck:
  93. -cat $(TEST_LOGS) /dev/null