Makefile.am 6.5 KB

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