Makefile.am 2.3 KB

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