Linking flags for embedded mode.
authorRobert Bradshaw <robertwb@math.washington.edu>
Tue, 24 Nov 2009 07:33:16 +0000 (23:33 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Tue, 24 Nov 2009 07:33:16 +0000 (23:33 -0800)
Demos/embed/Makefile

index dfb0cc91aaa8d44ac01e55f18019f1803f39cdde..bec7335b74dd0c5b91a1bf37b9b1e5786cf803b3 100644 (file)
@@ -1,10 +1,11 @@
 # Makefile for creating our standalone Cython program
 PYVERSION=$(shell python -c "import sys; print sys.version[:3]")
 PYPREFIX=$(shell python -c "import sys; print sys.prefix")
+LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
 INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION)
 
 embedded: embedded.o
-       gcc -o $@ $^ -lpython$(PYVERSION)
+       gcc -o $@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil
 
 embedded.o: embedded.c
        gcc -c $^ $(INCLUDES)