author | laurent |
Tue, 15 Dec 2009 14:40:18 +0100 | |
changeset 516 | 6a926af33ebc |
parent 510 | 8038c08b9874 |
child 615 | 72bc3e53a1fa |
permissions | -rwxr-xr-x |
321 | 1 |
from .. import toolchain_gcc |
2 |
from wxPopen import ProcessLogger |
|
3 |
||
4 |
class Xenomai_target(toolchain_gcc): |
|
5 |
extension = ".so" |
|
6 |
def getXenoConfig(self): |
|
7 |
""" Get xeno-config from target parameters """ |
|
510
8038c08b9874
Getting default target when no target defined fixed
laurent
parents:
421
diff
changeset
|
8 |
return self.PluginsRootInstance.GetTarget().getcontent()["value"].getXenoConfig() |
321 | 9 |
|
10 |
def getBuilderLDFLAGS(self): |
|
11 |
# get xeno-config from target parameters |
|
12 |
xeno_config = self.getXenoConfig() |
|
13 |
||
421 | 14 |
status, result, err_result = ProcessLogger(self.PluginsRootInstance.logger, xeno_config + " --xeno-ldflags", no_stdout=True).spin() |
321 | 15 |
if status: |
421 | 16 |
self.PluginsRootInstance.logger.write_error(_("Unable to get Xenomai's LDFLAGS\n")) |
321 | 17 |
xeno_ldlags = result.strip() |
18 |
||
19 |
return toolchain_gcc.getBuilderLDFLAGS(self) + [xeno_ldlags, "-shared", "-lnative"] |
|
20 |
||
21 |
def getBuilderCFLAGS(self): |
|
22 |
# get xeno-config from target parameters |
|
23 |
xeno_config = self.getXenoConfig() |
|
24 |
||
421 | 25 |
status, result, err_result = ProcessLogger(self.PluginsRootInstance.logger, xeno_config + " --xeno-cflags", no_stdout=True).spin() |
321 | 26 |
if status: |
421 | 27 |
self.PluginsRootInstance.logger.write_error(_("Unable to get Xenomai's CFLAGS\n")) |
321 | 28 |
xeno_cflags = result.strip() |
29 |
||
30 |
return toolchain_gcc.getBuilderCFLAGS(self) + [xeno_cflags] |
|
31 |