Created
February 15, 2010 15:17
-
-
Save kwharrigan/304719 to your computer and use it in GitHub Desktop.
Swig script for C3D and related makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%module C3D | |
%{ | |
/* Includes the header in the wrapper code */ | |
#include "C3D.h" | |
#include "vl/vld.h" | |
%} | |
/* Parse the header file to generate wrappers */ | |
%include "C3D.h" | |
%include cpointer.i | |
%include "std_vector.i" | |
%pointer_functions(int, intp); | |
namespace std{ | |
%template(vector_Vec3D) vector<Vec3D>; | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C3D: C3D.o C3D_wrap.o C3D.i | |
c++ -mno-cygwin -shared C3D.o C3D_wrap.o -o _C3D.pyd /c/Python25/libs/libpython25.a | |
C3D_wrap.cpp: | |
swig -c++ -python C3D.i | |
mv C3D_wrap.cxx C3D_wrap.cpp | |
C3D.o C3D_wrap.o: C3D_wrap.cpp | |
g++ -c C3D.cpp C3D_wrap.cpp -I/c/Python25/include -Ivl-1.3.2/include -D__int8=char -D__int16=short -D__int32=int "-D__int64=long long" | |
clean: | |
rm -f *.o | |
rm -f C3D_wrap.cpp | |
rm -f _C3D.pyd | |
rm -f C3D.pyc | |
rm -f C3D.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment