#
# Makefile for ABINIT                                      -*- Automake -*-
# Generated by make-makefiles-corelibs on 2018/06/20 16:22:31 +0000

#
# IMPORTANT NOTE
#
# Any manual change to this file will systematically be overwritten.
# Please modify the make-makefiles-corelibs script or its config file instead.
#

# Build parameters
#AM_CPPFLAGS = \
#  @src_12_hide_mpi_incs@ \
#  @src_41_xc_lowlevel_incs@ \
#  @src_14_hidewrite_incs@ \
#  @lib_libxc_incs@ \
#  @lib_netcdf_incs@

# Regular source files
libpaw_srcs = \
  m_libpaw_mpi.F90 \
  m_libpaw_tools.F90 \
  m_libpaw_libxc.F90 \
  m_paral_atom.F90 \
  m_paw_numeric.F90 \
  m_paw_sphharm.F90 \
  m_paw_io.F90 \
  m_pawang.F90 \
  m_pawrad.F90 \
  m_pawtab.F90 \
  m_paw_an.F90 \
  m_paw_ij.F90 \
  m_pawfgrtab.F90 \
  m_paw_finegrid.F90 \
  m_pawcprj.F90 \
  m_pawrhoij.F90 \
  m_pawdij.F90 \
  m_pawxc.F90 \
  m_paw_atom.F90 \
  m_paw_gaussfit.F90 \
  m_paw_onsite.F90 \
  m_pawxmlps.F90 \
  m_pawpsp.F90

# Optional source files
libpaw_opt_srcs = \
  m_libpaw_defs.F90

# Regular Fortran modules
if FORTRAN_MOD_UPPERCASE
libpaw_mods = \
  M_LIBPAW_DEFS.$(FMODEXT) \
  M_LIBPAW_LIBXC.$(FMODEXT) \
  M_LIBPAW_LIBXC_FUNCS.$(FMODEXT) \
  M_LIBPAW_MPI.$(FMODEXT) \
  M_LIBPAW_TOOLS.$(FMODEXT) \
  M_PARAL_ATOM.$(FMODEXT) \
  M_PAW_AN.$(FMODEXT) \
  M_PAW_ATOM.$(FMODEXT) \
  M_PAW_FINEGRID.$(FMODEXT) \
  M_PAW_GAUSSFIT.$(FMODEXT) \
  M_PAW_IJ.$(FMODEXT) \
  M_PAW_IO.$(FMODEXT) \
  M_PAW_NUMERIC.$(FMODEXT) \
  M_PAW_ONSITE.$(FMODEXT) \
  M_PAW_SPHHARM.$(FMODEXT) \
  M_PAWANG.$(FMODEXT) \
  M_PAWCPRJ.$(FMODEXT) \
  M_PAWDIJ.$(FMODEXT) \
  M_PAWFGRTAB.$(FMODEXT) \
  M_PAWPSP.$(FMODEXT) \
  M_PAWRAD.$(FMODEXT) \
  M_PAWRHOIJ.$(FMODEXT) \
  M_PAWTAB.$(FMODEXT) \
  M_PAWXC.$(FMODEXT) \
  M_PAWXMLPS.$(FMODEXT)
else
libpaw_mods = \
  m_libpaw_defs.$(FMODEXT) \
  m_libpaw_libxc.$(FMODEXT) \
  m_libpaw_libxc_funcs.$(FMODEXT) \
  m_libpaw_mpi.$(FMODEXT) \
  m_libpaw_tools.$(FMODEXT) \
  m_paral_atom.$(FMODEXT) \
  m_paw_an.$(FMODEXT) \
  m_paw_atom.$(FMODEXT) \
  m_paw_finegrid.$(FMODEXT) \
  m_paw_gaussfit.$(FMODEXT) \
  m_paw_ij.$(FMODEXT) \
  m_paw_io.$(FMODEXT) \
  m_paw_numeric.$(FMODEXT) \
  m_paw_onsite.$(FMODEXT) \
  m_paw_sphharm.$(FMODEXT) \
  m_pawang.$(FMODEXT) \
  m_pawcprj.$(FMODEXT) \
  m_pawdij.$(FMODEXT) \
  m_pawfgrtab.$(FMODEXT) \
  m_pawpsp.$(FMODEXT) \
  m_pawrad.$(FMODEXT) \
  m_pawrhoij.$(FMODEXT) \
  m_pawtab.$(FMODEXT) \
  m_pawxc.$(FMODEXT) \
  m_pawxmlps.$(FMODEXT)
endif

# Optional Fortran modules
libpaw_opt_mods = \
  m_libpaw_defs.$(FMODEXT)

# Library description
lib_LIBRARIES = libpaw.a

libpaw_a_SOURCES = $(libpaw_srcs)
libpaw_a_LIBADD  = ../libxc/libpaw_libxc.a

# Make sure optional source files are distributed
EXTRA_DIST = $(libpaw_opt_srcs)

                    # ------------------------------------ #

# Clean explicitly preprocessed files
CLEANFILES = \
  m_libpaw_mpi_cpp.f90 \
  m_libpaw_tools_cpp.f90 \
  m_libpaw_libxc_cpp.f90 \
  m_paral_atom_cpp.f90 \
  m_paw_numeric_cpp.f90 \
  m_paw_onsite_cpp.f90 \
  m_paw_sphharm_cpp.f90 \
  m_paw_io_cpp.f90 \
  m_pawang_cpp.f90 \
  m_pawrad_cpp.f90 \
  m_pawtab_cpp.f90 \
  m_paw_an_cpp.f90 \
  m_paw_ij_cpp.f90 \
  m_pawfgrtab_cpp.f90 \
  m_paw_finegrid_cpp.f90 \
  m_pawcprj_cpp.f90 \
  m_pawrhoij_cpp.f90 \
  m_pawdij_cpp.f90 \
  m_pawxc_cpp.f90 \
  m_paw_atom_cpp.f90 \
  m_paw_gaussfit_cpp.f90 \
  m_pawxmlps_cpp.f90 \
  m_pawpsp_cpp.f90

# Clean Fortran modules
CLEANFILES += $(libpaw_mods) $(libpaw_opt_mods)

                    # ------------------------------------ #

# Explicit dependencies
m_libpaw_libxc.$(OBJEXT): \
  m_libpaw_defs.$(OBJEXT) \
  m_libpaw_tools.$(OBJEXT)

m_libpaw_mpi.$(OBJEXT): \
  m_libpaw_defs.$(OBJEXT)

m_libpaw_tools.$(OBJEXT): \
  m_libpaw_mpi.$(OBJEXT)

m_paw_an.$(OBJEXT): \
  m_paral_atom.$(OBJEXT) \
  m_pawang.$(OBJEXT) \
  m_pawtab.$(OBJEXT) 

m_paral_atom.$(OBJEXT): \
  m_libpaw_defs.$(OBJEXT) \
  m_libpaw_tools.$(OBJEXT)

m_paw_atom.$(OBJEXT): \
  m_paw_numeric.$(OBJEXT) \
  m_pawrad.$(OBJEXT) \
  m_pawtab.$(OBJEXT) 

m_paw_finegrid.$(OBJEXT): \
  m_paw_numeric.$(OBJEXT) \
  m_paw_sphharm.$(OBJEXT) \
  m_pawtab.$(OBJEXT) 

m_paw_gaussfit.$(OBJEXT): \
  m_paw_numeric.$(OBJEXT) \
  m_pawrad.$(OBJEXT) 

m_paw_ij.$(OBJEXT): \
  m_paral_atom.$(OBJEXT) \
  m_paw_io.$(OBJEXT) \
  m_pawtab.$(OBJEXT) 

m_paw_io.$(OBJEXT): \
  m_libpaw_defs.$(OBJEXT) \
  m_libpaw_tools.$(OBJEXT)

m_paw_numeric.$(OBJEXT): \
  m_libpaw_defs.$(OBJEXT) \
  m_libpaw_tools.$(OBJEXT)

m_paw_onsite.$(OBJEXT): \
  m_paw_sphharm.$(OBJEXT) \
  m_pawrad.$(OBJEXT) \
  m_pawtab.$(OBJEXT)

m_paw_sphharm.$(OBJEXT): \
  m_libpaw_tools.$(OBJEXT)

m_pawang.$(OBJEXT): \
  m_paw_sphharm.$(OBJEXT) 

m_pawcprj.$(OBJEXT): \
  m_pawtab.$(OBJEXT) 

m_pawdij.$(OBJEXT): \
  m_paral_atom.$(OBJEXT) \
  m_paw_an.$(OBJEXT) \
  m_paw_finegrid.$(OBJEXT) \
  m_paw_ij.$(OBJEXT) \
  m_paw_io.$(OBJEXT) \
  m_paw_sphharm.$(OBJEXT) \
  m_pawang.$(OBJEXT) \
  m_pawfgrtab.$(OBJEXT) \
  m_pawrad.$(OBJEXT) \
  m_pawrhoij.$(OBJEXT) \
  m_pawtab.$(OBJEXT)

m_pawfgrtab.$(OBJEXT): \
  m_paral_atom.$(OBJEXT) 

m_pawpsp.$(OBJEXT): \
  m_libpaw_libxc.$(OBJEXT) \
  m_libpaw_tools.$(OBJEXT) \
  m_paw_atom.$(OBJEXT) \
  m_paw_gaussfit.$(OBJEXT) \
  m_paw_numeric.$(OBJEXT) \
  m_pawang.$(OBJEXT) \
  m_pawrad.$(OBJEXT) \
  m_pawtab.$(OBJEXT) \
  m_pawxc.$(OBJEXT) \
  m_pawxmlps.$(OBJEXT)

m_pawrad.$(OBJEXT): \
  m_paw_numeric.$(OBJEXT)

m_pawrhoij.$(OBJEXT): \
  m_libpaw_tools.$(OBJEXT) \
  m_paral_atom.$(OBJEXT) \
  m_paw_io.$(OBJEXT) \
  m_pawang.$(OBJEXT) \
  m_pawtab.$(OBJEXT)

m_pawtab.$(OBJEXT): \
  m_libpaw_tools.$(OBJEXT)

m_pawxc.$(OBJEXT): \
  m_libpaw_libxc.$(OBJEXT) \
  m_pawang.$(OBJEXT) \
  m_pawrad.$(OBJEXT)

m_pawxmlps.$(OBJEXT): \
  m_paw_numeric.$(OBJEXT) \
  m_pawrad.$(OBJEXT)
