# Generated automatically from Makefile.in by configure.
#
# This file is a Makefile for Tix.  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.
#
# @(#) Makefile.in 1.19 95/01/08 16:55:30

#----------------------------------------------------------------
# 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/coda/2.5/common
exec_prefix =	/usr/local/coda/2.5/Linux



# Directory in which to install the library of Tix scripts and demos
# (note: you can set the TIX_LIBRARY environment variable at run-time to
# override the compiled-in location):
TIX_LIBRARY =	$(prefix)/lib/tix

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

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

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

# Top-level directory for manual entries:
MAN_DIR =	$(prefix)/man

# Directory in which to install manual entry for wish:
MAN1_DIR =	$(MAN_DIR)/man1

# Directory in which to install manual entries for Tix's C library
# procedures:
MAN3_DIR =	$(MAN_DIR)/man3

# Directory in which to install manual entries for the built-in
# Tcl commands implemented by Tix:
MANN_DIR =	$(MAN_DIR)/mann

# 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

# 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 = -L/usr/X11R6/lib -lXpm -lXext -lXt -lX11

# Libraries to use when linking:  must include at least Tix, Tcl, Xlib,
# and the math library (in that order).  The "" part will be
# replaced (or has already been replaced) with relevant libraries as
# determined by the configure script.
LIBS = libtix.a $(LIB_DIR)/libtk.a $(LIB_DIR)/libtcl.a $(X11_LIB_SWITCHES)  -lieee -lm

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
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	=	 -DLINUX=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_FCNTL_H=1 -DNO_STREAM_H=1 -DNO_UN_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_TOLOWER=1 -DHAVE_NTOHL=1 -DSTDC_HEADERS=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_FLOAT_H=1 -DHAVE_MALLOC_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_WAIT_H=1 -DTIME_WITH_SYS_TIME=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DSVIPC_NO_UNION_SEMUN=1 -DTK_FILE_READ_PTR=1 
INSTALL		=	./../install.sh -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA	=	${INSTALL} -m 644
RANLIB		=	ranlib
SRC_DIR		=	.
INC_DIR		=	$(SRC_DIR)/../include
LIBRARY_DIR	=	$(SRC_DIR)/../library
CC		=	gcc
GENERIC_DIR	=	../generic

CC_SWITCHES =	${CFLAGS} -I${INC_DIR} -I${INCLUDE_DIR} \
${X11_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
-DTIX_LIBRARY=\"${TIX_LIBRARY}\"


#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

CORE_OBJS = \
	tixClass.o \
	tixCmds.o \
	tixCompat.o \
	tixError.o \
	tixGeometry.o \
	tixInit.o \
	tixList.o \
	tixMethod.o \
	tixOption.o  \
	tixSmpLs.o \
	tixUtils.o \
	tixWidget.o

DITEM_OBJS = \
	tixDItem.o \
	tixDiITxt.o \
	tixDiImg.o \
	tixDiStyle.o \
	tixDiText.o \
	tixDiWin.o

MANAGER_OBJS = \
	tixForm.o \
	tixFormMisc.o

WIDGET_OBJS = \
	tixHList.o \
	tixHLCol.o \
	tixHLInd.o \
	tixHLHdr.o \
	tixInputO.o \
	tixNBFrame.o

MISC_OBJS = \
	tixImgCmp.o \
	tixImgXpm.o \
	tixMwm.o

OBJS = $(CORE_OBJS) $(DITEM_OBJS) $(MANAGER_OBJS) $(MISC_OBJS) \
	$(WIDGET_OBJS)

#
# PATCH_OBJS = tkWm.o
#

all: libtix.a tixwish 

libtix.a: $(OBJS)
	rm -f libtix.a
	ar cr libtix.a $(OBJS)
	$(RANLIB) libtix.a

tixwish: tixAppInit.o libtix.a $(LIB_DIR)/libtcl.a $(LIB_DIR)/libtk.a
	$(CC) $(CC_SWITCHES) tixAppInit.o $(LIBS) -lm -lnsl -lresolv -ldl -o tixwish

#----------------------------------------------------------------------
#
#			.o file rules
#
#----------------------------------------------------------------------
tixClass.o : $(GENERIC_DIR)/tixClass.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixClass.c

tixCmds.o: $(GENERIC_DIR)/tixCmds.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixCmds.c

tixCompat.o: $(GENERIC_DIR)/tixCompat.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixCompat.c

tixDItem.o: $(GENERIC_DIR)/tixDItem.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDItem.c

tixDiImg.o: $(GENERIC_DIR)/tixDiImg.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDiImg.c

tixDiITxt.o: $(GENERIC_DIR)/tixDiITxt.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDiITxt.c

tixDiStyle.o: $(GENERIC_DIR)/tixDiStyle.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDiStyle.c

tixDiText.o: $(GENERIC_DIR)/tixDiText.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDiText.c

tixDiWin.o: $(GENERIC_DIR)/tixDiWin.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixDiWin.c

tixError.o: $(GENERIC_DIR)/tixError.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixError.c

tixForm.o: $(GENERIC_DIR)/tixForm.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixForm.c

tixFormMisc.o: $(GENERIC_DIR)/tixFormMisc.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixFormMisc.c

tixGeometry.o: $(GENERIC_DIR)/tixGeometry.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixGeometry.c

tixHLCol.o: $(GENERIC_DIR)/tixHLCol.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixHLCol.c

tixHLHdr.o: $(GENERIC_DIR)/tixHLHdr.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixHLHdr.c

tixHLInd.o: $(GENERIC_DIR)/tixHLInd.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixHLInd.c

tixHList.o: $(GENERIC_DIR)/tixHList.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixHList.c

tixImgCmp.o: $(GENERIC_DIR)/tixImgCmp.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixImgCmp.c

tixImgXpm.o: $(GENERIC_DIR)/tixImgXpm.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixImgXpm.c

tixInit.o: $(GENERIC_DIR)/tixInit.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixInit.c

tixInputO.o : $(GENERIC_DIR)/tixInputO.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixInputO.c

tixList.o: $(GENERIC_DIR)/tixList.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixList.c

tixMethod.o : $(GENERIC_DIR)/tixMethod.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixMethod.c

tixMwm.o: $(GENERIC_DIR)/tixMwm.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixMwm.c

tixNBFrame.o: $(GENERIC_DIR)/tixNBFrame.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixNBFrame.c

tixOption.o: $(GENERIC_DIR)/tixOption.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixOption.c

tixSmpLs.o: $(GENERIC_DIR)/tixSmpLs.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixSmpLs.c

tixUtils.o: $(GENERIC_DIR)/tixUtils.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixUtils.c

tixWidget.o: $(GENERIC_DIR)/tixWidget.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tixWidget.c

tkTest.o: $(GENERIC_DIR)/tkTest.c
	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTest.c

#----------------------------------------------------------------------
#
#			INSTALLATION
#
#----------------------------------------------------------------------
install: install-binaries 

install-binaries: libtix.a tixwish
	@for i in $(LIB_DIR) $(BIN_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing libtix.a"
	@$(INSTALL_DATA) libtix.a $(LIB_DIR)/libtix4.0.a
	@$(RANLIB) $(LIB_DIR)/libtix4.0.a
	@echo "Installing tixwish"
	@$(INSTALL_PROGRAM) tixwish $(BIN_DIR)/tixwish4.0

#----------------------------------------------------------------------
#
#			GENERAL STUFF
#
#----------------------------------------------------------------------

Makefile: Makefile.in
	cd $(SRC_DIR); echo

clean:
	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tixwish \
		Makefile.bak

# Now I want to preserve the Makefile on my machine somehow
#
distclean: clean
	rm -f Makefile Makefile.bak config.status config.cache config.log

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

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

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

