include Makefile.defs

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

OBJS = \
       benchmark.o             \
       gettime.o               \
       geometry_eo.o           \
       init/init_dirac_halfspinor.o \
       init/init_moment_field.o     \
       ranlxd.o                \
       start.o                 \
       xchange/xchange_field.o         \
       xchange/xchange_lexicfield.o    \
       boundary.o              \
       operator/Hopping_Matrix.o        \
       init/init_gauge_field.o      \
       init/init_spinor_field.o     \
       ranlxs.o                \
       update_backward_gauge.o \
       xchange/xchange_gauge.o         \
       operator/D_psi.o                 \
       operator/Hopping_Matrix_nocom.o  \
       init/init_geometry_indices.o \
       mpi_init.o              \
       read_input.o            \
       fatal_error.o           \
       xchange/xchange_deri.o          \
       xchange/xchange_halffield.o     \
       test/check_xchange.o       \
       test/check_geometry.o   


kernel: $(OBJS)
	$(AR) $(ARFLAGS) ../kernel_D.a $(OBJS)	
	
clean: 
	$(RM) $(OBJS) ../kernel_D.a benchmark_main