# Generated automatically from Makefile.in by configure.
# File         : Makefile
# Author       : Sung-Hoon Ko, Xinying Li
# Created      : Thu Apr 1998
# Revision     : ver 1.1
# Updated      : $Date: 1999/05/06 15:57:48 $
# Copyright: Northeast Parallel Architectures Center at Syracuse University 1998

SHELL       = /bin/sh


srcdir = .
top_srcdir = ../..

VPATH = .:${srcdir}


CC = /HPS/repository/work/users/hitoshi/sun/local/mpich/bin/mpicc

JDK = /usr/java1.2

MPI_INC = /HPS/repository/work/users/hitoshi/sun/local/mpich/include
MPI_LIB = /HPS/repository/work/users/hitoshi/sun/local/mpich/lib

CCLIBKEY = -lmpich

INCLUDES = -I$(JDK)/include -I$(JDK)/include/solaris -I$(MPI_INC)

CLASSES = ../../lib/classes
LIB = ../../lib

TITLE = mpi
PFX = $(TITLE)_
PKG = $(TITLE).
DIR = $(TITLE)/

RM = rm
CP = cp
MV = mv

JC = $(JDK)/bin/javac
JH = $(JDK)/bin/javah
JFLAG = -jni
CFLAGS = -c

LD = /HPS/repository/work/users/hitoshi/sun/local/mpich/bin/mpicc
LDFLAG = -G
#LDFLAGS = -G # solaris native compiler and linker
#LDFLAGS = -shared #gnu compiler and linker ; irix


OBJ = $(PFX)MPI.o       $(PFX)Comm.o      \
      $(PFX)Op.o        $(PFX)Datatype.o  \
      $(PFX)Intracomm.o $(PFX)Intercomm.o \
      $(PFX)Cartcomm.o  $(PFX)Graphcomm.o \
      $(PFX)Group.o     $(PFX)Status.o    \
      $(PFX)Request.o   $(PFX)Prequest.o  \
      $(PFX)Errhandler.o

SRC = $(PFX)MPI.c       $(PFX)Comm.c      \
      $(PFX)Op.c        $(PFX)Datatype.c  \
      $(PFX)Intracomm.c $(PFX)Intercomm.c \
      $(PFX)Cartcomm.c  $(PFX)Graphcomm.c \
      $(PFX)Group.c     $(PFX)Status.c    \
      $(PFX)Request.c   $(PFX)Prequest.c  \
      $(PFX)Errhandler.c


all:: $(LIB)/lib$(TITLE).so 



$(LIB)/lib$(TITLE).so : $(OBJ)
	  $(LD) $(LDFLAG) -o $(LIB)/libmpijava.so \
                -L$(MPI_LIB) $(OBJ) $(CCLIBKEY); 



.SUFFIXES:
.SUFFIXES: .c .C .o

.C.o:
	$(CXX) -c $(INCLUDES)  -o $@ $*.C

.c.o:
	$(CC) -c $(INCLUDES)  -o $@ $*.c

IDlist.h: $(SRC)
	cat $(SRC) | egrep 'DECLARE_(CLASS|FIELD_ID|METHOD_ID)' | sort | uniq > IDlist.h

$(PFX)MPI.o :        $(PFX)MPI.c $(PFX)MPI.h IDlist.h
$(PFX)Comm.o :       $(PFX)Comm.c $(PFX)Comm.h
$(PFX)Intercomm.o :  $(PFX)Intercomm.c $(PFX)Intercomm.h
$(PFX)Intracomm.o :  $(PFX)Intracomm.c $(PFX)Intracomm.h
$(PFX)Status.o :     $(PFX)Status.c $(PFX)Status.h
$(PFX)Op.o :         $(PFX)Op.c $(PFX)Op.h
$(PFX)Request.o :    $(PFX)Request.c $(PFX)Request.h
$(PFX)Prequest.o :   $(PFX)Prequest.c $(PFX)Prequest.h
$(PFX)Datatype.o :   $(PFX)Datatype.c $(PFX)Datatype.h
$(PFX)Cartcomm.o :   $(PFX)Cartcomm.c $(PFX)Cartcomm.h
$(PFX)Graphcomm.o :  $(PFX)Graphcomm.c $(PFX)Graphcomm.h
$(PFX)Group.o :      $(PFX)Group.c $(PFX)Group.h
$(PFX)Errhandler.o : $(PFX)Errhandler.c $(PFX)Errhandler.h

clean :
	$(RM) -f $(PFX)*.h
	$(RM) -f *.o 
	$(RM) -f $(LIB)/lib*.so

