Makefile.am 5.8 KB

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