Makefile.am 5.5 KB

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