CHARMC=../../../bin/charmc $(OPTS)

OBJS=megatest.o \
     groupring.o \
     nodering.o \
     varsizetest.o \
     varraystest.o \
     groupcast.o \
     nodecast.o \
     synctest.o \
     fib.o \
     arrayring.o \
     tempotest.o \
     packtest.o \
     queens.o \
     migration.o \
     marshall.o \
     priomsg.o \
     priotest.o \
     rotest.o \
     statistics.o \
     templates.o \
     inherit.o \
     reduction.o \
     callback.o	\
     immediatering.o \
     bitvector.o

.SUFFIXES: .o .C .def.h .decl.h .ci .h

pgm: $(OBJS)
	$(CHARMC) -o pgm  $(OBJS) -language charm++ 
.C.o: 
	$(CHARMC) -c $<

megatest.h: megatest.decl.h

megatest.C: megatest.h megatest.def.h groupring.h nodering.h \
	varsizetest.h varraystest.h groupcast.h nodecast.h synctest.h\
	fib.h arrayring.h tempotest.h packtest.h queens.h migration.h\
	marshall.h priomsg.h priotest.h templates.h inherit.h rotest.h \
	reduction.h callback.h immediatering.h statistics.h bitvector.h

groupring.h: groupring.decl.h

groupring.C: groupring.h groupring.def.h megatest.h

nodering.h: nodering.decl.h

nodering.C: nodering.h nodering.def.h megatest.h

varsizetest.h: varsizetest.decl.h

varsizetest.C: varsizetest.h varsizetest.def.h megatest.h

varraystest.h: varraystest.decl.h

varraystest.C: varraystest.h varraystest.def.h megatest.h

groupcast.h: groupcast.decl.h

groupcast.C: groupcast.h groupcast.def.h megatest.h

nodecast.h: nodecast.decl.h

nodecast.C: nodecast.h nodecast.def.h megatest.h

synctest.h: synctest.decl.h

synctest.o: synctest.C synctest.h synctest.def.h megatest.h

fib.h: fib.decl.h

fib.C: fib.h fib.def.h megatest.h

arrayring.h: arrayring.decl.h

arrayring.C: arrayring.h arrayring.def.h megatest.h

tempotest.h: tempotest.decl.h

tempotest.C: tempotest.h tempotest.def.h megatest.h

packtest.h: packtest.decl.h

packtest.C: packtest.h packtest.def.h megatest.h

queens.h: queens.decl.h

queens.C: queens.h queens.def.h megatest.h

migration.h: migration.decl.h

migration.C: migration.h migration.def.h megatest.h

marshall.h: marshall.decl.h

marshall.C: marshall.h marshall.def.h megatest.h

priomsg.h: priomsg.decl.h

priomsg.C: priomsg.h priomsg.def.h megatest.h

priotest.h: priotest.decl.h

priotest.C: priotest.h priotest.def.h megatest.h

templates.h: templates.decl.h

templates.C: templates.h templates.def.h megatest.h

inherit.h: inherit.decl.h

inherit.C: inherit.h inherit.def.h megatest.h

rotest.h: rotest.decl.h

rotest.C: rotest.h rotest.def.h megatest.h

reduction.h: reduction.decl.h

reduction.C: reduction.h reduction.def.h megatest.h

callback.h: callback.decl.h

callback.C: callback.h callback.def.h 

immediatering.h: immediatering.decl.h

immediatering.o: immediatering.C immediatering.h immediatering.def.h 

statistics.o: statistics.C statistics.h

bitvector.h: bitvector.decl.h

bitvector.C: bitvector.h bitvector.def.h megatest.h


.ci.decl.h:
	$(CHARMC) -c $<

.ci.def.h:
	$(CHARMC) -c $<

clean:
	rm -r -f conv-host pgm *.o *.decl.h *.def.h *.log *.sts *~ *.bak charmrun SunWS_cache

test: pgm
	./charmrun ./pgm +p1
	./charmrun ./pgm +p2
	./charmrun ./pgm +p3
	./charmrun ./pgm +p4
