Makefile.am 2.6 KB

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