#######################################################################
# $Header: /cvsroot/SWIG1.1/Modules/Makefile.in,v 1.2 1999/08/17 03:31:30 beazley Exp $
# Simplified Wrapper and Interface Generator (SWIG)
# 
# Makefile for version 1.0 Final
# Dave Beazley
# August 1, 1996
#
# This makefile is now mostly constructed by ./configure.
#
# $Log: Makefile.in,v $
# Revision 1.2  1999/08/17 03:31:30  beazley
# Minor cleanup. Removed Perl4
#
# Revision 1.1.1.1  1999/02/28 02:00:50  beazley
# Swig1.1
#
# Revision 1.1  1996/08/12 01:55:02  dmb
# Initial revision
#
#######################################################################

#.KEEP_STATE:


srcdir = .


# Set your C++ compiler here.   g++ works on most machines,
# but you might have to change it depending on your installation.
#
CC      = g++

#
# Set the prefix below to indicate where you want SWIG to install its
# files.   Normally this is /usr/local
# 

prefix     = /usr/local/stow/swig-1.1-883

# Location of the SWIG library.  Is normally put in /usr/local/lib/swig_lib
# The SWIG library contains configuration files and library modules
# so you should install it someplace where it can be easily accessed.

SWIG_LIB = $(prefix)/lib/swig_lib

########################################################################
# Normally, you shouldn't have to change anything below this point     #
########################################################################

WRAPOBJS = swigmain.o tcl.o tcl8.o perl5.o python.o pycpp.o guile.o debug.o
WRAPSRCS = swigmain.cxx tcl.cxx tcl8.cxx perl5.cxx python.cxx pycpp.cxx guile.cxx debug.cxx
WRAPHEADERS = ../Include/swig.h swigtcl.h perl5.h python.h guile.h debug.h wrap.h

TARGET  = ../swig.x
CFLAGS  = -g -O2 -DSWIG_LIB='"$(SWIG_LIB)"' -DSWIG_CC='"$(CC)"' -DSTDC_HEADERS=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DSWIG_LANG=TCL -DSWIG_DOC=ASCII -DHAVE_LIBDL=1 
INCLUDE = -I../Include -I../SWIG
LIBS    = -L.. -lswig
SHELL  = /bin/sh

#
#
#
# Rules for creation of a .o file from .cxx
.SUFFIXES: .cxx
.cxx.o: 
	$(CC) $(INCLUDE) $(CFLAGS) -c -o $*.o $<

all:    $(TARGET) 

$(TARGET): $(WRAPOBJS) $(WRAPHEADERS) ../libswig.a
	$(CC) $(INCLUDE) $(WRAPOBJS) $(LIBS) -o $(TARGET)

swigmain.o: swigmain.cxx 
tcl.o: tcl.cxx 
perl5.o: perl5.cxx 
python.o: python.cxx 
pycpp.o: pycpp.cxx
guile.o: guile.cxx 

Makefile:	$(srcdir)/Makefile.in ../config.status
		(cd ..; CONFIG_FILES=Modules/Makefile $(SHELL) config.status)

.PRECIOUS:	Makefile

clean::
	rm -f *.o $(TARGET) 

nuke::
	rm -f Makefile *~ #* core a.out 

wc::	
	wc $(WRAPSRCS) *.h 

# I use this to build final releases from the RCS directory.   Probably
# not very useful to anyone else...
co::
	co $(WRAPSRCS) $(WRAPHEADERS) $(PARSER)
