Makefile.am 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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/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/tree.txx \
  84. include/vector.txx
  85. #nodist_lib_libpvfmm_a_HEADERS = \
  86. # include/pvfmm_config.h
  87. # the sources to add to the library and to add to the source distribution
  88. lib_libpvfmm_a_SOURCES = \
  89. $(lib_libpvfmm_a_HEADERS) \
  90. src/fmm_gll.cpp \
  91. src/legendre_rule.cpp \
  92. src/mortonid.cpp \
  93. src/profile.cpp \
  94. src/tree_node.cpp
  95. dist_noinst_SCRIPTS = autogen.sh
  96. core: $(pkglib_LIBRARIES)
  97. all: #all-docs all-examples
  98. ###############################################################################
  99. # COMPILE .cu FILES
  100. #------------------------------------------------------------------------------
  101. if NVCC_OK
  102. %.o : %.cu
  103. $(NVCC) $(NVCCFLAGS) $< -o $@
  104. endif
  105. ###############################################################################
  106. # BUILD EXAMPLES
  107. #------------------------------------------------------------------------------
  108. all-examples: core
  109. cd $(EX_DIR) && $(MAKE);
  110. $(EX_DIR)/bin/%: core
  111. cd $(EX_DIR) && $(MAKE) bin/$(notdir $@)
  112. ###############################################################################
  113. # BUILD DOCUMENTATION
  114. #------------------------------------------------------------------------------
  115. pdf-doc:
  116. cd doc/doc && $(MAKE);
  117. all-docs: doxygen-doc pdf-doc
  118. ###############################################################################
  119. # INSTALL/UNINSTALL MakeVariables, pvfmm_config.h
  120. #------------------------------------------------------------------------------
  121. install-make-variables:
  122. $(MKDIR_P) $(INSTALL_DIR)
  123. sed -e 's/(TOP_SRCDIR_PVFMM)/(INSTALL_DIR_PVFMM)/' \
  124. -e "s/PKG_SUBDIR_PVFMM =/PKG_SUBDIR_PVFMM = \/$(PACKAGE)/" \
  125. MakeVariables > $(INSTALL_DIR)/MakeVariables
  126. uninstall-make-variables:
  127. $(RM) $(INSTALL_DIR)/MakeVariables
  128. ###############################################################################
  129. # INSTALL/UNINSTALL DOCS
  130. #------------------------------------------------------------------------------
  131. if DOXYGEN_OK
  132. install-doxygen-doc: doxygen-doc
  133. for doxygen_dir in $(srcdir)/doc/doxygen/*/ ; do \
  134. doxygen_dir=$${doxygen_dir%*/}; \
  135. dest_dir=$(INSTALL_DIR)/doc/$${doxygen_dir##*/}; \
  136. $(MKDIR_P) $${dest_dir}; \
  137. $(INSTALL_DATA) $${doxygen_dir}/* $${dest_dir}; done;
  138. uninstall-doxygen-doc:
  139. $(RM) -r $(INSTALL_DIR)/doc/*
  140. $(RM) -r $(INSTALL_DIR)/doc
  141. else
  142. install-doxygen-doc:
  143. uninstall-doxygen-doc:
  144. endif
  145. ###############################################################################
  146. # LOCAL INSTALL/UNINSTALL
  147. #------------------------------------------------------------------------------
  148. install: install-am
  149. @echo
  150. @echo '======================================================================='
  151. @echo 'You should add the following to your ~/.bashrc'
  152. @echo ' export PVFMM_DIR=$(INSTALL_DIR)'
  153. @echo
  154. @echo 'You will need to load $$(PVFMM_DIR)/MakeVariables in your Makefile and'
  155. @echo 'use the variables CXXFLAGS_PVFMM and LDFLAGS_PVFMM for compiling your code.'
  156. @echo '======================================================================='
  157. install-data-local: install-make-variables install-doxygen-doc
  158. cd doc/doc && $(MAKE) install;
  159. uninstall-local: uninstall-make-variables uninstall-doxygen-doc
  160. cd doc/doc && $(MAKE) uninstall;
  161. ###############################################################################
  162. # LOCAL CLEAN
  163. #------------------------------------------------------------------------------
  164. clean-doxygen:
  165. $(RM) -r $(DX_CLEANFILES)
  166. clean-local: clean-doxygen
  167. cd $(EX_DIR) && $(MAKE) clean;
  168. $(RM) -r $(RESULT_DIR)/*
  169. $(RM) *~ */*~ */*/*~
  170. #------------------------------------------------------------------------------