Makefile.am 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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/kernel.hpp \
  51. include/lapack.h \
  52. include/legendre_rule.hpp \
  53. include/matrix.hpp \
  54. include/mat_utils.hpp \
  55. include/mem_mgr.hpp \
  56. include/mortonid.hpp \
  57. include/mpi_node.hpp \
  58. include/mpi_tree.hpp \
  59. include/ompUtils.h \
  60. include/parUtils.h \
  61. include/precomp_mat.hpp \
  62. include/profile.hpp \
  63. include/quad_utils.hpp \
  64. include/stacktrace.h \
  65. include/tree.hpp \
  66. include/tree_node.hpp \
  67. include/vector.hpp \
  68. include/cheb_node.txx \
  69. include/cheb_utils.txx \
  70. include/device_wrapper.txx \
  71. include/fmm_cheb.txx \
  72. include/fmm_node.txx \
  73. include/fmm_pts.txx \
  74. include/fmm_tree.txx \
  75. include/interac_list.txx \
  76. include/kernel.txx \
  77. include/matrix.txx \
  78. include/mat_utils.txx \
  79. include/mem_mgr.txx \
  80. include/mortonid.txx \
  81. include/mpi_node.txx \
  82. include/mpi_tree.txx \
  83. include/ompUtils.txx \
  84. include/parUtils.txx \
  85. include/precomp_mat.txx \
  86. include/quad_utils.txx \
  87. include/tree.txx \
  88. include/vector.txx
  89. #nodist_lib_libpvfmm_a_HEADERS = \
  90. # include/pvfmm_config.h
  91. # the sources to add to the library and to add to the source distribution
  92. lib_libpvfmm_a_SOURCES = \
  93. $(lib_libpvfmm_a_HEADERS) \
  94. src/device_wrapper.cpp \
  95. src/fmm_gll.cpp \
  96. src/legendre_rule.cpp \
  97. src/mem_mgr.cpp \
  98. src/mortonid.cpp \
  99. src/profile.cpp \
  100. src/tree_node.cpp
  101. if NVCC_OK
  102. lib_libpvfmm_a_SOURCES += \
  103. src/fmm_pts_gpu.cu
  104. endif
  105. dist_noinst_SCRIPTS = autogen.sh
  106. core: $(pkglib_LIBRARIES)
  107. all: #all-docs all-examples
  108. ###############################################################################
  109. # COMPILE .cu FILES
  110. #------------------------------------------------------------------------------
  111. if NVCC_OK
  112. .cu.o :
  113. $(NVCC_PVFMM) $(NVCCFLAGS_PVFMM) -c $< -o $@
  114. endif
  115. ###############################################################################
  116. # BUILD EXAMPLES
  117. #------------------------------------------------------------------------------
  118. all-examples: core
  119. cd $(EX_DIR) && $(MAKE);
  120. $(EX_DIR)/bin/%: core
  121. cd $(EX_DIR) && $(MAKE) bin/$(notdir $@)
  122. ###############################################################################
  123. # BUILD DOCUMENTATION
  124. #------------------------------------------------------------------------------
  125. pdf-doc:
  126. cd doc/doc && $(MAKE);
  127. all-docs: doxygen-doc pdf-doc
  128. ###############################################################################
  129. # INSTALL/UNINSTALL MakeVariables, pvfmm_config.h
  130. #------------------------------------------------------------------------------
  131. install-make-variables:
  132. $(MKDIR_P) $(INSTALL_DIR)
  133. sed -e 's/(TOP_SRCDIR_PVFMM)/(INSTALL_DIR_PVFMM)/' \
  134. -e "s/PKG_SUBDIR_PVFMM =/PKG_SUBDIR_PVFMM = \/$(PACKAGE)/" \
  135. MakeVariables > $(INSTALL_DIR)/MakeVariables
  136. uninstall-make-variables:
  137. $(RM) $(INSTALL_DIR)/MakeVariables
  138. ###############################################################################
  139. # INSTALL/UNINSTALL DOCS
  140. #------------------------------------------------------------------------------
  141. if DOXYGEN_OK
  142. install-doxygen-doc: doxygen-doc
  143. for doxygen_dir in $(srcdir)/doc/doxygen/*/ ; do \
  144. doxygen_dir=$${doxygen_dir%*/}; \
  145. dest_dir=$(INSTALL_DIR)/doc/$${doxygen_dir##*/}; \
  146. $(MKDIR_P) $${dest_dir}; \
  147. $(INSTALL_DATA) $${doxygen_dir}/* $${dest_dir}; done;
  148. uninstall-doxygen-doc:
  149. $(RM) -r $(INSTALL_DIR)/doc/*
  150. $(RM) -r $(INSTALL_DIR)/doc
  151. else
  152. install-doxygen-doc:
  153. uninstall-doxygen-doc:
  154. endif
  155. ###############################################################################
  156. # LOCAL INSTALL/UNINSTALL
  157. #------------------------------------------------------------------------------
  158. install: install-am
  159. @echo
  160. @echo '======================================================================='
  161. @echo 'You should add the following to your ~/.bashrc'
  162. @echo ' export PVFMM_DIR=$(INSTALL_DIR)'
  163. @echo
  164. @echo 'You will need to load $$(PVFMM_DIR)/MakeVariables in your Makefile and'
  165. @echo 'use the variables CXXFLAGS_PVFMM and LDLIBS_PVFMM for compiling your code.'
  166. @echo '======================================================================='
  167. install-data-local: install-make-variables install-doxygen-doc
  168. cd doc/doc && $(MAKE) install;
  169. uninstall-local: uninstall-make-variables uninstall-doxygen-doc
  170. cd doc/doc && $(MAKE) uninstall;
  171. ###############################################################################
  172. # LOCAL CLEAN
  173. #------------------------------------------------------------------------------
  174. clean-doxygen:
  175. $(RM) -r $(DX_CLEANFILES)
  176. clean-local: clean-doxygen
  177. cd $(EX_DIR) && $(MAKE) clean;
  178. $(RM) -r $(RESULT_DIR)/*
  179. $(RM) *~ */*~ */*/*~
  180. $(RM) ./lib/*
  181. #------------------------------------------------------------------------------