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

all: pgm

pgm: pgm.o pgm.top.h pgm.bot.h
	$(CHARMC) pgm.o -o pgm -language charm++

pgm.o : pgm.C pgm.top.h
	$(CHARMC) -c pgm.C -language charm++

pgm.top.h pgm.bot.h : pgm.ci
	$(CHARMC) pgm.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
