mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linker flags for the build script
This commit is contained in:
parent
7dc4fc5d74
commit
2e5cb8f727
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
import textwrap, os, shlex, subprocess, glob, shutil, re, sys, json
|
import textwrap, os, shlex, subprocess, glob, shutil, re, sys, json
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from setup import Command, islinux, isbsd, isosx, SRC, iswindows, __version__
|
from setup import Command, islinux, isbsd, isosx, ishaiku, SRC, iswindows, __version__
|
||||||
isunix = islinux or isosx or isbsd
|
isunix = islinux or isosx or isbsd
|
||||||
|
|
||||||
py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
|
py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
|
||||||
@ -100,6 +100,8 @@ def parse_extension(ext):
|
|||||||
ans = ext.pop('osx_' + k, ans)
|
ans = ext.pop('osx_' + k, ans)
|
||||||
elif isbsd:
|
elif isbsd:
|
||||||
ans = ext.pop('bsd_' + k, ans)
|
ans = ext.pop('bsd_' + k, ans)
|
||||||
|
elif ishaiku:
|
||||||
|
ans = ext.pop('haiku_' + k, ans)
|
||||||
else:
|
else:
|
||||||
ans = ext.pop('linux_' + k, ans)
|
ans = ext.pop('linux_' + k, ans)
|
||||||
return ans
|
return ans
|
||||||
@ -156,6 +158,12 @@ def init_env():
|
|||||||
cflags.append('-I'+sysconfig.get_python_inc())
|
cflags.append('-I'+sysconfig.get_python_inc())
|
||||||
ldflags.append('-lpython'+sysconfig.get_python_version())
|
ldflags.append('-lpython'+sysconfig.get_python_version())
|
||||||
|
|
||||||
|
if ishaiku:
|
||||||
|
cflags.append('-lpthread')
|
||||||
|
ldflags.append('-shared')
|
||||||
|
cflags.append('-I'+sysconfig.get_python_inc())
|
||||||
|
ldflags.append('-lpython'+sysconfig.get_python_version())
|
||||||
|
|
||||||
if isosx:
|
if isosx:
|
||||||
cflags.append('-D_OSX')
|
cflags.append('-D_OSX')
|
||||||
ldflags.extend('-bundle -undefined dynamic_lookup'.split())
|
ldflags.extend('-bundle -undefined dynamic_lookup'.split())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user