####################################################################
#   Copyright (c)
#
#   You may copy, distribute, and modify it freely as long as you  #
#   preserve distribute, and modify it freely as long as you       # 
#   preserve this copyright and permission notice.                 #
#                                                                  #
#
####################################################################

#
#  Makefile for Adlib/src/kernel
#

SHELL       = /bin/sh


srcdir      = @srcdir@
top_srcdir  = @top_srcdir@

prefix      = @prefix@
exec_prefix = @exec_prefix@

bindir      = @bindir@
libdir      = @libdir@

ADLIB_INC_DIR = ${top_srcdir}/src/include

config_dir = ../include

VPATH       = .:${srcdir}

CCC         = @CXX@

mpi_inc     = @MPI_INC@

RANLIB      = @RANLIB@

INSTALL     = cp

# NOTHING BELOW HERE modified by `configure'.

AR          = ar rcu

CCC_OPTS    = @OPTIMIZE@ @COMPILER_OPT@  

CCFLAGS = $(CCC_OPTS) ${mpi_inc} -I$(ADLIB_INC_DIR) -c

OBJECTS = Gather.o Reduce.o Remap.o Frame.o RangeRep.o DimRangeRep.o CollapsedRangeRep.o BlockRangeRep.o CyclicRangeRep.o StepRangeRep.o Procs.o globals.o MessSchedule.o DataSchedule.o TreeSchedule.o block.o schedule.o threads.o io.o

LIB = libadlib.a

all : $(LIB)

libadlib.a : $(OBJECTS)
	rm -f $@
	$(AR) $@ $(OBJECTS)
	$(RANLIB) $@

io.o: io.C $(IO_INC)
	$(CCC) $(CCFLAGS) io.C

Gather.o: Gather.C
	$(CCC) $(CCFLAGS) Gather.C

Reduce.o: Reduce.C
	$(CCC) $(CCFLAGS) Reduce.C

Remap.o: Remap.C
	$(CCC) $(CCFLAGS) Remap.C

Frame.o: Frame.C
	$(CCC) $(CCFLAGS) Frame.C

RangeRep.o: RangeRep.C
	$(CCC) $(CCFLAGS) RangeRep.C

DimRangeRep.o: DimRangeRep.C
	$(CCC) $(CCFLAGS) DimRangeRep.C

CollapsedRangeRep.o: CollapsedRangeRep.C
	$(CCC) $(CCFLAGS) CollapsedRangeRep.C

BlockRangeRep.o: BlockRangeRep.C
	$(CCC) $(CCFLAGS) BlockRangeRep.C

CyclicRangeRep.o: CyclicRangeRep.C
	$(CCC) $(CCFLAGS) CyclicRangeRep.C

StepRangeRep.o: StepRangeRep.C
	$(CCC) $(CCFLAGS) StepRangeRep.C

Procs.o: Procs.C
	$(CCC) $(CCFLAGS) Procs.C

globals.o: globals.C
	$(CCC) $(CCFLAGS) globals.C

TreeSchedule.o: TreeSchedule.C
	$(CCC) $(CCFLAGS) TreeSchedule.C

DataSchedule.o: DataSchedule.C
	$(CCC) $(CCFLAGS) DataSchedule.C

MessSchedule.o: MessSchedule.C
	$(CCC) $(CCFLAGS) MessSchedule.C

schedule.o: schedule.C
	$(CCC) $(CCFLAGS) schedule.C

block.o: block.C
	$(CCC) $(CCFLAGS) block.C

threads.o: threads.C
	$(CCC) $(CCFLAGS) threads.C


clean:
	rm -f *.o core

distclean:
	rm -f *.o core
	rm -f Makefile $(LIB)

install: $(LIB)
	if [ ! -d ${libdir} ] ; then mkdir ${libdir} ; fi
	$(INSTALL) $(LIB) ${libdir}

uninstall:
	rm -f ${libdir}/$(LIB)


# DO NOT DELETE THIS LINE -- make depend depends on it.

threads.o: ../include/MPIinclude.h ../include/threads.h
block.o: ../include/block.h
schedule.o: ../include/MPIinclude.h
schedule.o: ../include/globals.h ../include/threads.h ../include/block.h
schedule.o: ../include/adtags.h ../include/schedule.h
TreeSchedule.o: ../include/MPIinclude.h ../include/globals.h
TreeSchedule.o: ../include/threads.h ../include/adtags.h
TreeSchedule.o: ../include/ProcTree.h ../include/schedule.h
TreeSchedule.o: ../include/TreeSchedule.h
MessSchedule.o: ../include/MPIinclude.h ../include/globals.h
MessSchedule.o: ../include/Procs.h ../include/threads.h ../include/adtags.h
MessSchedule.o: ../include/schedule.h ../include/MessSchedule.h
DataSchedule.o: ../include/MPIinclude.h ../include/globals.h
DataSchedule.o: ../include/threads.h ../include/adtags.h
DataSchedule.o: ../include/ProcTree.h ../include/schedule.h
DataSchedule.o: ../include/MessSchedule.h ../include/TreeSchedule.h
DataSchedule.o: ../include/DataSchedule.h
Procs.o: ../include/MPIinclude.h
Procs.o: ../include/globals.h ../include/ProcTree.h ../include/Procs.h
RangeRep.o: ../include/globals.h ../include/Procs.h
RangeRep.o: ../include/Range.h ../include/RangeRep.h
RangeRep.o: ../include/CollapsedRangeRep.h ../include/DimRangeRep.h
RangeRep.o: ../include/BlockRangeRep.h ../include/CyclicRangeRep.h
RangeRep.o: ../include/StepRangeRep.h
DimRangeRep.o: ../include/globals.h ../include/Procs.h ../include/Range.h
DimRangeRep.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
DimRangeRep.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
DimRangeRep.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
CollapsedRangeRep.o: ../include/globals.h ../include/Procs.h
CollapsedRangeRep.o: ../include/Range.h ../include/RangeRep.h
CollapsedRangeRep.o: ../include/CollapsedRangeRep.h ../include/DimRangeRep.h
CollapsedRangeRep.o: ../include/BlockRangeRep.h ../include/CyclicRangeRep.h
CollapsedRangeRep.o: ../include/StepRangeRep.h
BlockRangeRep.o: ../include/globals.h ../include/Procs.h ../include/Range.h
BlockRangeRep.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
BlockRangeRep.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
BlockRangeRep.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
CyclicRangeRep.o: ../include/globals.h ../include/Procs.h ../include/Range.h
CyclicRangeRep.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
CyclicRangeRep.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
CyclicRangeRep.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
StepRangeRep.o: ../include/globals.h ../include/Procs.h ../include/Range.h
StepRangeRep.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
StepRangeRep.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
StepRangeRep.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
globals.o: ../include/MPIinclude.h
globals.o: ../include/globals.h ../include/Procs.h ../include/ProcTree.h
globals.o: ../include/threads.h ../include/schedule.h
globals.o: ../include/TreeSchedule.h ../include/adtags.h ../include/Range.h
globals.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
globals.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
globals.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
Reduce.o: ../include/MPIinclude.h
Reduce.o: ../include/globals.h ../include/threads.h ../include/ProcTree.h
Reduce.o: ../include/Procs.h ../include/Range.h ../include/RangeRep.h
Reduce.o: ../include/CollapsedRangeRep.h ../include/DimRangeRep.h
Reduce.o: ../include/BlockRangeRep.h ../include/CyclicRangeRep.h
Reduce.o: ../include/StepRangeRep.h ../include/Frame.h ../include/schedule.h
Reduce.o: ../include/TreeSchedule.h ../include/Reduce.h
Remap.o: ../include/MPIinclude.h ../include/globals.h ../include/threads.h
Remap.o: ../include/ProcTree.h ../include/Procs.h ../include/Range.h
Remap.o: ../include/RangeRep.h ../include/CollapsedRangeRep.h
Remap.o: ../include/DimRangeRep.h ../include/BlockRangeRep.h
Remap.o: ../include/CyclicRangeRep.h ../include/StepRangeRep.h
Remap.o: ../include/SFrame.h ../include/Frame.h ../include/schedule.h
Remap.o: ../include/MessSchedule.h ../include/TreeSchedule.h
Remap.o: ../include/Reduce.h ../include/Remap.h
Gather.o: ../include/MPIinclude.h
Gather.o: ../include/globals.h ../include/threads.h ../include/ProcTree.h
Gather.o: ../include/Procs.h ../include/Range.h ../include/RangeRep.h
Gather.o: ../include/CollapsedRangeRep.h ../include/DimRangeRep.h
Gather.o: ../include/BlockRangeRep.h ../include/CyclicRangeRep.h
Gather.o: ../include/StepRangeRep.h ../include/Frame.h ../include/schedule.h
Gather.o: ../include/MessSchedule.h ../include/TreeSchedule.h
Gather.o: ../include/DataSchedule.h ../include/Reduce.h ../include/Gather.h
Gather.o: ../include/admacros.h
io.o: ../include/adlib.h
io.o: ../include/platform.h
io.o: ../include/MPIinclude.h ../include/globals.h
io.o: ../include/Procs.h ../include/Range.h ../include/RangeRep.h
io.o: ../include/CollapsedRangeRep.h ../include/DimRangeRep.h
io.o: ../include/BlockRangeRep.h ../include/CyclicRangeRep.h
io.o: ../include/StepRangeRep.h ../include/Frame.h ../include/Seq.h
io.o: ../include/threads.h ../include/ProcTree.h ../include/schedule.h
io.o: ../include/TreeSchedule.h ../include/MessSchedule.h
io.o: ../include/DataSchedule.h ../include/Reduce.h ../include/Remap.h
io.o: ../include/block.h ../include/Sum.h ../include/Gather.h ../include/io.h
