#######################################################################
# $Header: /cvsroot/SWIG1.1/Win/makefile.bc,v 1.2 1999/11/01 15:24:43 beazley Exp $
# Simplified Wrapper and Interface Generator (SWIG)
# 
# Makefile for version 1.1
# Dave Beazley
# March 12, 1997
#
# Modified for Borland C++
# Pier Giorgio Esposito
# 4/20/97
#
# $Log: makefile.bc,v $
# Revision 1.2  1999/11/01 15:24:43  beazley
# Removed perl4
#
# Revision 1.1.1.1  1999/02/28 02:00:53  beazley
# Swig1.1
#
# Revision 1.1  1996/08/12 01:55:02  dmb
# Initial revision
#
#######################################################################


!include <make_bc.in>

srcdir = .

all:		swig doc

swig: swig.exe

swig.exe:
                @echo "Making the SWIG Parser..."
                @cd ..\SWIG
                @$(MAKE)
                @echo "Make Modules..."
                @cd ..\Modules
                @$(MAKE)
                @cd ..\Win

clean:
	@cd ..
	del *.lib
	del *.obj
	del swig.exe 
	@cd SWIG
	@$(MAKE) clean
	@cd ..\Modules
	@$(MAKE) clean

doc:	swig
	@echo "Building Documentation for SWIG library..."
	..\swig -Iswig_lib -d ../Doc/swiglib -I../swig_lib ../swig_lib/autodoc.i
	@rem ??? KB ??? rm -f swig_lib\autodoc_wrap*
	@echo "Compilation complete. Type 'make install' to install."	

# Install the SWIG program

INSTALL        = copy

install: install-main install-lib
	@echo "Installation complete"

install95: install-main95 install-lib95
	@echo "Installation complete"

smallinstall: install-main

install-main: swig
	@if not exist $(dprefix) mkdir $(dprefix)
	@echo "Installing $(dSWIG_EXE)"
	@copy  ..\swig.exe $(dSWIG_EXE) 
install-lib:
	@if not exist $(dSWIG_LIB) mkdir $(dSWIG_LIB)
	@echo "$(dSWIG_LIB)"
	@echo "Installing the SWIG library"
	@cd ..\swig_lib
	@xcopy *.i $(dSWIG_LIB) 
	@xcopy *.swg $(dSWIG_LIB) 
	@if not exist $(dSWIG_LIB)\tcl mkdir $(dSWIG_LIB)\tcl
	@cd tcl
	@xcopy *.i $(dSWIG_LIB)\tcl 
	@xcopy *.swg $(dSWIG_LIB)\tcl 
	@if not exist $(dSWIG_LIB)\perl5 mkdir $(dSWIG_LIB)\perl5
	@cd ..\perl5
	@xcopy *.i $(dSWIG_LIB)\perl5 
	@xcopy *.swg $(dSWIG_LIB)\perl5 
	@if not exist $(dSWIG_LIB)\python mkdir $(dSWIG_LIB)\python
	@cd ..\python
	@xcopy *.i $(dSWIG_LIB)\python 
	@xcopy *.swg $(dSWIG_LIB)\python 
	@if not exist $(dSWIG_LIB)\guile mkdir $(dSWIG_LIB)\guile
	@cd ..\guile
	@xcopy *.i $(dSWIG_LIB)\guile 
	@xcopy *.swg $(dSWIG_LIB)\guile 

install-main95: swig
	@if not exist $(dprefix) mkdir $(dprefix)
	@echo "Installing $(dSWIG_EXE)"
	@copy  ..\swig.exe $(dSWIG_EXE) /Y
install-lib95:
	@if not exist $(dSWIG_LIB) mkdir $(dSWIG_LIB)
	@echo "$(dSWIG_LIB)"
	@echo "Installing the SWIG library"
	@cd ..\swig_lib
	@xcopy *.i $(dSWIG_LIB) /Y
	@xcopy *.swg $(dSWIG_LIB) /Y
	@mkdir $(dSWIG_LIB)\tcl
	@cd tcl
	@xcopy *.i $(dSWIG_LIB)\tcl /Y
	@xcopy *.swg $(dSWIG_LIB)\tcl /Y
	@mkdir $(dSWIG_LIB)\perl5
	@cd ..\perl5
	@xcopy *.i $(dSWIG_LIB)\perl5 /Y
	@xcopy *.swg $(dSWIG_LIB)\perl5 /Y
	@mkdir $(dSWIG_LIB)\python
	@cd ..\python
	@xcopy *.i $(dSWIG_LIB)\python /Y
	@xcopy *.swg $(dSWIG_LIB)\python /Y
	@mkdir $(dSWIG_LIB)\guile
	@cd ..\guile
	@xcopy *.i $(dSWIG_LIB)\guile /Y
	@xcopy *.swg $(dSWIG_LIB)\guile /Y

