Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b96b0d782c858619536ab397b702cc7e > files > 75

mpich2-doc-1.0.8-2mdv2010.0.i586.rpm


##### User configurable options #####

MAKE                 = make --no-print-directory

MPI_CC               = /usr/bin/mpicc
MPI_F77              = /usr/bin/mpif77
MPI_CLINKER          = $(MPI_CC)
MPI_FLINKER          = $(MPI_F77)
MPE_CLINKER          = /usr/bin/mpicc -mpe=
MPE_FLINKER          = /usr/bin/mpif77 -mpe=
#
DEBUG_LIBS           = 
MPI_CFLAGS           = -O2
MPI_FFLAGS           = -O2
MPI_LIBS             = 
CFLAGS               = -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -O2
FFLAGS               = -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -O2
MPE_INCDIR           = /usr/include
MPE_LIBDIR           = /usr/lib
MPE_SBINDIR          = /usr/sbin
ANIM_LIBS            = -L$(MPE_LIBDIR) -lampe -lmpe -L/usr/lib -lX11 $(MPI_LIBS)
C_XGRAPH_LIBS        = -L$(MPE_LIBDIR) -lmpe -L/usr/lib -lX11 $(MPI_LIBS)
F_XGRAPH_LIBS        = -L$(MPE_LIBDIR) -lmpe -L/usr/lib -lX11 $(MPI_LIBS)
#
C_INCS               = -I$(MPE_INCDIR)
F_INCS               = -I$(MPE_INCDIR)
LDFLAGS              =  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro
MPE_BUILD_FORTRAN2C  = yes

### End User configurable options ###

SHELL         = /bin/sh
RM            = rm 

VPATH=.:$(srcdir)

srcdir        = .

# MPE include path, x_INCS, goes in front of MPI include path, MPI_xFLAGS,
# in case MPI include path is in MPI_xFLAGS containing old MPE include path.
MPICC_FLAGS   = $(C_INCS) $(MPI_CFLAGS) $(MPE_COPTS)
MPIFC_FLAGS   = $(F_INCS) $(MPI_FFLAGS) $(MPE_FOPTS)
MPICC_LDFLAGS = $(LDFLAGS) $(MPI_CFLAGS) $(MPE_LDOPTS)
MPIFC_LDFLAGS = $(LDFLAGS) $(MPI_FFLAGS) $(MPE_LDOPTS)
EXECS         = cpi_anim cxgraphics

.SUFFIXES: .c .f .o 

.c.o:
	$(MPI_CC) $(MPICC_FLAGS) -c $<
.f.o:
	$(MPI_F77) $(MPIFC_FLAGS) -c $<

default: $(EXECS)
	-if [ "$(MPE_BUILD_FORTRAN2C)" = "yes" ] ; then \
	     $(MAKE) fxgraphics ; \
	 fi

cpi_anim: cpi.o
	$(MPE_CLINKER)mpianim $(MPICC_LDFLAGS) -o $@ $? $(DEBUG_LIBS) -lm 
#	$(MPI_CLINKER) $(MPICC_LDFLAGS) -o $@ $? $(ANIM_LIBS) $(DEBUG_LIBS) -lm 

cxgraphics: cxgraphics.o
	$(MPE_CLINKER)graphics $(MPICC_LDFLAGS) -o $@ $? $(DEBUG_LIBS) -lm
#	$(MPI_CLINKER) $(MPICC_LDFLAGS) -o $@ $? $(C_XGRAPH_LIBS) $(DEBUG_LIBS) -lm

fxgraphics: fxgraphics.o
	$(MPE_FLINKER)graphics $(MPIFC_LDFLAGS) -o $@ $? $(DEBUG_LIBS) -lm
#	$(MPI_FLINKER) $(MPIFC_LDFLAGS) -o $@ $? $(F_XGRAPH_LIBS) $(DEBUG_LIBS) -lm

linktest: linktest_C

linktest_C: 
	@-$(MPE_SBINDIR)/mpetestlink cpi_anim \
	  "*** Link C program with the MPI animation library ........................"
	@-$(MPE_SBINDIR)/mpetestlink cxgraphics \
	  "*** Link C program with the X11 graphics library ........................."
	@-echo ; $(MAKE) clean

linktest_F77: 
	@-if [ "$(MPE_BUILD_FORTRAN2C)" = "yes" ] ; then \
	      $(MPE_SBINDIR)/mpetestlink fxgraphics \
	      "*** Link F77 program with the X11 graphics library ......................." ; \
	      $(MAKE) clean ; \
	      echo ; \
	  fi

runtest_C: 
	@-$(MPE_SBINDIR)/mpetestexec cpi_anim \
	  "*** Test C program with the MPI animation library ........................"
	@-$(MPE_SBINDIR)/mpetestexec cxgraphics \
	  "*** Test C program with the X11 graphics library ........................."
	@-echo ; $(MAKE) clean

runtest_F77: 
	@-if [ "$(MPE_BUILD_FORTRAN2C)" = "yes" ] ; then \
	      $(MPE_SBINDIR)/mpetestexec fxgraphics \
	      "*** Test F77 program with the X11 graphics library ......................." ; \
	      $(MAKE) clean ; \
	      echo ; \
	  fi

clean:
	@-$(RM) -f work.pc work.pcl
	@-$(RM) -f *.o *~ PI* $(EXECS)
	@-$(RM) -f cpi_anim cxgraphics fxgraphics

distclean: clean
	@-$(RM) -f Makefile