# Generated automatically from Makefile.in by configure.
#
# This file is a Makefile for tkpvm.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
# @(#) Makefile.in 1.25 95/03/24 09:38:39

# Current tkpvm version;  used in various names.

VERSION  = 1.1

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix =	/usr/local
exec_prefix =	/usr/local

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =

# Directory from which applications will reference the library of Tcl
# scripts (note: you can set the PVM_LIBRARY environment variable at
# run-time to override the compiled-in location):
PVM_LIBRARY =	$(prefix)/lib/tkpvm${VERSION}

# Path name to use when installing library scripts:
EXAMPLE_INSTALL_DIR =	$(INSTALL_ROOT)$(PVM_LIBRARY)/examples

# Directory in which to install the archive libPvm1.0.a and libPvm1.0.so:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib

# Directory in which to install the pvmsh and pvmwish:
BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin

TOP_DIR =		/other/ergolab4/users/nijtmans/tcl/tkpvm1.1
BUILD_DIR =		/other/ergolab4/users/nijtmans/tcl/tkpvm1.1/irix

# Directory in which to install the include file tkpvm.h:
INCLUDE_DIR =	$(INSTALL_ROOT)$(prefix)/include

# The directory containing the Tcl sources and headers appropriate
# for this version of Tkpvm
TK_INC =	-I$(INSTALL_ROOT)$(prefix)/include

# The directory containing the Tcl library archive file appropriate
# for this version of Tkpvm:
TK_BIN_DIR =	/other/ergolab4/users/nijtmans/tcl/tk4.2/irix

TK_LIB_DIR =	/other/ergolab4/users/nijtmans/tcl/tk4.2/irix

TK_LIB_SPEC = -L/other/ergolab4/users/nijtmans/tcl/tk4.2/irix -ltk4.2 -lX11 ${TCL_LIB_SPEC}

# 
PVM_BIN_DIR = /other/ergolab4/users/nijtmans/tcl/tkpvm1.1/pvm3/lib/${PVM_ARCH}

# A "-I" switch that can be used when compiling to make all of the
# PVM include files accessible (the configure script will try to
# set this value, and will cause it to be an empty string if the
# include files are accessible via /usr/include).
PVM_INC =	# no include files found
PVM_ROOT =	
PVM_ARCH =	

TKPVM_SEARCH_FLAGS = -Wl,-rpath,${LIB_RUNTIME_DIR}:${PVM_ROOT}/lib/${PVM_ARCH}:${BUILD_DIR}:${PVM_BIN_DIR}

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = 
CXXFLAGS = 

# To disable ANSI-C procedure prototypes reverse the comment characters
# on the following lines:
PROTO_FLAGS =
#PROTO_FLAGS = -DNO_PROTOTYPE

# To enable memory debugging reverse the comment characters on the following
# lines.  Warning:  if you enable memory debugging, you must do it
# *everywhere*, including all the code that calls Tcl, and you must use
# ckalloc and ckfree everywhere instead of malloc and free.
MEM_DEBUG_FLAGS =
#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =		/bin/sh

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

AC_FLAGS =		 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 
INSTALL =		../../../../unix/install-sh -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA =		${INSTALL} -m 644
RANLIB =		:
LN_S =			ln -s
NM =			/usr/ucb/nm
SRC_DIR =		../../../../unix/../examples/
EXAMPLE_DIR = 		$(TOP_DIR)/examples
DOC_DIR = 		$(TOP_DIR)/doc
PVM3_DIR =		$(TOP_DIR)/pvm3
UNIX_DIR = 		../../../../unix/../examples/
VPATH =			../../../../unix/../examples/

# Composite list of include files
INCS = ${PVM_INC}

LIBS = -Wl,-rpath,${LIB_RUNTIME_DIR}:${PVM_ROOT}/lib/${PVM_ARCH}:${BUILD_DIR}:${PVM_BIN_DIR} -L${PVM_BIN_DIR} -lgpvm3 -L${PVM_BIN_DIR} -lpvm3   -lm

STATIC_LIBS = ${PVM_BIN_DIR}/libgpvm3.a ${PVM_BIN_DIR}/libpvm3.a   -lm

INSTALL_LIBS = -L${PVM_ROOT}/lib/${PVM_ARCH} -lgpvm3 -L${PVM_ROOT}/lib/${PVM_ARCH} -lpvm3   -lm

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------


CC =		cc
CXX =		CC
CC_SWITCHES =	${CFLAGS} ${INCS} ${AC_FLAGS} ${PROTO_FLAGS}

CXX_SWITCHES =	${CXXFLAGS} ${INCS} ${AC_FLAGS} ${PROTO_FLAGS}

EXECUTABLES = hello hello_other master1 slave1 pvmdemo

STATIC_EXECUTABLES = hello.static hello_other.static master1.static \
	slave1.static pvmdemo.static

all: ${EXECUTABLES}

static: ${STATIC_EXECUTABLES}

hello: ${EXAMPLE_DIR}/hello.c
	$(CC) -o hello ${CC_SWITCHES} ${EXAMPLE_DIR}/hello.c ${LIBS}

hello.static: ${EXAMPLE_DIR}/hello.c
	$(CC) -o hello.static ${CC_SWITCHES} ${EXAMPLE_DIR}/hello.c ${STATIC_LIBS}

hello_other: ${EXAMPLE_DIR}/hello_other.c
	$(CC) -o hello_other ${CC_SWITCHES} ${EXAMPLE_DIR}/hello_other.c ${LIBS}

hello_other.static: ${EXAMPLE_DIR}/hello_other.c
	$(CC) -o hello_other.static ${CC_SWITCHES} ${EXAMPLE_DIR}/hello_other.c ${STATIC_LIBS}

master1: ${EXAMPLE_DIR}/master1.c
	$(CC) -o master1 ${CC_SWITCHES} ${EXAMPLE_DIR}/master1.c ${LIBS}

master1.static: ${EXAMPLE_DIR}/master1.c
	$(CC) -o master1.static ${CC_SWITCHES} ${EXAMPLE_DIR}/master1.c ${STATIC_LIBS}

slave1: ${EXAMPLE_DIR}/slave1.c
	$(CC) -o slave1 ${CC_SWITCHES} ${EXAMPLE_DIR}/slave1.c ${LIBS}

slave1.static: ${EXAMPLE_DIR}/slave1.c
	$(CC) -o slave1.static ${CC_SWITCHES} ${EXAMPLE_DIR}/slave1.c ${STATIC_LIBS}

pvmdemo: ${EXAMPLE_DIR}/pvmdemo.c
	$(CC) -o pvmdemo ${CC_SWITCHES} ${EXAMPLE_DIR}/pvmdemo.c ${LIBS}

pvmdemo.static: ${EXAMPLE_DIR}/pvmdemo.c
	$(CC) -o pvmdemo.static ${CC_SWITCHES} ${EXAMPLE_DIR}/pvmdemo.c ${STATIC_LIBS}


install:  ${EXECUTABLES}
	@for i in ${EXAMPLE_INSTALL_DIR} ${EXAMPLE_INSTALL_DIR}/src ${EXAMPLE_INSTALL_DIR}/${PVM_ARCH} ; do \
	    if [ ! -d $$i ] ; then \
			echo "Making directory $$i"; \
			mkdir $$i; \
			chmod 755 $$i; \
		else true; \
		fi; \
	done;
	@for i in ${EXECUTABLES} ; do \
	    echo "Installing $$i"; \
	    rm -f ${EXAMPLE_INSTALL_DIR}/src/$$i.c; \
	    cp ../$$i.c ${EXAMPLE_INSTALL_DIR}/src/$$i.c; \
	    rm -f ${EXAMPLE_INSTALL_DIR}/$$i; \
	    cp ../$$i ${EXAMPLE_INSTALL_DIR}; \
	    if test -f "../$$i.tcl" ; then \
		rm -f ${EXAMPLE_INSTALL_DIR}/$$i.tcl; \
		cp ../$$i.tcl ${EXAMPLE_INSTALL_DIR}; \
	    fi; \
	    if test "x-Wl,-rpath,${LIB_RUNTIME_DIR}:${PVM_ROOT}/lib/${PVM_ARCH}:${BUILD_DIR}:${PVM_BIN_DIR}" != "x" -o .so = "..o"; then \
		rm -f ${EXAMPLE_INSTALL_DIR}/${PVM_ARCH}/$$i; \
		cp $$i ${EXAMPLE_INSTALL_DIR}/${PVM_ARCH}; \
	    else \
		$(CC) -o ${EXAMPLE_INSTALL_DIR}/${PVM_ARCH}/$$i \
			${CC_SWITCHES} ${EXAMPLE_DIR}/$$i.c ${INSTALL_LIBS}; \
	    fi; \
	done;

clean:
	rm -f ${EXECUTABLES}

distclean: clean
	rm -f Makefile

depend:
	makedepend -- ${CC_SWITCHES} -- $(SRCS)


# DO NOT DELETE THIS LINE -- make depend depends on it.
