# Generated automatically from Makefile.in by configure.
# $Id: Makefile,v 1.1.1.1 2004/03/09 15:36:16 clif Exp $
# $Log: Makefile,v $
# Revision 1.1.1.1  2004/03/09 15:36:16  clif
# The initial TkReplay from Crowley's website.
#
# Revision 1.2  1996/07/31  16:23:59  crowley
# This is the 1.1 revision of TkReplay.  Lots of small changes.
# Most of them from Dean Brettle.  Connecting and replay are
# faster.  Socket support has been added.
#
# Revision 1.1  1996/07/29  22:48:12  crowley
# Initial revision
#
# This Makefile is used to create the example loadable module.
# It also illustrates how to take advantage of configuration
# exported by Tcl to set up Makefiles for shared libraries.
#
# SCCS: @(#) Makefile.in 1.4 96/04/26 11:36:27

PROJECT = WarpPointer

# The directory containing the Tcl sources and headers appropriate
# for this version of Tk ("srcdir" will be replaced or has already
# been replaced by the configure script):
TCL_GENERIC_DIR =	/nfs/u3/crowley/tk/tcl7.5/generic
TK_GENERIC_DIR =	/nfs/u3/crowley/tk/tk4.1/generic

# The directory containing the Tcl library archive file appropriate
# for this version of Tk:
TCL_BIN_DIR = /nfs/u3/crowley/tk/tcl7.5/unix

X11_INCLUDES =		-I/usr/local/X11R5/include
X11_LIB_SWITCHES =	-L/usr/local/X11R5/lib -lX11

# Libraries to use when linking:
LIBS = -L/nfs/u3/crowley/tk/tcl7.5/unix -ltcl75 -ldl  -lm $(X11_LIB_SWITCHES) -lc

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

CC = cc
SHLIB_CFLAGS =		-PIC
SHLIB_LD =		ld
SHLIB_SUFFIX =		.so
SHLIB_VERSION =		
SRC_DIR =		.

CFLAGS = -g
CC_SWITCHES = $(CFLAGS) -I${TCL_GENERIC_DIR} -I${TK_GENERIC_DIR} ${SHLIB_CFLAGS} ${X11_INCLUDES}

all: pkgIndex.tcl

test: pkgIndex.tcl
	@echo "Testing WarpPointer..."
	@echo 'lappend auto_path .; package require $(PROJECT); \
		if ![catch {$(PROJECT) 100 100 0}] { \
		    exit 0 \
		} else { \
		    puts "$(PROJECT) failed to load and run"; \
		    exit 1 \
		}' | wish4.1
	@echo "Test passed."

pkgIndex.tcl: $(PROJECT)${SHLIB_SUFFIX}
	@echo 'pkg_mkIndex . $(PROJECT)${SHLIB_SUFFIX}' | \
		${TCL_BIN_DIR}/tclsh

$(PROJECT)${SHLIB_SUFFIX}: $(SRC_DIR)/$(PROJECT).c
	$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/$(PROJECT).c
	${SHLIB_LD} $(PROJECT).o -o $(PROJECT)${SHLIB_SUFFIX} 

clean:
	rm -f *.o *${SHLIB_SUFFIX} config.cache config.log config.status lib.exp

Makefile: Makefile.in
	./config.status

distclean: clean
	rm -f Makefile
