Makefile.am 6.3 KB

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