# $Id: Makefile,v 1.2 90/07/11 13:10:53 mbp Exp Locker: mbp $

# Master makefile for graphics part of Interface

####################################################################
# Configuration section

# PWD = complete pathname of the dir containing this makefile.  If you
# are using csh this should be set automatically by the shell.
# Otherwise, remove the comment char from the next line and append the
# complete pathname of this dir.
# PWD = 

# BINDIR = dir in which to install executable files. This is used by
# 'make install'.  If this def is left blank or commented out, the
# executables will be left in their source dirs.
BINDIR = $(PWD)/bin

# OPTIONS = compiler options
OPTIONS=-O

# BSDPREFIX = prefix for "BSD style" header files sys/types.h,
# sys/socket.h, netinet/in.h, netdb.h, and strings.h.  On Suns and other
# Berkeley Unix systems, leave the def of BSDPREFIX commented out.  On
# IRISes it should be
#   BSDPREFIX = bsd/
# (the last thing on the line should be the '/' --- no trailing blanks!)
# BSDPREFIX = 

# BSDLIBS = any library flags which are necessary to load the BSD
# libraries.  On Suns and other Berkeley Unix systems, leave the def
# of BSDPREFIX commented out.  On IRISes it should be
#   BSDLIBS = -lbsd
# BSDLIBS = 

# CP = copying command for use in installation. Should be 'ln' or 'cp'.
CP=ln

# End configuration section --- don't change anything below here
####################################################################

INSTALL_BIN = $(PWD)/../instl

INSTALL = $(INSTALL_BIN) -cp "$(CP)"

SHELL = /bin/sh

REMOTEPIPE_MAKE_OPTIONS =  \
  PWD="$(PWD)/remotepipe"  \
  OPTIONS="$(OPTIONS)"  \
  BINDIR="$(BINDIR)"  \
  CP="$(CP)"  \
  INSTALL_BIN="$(INSTALL_BIN)" \
  BOTHPIPEDIR="$(PWD)/bothpipe" \
  SYS_TYPES_H="<$(BSDPREFIX)sys/types.h>" \
  SYS_SOCKET_H="<$(BSDPREFIX)sys/socket.h>" \
  NETINET_IN_H="<$(BSDPREFIX)netinet/in.h>" \
  NETDB_H="<$(BSDPREFIX)netdb.h>" \
  STRINGS_H="<$(BSDPREFIX)strings.h>" \
  LIBS="$(BSDLIBS)"

####################################################################

all:	elbowd_bin

install:	$(BINDIR) install_elbowd

$(BINDIR):
	mkdir $(BINDIR)

elbowd_bin:
	cd remotepipe ;				\
	$(MAKE)					\
	  $(REMOTEPIPE_MAKE_OPTIONS)

install_elbowd:
	cd remotepipe ;				\
	$(MAKE)					\
	    $(REMOTEPIPE_MAKE_OPTIONS)		\
	    install

localclean:
	/bin/rm -f *~ ;

clean:	localclean
	cd remotepipe ; $(MAKE) clean

veryclean:	localclean
	cd remotepipe ; $(MAKE) veryclean

distclean:	localclean
	/bin/rm -r -f ./bin
	cd remotepipe ; $(MAKE) distclean

