# Generated automatically from Makefile.in by configure.
#
#  (C) 1993 by Argonne National Laboratory and Mississipi State University.
#      All rights reserved.  See COPYRIGHT in top-level directory.
#

CC          = cc
F77         = g77
AR          = ar crl
RANLIB      = ranlib
OPTFLAGS    = -O2
OPTFLAGSC   = 
prefix      = /usr/rels/mpich-1.2..4pre2
top_srcdir  = /usr/rels/mpich-1.2..4pre2
srcdir      = /usr/rels/mpich-1.2..4pre2/src/topol
libbuild_dir = /usr/rels/mpich-1.2..4pre2/lib

DEFS        = -DHAVE_CONFIG_H ${MPIPROFILE} -I. -I${srcdir} -I/usr/rels/mpich-1.2..4pre2/include -I/usr/rels/mpich-1.2..4pre2/include -I/usr/rels/mpich-1.2..4pre2/mpid/ch_gm
CFLAGS      =  -I/GM/binary/include -I/GM/include -DGM_DEV -DFORTRANDOUBLEUNDERSCORE -DHAVE_MPICHCONF_H 

SHELL       = /bin/sh

VPATH=.:$(srcdir)

.SUFFIXES:
.SUFFIXES: .o .c .f

LIBS = ${libbuild_dir}/libmpich.a
MPI_CSOURCES = topo_test.c graphdimsget.c graph_get.c cartdim_get.c \
              cart_get.c dims_create.c cart_map.c graph_map.c cart_create.c \
              graphcreate.c cart_rank.c cart_coords.c graphnbrcnt.c \
              graph_nbr.c cart_shift.c cart_sub.c topo_util.c

# wrappers for routines with Fortran LOGICAL type being made by hand
MPI_TSOURCES =  

MPI_COBJECTS = topo_test.o graphdimsget.o graph_get.o cartdim_get.o \
              cart_get.o dims_create.o cart_map.o graph_map.o cart_create.o \
              graphcreate.o cart_rank.o cart_coords.o graphnbrcnt.o \
              graph_nbr.o cart_shift.o cart_sub.o topo_util.o

MPI_WSOURCES = topo_testf.c graphdimsgtf.c graph_getf.c cartdim_getf.c \
              cart_getf.c dims_createf.c cart_mapf.c graph_mapf.c \
              cart_createf.c \
              graphcreatef.c cart_rankf.c cart_coordsf.c graphnbrcntf.c \
              graph_nbrf.c cart_shiftf.c cart_subf.c

MPI_WOBJECTS = topo_testf.o graphdimsgtf.o graph_getf.o cartdim_getf.o \
              cart_getf.o dims_createf.o cart_mapf.o graph_mapf.o \
              cart_createf.o \
              graphcreatef.o cart_rankf.o cart_coordsf.o graphnbrcntf.o \
              graph_nbrf.o cart_shiftf.o cart_subf.o

default: ${libbuild_dir}/libmpich.a

profile: ${libbuild_dir}/libpmpich.a

MPI_SOURCES = ${MPI_CSOURCES} ${MPI_WSOURCES}
MPI_OBJECTS = ${MPI_COBJECTS} ${MPI_WOBJECTS}

# default_all is the same as default, but without the RANLIB.  This
# can speed up the build (ranlibs can take a LONG time).  profile_all 
# is the same, but for the profile library
default_all: ${MPI_OBJECTS}
	${AR} ${libbuild_dir}/libmpich.a $?
profile_all: ${MPI_OBJECTS}
	${AR} ${libbuild_dir}/libpmpich.a $?
wrapperlib: ${MPI_WOBJECTS}
	${AR} ${libbuild_dir}/libfmpich.a $?	

source_names:
	@echo ${MPI_CSOURCES}

.c.o:
	${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTFLAGSC} ${OPTFLAGS} -c $<

${libbuild_dir}/libmpich.a: ${MPI_OBJECTS} 
	-${AR} $@ $?
	${RANLIB} $@

${libbuild_dir}/libpmpich.a: ${MPI_OBJECTS} 
	-${AR} $@ $?
	${RANLIB} $@

# We need to clean the srcdir of any .o files because they can confuse the
# VPATH build process
clean:
	/bin/rm -f *.o *~ ${srcdir}/*.o
