Skip to content

Instantly share code, notes, and snippets.

@mlcollard
Last active July 25, 2017 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlcollard/7c80db54ff8c59469640318c5cdd1ae4 to your computer and use it in GitHub Desktop.
Save mlcollard/7c80db54ff8c59469640318c5cdd1ae4 to your computer and use it in GitHub Desktop.
Using SWIG to generate python bindings for libsrcml
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
%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