swig/Runtime/Makefile.in
Thien-Thi Nguyen f30966e6d4 {Changes to enable non-local build}
(srcdir, VPATH): New vars.  Use where appropriate.

(libswigtcl8.la, libswigpy.la): Don't die if file to be
copied already exists.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@267 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-02-26 05:00:49 +00:00

82 lines
2.2 KiB
Makefile

# Makefile for producing SWIG runtime libraries.
#
# The runtime libraries contain the pointer-type checking code and other
# support functions that are needed when creating multi-file SWIG modules.
#
# At the moment, libtool is used to create these libraries
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
LIBTOOL = ../Tools/libtool
SWIGLIB = ../Lib
LIBS = libswigpl.la libswigpy.la libswigtcl8.la
LIB_DIR = $(exec_prefix)/lib
all:
@sh $(srcdir)/make.sh
install:
@echo "Installing runtime libraries"
@for i in $(LIBS); \
do \
if [ -f $$i ]; then \
$(LIBTOOL) install -c $$i $(LIB_DIR)/$$i; \
fi; \
done;
clean::
rm -rf *.o *.lo *.la *.a *.c *.swg *~ core .libs
# ----------------------------------------------------------------------
# Tcl runtime library
# ----------------------------------------------------------------------
TCL_INCLUDE = @TCLINCLUDE@
TCL_RUNTIME = $(SWIGLIB)/tcl/swigtcl8.swg
# Tcl 8.x
tcl: libswigtcl8.la
libswigtcl8.la:
-cp $(srcdir)/$(TCL_RUNTIME) swigtcl8.c
$(LIBTOOL) $(CC) -c $(TCL_INCLUDE) -DSWIG_GLOBAL swigtcl8.c
$(LIBTOOL) $(CC) -o libswigtcl8.la swigtcl8.lo -rpath $(LIB_DIR) -avoid-version
# ----------------------------------------------------------------------
# Python run-time library
# ----------------------------------------------------------------------
PYTHON_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
PYTHON_RUNTIME = $(SWIGLIB)/python/python.swg
# Python shared
python: libswigpy.la
libswigpy.la:
-cp $(srcdir)/$(PYTHON_RUNTIME) libpy.c
$(LIBTOOL) $(CC) -c $(PYTHON_INCLUDE) -DSWIG_GLOBAL libpy.c
$(LIBTOOL) $(CC) -o libswigpy.la libpy.lo -rpath $(LIB_DIR) -avoid-version
# ----------------------------------------------------------------------
# Perl run-time library
# ----------------------------------------------------------------------
PERL5_INCLUDE = -I@PERL5EXT@
PERL5_RUNTIME = $(SWIGLIB)/perl5/perl5.swg
# Perl shared
perl5: libswigpl.la
libswigpl.la:
@rm -f libperl.c
cat $(srcdir)/perlrun.h >> libperl.c
cat $(srcdir)/$(PERL5_RUNTIME) >> libperl.c
$(LIBTOOL) $(CC) -c $(PERL5_INCLUDE) -DSWIG_GLOBAL -Dbool=char -Dexplicit= libperl.c
$(LIBTOOL) $(CC) -o libswigpl.la libperl.lo -rpath $(LIB_DIR) -avoid-version