# FMM: An implementation of the fast multipole method for the
#      Yukawa potential under UNIX/Linux for fmm.
#
# MAKEFILE - makefile for the 3D yukawa uniform fast multipole solver.
#
# JingFang Huang 06/12/2008 -- last modified
#
 
# 1. Compilers and linker.
FC = gfortran
LINKER = gfortran
 
# 2. Compiling options
FFLAGS = -g -O4
#FFLAGS = -g -O4

# 3. TARGET and OBJECT LIST
TARGET  = fmm
OBJS    = \
	uniyukdriver.o \
	fmmuniyuk.o \
	treeuniform.o \
	yukoperators.o \
        functions.o \
	yuktable.o \
	prini.o \
	second.o 

# 4. LINK LIST
$(TARGET):      $(OBJS)
	$(LINKER) $(FFLAGS) $(OBJS) -o $(TARGET)
	@size $(TARGET)
 
# 5. SUFFIX RULE
.f.o:
	$(FC) $(FFLAGS) -c $*.f
 
# 6. DEPENDENCY LIST  with different header files.
uniyukdriver.o : uniyukdriver.f 
fmmuniyuk.o : fmmuniyuk.f parm-uniyuk.h 
treeuniform.o: treeuniform.f 
yukoperators.o: yukoperators.f 
functions.o: functions.f 
yuktable.o: yuktable.f 
prini.o: prini.f 
second.o: second.f 

# 7. make clean
clean:
	rm -f *.o
	rm -f $(TARGET)
	rm -f fort.*

# 8. SUFFIX LIST
.SUFFIXES:;
.SUFFIXES:      .o .f .c .m
 
.KEEP_STATE:
