Makefile.am 7.2 KB

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