##
# Copyright 1998-1999, University of Notre Dame.
# Authors: Jeffrey M. Squyres, Kinis L. Meyer, with M. D. McNally 
#          and Andrew Lumsdaine
#
# This file is part of the Notre Dame LAM implementation of MPI.
#
# You should have received a copy of the License Agreement for the
# Notre Dame LAM implementation of MPI along with the software; see
# the file LICENSE.  If not, contact Office of Research, University of
# Notre Dame, Notre Dame, IN 46556.
#
# Permission to modify the code and to distribute modified code is
# granted, provided the text of this NOTICE is retained, a notice that
# the code was modified is included with the above COPYRIGHT NOTICE and
# with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
# file is distributed with the modified code.
#
# LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
# By way of example, but not limitation, Licensor MAKES NO
# REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
# PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
# OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
# OR OTHER RIGHTS.
#
# Additional copyrights may follow.
#
##	Ohio Trollius
##	Copyright 1997 The Ohio State University
##
##	$Id: Makefile,v 6.8 1999/07/26 03:00:07 jsquyres Exp $
##
##	Function:	- libpmpi
##			- MPI profiling library
##

DEPTH	= ../../..

##
## global configuration
##
include $(DEPTH)/config.mk

##
## local configuration
##
VPATH	=
INCLUDE	= -I$(IDIR)
DEFS	= -DMPI_GER=$(MPI_GER) -DLAM_PROFILELIB
LCFLAGS = $(INCLUDE) $(DEFS) $(SOFLAGS) $(RPIFLAGS)

##
## modules and libraries
##
LIBNAME	= libpmpi
MAJOR	= 1
MINOR	= 0

CSRC	= abort.c accept.c address.c allgather.c allgatherv.c allreduce.c \
	  alltoall.c alltoallv.c attrdel.c attrget.c attrput.c \
	  barrier.c bcast.c bsend.c bsendinit.c bufattach.c bufdetach.c \
	  cancel.c cartcoords.c cartcreate.c cartdimget.c cartget.c \
	  cartmap.c cartrank.c cartshift.c cartsub.c ccmp.c ccreate.c \
	  cdisconnect.c cdup.c cfree.c cgroup.c connect.c crank.c crgroup.c \
	  crsize.c csize.c csplit.c ctestinter.c \
	  dimscreate.c \
	  errclass.c errcreate.c errfree.c errget.c errset.c errstring.c \
	  finalize.c \
	  gather.c gatherv.c gcmp.c gdiff.c getcount.c getelem.c \
	  getprocname.c getversion.c gexcl.c gfree.c gincl.c ginter.c grank.c \
	  graphcreate.c graphdimsget.c graphget.c graphmap.c graphnbr.c \
	  graphnbrcount.c grexcl.c grincl.c gsize.c gtranks.c gunion.c \
	  ibsend.c iccreate.c icmerge.c infocreate.c infodel.c infodup.c \
	  infofree.c infoget.c infogetnkeys.c infogetnth.c infogetvlen.c \
	  infoset.c init.c inited.c iprobe.c irecv.c irsend.c isend.c issend.c \
	  keycreate.c keyfree.c \
	  mpil_spawn.c \
	  namelook.c namepub.c nameunpub.c \
	  opcreate.c opfree.c \
	  pack.c packsize.c pcontrol.c portclose.c portopen.c probe.c \
	  recv.c recvinit.c reduce.c reducescatter.c reqfree.c rsend.c \
	  rsendinit.c \
	  scan.c scatter.c scatterv.c send.c sendinit.c sendrecv.c \
	  sendrecvrep.c spawn.c spawnmult.c ssend.c ssendinit.c start.c \
	  startall.c \
	  tcommit.c tcontig.c tdup.c test.c testall.c testany.c \
	  testcancel.c testsome.c textent.c tfree.c tgetconts.c tgetenvl.c \
	  thindex.c thvector.c tindex.c tlb.c topotest.c tresize.c tsize.c \
	  tstruct.c tub.c tvector.c \
	  unpack.c \
	  wait.c waitall.c waitany.c waitsome.c wtick.c wtime.c \
	  tcreatekey.c tdelattr.c tgetattr.c tsetattr.c \
	  ccreatekey.c cdelattr.c cgetattr.c csetattr.c \
	  wcreatekey.c wdelattr.c wgetattr.c wsetattr.c \
	  wcreate.c wfree.c wfence.c put.c get.c wstart.c wpost.c wcomplete.c \
	  wgroup.c wwait.c tcreatestruct.c tcreatehindex.c tcreatehvector.c \
	  tsubarray.c tdarray.c getaddress.c cgetparent.c accumulate.c \
	  ccreateerr.c cgeterr.c cseterr.c wcreateerr.c wgeterr.c wseterr.c \
	  cfreekey.c tfreekey.c wfreekey.c tgetextent.c tgettrue.c \
	  cgetname.c csetname.c tgetname.c tsetname.c wgetname.c wsetname.c

F77SRC	= abort_f.c accept_f.c address_f.c allgather_f.c allgatherv_f.c \
	  allreduce_f.c alltoall_f.c alltoallv_f.c attrdel_f.c attrget_f.c \
	  attrput_f.c \
	  barrier_f.c bcast_f.c bsend_f.c bsendinit_f.c \
	  bufattach_f.c bufdetach_f.c \
	  cancel_f.c cartcoords_f.c cartcreate_f.c cartdimget_f.c cartget_f.c \
	  cartmap_f.c cartrank_f.c cartshift_f.c cartsub_f.c ccmp_f.c \
	  ccreate_f.c cdisconnect_f.c cdup_f.c cfree_f.c \
	  cgroup_f.c connect_f.c crank_f.c crgroup_f.c crsize_f.c csize_f.c \
	  csplit_f.c ctestinter_f.c \
	  dimscreate_f.c dupfn_f.c \
	  errclass_f.c errcreate_f.c errfree_f.c errget_f.c errset_f.c \
	  errstring_f.c \
	  finalize_f.c \
	  gather_f.c gatherv_f.c gcmp_f.c gdiff_f.c getcount_f.c \
	  getelem_f.c getprocname_f.c getversion_f.c \
	  gexcl_f.c gfree_f.c gincl_f.c ginter_f.c \
	  grank_f.c graphcreate_f.c graphdimsget_f.c graphget_f.c graphmap_f.c \
	  graphnbr_f.c graphnbrcount_f.c grexcl_f.c grincl_f.c gsize_f.c \
	  gtranks_f.c gunion_f.c \
	  ibsend_f.c iccreate_f.c icmerge_f.c infocreate_f.c infodel_f.c \
	  infodup_f.c infofree_f.c infoget_f.c infogetnkeys_f.c \
	  infogetnth_f.c infogetvlen_f.c infoset_f.c init_f.c inited_f.c \
	  iprobe_f.c irecv_f.c irsend_f.c isend_f.c issend_f.c \
	  keycreate_f.c keyfree_f.c \
	  mpil_spawn_f.c \
	  namelook_f.c namepub_f.c nameunpub_f.c \
	  opcreate_f.c opfree_f.c \
	  pack_f.c packsize_f.c pcontrol_f.c portclose_f.c portopen_f.c \
	  probe_f.c \
	  recv_f.c recvinit_f.c reduce_f.c reducescatter_f.c reqfree_f.c \
	  rsend_f.c rsendinit_f.c \
	  scan_f.c scatter_f.c scatterv_f.c send_f.c sendinit_f.c \
	  sendrecv_f.c sendrecvrep_f.c spawn_f.c spawnmult_f.c ssend_f.c \
	  ssendinit_f.c start_f.c startall_f.c \
	  tcommit_f.c tcontig_f.c tdup_f.c test_f.c testall_f.c testany_f.c \
	  testcancel_f.c testsome_f.c textent_f.c tfree_f.c thindex_f.c \
	  thvector_f.c tindex_f.c tlb_f.c topotest_f.c tresize_f.c tsize_f.c \
	  tstruct_f.c tub_f.c tvector_f.c \
	  unpack_f.c \
	  wait_f.c waitall_f.c waitany_f.c waitsome_f.c \
	  wtick_f.c wtime_f.c \
	  tcreatekey_f.c tdelattr_f.c tgetattr_f.c tsetattr_f.c \
	  ccreatekey_f.c cdelattr_f.c cgetattr_f.c csetattr_f.c \
	  wcreatekey_f.c wdelattr_f.c wgetattr_f.c wsetattr_f.c \
	  wcreate_f.c wfree_f.c wfence_f.c put_f.c get_f.c wstart_f.c \
	  wpost_f.c wcomplete_f.c wgroup_f.c wwait_f.c tcreatestruct_f.c \
	  tcreatehindex_f.c tcreatehvector_f.c tsubarray_f.c tdarray_f.c \
	  getaddress_f.c cgetparent_f.c accumulate_f.c \
	  ccreateerr_f.c cgeterr_f.c cseterr_f.c wcreateerr_f.c wgeterr_f.c \
	  wseterr_f.c cfreekey_f.c tfreekey_f.c wfreekey_f.c \
	  tgetextent_f.c tgettrue_f.c cgetname_f.c csetname_f.c tgetname_f.c \
	  tsetname_f.c wgetname_f.c wsetname_f.c


SRC	= $(CSRC) $(F77SRC)

OBJ 	= $(CSRC:.c=.o) $(F77SRC:.c=.o)

OBJ 	= $(SRC:.c=.o)

all: $(LIB)

$(LIB): $(OBJ)
	$(MAKELIB)

install: $(OLDIR)/$(LIB)

$(OLDIR)/$(LIB): $(LIB)
	$(INSTALL) -c -m $(FILE_PERMS) $(LIB) $(OLDIR)
	$(RANSYMLIB)

clean:
	$(RM) $(OBJ) $(LIB)

##
## dependencies and rules
##
include Depends
