author | laurent |
Mon, 07 Dec 2009 10:25:33 +0100 | |
changeset 468 | d750151bd6ae |
parent 421 | c9ec111ad275 |
child 510 | 8038c08b9874 |
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 """ |
|
411
8261c8f1e365
Bug on Debug trying to start (and stop) before PLC started fixed.
laurent
parents:
361
diff
changeset
|
8 |
return self.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 |