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

all: pgm

pgm: module1.o module2.o
	$(CHARMC) -o pgm module1.o module2.o -language charm++

module1.o: module1.top.h module1.bot.h module2.top.h module1.C module1.h
	$(CHARMC) -c module1.C

module1.top.h module1.bot.h: module1.ci
	$(CHARMC) module1.ci

module2.o: module2.top.h module2.bot.h module2.C module2.h module2.ci
	$(CHARMC) -c module2.C

module2.top.h module2.bot.h: module2.ci
	$(CHARMC) module2.ci

clean:
	rm -f core conv-host *.o *.top.h *.bot.h *.out
	rm -f pgm *.TMP.* *.headers gmon.out

vclean: clean
	rm -f TAGS  *~

projections:
	make all OPTS='$(OPTS) -execmode projections'

summary:
	make all OPTS='$(OPTS) -execmode summary'

replay:
	make all OPTS='$(OPTS) -execmode replay'

tests: all test1

test1:
	pgm +p2 > test.1.out
	diff test.1.std test.1.out
