head	1.3;
access;
symbols
	charm6_1:1.3
	charm_6_0_1:1.3
	charm6_0_1:1.3
	charm6_0:1.3
	ChaNGa_1-0:1.2
	charm5_9:1.2;
locks; strict;
comment	@# @;


1.3
date	2007.09.20.20.39.30;	author bhatele;	state Exp;
branches;
next	1.2;
commitid	11a446f2da7f4567;

1.2
date	2004.10.13.02.58.08;	author olawlor;	state Exp;
branches;
next	1.1;

1.1
date	2004.09.07.21.07.16;	author bohm;	state Exp;
branches;
next	;


desc
@@


1.3
log
@"all" target added
@
text
@# emacs mode line -*- mode: makefile -*-
# needs $(PGM)

OPTS=
CDIR=../../../..
CHARMC=$(CDIR)/bin/charmc -language charm++ $(OPTS)

# Rules to convert .ci to .decl.h and .def.h
.SUFFIXES:
.SUFFIXES: .o .C .def.h .decl.h .ci .h

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

.decl.h.def.h:
	@@true

all: opt

test: $(PGM)
	./charmrun +p4 $(PGM) $(TEST_ARGS)

$(PGM) : $(PGM).o
	$(CHARMC) -o $(PGM) -module msa $(PGM).o -lm

headers: $(PGM).decl.h $(PGM).def.h $(HEADERS)
	touch headers

$(PGM).o : $(PGM).ci $(PGM).C headers
	$(CHARMC) -c $(PGM).C

proj:
	make OPTS="-tracemode projections -O3" $(PGM)

para:
	make OPTS="-memory paranoid -g $(OPTS)" $(PGM)

opt:
	make OPTS="-O3 $(OPTS)" $(PGM)

g:
	make OPTS="-g $(OPTS)" $(PGM)

gprof:
	make OPTS="-pg $(OPTS)" $(PGM)

clean:
	rm -f *.o *.decl.h *.def.h charmrun test $(PGM) headers

c: clean

tests: w2 w3 w4

# test with two worker threads
w2: opt
	@@echo ================================================================
	./charmrun +p1 $(PGM) 2
	@@echo ================================================================
	./charmrun +p2 $(PGM) 2
	@@echo ================================================================
	./charmrun +p3 $(PGM) 2
	@@echo ================================================================
	./charmrun +p4 $(PGM) 2

# test with three worker threads
w3: opt
	@@echo ================================================================
	./charmrun +p1 $(PGM) 3
	@@echo ================================================================
	./charmrun +p2 $(PGM) 3
	@@echo ================================================================
	./charmrun +p3 $(PGM) 3
	@@echo ================================================================
	./charmrun +p4 $(PGM) 3

#test with various worker threads
w4: opt
	@@echo ================================================================
	./charmrun +p1 $(PGM) 4
	@@echo ================================================================
	./charmrun +p2 $(PGM) 4
	@@echo ================================================================
	./charmrun +p3 $(PGM) 4
	@@echo ================================================================
	./charmrun +p4 $(PGM) 4
	@@echo ================================================================
	./charmrun +p4 $(PGM) 8
	@@echo ================================================================
	./charmrun +p4 $(PGM) 32
@


1.2
log
@Added test targets to Makefiles.
@
text
@d18 1
a18 1
all : opt
@


1.1
log
@a few examples from the pgms/charm++ tree
@
text
@d20 3
@

