#
#  $Id$
#
#  (C) 1993,1995 by Argonne National Laboratory and Mississipi State University.
#      All rights reserved.  See COPYRIGHT in top-level directory.
#
##### User configurable options #####

ARCH        = @ARCH@
COMM        = @COMM@
DEVICE      = @DEVICE@
MPIR_HOME   = @MPIR_HOME@
INCLUDE_DIR = @INCLUDE_PATH@ 
CC          = @CC@
AR          = @AR@
RANLIB      = @RANLIB@
OPTFLAGS    = @OPTFLAGS@
SHELL       = /bin/sh
ASMFILES_O  = @ASMFILES_O@
### End User configurable options ###

ALL: default

LIBNAME  = ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@.a
CFLAGS   = @CFLAGS@ $(OPTFLAGS) -I../.. -I../$(COMM) -I../ch2 \
	-I../../include -I./ 

SOURCE   = queue.c mperror.c cmnargs.c
SOURCEC  = $(SOURCE)
SOURCEF  =
MPI_OBJECTS = queue.o mperror.o cmnargs.o
queue.o: queue.h
cmnargs.o: cmnargs.h

default: ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@.a
local: ../$(COMM)/libmpid.a

# 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) ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@.a $?
profile_all: 

clean:
	/bin/rm -f *~ $(MPI_OBJECTS) 

.c.o:
	$(CC) $(CFLAGS) $(BASEOPT) -c $*.c $(MPI_PROFILE)

../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@.a: $(MPI_OBJECTS) 
	$(AR) $@ $?
	$(RANLIB) $@

../$(COMM)/libmpid.a: $(MPI_OBJECTS) 
	$(AR) $@ $?
	$(RANLIB) $@

