diff options
-rw-r--r-- | python/build/autotools.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/python/build/autotools.py b/python/build/autotools.py index 55a5fc067..c3e179f85 100644 --- a/python/build/autotools.py +++ b/python/build/autotools.py @@ -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) |