#===============================================================================
#
# BQCD -- Berlin Quantum ChromoDynamics programme
#
# Author: Hinnerk Stueben <stueben@zib.de>
#
# Copyright (C) 1998-2006, Hinnerk Stueben, Zuse-Institut Berlin
#
#-------------------------------------------------------------------------------
#
# clover/Makefile
#
#===============================================================================

include ../Makefile.defs

fpp = $(FPP) -I.. $(FPPFLAGS)

MODULES_DIR = ../modules

.SUFFIXES:
.SUFFIXES: .a .o .F90

.F90.o:
	$(fpp) $< > $*.f90
	$(F90) -c $(FFLAGS) -I$(MODULES_DIR) $*.f90

OBJS = \
	clover_action.o \
	clover_allocate.o \
	clover_bsa.o \
	clover_d.o \
	clover_f_mu_nu.o \
	clover_init.o \
	clover_inv.o \
	clover_mult_a.o \
	clover_mult_ao.o \
	clover_mult_b.o \
	clover_t_init.o \
	clover_ts.o \
	clover_uuu.o \
	clover_uuuu.o

OBJS_CTEST = \
	ctest.o \
	clover_inv.o \
	clover_mult_a.o \
	clover_mult_ao.o \
	clover_mult_b.o

$(LIBCLOVER):

libclover.a: $(OBJS)
	$(AR) $(ARFLAGS) $@ $(OBJS)
	$(RANLIB) $@

fast:
	$(FAST_MAKE)

ctest: $(OBJS_CTEST)
	f90 -o $@ $(OBJS_CTEST)

clean:
	rm -f *.[Tiod] *.f90 *.mod core work.pc work.pcl

clobber: clean
	rm -f libclover.a ctest
