Makefile.am 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2016 Université de Bordeaux
  4. # Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016 CNRS
  5. # Copyright (C) 2014 INRIA
  6. # Copyright (C) 2016 Inria
  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. ACLOCAL_AMFLAGS=-I m4
  19. CLEANFILES = *.gcno *.gcda *.linkinfo
  20. SUBDIRS = src
  21. SUBDIRS += tools
  22. if BUILD_TESTS
  23. SUBDIRS += tests
  24. endif
  25. SUBDIRS += doc
  26. if USE_MPI
  27. SUBDIRS += mpi
  28. endif
  29. if BUILD_EXAMPLES
  30. SUBDIRS += examples
  31. endif
  32. if BUILD_SOCL
  33. SUBDIRS += socl
  34. endif
  35. if BUILD_GCC_PLUGIN
  36. SUBDIRS += gcc-plugin
  37. endif
  38. if BUILD_STARPUFFT
  39. SUBDIRS += starpufft
  40. endif
  41. if STARPU_BUILD_SC_HYPERVISOR
  42. SUBDIRS += sc_hypervisor
  43. endif
  44. pkgconfigdir = $(libdir)/pkgconfig
  45. pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
  46. versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
  47. versinclude_HEADERS = \
  48. include/starpu.h \
  49. include/starpu_bitmap.h \
  50. include/starpu_data_filters.h \
  51. include/starpu_data_interfaces.h \
  52. include/starpu_worker.h \
  53. include/starpu_task.h \
  54. include/starpu_task_bundle.h \
  55. include/starpu_task_list.h \
  56. include/starpu_task_util.h \
  57. include/starpu_data.h \
  58. include/starpu_perfmodel.h \
  59. include/starpu_util.h \
  60. include/starpu_fxt.h \
  61. include/starpu_cuda.h \
  62. include/starpu_opencl.h \
  63. include/starpu_openmp.h \
  64. include/starpu_sink.h \
  65. include/starpu_mic.h \
  66. include/starpu_mpi_ms.h \
  67. include/starpu_scc.h \
  68. include/starpu_expert.h \
  69. include/starpu_profiling.h \
  70. include/starpu_bound.h \
  71. include/starpu_scheduler.h \
  72. include/schedulers/starpu_heteroprio.h \
  73. include/starpu_sched_component.h \
  74. include/starpu_sched_ctx.h \
  75. include/starpu_sched_ctx_hypervisor.h \
  76. include/starpu_top.h \
  77. include/starpu_deprecated_api.h \
  78. include/starpu_hash.h \
  79. include/starpu_rand.h \
  80. include/starpu_disk.h \
  81. include/starpu_cublas.h \
  82. include/starpu_driver.h \
  83. include/starpu_stdlib.h \
  84. include/starpu_thread.h \
  85. include/starpu_thread_util.h \
  86. include/starpu_tree.h \
  87. include/starpu_simgrid_wrap.h \
  88. include/starpu_mod.f90 \
  89. include/fstarpu_mod.f90 \
  90. include/starpu_clusters_util.h
  91. nodist_versinclude_HEADERS = \
  92. include/starpu_config.h
  93. noinst_HEADERS = \
  94. include/pthread_win32/pthread.h \
  95. include/pthread_win32/semaphore.h
  96. if BUILD_STARPU_TOP
  97. all-local: starpu-top/starpu_top$(EXEEXT)
  98. else
  99. all-local:
  100. endif
  101. if STARPU_DEVEL
  102. @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 ) ; \
  103. then \
  104. echo "Please do not include sys/time, it is not available on Windows, include starpu_util.h and use starpu_timing_now() instead" ; \
  105. false ; \
  106. fi
  107. @if grep -re '\<ssize_t' $$( find $(srcdir)/examples $(srcdir)/tests $(srcdir)/src $(srcdir)/mpi/src $(srcdir)/include -name \*.[ch] -a \! -name starpu_config.h ) ; \
  108. then \
  109. echo "Please do not use ssize_t, it is not available on Windows, use starpu_ssize_t instead"; \
  110. false ; \
  111. fi
  112. @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) ; \
  113. then \
  114. echo "Please do not use getenv, use starpu_getenv instead, which catches unsafe uses"; \
  115. false ; \
  116. fi
  117. endif
  118. if BUILD_STARPU_TOP
  119. starpu-top/starpu_top$(EXEEXT):
  120. cd starpu-top ; $(QMAKE) ; $(MAKE)
  121. clean-local:
  122. cd starpu-top ; $(QMAKE) ; $(MAKE) clean ; $(RM) Makefile
  123. $(RM) starpu-top/starpu_top.1 starpu-top/starpu_top$(EXEEXT)
  124. # TODO: resources
  125. install-exec-local:
  126. $(MKDIR_P) $(DESTDIR)$(bindir)
  127. -$(INSTALL_STRIP_PROGRAM) starpu-top/starpu_top$(EXEEXT) $(DESTDIR)$(bindir)
  128. uninstall-local:
  129. $(RM) $(DESTDIR)$(bindir)/starpu_top$(EXEEXT)
  130. $(RM) starpu-top/starpu_top$(EXEEXT)
  131. $(RM) starpu-top/Makefile
  132. if STARPU_HAVE_HELP2MAN
  133. starpu-top/starpu_top.1: starpu-top/starpu_top$(EXEEXT)
  134. help2man --no-discard-stderr -N --output=$@ starpu-top/starpu_top$(EXEEXT)
  135. dist_man1_MANS =\
  136. starpu-top/starpu_top.1
  137. endif
  138. endif
  139. if STARPU_HAVE_WINDOWS
  140. txtdir = ${prefix}
  141. else
  142. txtdir = ${docdir}
  143. endif
  144. txt_DATA = AUTHORS COPYING.LGPL README README.dev STARPU-REVISION
  145. EXTRA_DIST = autogen.sh AUTHORS COPYING.LGPL README README.dev STARPU-VERSION STARPU-REVISION build-aux/svn2cl.xsl mic-configure
  146. DISTCLEANFILES = STARPU-REVISION
  147. include starpu-top/extradist
  148. showcheck:
  149. RET=0 ; \
  150. for i in $(SUBDIRS) ; do \
  151. make -C $$i showcheck || RET=1 ; \
  152. done ; \
  153. exit $$RET
  154. ctags-local:
  155. cd $(top_srcdir) ; $(CTAGS) -R -I LIST_TYPE
  156. sed -i $(top_srcdir)/tags -e '/^[^ ]* [^ ]* /d' -e '/^[^ ]*$$/d'
  157. # Cyclomatic complexity reports.
  158. # The pmccabe tool, see <http://www.parisc-linux.org/~bame/pmccabe/>.
  159. PMCCABE = pmccabe
  160. VC_URL = "https://gforge.inria.fr/scm/viewvc.php/trunk/%FILENAME%?view=markup&root=starpu"
  161. # Generate a cyclomatic complexity report. Note that examples and tests are
  162. # excluded because they're not particularly relevant, and more importantly
  163. # they all have a function called `main', which clobbers the report.
  164. cyclomatic-complexity.html:
  165. $(PMCCABE) \
  166. `find \( -name examples -o -name tests -o -path ./tools/dev/experimental \) -prune -o -name \*.c` \
  167. | sort -nr \
  168. | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
  169. -v lang=html -v name="$(PACKAGE_NAME)" \
  170. -v vcurl=$(VC_URL) \
  171. -v url="$(PACKAGE_URL)" \
  172. -v css=${top_srcdir}/build-aux/pmccabe.css \
  173. -v cut_dir=${top_srcdir}/ \
  174. > $@-tmp
  175. mv $@-tmp $@