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

ACC_LIB_FILES = icount.o fcount.o dcount.o ihist.o fhist.o dhist.o

all: libacc_libs++.a

pgm: libacc_libs++.a

libacc_libs++.a: $(ACC_LIB_FILES)
	$(CHARMC) -o libacc_libs++.a $(ACC_LIB_FILES)

icount.o: icount.h icount.P GENERIC-COUNT.h GENERIC-COUNT.P
	$(CHARMC) -o icount.o icount.P
	
fcount.o: fcount.h fcount.P GENERIC-COUNT.h GENERIC-COUNT.P
	$(CHARMC) -o fcount.o fcount.P
	
dcount.o: dcount.h dcount.P GENERIC-COUNT.h GENERIC-COUNT.P
	$(CHARMC) -o dcount.o dcount.P

ihist.o: ihist.P ihist.h GENERIC-HIST.P GENERIC-HIST.h
	$(CHARMC) -o ihist.o ihist.P

fhist.o: fhist.P fhist.h GENERIC-HIST.P GENERIC-HIST.h
	$(CHARMC) -o fhist.o fhist.P

dhist.o: dhist.P dhist.h GENERIC-HIST.P GENERIC-HIST.h
	$(CHARMC) -o dhist.o dhist.P

clean:
	rm -f conv-host *.o
	rm -f pgm *.TMP.*
	rm -f gmon.out #*#
	rm -f core *~
	rm -f TAGS *.headers

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

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

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