#OTHER_DIRS = f77 f90 cxx
# We want to replace the compilation and linking rule used by simplement
MPICHDIR=..
CC       = $(MPICHDIR)/bin/mpicc
CPPFLAGS = 
DEFS     = 
INCLUDES = -I../src/include -I${top_srcdir}/src/include

LDADD = -L../lib
DEPADD = ../lib/lib${MPILIBNAME}.a
LIBS += @EXAMPLE_LIBS@
# pmandel requires a separate set of socket calls (its a long story)
# and may not build on most platforms
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

# LIBS includes -lmpich and other libraries (e.g., -lpmpich if
# weak symbols are not supported)
hellow_SOURCES = hellow.c
srtest_SOURCES = srtest.c
child_SOURCES = child.c
parent_SOURCES = parent.c
cpi_SOURCES = cpi.c
cpi_LDADD = -lm
icpi_SOURCES = icpi.c
icpi_LDADD = -lm
pmandel_SOURCES = pmandel.c
pmandel_LDADD = -lm
pmandel_spawn_SOURCES = pmandel_spawn.c
pmandel_spawn_LDADD = -lm
pmandel_service_SOURCES = pmandel_service.c
pmandel_service_LDADD = -lm
pmandel_spaserv_SOURCES = pmandel_spaserv.c
pmandel_spaserv_LDADD = -lm
pmandel_fence_SOURCES = pmandel_fence.c
pmandel_fence_LDADD = -lm
spawn_merge_parent_SOURCES = spawn_merge_parent.c
spawn_merge_child1_SOURCES = spawn_merge_child1.c
spawn_merge_child2_SOURCES = spawn_merge_child2.c

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