###############################################################################
#
#  Copyright (C) 1994 A. Bode, J. Pruyne and G. Stellner
#
#  This file is part of CoCheck
#
#  CoCheck is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Library General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  CoChecl is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Library General Public License for more details.
#
#  You should have received a copy of the GNU Library General Public
#  License along with this library; if not, write to the Free
#  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#  Contact to the authors:
#
#  electronic mail: {bode,stellner}@informatik.tu-muenchen.de
#
#  paper mail:      Prof. Dr. A. Bode
#                   Lehrstuhl f"ur Rechnertechnik und Rechnerorganisation
#                   Institut f"ur Informatik
#                   Technische Universit"at M"unchen
#                   80290 M"unchen
#                   Germany
#
###############################################################################
#
# Makefile,v
# 1995/11/07 13:50:55
# 1.4
# Exp
# stellner
#
# Authors: G. Stellner
#
# Description:
#
# Makefile.aimk for lib
#
###############################################################################
#
# rcs_id: "Makefile,v 1.4 1995/11/07 13:50:55 stellner Exp"
#

###############################################################################
# DO NOT MODIFY THIS FILE
###############################################################################

# Imports:
#  PVM_ARCH   = the official pvm-name of your processor
#  ARCHCFLAGS = special cc flags
#  HASRANLIB  = 't' or 'f'
#
# Compatibility defines (usually in conf/*.def):
#  FDSETPATCH      if system includes don't have fd_set stuff
#  HASSTDLIB       if system has stdlib.h
#  NOGETDTBLSIZ    if system doesn't have getdtablesize()
#  NOREXEC         if system doesn't have rexec()
#  NOSOCKOPT       if system doesn't have setsockopt() or it doesn't work
#  NOSTRCASE       if system doesn't have strcasecmp, strncasecmp
#  NOTMPNAM        if system doesn't have tmpnam() or it's hosed
#  NOUNIXDOM       to disable use of Unix domain sockets
#  NOWAIT3         if system doesn't have wait3()
#  NOWAITPID       if system doesn't have waitpid() either
#  RSHCOMMAND=     for rsh command other than "/usr/ucb/rsh"
#  SHAREDTMP       if /tmp is shared between machines (yecch)
#  SOCKADHASLEN    if struct sockaddr has an sa_len field
#  SYSVBFUNC       if system uses memcpy() instead of bcopy(), etc.
#  SYSVSIGNAL      if system has sysV signal handling
#  SYSVSTR         if system uses strchr() instead of index()
#  UDPMAXLEN=      for alternate max udp packet size
#
# Options defines:
#  DEBUGMALLOC     to enable instrumented malloc functions (for debugging)

include      $(TOP)/config/COMMON.config
include      $(TOP)/config/$(PVM_ARCH).config

CFLAGS       = $(OPTIONS) \
		-I$(INCDIR) \
		-DIMA_$(PVM_ARCH) \
		$(ARCHCFLAGS) \
		$(ARCHCPPFLAGS)
RENSYM       =\
		pvm_addhosts PVM_addhosts \
		pvm_archcode PVM_archcode \
		pvm_bufinfo PVM_bufinfo \
		pvm_catchout PVM_catchout \
		pvm_config PVM_config \
		pvm_delete PVM_delete \
		pvm_delhosts PVM_delhosts \
		pvm_exit PVM_exit \
		pvm_freebuf PVM_freebuf \
		pvm_getfds PVM_getfds \
		pvm_getmwid PVM_getmwid \
		pvm_getopt PVM_getopt \
		pvm_getrbuf PVM_getrbuf \
		pvm_getsbuf PVM_getsbuf \
		pvm_gettmask PVM_gettmask \
		pvm_halt PVM_halt \
		pvm_hostsync PVM_hostsync \
		pvm_initsend PVM_initsend \
		pvm_insert PVM_insert \
		pvm_kill PVM_kill \
		pvm_lookup PVM_lookup \
		pvm_mcast PVM_mcast \
		pvm_mkbuf PVM_mkbuf \
		pvm_mstat PVM_mstat \
		pvm_mytid PVM_mytid \
		pvm_notify PVM_notify \
		pvm_nrecv PVM_nrecv \
		pvm_parent PVM_parent \
		pvm_packf PVM_packf \
		pvm_perror PVM_perror \
		pvm_perror PVM_perror \
		pvm_pkbyte PVM_pkbyte \
		pvm_pkcplx PVM_pkcplx \
		pvm_pkdcplx PVM_pkdcplx \
		pvm_pkdouble PVM_pkdouble \
		pvm_pkfloat PVM_pkfloat \
		pvm_pkint PVM_pkint \
		pvm_pklong PVM_pklong \
		pvm_pkshort PVM_pkshort \
		pvm_pkstr PVM_pkstr \
		pvm_pkuint PVM_pkuint \
		pvm_pkulong PVM_pkulong \
		pvm_pkushort PVM_pkushort \
		pvm_precv PVM_precv \
		pvm_probe PVM_probe \
		pvm_psend PVM_psend \
		pvm_start_pvmd PVM_start_pvmd \
		pvm_pstat PVM_pstat \
		pvm_recv PVM_recv \
		pvm_recvf PVM_recvf \
		pvm_reg_hoster PVM_reg_hoster \
		pvm_reg_rm PVM_reg_rm \
		pvm_reg_tasker PVM_reg_tasker \
		pvm_send PVM_send\
		pvm_sendsig PVM_sendsig \
		pvm_setmwid PVM_setmwid \
		pvm_setopt PVM_setopt \
		pvm_setrbuf PVM_setrbuf \
		pvm_setsbuf PVM_setsbuf \
		pvm_spawn PVM_spawn \
		pvm_start_pvmd PVM_start_pvmd \
		pvm_tasks PVM_tasks \
		pvm_tickle PVM_tickle \
		pvm_tidtohost PVM_tidtohost \
		pvm_trecv PVM_trecv \
		pvm_unpackf PVM_unpackf \
		pvm_upkbyte PVM_upkbyte \
		pvm_upkcplx PVM_upkcplx \
		pvm_upkdcplx PVM_upkdcplx \
		pvm_upkdouble PVM_upkdouble \
		pvm_upkfloat PVM_upkfloat \
		pvm_upkint PVM_upkint \
		pvm_upklong PVM_upklong \
		pvm_upkshort PVM_upkshort \
		pvm_upkstr PVM_upkstr \
		pvm_upkuint PVM_upkuint \
		pvm_upkulong PVM_upkulong \
		pvm_upkushort PVM_upkushort \
		pvm_version PVM_version

RENFSYM      =\
		pvmfrecv PVMfrecv \
		pvmfsend PVMfsend
RENGSYM      =\
		pvm_barrier PVM_barrier \
		pvm_bcast PVM_bcast \
		pvm_gather PVM_gather \
		pvm_getinst PVM_getinst \
		pvm_gettid PVM_gettid \
		pvm_gsize PVM_gsize \
		pvm_joingroup PVM_joingroup \
		pvm_lvgroup PVM_lvgroup \
		pvm_reduce PVM_reduce \
		pvm_scatter PVM_scatter

all: $(PVMLIBDIR) $(LIBKOJAKPVM) $(LIBKOJAKFPVM) $(LIBKOJAKGPVM)

$(LIBKOJAKPVM): $(LIBPVM)
	cp $(LIBPVM) $(LIBKOJAKPVM)
	$(BINDIR)/rensym $(LIBKOJAKPVM) $(RENSYM)
	case x$(HASRANLIB) in xt ) echo ranlib $(LIBKOJAKPVM);\
		 ranlib $(LIBKOJAKPVM) ;; esac

$(LIBKOJAKFPVM): $(LIBFPVM)
	cp $(LIBFPVM) $(LIBKOJAKFPVM)
	case x$(HASRANLIB) in xt ) echo ranlib$(LIBKOJAKFPVM);\
		 ranlib $(LIBKOJAKFPVM) ;; esac

$(LIBKOJAKGPVM): $(LIBGPVM)
	cp $(LIBGPVM) $(LIBKOJAKGPVM)
	$(BINDIR)/rensym $(LIBKOJAKGPVM) $(RENGSYM)
	case x$(HASRANLIB) in xt ) echo ranlib $(LIBKOJAKGPVM);\
		 ranlib $(LIBKOJAKGPVM) ;; esac

$(PVMLIBDIR):
	echo "Install PVM in $(PVMLIBDIR) first"
	[ -f $@ ]

realclean:
	- rm -rf $(PVM_ARCH)

