summaryrefslogtreecommitdiff
path: root/src/SWIG/Makefile
blob: 9a3bd561a15726d7be5ece2409dfc7ccaec773c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $Id$

CFLAGS	   = -DTHREADING -g
INCLUDE	   = -I/usr/local/include -I.
LIBS       = -L/usr/local/lib -lssl -lcrypto
#if PYTHON_VERSION
PYVER = $(PYTHON_VERSION)
#else
PYVER = 2.3
#endif
PYINCLUDE  = -DHAVE_CONFIG_H -I/usr/local/include/python$(PYVER) \
	-I/usr/local/lib/python$(PYVER)/config
PYLIB      = /usr/local/lib/python$(PYVER)/config

all:	_m2crypto

_m2crypto: 	_m2crypto.i
	swig -python -shadow _m2crypto.i
	cc -c -fpic $(CFLAGS) $(INCLUDE) $(PYINCLUDE) _m2crypto_wrap.c
	ld -Bshareable -o _m2crypto.so _m2crypto_wrap.o $(LIBS)
	cp m2crypto.py _m2crypto.so ../M2Crypto

clean:
	rm -f *_wrap* *.o *.so _*.py *.pyc