# Generated automatically from Makefile.in by configure.
#
# tools/Makefile.in  --
#
# Makefile for building tools used during install
#------------------------------------------------------------------------------
# Copyright 1992-1995 Karl Lehenbauer and Mark Diekhans.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies.  Karl Lehenbauer and
# Mark Diekhans make no representations about the suitability of this
# software for any purpose.  It is provided "as is" without express or
# implied warranty.
#------------------------------------------------------------------------------
# $Id: Makefile.in,v 5.0 1995/07/25 05:59:24 markd Rel $
#------------------------------------------------------------------------------
#
SHELL = /bin/sh

#------------------------------------------------------------------------------

CC          = gcc
CFLAGS      = -g
srcdir      = .
srcbasedir  = /opt/dsap/tcl7.4tk4.0/itcl2.0/tclX7.4a-p2
bldbasedir  = /opt/dsap/tcl7.4tk4.0/itcl2.0/tclX7.4a-p2
prefix      = /opt/dsap/tcl7.4tk4.0
exec_prefix = ${prefix}
XINCLUDES   = -I/usr/X11R6/include
LIBS        = -lsocks -lnsl -ldl -lm

include ${bldbasedir}/Config.mk

#------------------------------------------------------------------------------

CC_FLAGS = ${CPPFLAGS} ${XCFLAGS} ${CFLAGS} -I${srcbasedir}/src \
           ${XINCLUDES} -I${TCL_UCB_SRC}

.c.o:
	${CC} ${CC_FLAGS} -c $<

#------------------------------------------------------------------------------

all: tclxversion $(TK_BUILD) instcopy bldmanhelp cpmanpages cphelpdir \
     symlinkext

tclxversion: getversion.c
	$(CC) $(CC_FLAGS) ${srcdir}/getversion.c -o tclxversion ${LIBS}

WISHX: tkxversion

tkxversion: getversion.c
	$(CC) $(CC_FLAGS) -I$(TK_UCB_SRC) -DTK_GET_VERSION \
	   ${srcdir}/getversion.c -o tkxversion ${LIBS}

instcopy: instcopy.tcl buildutil.tcl
	rm -f instcopy
	cat ${srcdir}/buildutil.tcl ${srcdir}/instcopy.tcl >instcopy

bldmanhelp: bldmanhelp.tcl
	rm -f bldmanhelp
	cp ${srcdir}/bldmanhelp.tcl bldmanhelp

cpmanpages: cpmanpages.tcl buildutil.tcl
	rm -f cpmanpages
	cat ${srcdir}/buildutil.tcl ${srcdir}/cpmanpages.tcl >cpmanpages

cphelpdir: cphelpdir.sh
	rm -f cphelpdir
	echo ":"                           >cphelpdir
	echo "TOOLS=${bldbasedir}/tools"  >>cphelpdir
	cat ${srcdir}/cphelpdir.sh        >>cphelpdir
	chmod a+x cphelpdir

symlinkext: symlinkext.sh
	rm -f symlinkext
	cat ${srcdir}/symlinkext.sh  >symlinkext
	chmod a+x symlinkext

#------------------------------------------------------------------------------

clean:
	-rm -f tclxversion tkxversion *.o
	-rm -f instcopy bldmanhelp cpmanpages cphelpdir symlinkext

#------------------------------------------------------------------------------
# Restore to the distributed state.

distclean: clean
	rm -f Makefile

# Disable Sun's parallel make, it doesn't get the dependencies right.
.NO_PARALLEL:
