1ALL: default
2
3# This is a special Makefile.in source for use by the test suite (see the
4# configure in examples/test)
5##### User configurable options #####
6
7MPIR_HOME    = @MPIR_HOME@
8CC           = @MPICC@
9CLINKER      = @MPICC@
10CCC          = @MPICPLUSPLUS@
11CCLINKER     = $(CCC)
12F77          = @MPIF77@
13F90BASE	     = @MPIF90BASE@
14F90          = @MPIF90@
15FLINKER      = @MPIF77@
16OPTFLAGS     = @OPTFLAGS@
17MPIFDEP      = @MPIFDEP@
18### End User configurable options ###
19
20SHELL = /bin/sh
21prefix     = @prefix@
22top_srcdir = @top_srcdir@
23srcdir     = @srcdir@
24@VPATH@
25
26PROFLIB =
27CFLAGS  = @CFLAGS@ @DEFS@ $(OPTFLAGS)
28CCFLAGS = $(CFLAGS)
29FFLAGS = $(OPTFLAGS) @FFLAGS@
30# Use LIBS to add any special libraries for C programs
31LIBS = @LIB_PATH@ @LIB_LIST@
32# Use FLIBS to add any special libraries for Fortran programs
33FLIBS = @FLIB_PATH@ @LIB_LIST@ @F77EXTRALIBS@
34EXECS = $(CTESTS) $(FTESTS)
35OTHEREXECS =
36CTESTS = simple perf async coll_test coll_perf misc file_info excl \
37       large_array \
38     atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \
39     large_file psimple error status noncontig_coll2
40FTESTS = fcoll_test fperf fmisc pfcoll_test
41
42default: $(EXECS)
43
44#
45# Note that runtests builds the executables as required
46testing:
47	  -./runtests $(TESTARGS)
48
49all: testing
50
51fortran_tests: $(FTESTS)
52#
53# The Fortran tests must be built with the Fortran linker
54fperf: fperf.f
55	$(F77) $(USER_FFLAGS) -o  $@ $< $(FLIBS)
56
57# Some of the Fortran tests must be derived, so their code will be in the
58# LOCAL directory
59fcoll_test: fcoll_test.f
60	$(F77) $(USER_FFLAGS) -o  fcoll_test fcoll_test.f $(FLIBS)
61
62fmisc: fmisc.f
63	$(F77) $(USER_FFLAGS) -o  fmisc fmisc.f $(FLIBS)
64
65pfcoll_test: pfcoll_test.f
66	$(F77) $(USER_FFLAGS) -o  pfcoll_test pfcoll_test.f $(FLIBS)
67
68#
69# Make sure that we remove executables for specific architectures
70clean:
71	@-rm -f *.o *~ PI* $(EXECS) *.out core pt2pt.diff $(OTHEREXECS) \
72		*.trace rdb.* startup.* mpif.h ${srcdir}/*.o *.stdo
73	@-rm -f work.pc work.pcl
74	@-for file in $(EXECS) Makefile ; do \
75	   rm -f $$file.sun4 $$file.alpha $$file.IRIX $$file.freebsd ;\
76	done
77.c:
78	$(CC) $(CFLAGS) -o $* $< $(LIBS)
79.c.o:
80	$(CC) $(CFLAGS) -c $<
81.o:
82	${CLINKER} $(OPTFLAGS) -o $* $*.o $(LIBS)
83.f.o:
84	$(F77) $(FFLAGS) -c $<
85