Commit f6eb8dd1 authored by Robert Bradshaw's avatar Robert Bradshaw

Py3 fixes for embedded example.

parent 1bc30fdf
# Makefile for creating our standalone Cython program # Makefile for creating our standalone Cython program
PYVERSION=$(shell python -c "import sys; print sys.version[:3]") PYVERSION=$(shell python -c "import sys; print(sys.version[:3])")
PYPREFIX=$(shell python -c "import sys; print sys.prefix") PYPREFIX=$(shell python -c "import sys; print(sys.prefix)")
LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')") LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LINKFORSHARED'))")
INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION) INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION)
embedded: embedded.o embedded: embedded.o
gcc -o $@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil gcc -o $@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil -L$(PYPREFIX)/lib
embedded.o: embedded.c embedded.o: embedded.c
gcc -c $^ $(INCLUDES) gcc -c $^ $(INCLUDES)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment