example of how to include the swig runtime code into external user code

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-18 00:39:09 +00:00
commit eacea2b6f8
5 changed files with 151 additions and 0 deletions

View file

@ -0,0 +1,27 @@
TOP = ../..
SWIG = $(TOP)/../preinst-swig
CXXSRCS = example.cxx
TARGET = example
INTERFACE = example.i
LIBS = -lm
SWIGOPT =
all::
$(SWIG) -co swigrun.swg
$(SWIG) -o pyrun.swg -co python/pyrun.swg
$(SWIG) -o pyrunalias.swg -co python/pyrunalias.swg
$(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
rm -f swigrun.swg pyrun.swg pyrunalias.swg
static::
$(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean::
$(MAKE) -f $(TOP)/Makefile python_clean
rm -f $(TARGET).py
rm -f swigrun.swg pyrun.swg pyrunalias.swg
check: all