#
#	Makefile	- makes the Mini SQL tcl code
#
# Copyright (c) 1994   Brad Pepers
#
# Permission to use, copy, and distribute for non-commercial purposes,
# is hereby granted without fee, providing that the above copyright
# notice appear in all copies and that both the copyright notice and this
# permission notice appear in supporting documentation.
#
# This software is provided "as is" without any expressed or implied
# warranty.
#
# $Id: Makefile,v 1.7 1994/08/25 00:28:05 pepers Exp $
#
# $Log: Makefile,v $
# Revision 1.7  1994/08/25  00:28:05  pepers
# Changed for mSQL version 0.2
#
# Revision 1.6  1994/07/28  23:20:02  pepers
# Removed tclMain and tkMain
#
# Revision 1.5  1994/07/28  23:17:29  pepers
# Added paths for home and work
#
# Revision 1.4  1994/07/28  22:44:47  pepers
# Changed around how commands work
#
# Revision 1.3  1994/07/28  02:08:19  pepers
# Added clean, realclean, and tar
#
# Revision 1.2  1994/07/27  22:43:22  pepers
# Fixed log files
#
# Revision 1.1  1994/07/27  22:41:21  pepers
# First version of mSQL to Tcl/Tk interface
#

#TCL_INC=/home/userd/pepersb/tcl/tcl7.3
#TCL_LIB=/home/userd/pepersb/tcl/tcl7.3
TCL_INC=/usr/src/tcl/extensions/tcl7.3
TCL_LIB=/usr/src/tcl/extensions/tcl7.3

#MSQL_INC=/home/userd/pepersb/minerva/msql-0.1/src/msql
#MSQL_LIB=/home/userd/pepersb/minerva/msql-0.1/targets/SunOS-4.1.3-Sparc/lib
MSQL_INC=/usr/local/Minerva/msql-0.2/src/msql
MSQL_LIB=/usr/local/Minerva/msql-0.2/targets/Linux-1.0.8-i486/lib

CC=gcc
CFLAGS=-I$(TCL_INC) -I$(MSQL_INC) -L$(TCL_LIB) -L$(MSQL_LIB)

TCL_LIBS=-ltcl
TK_LIBS=-ltk
MSQL_LIBS=-lmsql -lm

all : tclmsql msqlwish

tclmsql : tclAppInit.o tclSQL.o
	$(CC) $(CFLAGS) -o tclmsql tclAppInit.o tclSQL.o \
		$(TCL_LIBS) $(MSQL_LIBS)

tclAppInit.o : tclAppInit.c

tclSQL.o : tclSQL.c tclSQL.h

msqlwish : tkAppInit.o tclSQL.o
	$(CC) $(CFLAGS) -o msqlwish tkAppInit.o tclSQL.o \
		$(TK_LIBS) $(TCL_LIBS) $(MSQL_LIBS) -lX11

tkAppInit.o : tkAppInit.c

clean:
	rm *.o

realclean:
	rm *.o *~ tcl_msql.tar tclmsql msqlwish

tar:
	tar cf tcl_msql.tar README Makefile tclSQL.c tclSQL.h \
		tclAppInit.c tkAppInit.c test.tcl test.tk
