Makefile.am 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. #
  2. # StarPU
  3. # Copyright (C) INRIA 2008-2009 (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. LIBS = $(top_builddir)/src/libstarpu.la @LIBS@
  17. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/
  18. TESTS = $(check_PROGRAMS)
  19. check_PROGRAMS =
  20. EXTRA_DIST = \
  21. cuda/incrementer_cuda.cu \
  22. cuda/spmv_cuda.cu
  23. CLEANFILES = \
  24. cuda/incrementer_cuda.cubin \
  25. cuda/spmv_cuda.cubin
  26. CLEANFILES += *.gcno *.gcda *.linkinfo
  27. if USE_CUDA
  28. # TODO define NVCCFLAGS
  29. NVCC ?= nvcc
  30. .cu.cubin:
  31. $(MKDIR_P) `dirname $@`
  32. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  33. .cu.o:
  34. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS) -I${includedir}
  35. BUILT_SOURCES = \
  36. cuda/incrementer_cuda.cubin \
  37. cuda/spmv_cuda.cubin
  38. endif
  39. examplebindir = $(libdir)/starpu/examples/
  40. examplebin_PROGRAMS =
  41. noinst_HEADERS = \
  42. heat/lu_kernels_model.h \
  43. heat/dw_sparse_cg.h \
  44. heat/heat.h \
  45. heat/dw_factolu.h \
  46. cholesky/dw_cholesky_models.h \
  47. cholesky/dw_cholesky.h \
  48. common/blas_model.h \
  49. common/blas.h \
  50. mult/dw_mult.h \
  51. cuda/incrementer_cuda.h \
  52. fortran/bindings/StarPU-fortran.h \
  53. strassen/strassen.h \
  54. strassen/strassen_models.h \
  55. spmv/matrix-market/mmio.h \
  56. spmv/matrix-market/mm_to_bcsr.h \
  57. spmv/dw_spmv.h \
  58. spmv/dw_block_spmv.h
  59. ##################
  60. # Basic examples #
  61. ##################
  62. examplebin_PROGRAMS += \
  63. basic-examples/hello-world
  64. basic_examples_hello_world_SOURCES = \
  65. basic-examples/hello-world.c
  66. ################
  67. # Mult example #
  68. ################
  69. if !NO_BLAS_LIB
  70. examplebin_PROGRAMS += \
  71. mult/dw_mult \
  72. mult/dw_mult_no_stride \
  73. mult/dw_mult_no_stride_no_tag
  74. mult_dw_mult_SOURCES = \
  75. mult/dw_mult.c \
  76. common/blas.c \
  77. common/blas_model.c
  78. mult_dw_mult_no_stride_SOURCES = \
  79. mult/dw_mult_no_stride.c \
  80. common/blas.c \
  81. common/blas_model.c
  82. mult_dw_mult_no_stride_no_tag_SOURCES = \
  83. mult/dw_mult_no_stride_no_tag.c \
  84. common/blas.c \
  85. common/blas_model.c
  86. endif
  87. ####################
  88. # Cholesky example #
  89. ####################
  90. if !NO_BLAS_LIB
  91. examplebin_PROGRAMS += \
  92. cholesky/dw_cholesky \
  93. cholesky/dw_cholesky_no_stride
  94. cholesky_dw_cholesky_SOURCES = \
  95. cholesky/dw_cholesky.c \
  96. cholesky/dw_cholesky_models.c \
  97. cholesky/dw_cholesky_kernels.c \
  98. common/blas.c
  99. cholesky_dw_cholesky_no_stride_SOURCES = \
  100. cholesky/dw_cholesky_no_stride.c \
  101. cholesky/dw_cholesky_models.c \
  102. cholesky/dw_cholesky_kernels.c \
  103. common/blas.c
  104. endif
  105. ################
  106. # Heat example #
  107. ################
  108. if !NO_BLAS_LIB
  109. examplebin_PROGRAMS += heat/heat
  110. heat_heat_SOURCES = \
  111. heat/heat.c \
  112. heat/dw_factolu.c \
  113. heat/dw_factolu_tag.c \
  114. heat/dw_sparse_cg.c \
  115. heat/heat_display.c \
  116. heat/lu_kernels_model.c \
  117. heat/dw_sparse_cg_kernels.c \
  118. heat/dw_factolu_kernels.c \
  119. common/blas.c
  120. endif
  121. ################
  122. # Tag examples #
  123. ################
  124. check_PROGRAMS += \
  125. tag_example/tag_example \
  126. tag_example/tag_example3 \
  127. tag_example/tag_example2
  128. examplebin_PROGRAMS += \
  129. tag_example/tag_example \
  130. tag_example/tag_example3 \
  131. tag_example/tag_example2
  132. tag_example_tag_example_SOURCES = \
  133. tag_example/tag_example.c
  134. tag_example_tag_example2_SOURCES = \
  135. tag_example/tag_example2.c
  136. tag_example_tag_example3_SOURCES = \
  137. tag_example/tag_example2.c
  138. ####################
  139. # Strassen example #
  140. ####################
  141. if ATLAS_BLAS_LIB
  142. examplebin_PROGRAMS += strassen/dw_strassen
  143. strassen_dw_strassen_SOURCES = \
  144. strassen/strassen.c \
  145. strassen/strassen_kernels.c \
  146. strassen/test_strassen.c \
  147. strassen/strassen_models.c \
  148. common/blas.c
  149. endif
  150. #####################
  151. # Strassen2 example #
  152. #####################
  153. if !NO_BLAS_LIB
  154. check_PROGRAMS += strassen2/strassen
  155. examplebin_PROGRAMS += strassen2/strassen
  156. strassen2_strassen_SOURCES = \
  157. strassen2/strassen2.c \
  158. strassen2/strassen2_kernels.c \
  159. common/blas.c
  160. endif
  161. ################
  162. # SpMV example #
  163. ################
  164. if ATLAS_BLAS_LIB
  165. examplebin_PROGRAMS += \
  166. spmv/dw_spmv \
  167. spmv/dw_block_spmv
  168. spmv_dw_spmv_SOURCES = \
  169. spmv/dw_spmv.c
  170. spmv_dw_block_spmv_SOURCES = \
  171. spmv/dw_block_spmv.c \
  172. spmv/dw_block_spmv_kernels.c \
  173. spmv/matrix-market/mm_to_bcsr.c \
  174. spmv/matrix-market/mmio.c
  175. endif
  176. #######################
  177. # Incrementer example #
  178. #######################
  179. check_PROGRAMS += \
  180. incrementer/incrementer \
  181. incrementer/incrementer_runtime
  182. examplebin_PROGRAMS += \
  183. incrementer/incrementer \
  184. incrementer/incrementer_runtime
  185. incrementer_incrementer_SOURCES = \
  186. incrementer/incrementer.c
  187. if USE_CUDA
  188. incrementer_incrementer_runtime_SOURCES = \
  189. incrementer/incrementer_runtime.c \
  190. incrementer/incrementer_runtime_kernels.cu
  191. else
  192. incrementer_incrementer_runtime_SOURCES = \
  193. incrementer/incrementer_runtime.c
  194. endif