Makefile.am 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2011-2018 Inria
  4. # Copyright (C) 2009-2017 Université de Bordeaux
  5. # Copyright (C) 2017 Guillaume Beauchamp
  6. # Copyright (C) 2010-2019 CNRS
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. #
  19. ACLOCAL_AMFLAGS=-I m4
  20. CLEANFILES = *.gcno *.gcda *.linkinfo
  21. SUBDIRS =
  22. if STARPU_USE_MIN_DGELS
  23. SUBDIRS += min-dgels
  24. endif
  25. SUBDIRS += src
  26. SUBDIRS += tools
  27. if BUILD_TESTS
  28. SUBDIRS += tests
  29. endif
  30. SUBDIRS += doc
  31. if STARPU_USE_MPI
  32. SUBDIRS += mpi
  33. endif
  34. if BUILD_EXAMPLES
  35. SUBDIRS += examples
  36. endif
  37. if BUILD_SOCL
  38. SUBDIRS += socl
  39. endif
  40. if BUILD_GCC_PLUGIN
  41. SUBDIRS += gcc-plugin
  42. endif
  43. if BUILD_STARPUFFT
  44. SUBDIRS += starpufft
  45. endif
  46. if BUILD_STARPURM
  47. SUBDIRS += starpurm
  48. endif
  49. if STARPU_BUILD_SC_HYPERVISOR
  50. SUBDIRS += sc_hypervisor
  51. endif
  52. pkgconfigdir = $(libdir)/pkgconfig
  53. pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
  54. versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
  55. versinclude_HEADERS = \
  56. include/starpu.h \
  57. include/starpu_helper.h \
  58. include/starpu_bitmap.h \
  59. include/starpu_data_filters.h \
  60. include/starpu_data_interfaces.h \
  61. include/starpu_worker.h \
  62. include/starpu_task.h \
  63. include/starpu_task_dep.h \
  64. include/starpu_task_bundle.h \
  65. include/starpu_task_list.h \
  66. include/starpu_task_util.h \
  67. include/starpu_data.h \
  68. include/starpu_perfmodel.h \
  69. include/starpu_util.h \
  70. include/starpu_fxt.h \
  71. include/starpu_cuda.h \
  72. include/starpu_opencl.h \
  73. include/starpu_openmp.h \
  74. include/starpu_sink.h \
  75. include/starpu_mic.h \
  76. include/starpu_mpi_ms.h \
  77. include/starpu_scc.h \
  78. include/starpu_expert.h \
  79. include/starpu_profiling.h \
  80. include/starpu_bound.h \
  81. include/starpu_scheduler.h \
  82. include/schedulers/starpu_heteroprio.h \
  83. include/starpu_sched_component.h \
  84. include/starpu_sched_ctx.h \
  85. include/starpu_sched_ctx_hypervisor.h \
  86. include/starpu_top.h \
  87. include/starpu_deprecated_api.h \
  88. include/starpu_hash.h \
  89. include/starpu_rand.h \
  90. include/starpu_disk.h \
  91. include/starpu_cublas.h \
  92. include/starpu_cublas_v2.h \
  93. include/starpu_cusparse.h \
  94. include/starpu_driver.h \
  95. include/starpu_stdlib.h \
  96. include/starpu_thread.h \
  97. include/starpu_thread_util.h \
  98. include/starpu_tree.h \
  99. include/starpu_simgrid_wrap.h \
  100. include/starpu_mod.f90 \
  101. include/fstarpu_mod.f90 \
  102. include/starpu_clusters.h \
  103. include/starpu_perf_monitoring.h \
  104. include/starpu_perf_steering.h
  105. nodist_versinclude_HEADERS = \
  106. include/starpu_config.h
  107. noinst_HEADERS = \
  108. include/pthread_win32/pthread.h \
  109. include/pthread_win32/semaphore.h
  110. if BUILD_STARPU_TOP
  111. all-local: starpu-top/starpu_top$(EXEEXT)
  112. else
  113. all-local:
  114. endif
  115. if STARPU_DEVEL
  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 BUILD_STARPU_TOP
  143. starpu-top/starpu_top$(EXEEXT):
  144. cd starpu-top ; $(QMAKE) ; $(MAKE)
  145. clean-local:
  146. cd starpu-top ; $(QMAKE) ; $(MAKE) clean ; $(RM) Makefile
  147. $(RM) starpu-top/starpu_top.1 starpu-top/starpu_top$(EXEEXT)
  148. # TODO: resources
  149. install-exec-local:
  150. $(MKDIR_P) $(DESTDIR)$(bindir)
  151. -$(INSTALL_STRIP_PROGRAM) starpu-top/starpu_top$(EXEEXT) $(DESTDIR)$(bindir)
  152. uninstall-local:
  153. $(RM) $(DESTDIR)$(bindir)/starpu_top$(EXEEXT)
  154. $(RM) starpu-top/starpu_top$(EXEEXT)
  155. $(RM) starpu-top/Makefile
  156. if STARPU_HAVE_HELP2MAN
  157. starpu-top/starpu_top.1: starpu-top/starpu_top$(EXEEXT)
  158. help2man --no-discard-stderr -N --output=$@ starpu-top/starpu_top$(EXEEXT)
  159. dist_man1_MANS =\
  160. starpu-top/starpu_top.1
  161. endif
  162. endif
  163. if STARPU_HAVE_WINDOWS
  164. txtdir = ${prefix}
  165. else
  166. txtdir = ${docdir}
  167. endif
  168. txt_DATA = AUTHORS COPYING.LGPL README README.dev STARPU-REVISION
  169. EXTRA_DIST = autogen.sh AUTHORS COPYING.LGPL README README.dev STARPU-VERSION STARPU-REVISION build-aux/svn2cl.xsl mic-configure
  170. DISTCLEANFILES = STARPU-REVISION
  171. include starpu-top/extradist
  172. recheck:
  173. RET=0 ; \
  174. for i in $(SUBDIRS) ; do \
  175. make -C $$i recheck || RET=1 ; \
  176. done ; \
  177. exit $$RET
  178. showcheck:
  179. RET=0 ; \
  180. for i in $(SUBDIRS) ; do \
  181. make -C $$i showcheck || RET=1 ; \
  182. done ; \
  183. exit $$RET
  184. showsuite:
  185. RET=0 ; \
  186. for i in $(SUBDIRS) ; do \
  187. make -C $$i showsuite || RET=1 ; \
  188. done ; \
  189. exit $$RET
  190. ctags-local:
  191. cd $(top_srcdir) ; $(CTAGS) -R -I LIST_TYPE
  192. $(SED) -i $(top_srcdir)/tags -e '/^[^ ]* [^ ]* /d' -e '/^[^ ]*$$/d'
  193. # Cyclomatic complexity reports.
  194. # The pmccabe tool, see <http://www.parisc-linux.org/~bame/pmccabe/>.
  195. PMCCABE = pmccabe
  196. VC_URL = "https://gforge.inria.fr/scm/viewvc.php/trunk/%FILENAME%?view=markup&root=starpu"
  197. # Generate a cyclomatic complexity report. Note that examples and tests are
  198. # excluded because they're not particularly relevant, and more importantly
  199. # they all have a function called `main', which clobbers the report.
  200. cyclomatic-complexity.html:
  201. $(PMCCABE) \
  202. `find \( -name examples -o -name tests -o -path ./tools/dev/experimental \) -prune -o -name \*.c` \
  203. | sort -nr \
  204. | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
  205. -v lang=html -v name="$(PACKAGE_NAME)" \
  206. -v vcurl=$(VC_URL) \
  207. -v url="$(PACKAGE_URL)" \
  208. -v css=${top_srcdir}/build-aux/pmccabe.css \
  209. -v cut_dir=${top_srcdir}/ \
  210. > $@-tmp
  211. mv $@-tmp $@