Makefile.am 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. # Copyright (C) 2017 Guillaume Beauchamp
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. #
  17. ACLOCAL_AMFLAGS=-I m4
  18. CLEANFILES = *.gcno *.gcda *.linkinfo
  19. SUBDIRS =
  20. if STARPU_USE_MIN_DGELS
  21. SUBDIRS += min-dgels
  22. endif
  23. SUBDIRS += src
  24. SUBDIRS += tools
  25. if STARPU_BUILD_TESTS
  26. SUBDIRS += tests
  27. endif
  28. SUBDIRS += doc
  29. if STARPU_USE_MPI
  30. SUBDIRS += mpi
  31. endif
  32. if STARPU_BUILD_EXAMPLES
  33. SUBDIRS += examples
  34. endif
  35. if STARPU_BUILD_SOCL
  36. SUBDIRS += socl
  37. endif
  38. if STARPU_BUILD_STARPUFFT
  39. SUBDIRS += starpufft
  40. endif
  41. if STARPU_BUILD_STARPURM
  42. SUBDIRS += starpurm
  43. endif
  44. if STARPU_USE_CPU
  45. if STARPU_BUILD_STARPUPY
  46. SUBDIRS += starpupy
  47. endif
  48. endif
  49. if STARPU_BUILD_SC_HYPERVISOR
  50. SUBDIRS += sc_hypervisor
  51. endif
  52. if STARPU_USE_JULIA
  53. SUBDIRS += julia
  54. endif
  55. if STARPU_BUILD_ECLIPSE_PLUGIN
  56. SUBDIRS += eclipse-plugin
  57. endif
  58. pkgconfigdir = $(libdir)/pkgconfig
  59. pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
  60. versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
  61. versinclude_HEADERS = \
  62. include/starpu.h \
  63. include/starpu_helper.h \
  64. include/starpu_bitmap.h \
  65. include/starpu_data_filters.h \
  66. include/starpu_data_interfaces.h \
  67. include/starpu_worker.h \
  68. include/starpu_task.h \
  69. include/starpu_task_dep.h \
  70. include/starpu_task_bundle.h \
  71. include/starpu_task_list.h \
  72. include/starpu_task_util.h \
  73. include/starpu_data.h \
  74. include/starpu_perfmodel.h \
  75. include/starpu_util.h \
  76. include/starpu_fxt.h \
  77. include/starpu_cuda.h \
  78. include/starpu_opencl.h \
  79. include/starpu_fpga.h \
  80. include/starpu_openmp.h \
  81. include/starpu_sink.h \
  82. include/starpu_mpi_ms.h \
  83. include/starpu_expert.h \
  84. include/starpu_profiling.h \
  85. include/starpu_bound.h \
  86. include/starpu_scheduler.h \
  87. include/schedulers/starpu_heteroprio.h \
  88. include/starpu_sched_component.h \
  89. include/starpu_sched_ctx.h \
  90. include/starpu_sched_ctx_hypervisor.h \
  91. include/starpu_deprecated_api.h \
  92. include/starpu_hash.h \
  93. include/starpu_rand.h \
  94. include/starpu_disk.h \
  95. include/starpu_cublas.h \
  96. include/starpu_cublas_v2.h \
  97. include/starpu_cusparse.h \
  98. include/starpu_driver.h \
  99. include/starpu_stdlib.h \
  100. include/starpu_thread.h \
  101. include/starpu_thread_util.h \
  102. include/starpu_tree.h \
  103. include/starpu_simgrid_wrap.h \
  104. include/starpu_mod.f90 \
  105. include/fstarpu_mod.f90 \
  106. include/starpu_clusters.h \
  107. include/starpu_perf_monitoring.h \
  108. include/starpu_perf_steering.h
  109. nodist_versinclude_HEADERS = \
  110. include/starpu_config.h
  111. noinst_HEADERS = \
  112. include/pthread_win32/pthread.h \
  113. include/pthread_win32/semaphore.h
  114. if STARPU_DEVEL
  115. all-local:
  116. @if $(GREP) -r sys/time.h $$( find $(srcdir)/examples $(srcdir)/tests $(srcdir)/src $(srcdir)/mpi/src $(srcdir)/include -name \*.[ch] -a \! -name starpu_util.h -a \! -name timer.h -a \! -name loader.c ) ; \
  117. then \
  118. echo "Please do not include sys/time, it is not available on Windows, include starpu_util.h and use starpu_timing_now() instead" ; \
  119. false ; \
  120. fi
  121. @if $(GREP) -re '\<ssize_t' $$( find $(srcdir)/examples $(srcdir)/tests $(srcdir)/src $(srcdir)/mpi/src $(srcdir)/include -name \*.[ch] -a \! -name starpu_config.h ) ; \
  122. then \
  123. echo "Please do not use ssize_t, it is not available on Windows, use starpu_ssize_t instead"; \
  124. false ; \
  125. fi
  126. @if $(GREP) -re '\<getenv\>' $$( find $(srcdir)/src $(srcdir)/mpi/src $(srcdir)/include -name \*.[ch] -a \! -name starpu_util.h -a \! -name utils.c -a \! -name simgrid.h) ; \
  127. then \
  128. echo "Please do not use getenv, use starpu_getenv instead, which catches unsafe uses"; \
  129. false ; \
  130. fi
  131. # we count the number of files which include unistd.h
  132. # we count the number of files which properly include unistd.h i.e by first detecting if it's available
  133. # and then we check both numbers are the same ...a
  134. @UNISTD_ALL_LINES=$(shell $(GREP) -B1 -rs "^#include <unistd.h>" $(srcdir)/src/ $(srcdir)/include/ $(srcdir)/mpi/src $(srcdir)/mpi/include |$(GREP) -v dolib|$(GREP) -v -e "--" | tr '\012' '@' | $(SED) 's/unistd.h>@/unistd.h>\n/g' | wc -l) ;\
  135. UNISTD_CORRECT_LINES=$(shell $(GREP) -B1 -rs "^#include <unistd.h>" $(srcdir)/src/ $(srcdir)/include/ $(srcdir)/mpi/src $(srcdir)/mpi/include |$(GREP) -v dolib|$(GREP) -v -e "--" | tr '\012' '@' | $(SED) 's/unistd.h>@/unistd.h>\n/g' | $(GREP) '#ifdef .*HAVE_UNISTD_H.*:#include <unistd.h>' | wc -l) ;\
  136. if test $$UNISTD_ALL_LINES -ne $$UNISTD_CORRECT_LINES ; \
  137. then \
  138. echo "Please do not unconditionally include unistd.h, it is not available on Windows, include config.h and test for HAVE_UNISTD_H" ; \
  139. false ; \
  140. fi
  141. endif
  142. if STARPU_HAVE_WINDOWS
  143. txtdir = ${prefix}
  144. else
  145. txtdir = ${docdir}
  146. endif
  147. txt_DATA = AUTHORS COPYING.LGPL README README.dev STARPU-REVISION
  148. EXTRA_DIST = autogen.sh AUTHORS COPYING.LGPL README README.dev STARPU-VERSION STARPU-REVISION build-aux/svn2cl.xsl
  149. DISTCLEANFILES = STARPU-REVISION
  150. recheck:
  151. RET=0 ; \
  152. for i in $(SUBDIRS) ; do \
  153. $(MAKE) -C $$i recheck || RET=1 ; \
  154. done ; \
  155. exit $$RET
  156. showfailed:
  157. @RET=0 ; \
  158. for i in $(SUBDIRS) ; do \
  159. $(MAKE) -s -C $$i showfailed || RET=1 ; \
  160. done ; \
  161. exit $$RET
  162. showcheck:
  163. RET=0 ; \
  164. for i in $(SUBDIRS) ; do \
  165. $(MAKE) -C $$i showcheck || RET=1 ; \
  166. done ; \
  167. exit $$RET
  168. showsuite:
  169. RET=0 ; \
  170. for i in $(SUBDIRS) ; do \
  171. $(MAKE) -C $$i showsuite || RET=1 ; \
  172. done ; \
  173. exit $$RET
  174. ctags-local:
  175. cd $(top_srcdir) ; $(CTAGS) -R -I LIST_TYPE
  176. $(SED) -i $(top_srcdir)/tags -e '/^[^ ]* [^ ]* /d' -e '/^[^ ]*$$/d'
  177. # Cyclomatic complexity reports.
  178. # The pmccabe tool, see <http://www.parisc-linux.org/~bame/pmccabe/>.
  179. PMCCABE = pmccabe
  180. VC_URL = "https://gitlab.inria.fr/starpu/starpu/-/blob/master/%FILENAME%"
  181. # Generate a cyclomatic complexity report. Note that examples and tests are
  182. # excluded because they're not particularly relevant, and more importantly
  183. # they all have a function called `main', which clobbers the report.
  184. cyclomatic-complexity.html:
  185. $(PMCCABE) \
  186. `find \( -name examples -o -name tests -o -path ./tools/dev/experimental \) -prune -o -name \*.c` \
  187. | sort -nr \
  188. | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
  189. -v lang=html -v name="$(PACKAGE_NAME)" \
  190. -v vcurl=$(VC_URL) \
  191. -v url="$(PACKAGE_URL)" \
  192. -v css=${top_srcdir}/build-aux/pmccabe.css \
  193. -v cut_dir=${top_srcdir}/ \
  194. > $@-tmp
  195. mv $@-tmp $@