# Generated automatically from Makefile.in by configure.

# This is a Makefile for the tcpip directory of scotty. 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.

#----------------------------------------------------------------
# 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 =	${prefix}

# Directory in which to install the program scotty:
BIN_DIR =	$(exec_prefix)/bin

# Directory in which to install the archive libscotty.a:
LIB_DIR =       $(exec_prefix)/lib

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

# Directory in which to install the scotty startup files.
SCOTTY_DIR =	$(LIB_DIR)/scotty

# Directory in which to install the library of tkined scripts.
TKINED_DIR =	$(LIB_DIR)/tkined

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

# Comment the following lines to exclude icmp support (because 
# you have no ntping or no root permissions). NTPING should 
# contain the full path to the installed ntping binary.
NTPING = $(BIN_DIR)/ntping

# A "-I" switch that can be used when compiling to make all of the
# X11 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).
X11_INCLUDES =	 -I/usr/X11R6/include

# A "-I" switch that can be used when compiling to make all the
# Tcl include files accessible (the configure script will try to
# set this value).
TCL_INCLUDES =	-I/usr/include/tcl

# A "-I" switch that can be used when compiling to make all the
# Tk include files accessible (the configure script will try to
# set this value).
TK_INCLUDES =	-I/usr/include/tcl

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

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

#----------------------------------------------------------------
# The symbols below provide support for dynamic loading and shared
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of
# these definitions by hand.  However, you can reverse the comments
# on the pairs of lines to force "no dynamic loading or shared
# libraries".
#----------------------------------------------------------------

# Flags to pass to cc when compiling the components of a shared
# library:
SHLIB_CFLAGS = 
#SHLIB_CFLAGS =

# Base command to use for combining object files into a shared
# library:
SHLIB_LD = 

# Suffix to use for the name of the shared library.  An empty string
# means we don't know how to use shared libraries on this platform.
SHLIB_SUFFIX = 
#SHLIB_SUFFIX = .a

# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed by DLOBJ above.
DL_LIBS = 
#DL_LIBS =

# Flags to pass to the compiler when linking object files into
# an executable wish or tktest binary.
LD_FLAGS = 
#LD_FLAGS =

#----------------------------------------------------------------
# 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.
#----------------------------------------------------------------

INSTALL =		/usr/bin/install -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA =		${INSTALL} -m 644
RPCGEN =		rpcgen
RANLIB =		ranlib
SRC_DIR =		.

#----------------------------------------------------------------
# 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
LD =		cc
CC_SWITCHES =	${CFLAGS} -I. -I${SRC_DIR} -I.. -I${SRC_DIR}/.. $(TCL_INCLUDES) $(TK_INCLUDES) $(X11_INCLUDES) $(MSQL_INCLUDES) ${PROTO_FLAGS}

SRCS =	clock.c uevent.c job.c ined.c syslog.c icmp.c dns.c \
	tcp.c udp.c sunrpc.c ntp.c rpc.c http.c netdb.c \
	init.c

OBJS =  clock.o uevent.o job.o ined.o syslog.o icmp.o dns.o \
	tcp.o udp.o sunrpc.o ntp.o rpc.o http.o netdb.o \
	mount_clnt.o mount_xdr.o ether_clnt.o ether_xdr.o \
	rstat_clnt.o rstat_xdr.o \
	init.o

SOBJS = clock.so uevent.so job.so ined.so syslog.so icmp.so dns.so \
	tcp.so udp.so sunrpc.so ntp.so rpc.so http.so netdb.so \
	mount_clnt.so mount_xdr.so ether_clnt.so ether_xdr.so \
	rstat_clnt.so rstat_xdr.so \
	init.so

.SUFFIXES: .x .so

.c.o:
	$(CC) -c $(CC_SWITCHES) $<

.c.so:
	$(CC) -o $*-so.o -c $(CC_SWITCHES) $(SHLIB_CFLAGS) $<
	mv $*-so.o $*.so

.x.h:
	@if [ "$<" != "$*.x" ] ; then \
		cp $< $*.x ; \
	else true ; \
	fi
	$(RPCGEN) $*.x

all: ../libscotty.a

../libscotty.a: $(OBJS)
	ar cru ../libscotty.a $(OBJS)
	$(RANLIB) ../libscotty.a

dynamic: $(SOBJS)

init.o:	init.c
	$(CC) -c $(CC_SWITCHES) -DSCOTTYLIB=\"$(SCOTTY_DIR)\" $(SRC_DIR)/init.c

init.so: init.c
	$(CC) -o $*-so.o -c $(CC_SWITCHES) $(SHLIB_CFLAGS) -DSCOTTYLIB=\"$(SCOTTY_DIR)\" $(SRC_DIR)/init.c
	mv $*-so.o $*.so

icmp.o:	icmp.c
	$(CC) -c $(CC_SWITCHES) -DNTPING=\"$(NTPING)\" $(SRC_DIR)/icmp.c

icmp.so:	icmp.c
	$(CC) -o $*-so.o -c $(CC_SWITCHES) $(SHLIB_CFLAGS) -DNTPING=\"$(NTPING)\" $(SRC_DIR)/icmp.c
	mv $*-so.o $*.so

ined.o: ined.c
	$(CC) -c $(CC_SWITCHES) -DTKINEDLIB=\"$(TKINED_DIR)\" $(SRC_DIR)/ined.c

ined.so: ined.c
	$(CC) -o $*-so.o -c $(CC_SWITCHES) $(SHLIB_CFLAGS) -DTKINEDLIB=\"$(TKINED_DIR)\" $(SRC_DIR)/ined.c
	mv $*-so.o $*.so

install:

depend: mount.h ether.h rstat.h
	cp Makefile Makefile.bak
	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
	echo '# DO NOT DELETE THIS LINE' >> Makefile
	echo ' ' >> Makefile
	$(CC) -MM $(CC_SWITCHES) $(SRCS) >> Makefile

clean:
	@rm -f core *.o *.so *~

rpcclean:
	@rm -f mount.h mount_clnt.c mount_svc.c mount_xdr.c
	@rm -f ether.h ether_clnt.c ether_svc.c ether_xdr.c
	@rm -f rstat.h rstat_clnt.c rstat_svc.c rstat_xdr.c

distclean: clean rpcclean
	@rm -f Makefile TAGS *.bak lmake.???

# Some special dependencies.

mount_xdr.c mount_clnt.c mount_svc.c:	mount.h
ether_clnt.c ether_svc.c ether_xdr.c:	ether.h 
rstat_clnt.c rstat_svc.c rstat_xdr.c:	rstat.h

sunrpc.o: mount.h ether.h rstat.h
sunrpc.so: mount.h ether.h rstat.h

mount_clnt.o: mount.h mount_clnt.c
mount_clnt.so: mount.h mount_clnt.c
mount_xdr.o: mount.h mount_xdr.c
mount_xdr.so: mount.h mount_xdr.c
mount.h: mount.x

ether_clnt.o: ether.h ether_clnt.c
ether_clnt.so: ether.h ether_clnt.c
ether_xdr.o: ether.h ether_xdr.c
ether_xdr.so: ether.h ether_xdr.c
ether.h: ether.x

rstat_clnt.o: rstat.h rstat_clnt.c
rstat_clnt.so: rstat.h rstat_clnt.c
rstat_xdr.o: rstat.h rstat_xdr.c
rstat_xdr.so: rstat.h rstat_xdr.c
rstat.h: rstat.x

# DO NOT DELETE THIS LINE
