include ../make.${BLKCMARCH}

OBJS =  disp.o initmpi.o
SOURCE =  disp.c initmpi.c
#
# This makefile template defines a library name that is used when collecting
# object files into a library.  
LIBNAME  = ../lib/libblkcm${BLKCMARCH}.a

.PRECIOUS: $(LIBNAME)

lib: $(OBJS) 
	$(AR) $(LIBNAME) $?
.c.o: 
	$(CC) -c $(CFLAGS) $(COPTFLAGS) $*.c
.f.o: 
	$(FC) -c $(FFLAGS) $(FOPTFLAGS) $*.f
clean:
	$(RM) -f *.o *.$(ARCH) *~ core TAGS

LIBS      = $(LIBNAME) $(MPI_LIB) $(FC_LIB) $(SYS_LIB) -lm
FMAIN   = 

#
# You must NOT pass FFLAGS to the CLINKER
example4: example4.o
	$(CLINKER) -I.. -o example4.${ARCH} $(FMAIN) example4.o \
                  $(LIBS) 
#	$(CLINKER) -I.. -o example4.${ARCH} $(FFLAGS) $(FMAIN) example4.o \
#                  $(LIBS) 

