Last active
July 25, 2017 18:55
-
-
Save mlcollard/7c80db54ff8c59469640318c5cdd1ae4 to your computer and use it in GitHub Desktop.
Using SWIG to generate python bindings for libsrcml
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
all: | |
swig -Wall -python srcml.i | |
gcc -fPIC -Wall -Wextra -shared srcml_wrap.c -o _srcml.so -L/usr/local/lib/ -lsrcml -I/usr/include/python2.7/ -lpython2.7 | |
clean: | |
rm -f srcml_wrap.c _srcml.so srcml.py srcml_wrap.c |
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 srcml | |
%{ | |
#include "srcml.h" | |
%} | |
%include "srcml.h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment