build/python/autotools: add properties "ldflags", "libs", "install_target"
This commit is contained in:
parent
4303aaa9b8
commit
1ca70d9759
|
@ -6,11 +6,17 @@ class AutotoolsProject(Project):
|
|||
def __init__(self, url, md5, installed, configure_args=[],
|
||||
autogen=False,
|
||||
cppflags='',
|
||||
ldflags='',
|
||||
libs='',
|
||||
install_target='install',
|
||||
**kwargs):
|
||||
Project.__init__(self, url, md5, installed, **kwargs)
|
||||
self.configure_args = configure_args
|
||||
self.autogen = autogen
|
||||
self.cppflags = cppflags
|
||||
self.ldflags = ldflags
|
||||
self.libs = libs
|
||||
self.install_target = install_target
|
||||
|
||||
def build(self, toolchain):
|
||||
src = self.unpack(toolchain)
|
||||
|
@ -32,8 +38,8 @@ class AutotoolsProject(Project):
|
|||
'CFLAGS=' + toolchain.cflags,
|
||||
'CXXFLAGS=' + toolchain.cxxflags,
|
||||
'CPPFLAGS=' + toolchain.cppflags + ' ' + self.cppflags,
|
||||
'LDFLAGS=' + toolchain.ldflags,
|
||||
'LIBS=' + toolchain.libs,
|
||||
'LDFLAGS=' + toolchain.ldflags + ' ' + self.ldflags,
|
||||
'LIBS=' + toolchain.libs + ' ' + self.libs,
|
||||
'AR=' + toolchain.ar,
|
||||
'RANLIB=' + toolchain.ranlib,
|
||||
'STRIP=' + toolchain.strip,
|
||||
|
@ -45,5 +51,5 @@ class AutotoolsProject(Project):
|
|||
subprocess.check_call(configure, cwd=build, env=toolchain.env)
|
||||
subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'],
|
||||
cwd=build, env=toolchain.env)
|
||||
subprocess.check_call(['/usr/bin/make', '--quiet', 'install'],
|
||||
subprocess.check_call(['/usr/bin/make', '--quiet', self.install_target],
|
||||
cwd=build, env=toolchain.env)
|
||||
|
|
Loading…
Reference in New Issue