# Generated automatically from Makefile.in by configure.
#
# Makefile for the ProTcl. It has been automatically generated by autoconf
# from Makefile.in.
#
# sccsid("@(#)Makefile.in	1.6          94/09/12").
#

#
# Some of the following paths might have to be modified
#
#
PROLOG_INCLUDE	= /usr/local/src/sicstus2.1

# In Eclipse, it is possible to share the same installation for
# several architectures and so machine-dependent files are moved
# to the corresponding directory. For other Prologs, this is a no-op.
# If unknown, replace it by the string you get with get_flag(hostarch, ARCH)
ARCH		= .

# Some machines are sensitive to cc/gcc combination, so it is better
# to use the same C compiler to install Prolog and ProTcl
CC = cc

##################################################
#
# The stuff below does not have to be modified, unless configure failed
#

TCL_INCLUDE = /usr/local/include
TK_INCLUDE = /usr/local/include
TCL_LIBRARY = /usr/lib
TK_LIBRARY = /usr/X11/lib
TCL_TESTS = 
TK_TESTS = 

# X include directory
X_INCLUDE = /usr/X386/include

# X library directory
XLIBSW = -L/usr/X386/lib -lX11

# The ProTcl source directory
PROTCL_SOURCE = `pwd`

CFLAGS = -O -DTK_TEST
PROLOG = SICSTUS
TOP_FILE = stk.pl
RANLIB = ranlib
TK_O = tk.o

##############################################################################

CFLAGS = -O -DTK_TEST -I$(TCL_INCLUDE) -I$(TK_INCLUDE) -I$(X_INCLUDE) -D$(PROLOG) -I$(PROLOG_INCLUDE) -DPROTO

.SUFFIXES:      $(SUFFIXES) .so

protcl:		$(TK_O) libinit.a dirs.pl tk.pl
		
		chmod 644 tk.*o libinit.a tk.pl dirs.pl
		
		chmod -R a+rX .

eclinstall:	$(TK_O) libinit.a tk.pl
		chmod 644 tk.*o libinit.a tk.pl
		/bin/mv tk.*o libinit.a ../../lib_graphic/$(ARCH)
		/bin/mv tk.pl ../../lib_graphic/tk

tk.so:		tk.o libinit.a
		$(CC) $(LDFLAGS)  tk.o -o $@ \
		    -L. -L$(TCL_LIBRARY) -L$(TK_LIBRARY) \
		    -linit -ltk -ltcl $(XLIBSW) -lm
				     
tk.pl:
		/bin/cp $(TOP_FILE) tk.pl

dirs.pl:
		echo "tcl_library('$(TCL_LIBRARY)')." > dirs.pl
		echo "tk_library('$(TK_LIBRARY)')." >> dirs.pl
		echo "tcl_tests('$(TCL_TESTS)')." >> dirs.pl
		echo "tk_tests('$(TK_TESTS)')." >> dirs.pl
		echo "protcl_source('$(PROTCL_SOURCE)')." >> dirs.pl
		echo "xlibsw('$(XLIBSW)')." >> dirs.pl

libinit.a:	tkAppInit.o
		ar rcv ./libinit.a tkAppInit.o
		$(RANLIB) ./libinit.a
