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)
authorEdouard Tisserant
Fri, 26 Jul 2013 14:04:29 +0900
changeset 1279 0eb9f8af479f
parent 1278 74afc7e86d00
child 1280 72a826dfcfbb
child 1281 47131e3388f4
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)
canfestival/canfestival.py
targets/Linux/__init__.py
targets/Win32/__init__.py
targets/Xenomai/__init__.py
--- 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 """