CHARMC=../../../bin/charmc $(OPTS)
all: cifiles pgm

cifiles:
	$(CHARMC) main.ci
	$(CHARMC) testcharm.ci
	$(CHARMC) testsdag.ci
	$(CHARMC) testthreads.ci

pgm: main.o testcharm.o testsdag.o simplemsg.o defmain.o testthreads.o
	$(CHARMC) -o pgm main.o testcharm.o testsdag.o  testthreads.o simplemsg.o defmain.o -language charm++

main.o: main.C main.h
	$(CHARMC) -c main.C 

testcharm.o: testcharm.C testcharm.h
	$(CHARMC) -c testcharm.C 

testsdag.o: testsdag.C testsdag.h
	$(CHARMC) -c testsdag.C 

testthreads.o: testthreads.C testthreads.h
	$(CHARMC) -c testthreads.C 

simplemsg.o: simplemsg.c simplemsg.h
	$(CHARMC) -c simplemsg.c

defmain.o: defmain.C
	$(CHARMC) -c defmain.C

clean:
	rm -rf conv-host pgm *.o *.decl.h *.def.h charmrun
