PROG =	bessel_test

SRCS =	bessel_test.f90 \
	m_bessel.f90 \
	m_constants.f90 \
	m_constants.f90 \
	m_precision.f90 \
	slatec.f90 \
	slatec_dummy.f90

OBJS =	bessel_test.o \
	m_bessel.o \
	m_constants.o \
	m_constants.o \
	m_precision.o \
	slatec.o \
	slatec_dummy.o


F90         = gfortran
F90FLAGS    = $(F90FLAGS_DEV) -W
F90LDFLAGS  = -L$(HOME)/usr/lib64/

LIBS        =  $(F90LIBS) 	

LDFLAGS     =  $(F90LDFLAGS) 	

ETAGS       = etags
DEPEND      = makedepf90
SVNVERSION  = svnversion



all: etags depend $(PROG)

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

clean:
	rm -f $(PROG) $(OBJS) *.mod  TAGS VERSION .depend

etags:
	$(ETAGS) $(SRCS) *.h90

depend .depend:
	rm -f .depend
	$(DEPEND) $(SRCS) > .depend 

version:
	$(SVNVERSION) > VERSION 


.SUFFIXES: $(SUFFIXES) .f90 .F90 .mod

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

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

.c.o:
	$(CC) $(CFLAGS) -c  $<

.cc.o:
	$(CPP) $(CPPFLAGS) -c $<

.cpp.o:
	$(CPP) $(CPPFLAGS) -c $<

# Override the modula2 default built-in rule! 
#   (without it, make will try to execute m2c .....) 
%.o:%.mod 


# ... Dependencies
# ......................

# Include the dependency list (created by $(DEPEND))
include .depend