Makefile.am 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
  2. AUTOMAKE_OPTIONS = subdir-objects
  3. @SET_MAKE@
  4. include MakeVariables.in
  5. # DOXYGEN SUPPORT
  6. include aminclude.am
  7. INSTALL_DIR = $(DESTDIR)$(datadir)/$(PACKAGE)
  8. EX_DIR = ./examples
  9. RESULT_DIR = ./result
  10. # the subdirectories of the project to go into
  11. #SUBDIRS =
  12. DIST_SUBDIRS= \
  13. doc/doc
  14. EXTRA_DIST = \
  15. $(EX_DIR)/src \
  16. $(EX_DIR)/include \
  17. $(EX_DIR)/Makefile \
  18. $(EX_DIR)/scripts \
  19. $(DX_CONFIG) \
  20. scripts
  21. # additional include pathes necessary to compile the C++ library
  22. AM_CXXFLAGS = $(CXXFLAGS_PVFMM)
  23. AM_LDFLAGS = -static $(LDFLAGS_PVFMM)
  24. ###############################################################################
  25. # THE LIBRARIES TO BUILD
  26. ###############################################################################
  27. # the library names to build (note we are building static libs only)
  28. pkglib_LIBRARIES = lib/libpvfmm.a
  29. # where to install the headers on the system
  30. lib_libfmm_adir = $(pkgincludedir)
  31. # the list of header files that belong to the library (to be installed later)
  32. lib_libfmm_a_HEADERS = \
  33. include/pvfmm_config.h \
  34. include/pvfmm_common.hpp \
  35. include/pvfmm.hpp \
  36. include/blas.h \
  37. include/cheb_node.hpp \
  38. include/cheb_utils.hpp \
  39. include/device_wrapper.hpp \
  40. include/dtypes.h \
  41. include/fft_wrapper.hpp \
  42. include/fmm_cheb.hpp \
  43. include/fmm_gll.hpp \
  44. include/fmm_node.hpp \
  45. include/fmm_pts.hpp \
  46. include/fmm_tree.hpp \
  47. include/interac_list.hpp \
  48. include/kernel.hpp \
  49. include/lapack.h \
  50. include/legendre_rule.hpp \
  51. include/matrix.hpp \
  52. include/mat_utils.hpp \
  53. include/mem_mgr.hpp \
  54. include/mem_utils.hpp \
  55. include/mortonid.hpp \
  56. include/mpi_node.hpp \
  57. include/mpi_tree.hpp \
  58. include/ompUtils.h \
  59. include/parUtils.h \
  60. include/precomp_mat.hpp \
  61. include/profile.hpp \
  62. include/quad_utils.hpp \
  63. include/tree.hpp \
  64. include/tree_node.hpp \
  65. include/vector.hpp \
  66. include/cheb_node.txx \
  67. include/cheb_utils.txx \
  68. include/device_wrapper.txx \
  69. include/fmm_cheb.txx \
  70. include/fmm_node.txx \
  71. include/fmm_pts.txx \
  72. include/fmm_tree.txx \
  73. include/interac_list.txx \
  74. include/kernel.txx \
  75. include/matrix.txx \
  76. include/mat_utils.txx \
  77. include/mem_utils.txx \
  78. include/mortonid.txx \
  79. include/mpi_node.txx \
  80. include/mpi_tree.txx \
  81. include/ompUtils.txx \
  82. include/parUtils.txx \
  83. include/precomp_mat.txx \
  84. include/quad_utils.txx \
  85. include/tree.txx \
  86. include/vector.txx
  87. #nodist_lib_libpvfmm_a_HEADERS = \
  88. # include/pvfmm_config.h
  89. # the sources to add to the library and to add to the source distribution
  90. lib_libpvfmm_a_SOURCES = \
  91. $(lib_libpvfmm_a_HEADERS) \
  92. src/device_wrapper.cpp \
  93. src/fmm_gll.cpp \
  94. src/legendre_rule.cpp \
  95. src/mortonid.cpp \
  96. src/profile.cpp \
  97. src/tree_node.cpp
  98. dist_noinst_SCRIPTS = autogen.sh
  99. core: $(pkglib_LIBRARIES)
  100. all: #all-docs all-examples
  101. ###############################################################################
  102. # COMPILE .cu FILES
  103. #------------------------------------------------------------------------------
  104. if NVCC_OK
  105. %.o : %.cu
  106. $(NVCC) $(NVCCFLAGS) $< -o $@
  107. endif
  108. ###############################################################################
  109. # BUILD EXAMPLES
  110. #------------------------------------------------------------------------------
  111. all-examples: core
  112. cd $(EX_DIR) && $(MAKE);
  113. $(EX_DIR)/bin/%: core
  114. cd $(EX_DIR) && $(MAKE) bin/$(notdir $@)
  115. ###############################################################################
  116. # BUILD DOCUMENTATION
  117. #------------------------------------------------------------------------------
  118. pdf-doc:
  119. cd doc/doc && $(MAKE);
  120. all-docs: doxygen-doc pdf-doc
  121. ###############################################################################
  122. # INSTALL/UNINSTALL MakeVariables, pvfmm_config.h
  123. #------------------------------------------------------------------------------
  124. install-make-variables:
  125. $(MKDIR_P) $(INSTALL_DIR)
  126. sed -e 's/(TOP_SRCDIR_PVFMM)/(INSTALL_DIR_PVFMM)/' \
  127. -e "s/PKG_SUBDIR_PVFMM =/PKG_SUBDIR_PVFMM = \/$(PACKAGE)/" \
  128. MakeVariables > $(INSTALL_DIR)/MakeVariables
  129. uninstall-make-variables:
  130. $(RM) $(INSTALL_DIR)/MakeVariables
  131. ###############################################################################
  132. # INSTALL/UNINSTALL DOCS
  133. #------------------------------------------------------------------------------
  134. if DOXYGEN_OK
  135. install-doxygen-doc: doxygen-doc
  136. for doxygen_dir in $(srcdir)/doc/doxygen/*/ ; do \
  137. doxygen_dir=$${doxygen_dir%*/}; \
  138. dest_dir=$(INSTALL_DIR)/doc/$${doxygen_dir##*/}; \
  139. $(MKDIR_P) $${dest_dir}; \
  140. $(INSTALL_DATA) $${doxygen_dir}/* $${dest_dir}; done;
  141. uninstall-doxygen-doc:
  142. $(RM) -r $(INSTALL_DIR)/doc/*
  143. $(RM) -r $(INSTALL_DIR)/doc
  144. else
  145. install-doxygen-doc:
  146. uninstall-doxygen-doc:
  147. endif
  148. ###############################################################################
  149. # LOCAL INSTALL/UNINSTALL
  150. #------------------------------------------------------------------------------
  151. install: install-am
  152. @echo
  153. @echo '======================================================================='
  154. @echo 'You should add the following to your ~/.bashrc'
  155. @echo ' export PVFMM_DIR=$(INSTALL_DIR)'
  156. @echo
  157. @echo 'You will need to load $$(PVFMM_DIR)/MakeVariables in your Makefile and'
  158. @echo 'use the variables CXXFLAGS_PVFMM and LDFLAGS_PVFMM for compiling your code.'
  159. @echo '======================================================================='
  160. install-data-local: install-make-variables install-doxygen-doc
  161. cd doc/doc && $(MAKE) install;
  162. uninstall-local: uninstall-make-variables uninstall-doxygen-doc
  163. cd doc/doc && $(MAKE) uninstall;
  164. ###############################################################################
  165. # LOCAL CLEAN
  166. #------------------------------------------------------------------------------
  167. clean-doxygen:
  168. $(RM) -r $(DX_CLEANFILES)
  169. clean-local: clean-doxygen
  170. cd $(EX_DIR) && $(MAKE) clean;
  171. $(RM) -r $(RESULT_DIR)/*
  172. $(RM) *~ */*~ */*/*~
  173. $(RM) ./lib/*
  174. #------------------------------------------------------------------------------