# This Makefile.in created by simplemake.  Do not edit

# examples/Makefile.  Generated from Makefile.in by configure.

# --------------------------------------------------------------------------
all: all-redirect

SHELL           = /bin/sh
srcdir          = .
abs_srcdir      = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/examples
top_srcdir      = ..
LIBS            = -lmpich        -lpthread  -lrt          -lpthread  -lrt   
MPILIBNAME      = mpich
PMPILIBNAME     = pmpich

CFLAGS          = 
C_COMPILE       = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
C_LINK      = $(CC)
CC_SHL          = ${CC} -fpic
C_COMPILE_SHL   = $(CC_SHL) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
LDFLAGS     =   -L../lib

VPATH = .
MPICHDIR=..
CC       = $(MPICHDIR)/bin/mpicc
CPPFLAGS = 
DEFS     = 
INCLUDES = -I../src/include -I${top_srcdir}/src/include

.SUFFIXES:
.SUFFIXES: .o .lo .c 
.c.o:
	$(C_COMPILE) -c $<
.c.lo:
	$(C_COMPILE_SHL) -c $< -o _s$*.o
	@mv -f _s$*.o $*.lo
.c:
	$(C_COMPILE) -o $* $< $(LDFLAGS) $(LIBS)
clean:
	-@rm -f *.o ${srcdir}/*.o parent hellow pmandel_spawn pmandel icpi child spawn_merge_child2 cpi pmandel_fence spawn_merge_parent spawn_merge_child1 pmandel_spaserv srvec pmandel_service sr srtest
	-@rm -f parent.exe hellow.exe pmandel_spawn.exe pmandel.exe icpi.exe child.exe spawn_merge_child2.exe cpi.exe pmandel_fence.exe spawn_merge_parent.exe spawn_merge_child1.exe pmandel_spaserv.exe srvec.exe pmandel_service.exe sr.exe srtest.exe
	-@rm -f core core.[0-9]*
	-@rm -f *.lo ${srcdir}/*.lo
	-@rm -f *.irlog*
distclean: clean distclean-xxx remove-makefile
distclean-xxx:
	-@rm -f Makefile
	-@rm -rf autom4te*.cache
	-@rm -rf $(DEPS_DIR)
	-@rm -f TAGS
remove-makefile:
	rm -f Makefile
remove-genmakefiles:
	rm -f  Makefile
all-redirect: cpi

parent: parent.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o parent parent.o  ${LIBS}
hellow: hellow.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o hellow hellow.o  ${LIBS}
pmandel_spawn: pmandel_spawn.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o pmandel_spawn pmandel_spawn.o  -lm ${LIBS}
pmandel: pmandel.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o pmandel pmandel.o  -lm ${LIBS}
icpi: icpi.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o icpi icpi.o  -lm ${LIBS}
child: child.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o child child.o  ${LIBS}
spawn_merge_child2: spawn_merge_child2.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o spawn_merge_child2 spawn_merge_child2.o  \
	${LIBS} 
cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
pmandel_fence: pmandel_fence.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o pmandel_fence pmandel_fence.o  -lm ${LIBS}
spawn_merge_parent: spawn_merge_parent.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o spawn_merge_parent spawn_merge_parent.o  \
	${LIBS} 
spawn_merge_child1: spawn_merge_child1.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o spawn_merge_child1 spawn_merge_child1.o  \
	${LIBS} 
pmandel_spaserv: pmandel_spaserv.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o pmandel_spaserv pmandel_spaserv.o  -lm \
	${LIBS} 
srvec: srvec.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o srvec srvec.o  ${LIBS}
pmandel_service: pmandel_service.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o pmandel_service pmandel_service.o  -lm \
	${LIBS} 
sr: sr.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o sr sr.o  ${LIBS}
srtest: srtest.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(LDFLAGS) -o srtest srtest.o  ${LIBS}
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
SOURCES         =  hellow.c sr.c srvec.c srtest.c child.c parent.c cpi.c \
	icpi.c pmandel.c pmandel_spawn.c pmandel_service.c pmandel_spaserv.c \
	pmandel_fence.c spawn_merge_parent.c spawn_merge_child1.c \
	spawn_merge_child2.c 
ETAGS           = etags --langmap=c:+.i
tags: TAGS
TAGS:${HEADERS} ${SOURCES}
	here=`cd .. && pwd` ; cd ${srcdir} && $(ETAGS) -o $$here/TAGS --append ${HEADERS} ${SOURCES}
# --------------------------------------------------------------------------
#SUBDIRS = mpiexec
# Do not build the example mpiexec by default (since this is not the 
# mpiexec that we want users to use)
#OTHER_DIRS = f77 f90 cxx
# We want to replace the compilation and linking rule used by simplement

# pmandel requires a separate set of socket calls (its a long story)
# and may not build on most platforms

# LIBS includes -lmpich and other libraries (e.g., -lpmpich if
# weak symbols are not supported)

FORCE_TARGET:

