# Location of files

DIR = .
LIB =  /homes/german/fortran/lib/mtspec/
LIB2 = /homes/german/fortran/lib/plot/

# Objects and Libraries

OBJS = $(LIB)/mwlib.a \
       $(LIB2)/gplot.a


# Module locations

MODS = $(LIB)
MODS2 = $(LIB2)

# Compiler
#FC =      g95
#FC =      f95
FC =      ifort

# Compiler flags
#   none
FFLAGS = -O
#   debug
#FFLAGS = -g 

# Module flag

# Sun Compiler
#MFLAG = -M
# Nag Compiler
#MFLAG = -i
#MFLAG = -I
# Absoft Compiler
#MFLAG = -p
# Intel or g95 compiler
MFLAG = -I

MODULE = $(MFLAG)$(MODS) $(MFLAG)$(MODS2) 

# Compile

all : mtpsd wigner dual_freq coherence nsqi_psd mtpad trfunction deconv

%:      %.f90 $(OBJS)
	$(FC) $(FFLAGS) $(MODULE) $< $(OBJS) -o $@


# Clean

clean : 
	rm mtpsd wigner dual_freq coherence nsqi_psd mtpad trfunction deconv

