Commit e1a8c058 authored by Mark Lodato's avatar Mark Lodato

freeze: Makefile: flags from distutils.sysconfig

Instead of hard-coding the compiler flags and libraries, extract them
from distutils.sysconfig.
parent c7a7a3f0
CC = gcc CC = gcc
CYTHON = ../../bin/cython CYTHON = ../../bin/cython
CYTHON_FREEZE = ../../bin/cython_freeze CYTHON_FREEZE = ../../bin/cython_freeze
PYTHON = python
PY_LDFLAGS = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_config_var as g; print " ".join([g("LINKFORSHARED"), "-L"+g("LIBPL")])')
PY_CPPFLAGS = $(shell $(PYTHON) -c 'from distutils.sysconfig import *; print "-I"+get_python_inc()')
PY_LDLIBS = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_config_var as g; print " ".join(["-lpython"+g("VERSION"), g("SYSLIBS"), g("LIBS"), g("LOCALMODLIBS")])')
CFLAGS = -fPIC -g -O2 -Wall -Wextra CFLAGS = -fPIC -g -O2 -Wall -Wextra
CPPFLAGS = -I /usr/include/python2.6 CPPFLAGS = $(PY_CPPFLAGS)
LDFLAGS = -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions LDFLAGS = $(PY_LDFLAGS)
LDLIBS = /usr/lib/python2.6/config/libpython2.6.a \ LDLIBS = $(PY_LDLIBS)
-lm -ldl -pthread -lutil -lz
# Name of executable # Name of executable
......
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