
DERIVED= all2all.f90   allredricf.f90 allredrir.f90 gath.f90   redricf.f90 redrir.f90 \
         allredlif.f90 allredricr.f90 barrier.f90   redlif.f90 redricr.f90 scat.f90 \
         allredlir.f90 allredrif.f90  bcast.f90     redlir.f90 redrif.f90



DEFAULT= all2all   allredricf allredrir gath   redricf redrir \
         allredlif allredricr barrier   redlif redricr scat \
         allredlir allredrif  bcast     redlir redrif


default: $(DEFAULT)
      
derived: $(DERIVED)    

include $(CCM_COM)_include


#MYTIME=atime.o

# max array size test is (8*10**SIZE)
# or nprocs*(8*10**SIZE) depending on
# routine being being tested

SIZE=3

make_timer:  make_timer.f90
	$(F90) $(FFLAGS) -o make_timer make_timer.f90

format:  format.f90
	$(F90) $(FFLAGS) -o format format.f90
	
# use commands similar to the next lines
# to set size on a routine by routine basis
# the third parameter replaces $(SIZE)
dummy.f90:dummy.input
	make_timer_script $< $@ 2
		

#### make the source files from input files
.SUFFIXES: .input .f90 .

#### make the source files from input files
#### using the default array size
.input.f90: make_timer fill.o
	make_timer_script $< $@ $(SIZE)

fill.o: fill.f90
	$(F90)  $(FFLAGS) -c fill.f90

.f90: $<  
	make fill.o
	$(PF90) $(FFLAGS) $(INC_DIR) -o $@  $<  $(MYTIME) fill.o $(LIB_DIR) $(LIB)
	
ALIST= do_* *input make* *include README fill.f90 format.f90 to_quad from_quad to_atime from_atime time.txt time.html

archive:
	tar -cf `date +%y%m%d`time.tar $(ALIST)

tar:
	tar -cf time.tar  $(ALIST)

clean:
	/bin/rm -f *mod *o $(DEFAULT) $(DERIVED) make_timer 
