~itamarst/+junk/giljoy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# It seems like Ubuntu 11.04 decided not to package debug symbols for regular
# interpreter, so this is built against debug interpreter. If you've got debug
# symbols installed for your normal Python interpreter, you probably want this
# to be '2.7', rather than '2.7_d' (or '2.6' for Python 2.6, etc.).
PYTHON_VERSION=2.7_d
PYTHON_INCLUDE=/usr/include/python${PYTHON_VERSION}


build:
	gcc -I${PYTHON_INCLUDE} -Wall -fPIC -lpython${PYTHON_VERSION} -g -shared nogilexample.c -o nogilexample.so
	gcc -I${PYTHON_INCLUDE} -Wall -D_GNU_SOURCE -fPIC -g -lc -ldl -lpython${PYTHON_VERSION} -lpthread -shared gilpreload.c -o gilpreload.so
	gcc -I${PYTHON_INCLUDE} -Wall -g -lc -lpython${PYTHON_VERSION} gilpython.c -o gilpython


test:
	./giljoy example.py


clean:
	rm -f gilpreload.so gilpython nogilexample.so