# ACL:license
#  ----------------------------------------------------------------------
#  This software and ancillary information (herein called "SOFTWARE")
#  called POOMA (Parallel Object-Oriented Methods and Applications) is
#  made available under the terms described here.  The SOFTWARE has been
#  approved for release with associated LA-CC Number LA-CC-98-65.
#  
#  Unless otherwise indicated, this SOFTWARE has been authored by an
#  employee or employees of the University of California, operator of the
#  Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with
#  the U.S. Department of Energy.  The U.S. Government has rights to use,
#  reproduce, and distribute this SOFTWARE. The public may copy, distribute,
#  prepare derivative works and publicly display this SOFTWARE without 
#  charge, provided that this Notice and any statement of authorship are 
#  reproduced on all copies.  Neither the Government nor the University 
#  makes any warranty, express or implied, or assumes any liability or 
#  responsibility for the use of this SOFTWARE.
#  
#  If SOFTWARE is modified to produce derivative works, such modified
#  SOFTWARE should be clearly marked, so as not to confuse it with the
#  version available from LANL.
#  
#  For more information about POOMA, send e-mail to pooma@acl.lanl.gov,
#  or visit the POOMA web page at http://www.acl.lanl.gov/pooma/.
#  ----------------------------------------------------------------------
# ACL:license

# This file is user-editable

PROJECT_ROOT = $(shell cd ../../..; pwd)
include $(PROJECT_ROOT)/config/head.mk

PASS=APP

default:: tests

run: run_tests
	cat *.out

run_tests: tests
	$(MPIRUN) $(ODIR)/rcptr_test1 $(TSTOPTS) 1>rcptr_test1.out 2>&1
	$(MPIRUN) $(ODIR)/rcptr_test2 $(TSTOPTS) 1>rcptr_test2.out 2>&1
	$(MPIRUN) $(ODIR)/rcblock_test1 $(TSTOPTS) 1>rcblock_test1.out 2>&1
	$(MPIRUN) $(ODIR)/rcblock_test2 $(TSTOPTS) 1>rcblock_test2.out 2>&1
	$(MPIRUN) $(ODIR)/rcblock_test3 $(TSTOPTS) 1>rcblock_test3.out 2>&1
	$(MPIRUN) $(ODIR)/rcblock_test4 $(TSTOPTS) 1>rcblock_test4.out 2>&1
	$(MPIRUN) $(ODIR)/dbptr_test1 $(TSTOPTS) 1>dbptr_test1.out 2>&1
	$(MPIRUN) $(ODIR)/dbptr_test2 $(TSTOPTS) 1>dbptr_test2.out 2>&1
	$(MPIRUN) $(ODIR)/dbptr_test3 $(TSTOPTS) 1>dbptr_test3.out 2>&1
	$(MPIRUN) $(ODIR)/dbptr_test4 $(TSTOPTS) 1>dbptr_test4.out 2>&1
	$(MPIRUN) $(ODIR)/dbptr_test5 $(TSTOPTS) 1>dbptr_test5.out 2>&1
	$(MPIRUN) $(ODIR)/inform_test $(TSTOPTS) 1>inform_test.out 2>&1
	$(MPIRUN) $(ODIR)/assert_test1 $(TSTOPTS) 1>assert_test1.out 2>&1
	$(MPIRUN) $(ODIR)/delete_test1 $(TSTOPTS) 1>delete_test1.out 2>&1
	$(MPIRUN) $(ODIR)/find_most_common_test1 $(TSTOPTS) \
	1>find_most_common_test1.out 2>&1

tests:: dbptr_tests rcptr_tests rcblock_tests inform_tests assert_tests \
	alg_tests

dbptr_tests:: 	dbptr_test1 dbptr_test2 dbptr_test3 dbptr_test4 dbptr_test5

rcptr_tests::	rcptr_test1 rcptr_test2

rcblock_tests::	rcblock_test1 rcblock_test2 rcblock_test3 rcblock_test4

inform_tests::	inform_test

assert_tests::	assert_test1

alg_tests::     delete_test1 find_most_common_test1

.PHONY: dbptr_test1
.PHONY: dbptr_test2
.PHONY: dbptr_test3
.PHONY: dbptr_test4
.PHONY: dbptr_test5

dbptr_test1:: 	$(ODIR)/dbptr_test1
dbptr_test2:: 	$(ODIR)/dbptr_test2
dbptr_test3:: 	$(ODIR)/dbptr_test3
dbptr_test4:: 	$(ODIR)/dbptr_test4
dbptr_test5:: 	$(ODIR)/dbptr_test5

.PHONY: rcptr_test1
.PHONY: rcptr_test2
.PHONY: rcblock_test1
.PHONY: rcblock_test2
.PHONY: rcblock_test3
.PHONY: rcblock_test4
.PHONY: inform_test
.PHONY: assert_test1
.PHONY: delete_test1
.PHONY: find_most_common_test1

rcptr_test1::	$(ODIR)/rcptr_test1
rcptr_test2::	$(ODIR)/rcptr_test2
rcblock_test1::	$(ODIR)/rcblock_test1
rcblock_test2::	$(ODIR)/rcblock_test2
rcblock_test3::	$(ODIR)/rcblock_test3
rcblock_test4::	$(ODIR)/rcblock_test4
inform_test::	$(ODIR)/inform_test
assert_test1::	$(ODIR)/assert_test1
delete_test1::	$(ODIR)/delete_test1
find_most_common_test1:: $(ODIR)/find_most_common_test1

$(ODIR)/rcptr_test1: $(ODIR)/rcptr_test1.o
	$(LinkToSuite)

$(ODIR)/rcptr_test2: $(ODIR)/rcptr_test2.o
	$(LinkToSuite)

$(ODIR)/rcblock_test1: $(ODIR)/rcblock_test1.o
	$(LinkToSuite)

$(ODIR)/rcblock_test2: $(ODIR)/rcblock_test2.o
	$(LinkToSuite)

$(ODIR)/rcblock_test3: $(ODIR)/rcblock_test3.o
	$(LinkToSuite)

$(ODIR)/rcblock_test4: $(ODIR)/rcblock_test4.o
	$(LinkToSuite)

$(ODIR)/dbptr_test1: $(ODIR)/dbptr_test1.o
	$(LinkToSuite)

$(ODIR)/dbptr_test2: $(ODIR)/dbptr_test2.o
	$(LinkToSuite)

$(ODIR)/dbptr_test3: $(ODIR)/dbptr_test3.o
	$(LinkToSuite)

$(ODIR)/dbptr_test4: $(ODIR)/dbptr_test4.o
	$(LinkToSuite)

$(ODIR)/dbptr_test5: $(ODIR)/dbptr_test5.o
	$(LinkToSuite)

$(ODIR)/inform_test: $(ODIR)/inform_test.o
	$(LinkToSuite)

$(ODIR)/assert_test1: $(ODIR)/assert_test1.o
	$(LinkToSuite)

$(ODIR)/delete_test1: $(ODIR)/delete_test1.o
	$(LinkToSuite)

$(ODIR)/find_most_common_test1: $(ODIR)/find_most_common_test1.o
	$(LinkToSuite)

$(ODIR)/dbptr_test1.o: ../DataBlockPtr.h
$(ODIR)/dbptr_test2.o: ../DataBlockPtr.h
$(ODIR)/dbptr_test3.o: ../DataBlockPtr.h
$(ODIR)/dbptr_test4.o: ../DataBlockPtr.h
$(ODIR)/dbptr_test5.o: ../DataBlockPtr.h

include $(SHARED_ROOT)/tail.mk

# ACL:rcsinfo
#  ----------------------------------------------------------------------
#  $RCSfile: makefile,v $   $Author: julianc $
#  $Revision: 1.13 $   $Date: 2000/07/21 18:29:22 $
#  ----------------------------------------------------------------------
# ACL:rcsinfo
