[sword-svn] r1965 - in trunk/bindings/swig: . package

lefticus at www.crosswire.org lefticus at www.crosswire.org
Wed Aug 30 14:49:48 MST 2006


Author: lefticus
Date: 2006-08-30 14:49:27 -0700 (Wed, 30 Aug 2006)
New Revision: 1965

Modified:
   trunk/bindings/swig/package/Makefile.am
   trunk/bindings/swig/package/configure.ac
   trunk/bindings/swig/sword.i
Log:
Fix problems with building swig wrappers and enable building of csharp wrapper


Modified: trunk/bindings/swig/package/Makefile.am
===================================================================
--- trunk/bindings/swig/package/Makefile.am	2006-08-30 04:22:51 UTC (rev 1964)
+++ trunk/bindings/swig/package/Makefile.am	2006-08-30 21:49:27 UTC (rev 1965)
@@ -1,5 +1,11 @@
+INCLUDES = $(SWORD_INCLUDES)
+lib_LTLIBRARIES = libsword_csharpsword.la
+libsword_csharpsword_la_LIBADD = $(SWORD_LIBS)
+libsword_csharpsword_la_SOURCES = csharp/Sword.cxx
+
 EXTRA_DIST = *.i
 
+
 if RUNSWIG
 PERLSWIG=perlswig
 TCLSWIG=tclswig
@@ -63,14 +69,14 @@
 
 tclswig: sword.i
 	mkdir -p tcl
-	$(SWIG) -tcl -c++ -namespace -pkgversion $(VERSION) -o tcl/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i
+	$(SWIG) -tcl -c++ -namespace -pkgversion $(VERSION) -o tcl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i
 
 python_make: python_makebuild
 	cd python && $(PYTHON) setup.py build_ext $(SWORD_INCLUDES) $(LIB_SWORD)
 
 pythonswig: sword.i
 	mkdir -p python
-	$(SWIG) -python -c++ -shadow -o python/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i
+	$(SWIG) -python -c++ -shadow -o python/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i
 
 python_makebuild: $(PYTHONSWIG)
 	mkdir -p python
@@ -84,6 +90,7 @@
 	@echo "	maintainer_email = \"sword-devel at crosswire.org\"," >> python/setup.py
 	@echo "	url = \"http://www.crosswire.org/sword\"," >> python/setup.py
 	@echo "	py_modules = [\"Sword\"]," >> python/setup.py
+	@echo " include_dirs=['$(SWORD_INCLUDES)']," >> python/setup.py
 	@echo "	ext_modules = [Extension(\"_Sword\", [\"Sword.cxx\"]," >> python/setup.py
 	@echo " libraries=[('sword')], " >> python/setup.py
 	@echo "	define_macros=[('SWIG',1)])], " >> python/setup.py
@@ -93,5 +100,14 @@
 
 phpswig: sword.i
 	mkdir -p php
-	$(SWIG) -php4 -c++ -fullmake -o php/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i
+	$(SWIG) -php4 -c++ -phpfull -o php/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i
 
+
+csharp/Sword.cxx: csharpswig
+
+csharpswig: sword.i
+	        mkdir -p csharp
+		        $(SWIG) -csharp -c++ -nodefaultctor -dllimport libsword_csharpwrap.dll -o csharp/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES)  $(top_srcdir)/sword.i
+
+csharpmake:
+	        mcs -out:csharp/Sword.dll -target:library csharp/*.cs

Modified: trunk/bindings/swig/package/configure.ac
===================================================================
--- trunk/bindings/swig/package/configure.ac	2006-08-30 04:22:51 UTC (rev 1964)
+++ trunk/bindings/swig/package/configure.ac	2006-08-30 21:49:27 UTC (rev 1965)
@@ -14,6 +14,7 @@
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
+AC_PROG_LIBTOOL
 SW_PROG_SWIG
 
 # ---------------------------------------------------------------------
@@ -25,6 +26,8 @@
 # Misc
 # ---------------------------------------------------------------------
 AM_MAINTAINER_MODE
+AC_ARG_ENABLE(swig, [--disable-swig do not run swig to generate input files], enable_swig=$enableval, enable_swig=no)
+AM_CONDITIONAL([RUNSWIG], [test x$enable_swig = xyes])
 
 # ---------------------------------------------------------------------
 # Check Scripting languages

Modified: trunk/bindings/swig/sword.i
===================================================================
--- trunk/bindings/swig/sword.i	2006-08-30 04:22:51 UTC (rev 1964)
+++ trunk/bindings/swig/sword.i	2006-08-30 21:49:27 UTC (rev 1965)
@@ -3,6 +3,8 @@
 
 #define SWDLLEXPORT  
 
+%module "Sword"
+
 %include "defs.i"
 
 %include "swbuf.i"




More information about the sword-cvs mailing list