summaryrefslogtreecommitdiff
path: root/SWIG/Makefile
blob: 7d73a3b4a1180d16e45492bb75495760b912cec1 (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: Makefile 299 2005-06-09 17:32:28Z heikki $

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