Added 'dlopen_prefix' class attributes to targets, in order to handle dlopen of shared object passed to runtime as extra file, and then in PWD (was working with windows only)
--- a/canfestival/canfestival.py Fri Jul 19 15:04:47 2013 +0900
+++ b/canfestival/canfestival.py Fri Jul 26 14:04:29 2013 +0900
@@ -463,7 +463,8 @@
if can_driver not in can_drivers :
can_driver = can_drivers[0]
can_drv_ext = self.GetCTRoot().GetBuilder().extension
- can_driver_name = "libcanfestival_" + can_driver + can_drv_ext
+ can_drv_prefix = self.GetCTRoot().GetBuilder().dlopen_prefix
+ can_driver_name = can_drv_prefix + "libcanfestival_" + can_driver + can_drv_ext
else:
can_driver_name = ""
--- a/targets/Linux/__init__.py Fri Jul 19 15:04:47 2013 +0900
+++ b/targets/Linux/__init__.py Fri Jul 26 14:04:29 2013 +0900
@@ -1,6 +1,7 @@
from ..toolchain_gcc import toolchain_gcc
class Linux_target(toolchain_gcc):
+ dlopen_prefix = "./"
extension = ".so"
def getBuilderCFLAGS(self):
return toolchain_gcc.getBuilderCFLAGS(self) + ["-fPIC"]
--- a/targets/Win32/__init__.py Fri Jul 19 15:04:47 2013 +0900
+++ b/targets/Win32/__init__.py Fri Jul 26 14:04:29 2013 +0900
@@ -1,6 +1,7 @@
from ..toolchain_gcc import toolchain_gcc
class Win32_target(toolchain_gcc):
+ dlopen_prefix = ""
extension = ".dll"
def getBuilderLDFLAGS(self):
return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-lwinmm"]
--- a/targets/Xenomai/__init__.py Fri Jul 19 15:04:47 2013 +0900
+++ b/targets/Xenomai/__init__.py Fri Jul 26 14:04:29 2013 +0900
@@ -1,6 +1,7 @@
from ..toolchain_gcc import toolchain_gcc
class Xenomai_target(toolchain_gcc):
+ dlopen_prefix = "./"
extension = ".so"
def getXenoConfig(self, flagsname):
""" Get xeno-config from target parameters """