PROG = exdig_mpi_gpu_mol

include DEFS

XDR = xdr_files

SRCS =	amp.f90 def_sectors_bench.f90 pdg_ctl.f90 dist_mat.f90 \
	energy_grid.f90 rmx1.f90 potl.f90 scaling.f90 \
	potl_coefs.f90 precisn.f90 rd_Hfile.f90 rmx1_in.f90 \
	sec_ham.f90 slp.f90 error_out.f90 io_units.f90 mpi_params.f90
SRC1 = $(XDR).f90


OBJS = $(SRCS:.f90=.o)
OBJ1 = $(SRC1:.f90=.o)


all: $(PROG)

$(PROG): $(OBJ1) $(OBJS) $(ULIBS)
	$(F90) $(LDFLAGS) -o $@ $(OBJS) $(OBJ1) $(LIBS) $(STATIC_LIBS)

$(OBJ1): $(SRC1)
	$(F90) $(F90FLAGS) -c  $<

clean:
	rm -f $(OBJS) $(OBJ1) *.mod *~
very_clean:
	rm -f $(PROG) $(OBJS) $(OBJ1) *.mod *~

.SUFFIXES: $(SUFFIXES) .f90

.f90.o:
	$(F90) $(F90FLAGS) -c $<

amp.o: amp.f90 def_sectors_bench.o dist_mat.o energy_grid.o \
	io_units.o precisn.o slp.o $(XDR).o error_out.o mpi_params.o
def_sectors_bench.o: def_sectors_bench.f90 energy_grid.o io_units.o precisn.o \
	rd_Hfile.o rmx1_in.o error_out.o mpi_params.o
pdg_ctl.o: pdg_ctl.f90 amp.o def_sectors_bench.o dist_mat.o io_units.o potl.o \
	potl_coefs.o precisn.o rd_Hfile.o rmx1_in.o slp.o mpi_params.o
dist_mat.o: dist_mat.f90 io_units.o precisn.o sec_ham.o error_out.o
energy_grid.o: energy_grid.f90 io_units.o precisn.o rd_Hfile.o \
	rmx1_in.o error_out.o mpi_params.o
error_prt.o: error_prt.f90 io_units.o
rmx1.o: rmx1.f90 pdg_ctl.o energy_grid.o io_units.o precisn.o rd_Hfile.o \
	rmx1_in.o slp.o error_out.o
potl.o: potl.f90 io_units.o potl_coefs.o precisn.o rd_Hfile.o rmx1_in.o
potl_coefs.o: potl_coefs.f90 io_units.o precisn.o scaling.o slp.o $(XDR).o
rd_Hfile.o: rd_Hfile.f90 io_units.o precisn.o rmx1_in.o scaling.o $(XDR).o error_out.o mpi_params.o
rmx1_in.o: rmx1_in.f90 io_units.o precisn.o error_out.o mpi_params.o
scaling.o: scaling.f90 io_units.o precisn.o
sec_ham.o: sec_ham.f90 precisn.o io_units.o potl.o error_out.o
$(XDR).o: $(XDR).f90 io_units.o precisn.o
slp.o: slp.f90
io_units.o: io_units.f90
precisn.o: precisn.f90
error_out.o: error_out.f90 io_units.o

