#
# This file is a Makefile for [incr Tk].  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.
#
# RCS: $Id$

#----------------------------------------------------------------
# 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 =		@prefix@
exec_prefix =		@exec_prefix@

# The directory containing the [incr Tcl] headers:
ITCL_INC_DIR =		@ITCL_DIR@/include

# The directory containing the [incr Tcl] library archive files:
ITCL_LIB_DIR =		@ITCL_DIR@/lib

# 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 =		@XINCLUDES@

# Linker switch(es) to use to link with the X11 library archive (the
# configure script will try to set this value automatically, but you
# can override it).
X11_LIB_SWITCHES =	@XLIBSW@

# Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
# and the math library (in that order).  The "LIBS" part will be
# replaced (or has already been replaced) with relevant libraries as
# determined by the configure script.
LIBS = -L$(ITCL_LIB_DIR) -litk2.0 -ltk4.0 -litcl2.0 -ltcl7.4 \
	$(X11_LIB_SWITCHES) @LIBS@ @MATH_LIBS@

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

# 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 =		@DEFS@
INSTALL_PROGRAM =	@INSTALL_PROGRAM@
INSTALL_DATA =		@INSTALL_DATA@
INSTALL =		@INSTALL@
RANLIB =		@RANLIB@
SRC_DIR =		@srcdir@
VPATH =			@srcdir@

#----------------------------------------------------------------
# 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@
CC_SWITCHES = $(CFLAGS) -I$(SRC_DIR) -I$(ITCL_INC_DIR) \
    $(X11_INCLUDES) $(AC_FLAGS) $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS)

SRCS = tree.c

OBJS = tree.o

all: treewish

treewish: tkAppInit.o $(OBJS)
	$(CC) $(CC_SWITCHES) tkAppInit.o $(OBJS) $(LIBS) -o treewish

Makefile: $(SRC_DIR)/Makefile.in
	$(SHELL) config.status

clean:
	rm -f *.a *.o *.so *.so.* core errs *~ \#* TAGS *.E a.out errors \
	rm -f treewish *pure*

distclean: clean
	rm -f Makefile config.status config.cache

pure: tkAppInit.o libitk.a
	purify $(CC) $(CC_SWITCHES) tkAppInit.o libitk.a $(LIBS) -o treewish

profile: tkAppInit.o libitk.a
	quantify $(CC) $(CC_SWITCHES) tkAppInit.o libitk.a $(LIBS) -o treewish

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

configure: configure.in
	autoconf

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

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