# Generated automatically from Makefile.in by configure.
# -*- Mode: Makefile; -*-
# Creator: Jeffrey Vetter (vetter3@llnl.gov) Tue Mar 14 2000
# $Header: /home/cvs/cvs/mlagada/ScalaTraceV2/record/tests/Makefile,v 1.2 2013/05/15 03:25:00 mlagada Exp $

# !!!!! Generated automatically from Makefile.in by configure.

EXES=hello.exe \
		send-recv-ok.exe	\
     irecv-isend-ok2.exe  \
     comm-simple.exe  \
     collective-exhaustive-no-error.exe 

TARGETS=$(EXES)
#TARGETS+=$(EXES:.exe=-mpip.exe)

#TARGETS	= \
	hello.exe \
	hellof.exe \
	abort.exe \
	abort1.exe \
	abort2.exe \
	abort3.exe \
	no-error.exe \
	no-error2.exe \
	no-error3.exe \
	no-error3-any_src.exe \
	no-error4.exe \
	no-error4-any_src.exe \
	no-error-any_src.exe \
	no-error-derived-comms.exe \
	no-error-interleaved-isend.exe \
	no-error-persistent.exe \
	no-error-persistent-all-completions.exe \
	no-error-persistent-test.exe \
	no-error-persistent-testpartial.exe \
	no-error-persistent-waitpartial.exe \
	no-error-probe.exe \
	no-error-probe-any_src.exe \
	no-error-probe-any_tag.exe \
	no-error-test.exe \
	no-error-testall.exe \
	no-error-testany.exe \
	no-error-vector-isend.exe \
	no-error-wait-any_src.exe \
	no-error-wait-any_src2.exe \
	no-error-wait-any_src3.exe \
	no-error-wait-any_src4.exe \
	no-error-wait.exe \
	no-error-wait2.exe \
	no-error-waitall-any_src.exe \
	no-error-waitall-any_src2.exe \
	no-error-waitall-any_src3.exe \
	no-error-waitall.exe \
	no-error-waitany-any_src.exe \
	no-error-waitany-any_src2.exe \
	no-error-waitany-any_src3.exe \
	no-error-waitany.exe \
	no-error-waitany2.exe \
	any_src-deadlock.exe \
	any_src-can-deadlock.exe \
	any_src-can-deadlock2.exe \
	any_src-can-deadlock3.exe \
	any_src-can-deadlock4.exe \
	any_src-can-deadlock5.exe \
	any_src-can-deadlock6.exe \
	any_src-can-deadlock7.exe \
	any_src-can-deadlock8.exe \
	any_src-can-deadlock9.exe \
	any_src-can-deadlock10.exe \
	any_src-can-deadlock11.exe \
	any_src-wait-deadlock.exe \
	any_src-wait-deadlock2.exe \
	any_src-waitall-deadlock.exe \
	any_src-waitall-deadlock2.exe \
	any_src-waitall-deadlock3.exe \
	any_src-waitany-deadlock.exe \
	any_src-waitany-deadlock2.exe \
	basic-deadlock.exe \
	basic-deadlock-comm_dup.exe \
	basic-deadlock-comm_create.exe \
	basic-deadlock-comm_split.exe \
	basic-deadlock-cart_create.exe \
	basic-deadlock-cart_sub.exe \
	basic-deadlock-graph_create.exe \
	basic-deadlock-intercomm_create.exe \
	basic-deadlock-intercomm_merge.exe \
	finalize-deadlock.exe \
	complex-deadlock.exe \
	send-recv-ok.exe \
	intercomm_create-deadlock.exe \
	intercomm_create-deadlock2.exe \
	intercomm_create-deadlock3.exe \
	intercomm_create-deadlock4.exe \
	intercomm_create-no-error.exe \
	intercomm_merge-deadlock.exe \
	irecv-deadlock.exe \
	irecv-isend-ok2.exe \
	sendrecv-deadlock.exe \
	wait-deadlock.exe \
	waitall-deadlock.exe \
	waitany-deadlock.exe \
	change-send-buffer.exe \
	change-send-buffer-exhaustive.exe \
	change-send-buffer-type-exhaustive.exe \
	collective-exhaustive-byte-int-mismatch.exe \
	collective-exhaustive-no-error.exe \
	collective-misorder.exe \
	collective-misorder2.exe \
	collective-misorder-allreduce.exe \
	bcast-deadlock.exe \
	comm-dup-no-error.exe \
	comm-dup-no-free.exe \
	comm-dup-no-free2.exe \
	comm-split-no-free.exe \
	comm-deadlock.exe \
	comm-bcast-deadlock.exe \
	deadlock-config.exe \
	errhandler-no-error.exe \
	errhandler-no-free.exe \
	group-no-error.exe \
	group-no-error2.exe \
	group-no-error3.exe \
	group-no-error-exhaustive.exe \
	group-no-free.exe \
	group-no-free2.exe \
	group-no-free3.exe \
	group-no-free-exhaustive.exe \
	lost-request.exe \
	lost-request2.exe \
	lost-request3.exe \
	lost-request-waitall.exe \
	dropped-req.exe \
	dropped-lost-req.exe \
	op-no-error.exe \
	op-no-free.exe \
	partial-recv.exe \
	partial-recv-exhaustive.exe \
	partial-recv-persistent.exe \
	partial-recv-persistent2.exe \
	partial-recv-persistent3.exe \
	partial-recv-persistent4.exe \
	persistent.exe \
	persistent2.exe \
	persistent3.exe \
	persistent4.exe \
	probe-any_src-types-can-mismatch.exe \
	probe-any_tag-types-can-mismatch.exe \
	probe-deadlock.exe \
	pt2pt-byte-int-mismatch.exe \
	remote_group-no-error.exe \
	type-commit-twice.exe \
	type-no-error.exe \
	type-no-error-exhaustive.exe \
	type-no-error-exhaustive-with-isends.exe \
	type-no-free-exhaustive.exe \
	type-no-free.exe \
	type-no-free2.exe \
	type-no-free3.exe

all: $(TARGETS)

include ../config/Makefile.config

libdir=../lib/
MPIPLIBDIRS:=-L${HOME}/opt/lib
MPIPLIBS:=-lmpiP
MPIPLIBS+=-lm

#MPIPLIBDIRS+=-L/home/pratn/opt/libunwind/lib
#MPIPLIBS+=-lunwind

.SUFFIXES: .exe -mpip.exe

MALLOC_DEBUG=
ifneq ($(MALLOC_DEBUG),)
LDFLAGS+=-L/home/pratn/opt/$(MALLOC_DEBUG)
MPILIBS+=-l$(MALLOC_DEBUG)
endif
ifeq ($(MALLOC_DEBUG),ccmalloc)
  MPILIBS+=-ldl
endif

MPICCFLAGS=-g -O0

#libdir=../../dummy
#LLIB=dummy
LLIB=glob
#LLIB=node

CPPFLAGS+=-DMPICH_IGNORE_CXX_SEEK

USE_WISC=n
ifeq ($(USE_WISC),y)

#SW_PLATFORM=ppc32_bgcompute
SW_PLATFORM=x86_64-unknown-linux2.4
SW_HOME=/home/tgamblin/src/sw

DWARF_HOME=/home/tgamblin/opt/libdwarf
XML2_HOME=/home/tgamblin/opt/libxml2

SW_LIBS = -L$(SW_HOME)/$(SW_PLATFORM)/lib -lstackwalk -lcommon -lsymtabAPI -liberty
SW_LIBS += -L$(DWARF_HOME)/lib -ldwarf
SW_LIBS += -L$(XML2_HOME)/lib -lxml2
else

#This is the old stackwalk lib
SW_LIBS=-L../../stackwalk/ver0 -lstackwalk

endif

.c-mpip.exe:
	$(MPICXX) $< $(MPIPLIBDIRS) $(MPIPLIBS) -o $@

.c.exe:
	$(MPICXX) $(CPPFLAGS) $(MPICCFLAGS) $(MPIINCLUDE) -o $@ $< -L$(libdir)\
$(MPILIBDIRS) $(LDFLAGS) -l$(LLIB) -lrt -lm $(MPILIBS) $(SW_LIBS)

.f.exe:
	$(MPIFC) $(MPIFCFLAGS) $(MPIINCLUDE) -L$(libdir) $(MPILIBDIRS) $(LDFLAGS) -o  \
  $@ $< $(MPILIBS) -l$(LLIB) -lrt -lm -lmpichcxx $(SW_LIBS)

$(TARGETS): $(libdir)/lib$(LLIB).a

clean::
	$(RM) *.exe *.o
	$(RM) *mgr.*.log
	$(RM) *task.*.log
	$(RM) *.log
	$(RM) -r coredir.*

##### EOF
