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

# @configure_input@

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

SHELL           = @SHELL@
abs_builddir    = @abs_builddir@
srcdir          = @srcdir@
abs_srcdir      = @abs_srcdir@
top_srcdir      = @top_srcdir@
LIBS            = @EXAMPLE_LIBS@@LIBS@
MAKE            = @MAKE@
MPILIBNAME      = @MPILIBNAME@
PMPILIBNAME     = @PMPILIBNAME@

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

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

EXTRA_PROGRAMS = pmandel pmandel_spawn pmandel_service pmandel_spaserv 	         pmandel_fence hellow icpi parent child srtest srvec sr 		 spawn_merge_parent spawn_merge_child1 spawn_merge_child2

.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)
apply: 
	$(ACTION) $(ACTION_INPUT)
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 pmandel_service 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 pmandel_service.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) $(CFLAGS) $(LDFLAGS) -o parent parent.o  ${LIBS}
hellow: hellow.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o hellow hellow.o  ${LIBS}
pmandel_spawn: pmandel_spawn.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o pmandel_spawn pmandel_spawn.o  -lm \
	${LIBS} 
pmandel: pmandel.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o pmandel pmandel.o  -lm ${LIBS}
icpi: icpi.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o icpi icpi.o  -lm ${LIBS}
child: child.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o child child.o  ${LIBS}
spawn_merge_child2: spawn_merge_child2.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o spawn_merge_child2 \
	spawn_merge_child2.o  ${LIBS} 
cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
pmandel_fence: pmandel_fence.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o pmandel_fence pmandel_fence.o  -lm \
	${LIBS} 
spawn_merge_parent: spawn_merge_parent.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o spawn_merge_parent \
	spawn_merge_parent.o  ${LIBS} 
spawn_merge_child1: spawn_merge_child1.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o spawn_merge_child1 \
	spawn_merge_child1.o  ${LIBS} 
pmandel_spaserv: pmandel_spaserv.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o pmandel_spaserv pmandel_spaserv.o  \
	-lm ${LIBS} 
pmandel_service: pmandel_service.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o pmandel_service pmandel_service.o  \
	-lm ${LIBS} 
srtest: srtest.o   ../lib/lib${MPILIBNAME}.a
	$(C_LINK) $(CFLAGS) $(LDFLAGS) -o srtest srtest.o  ${LIBS}
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
SOURCES         =  hellow.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@ @ETAGSADD@
HEADERFILES     = $(HEADERS)
SOURCEFILES     = $(SOURCES)
tags: TAGS
TAGS: Makefile${HEADERFILES} ${SOURCEFILES}
	here=`cd .. && pwd` ; cd ${srcdir} && $(ETAGS) -o $$here/TAGS --append ${HEADERFILES} ${SOURCEFILES}
# --------------------------------------------------------------------------
#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)

# Use make all-programs to test building all example programs
all-programs: cpi $(EXTRA_PROGRAMS) 

FORCE_TARGET:

