PYTHON_INCLUDES=$(shell python-config --includes) all: M2Crypto_ext clean: $(RM) _M2Crypto_ext.so M2Crypto_ext.py* M2Crypto_ext_wrap.c M2Crypto_ext_wrap.o M2Crypto_ext: _M2Crypto_ext.so M2Crypto_ext.py M2Crypto_ext.py: M2Crypto_ext.i swig -python -I/usr/include $< M2Crypto_ext_wrap.c: M2Crypto_ext.i swig -python -I/usr/include $< M2Crypto_ext_wrap.o: M2Crypto_ext_wrap.c gcc -O2 -fPIC -o $@ -c $< $(PYTHON_INCLUDES) _M2Crypto_ext.so: M2Crypto_ext_wrap.o gcc -shared -o $@ $<