Index: /branches/reconfiguration/platforms/tsar_generic_iob/Makefile
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/Makefile	(revision 775)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/Makefile	(revision 776)
@@ -14,4 +14,7 @@
 	rm -rf *.o *.x tty* term*
 
+distclean: clean
+	find . -name "*.pyc" -exec rm -f {} \;
+
 .PHONY: simul.x $(TAGS)
 
Index: /branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py	(revision 775)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py	(revision 776)
@@ -22,15 +22,17 @@
 assert len(sys.argv) > 1, "Introduce platform base directory path"
 
-# goto platform base directory
-os.chdir(sys.argv[1])
+# translate the relative path (if needed) into an absolute path
+basedir = os.path.abspath(sys.argv[1])
+print "[ run.py ] platform base directory: {}".format(basedir)
 
 # repeat while configurations is not empty
 for faulty in faultylist:
     for x,y in configs:
-        confdir = os.getcwd() + "conf/config_{}c/".format(x*y)
+        confdir = "{}/conf/config_{}c".format(basedir, x*y)
+        print "[ run.py ] generating files for {}".format(confdir)
 
         # 1. generate configuration and ouput directories
         try:
-            os.makedirs(confdir + "config", 0755)
+            os.makedirs(confdir + "/config", 0755)
         except OSError:
             pass # directory already exists => do nothing
@@ -38,19 +40,22 @@
         # 2. generate hard_config.h and fault_config.h files
         arch.main( x = x, y = y, p = nprocs,
-                   hard_path = confdir + "config/hard_config.h",
-                   xml_path = confdir + "config/map.xml" )
-        faultyprocs.generate(faulty, confdir + "config/fault_config.h")
+                   hard_path = confdir + "/config/hard_config.h",
+                   xml_path = confdir + "/config/map.xml" )
+        faultyprocs.generate(faulty, confdir + "/config/fault_config.h")
 
         # 3. compile simulator executable
-        if os.path.exists("hard_config.h"): os.unlink("hard_config.h")
-        os.symlink(confdir + "config/hard_config.h", "hard_config.h")
-        subprocess.call("make")
+        dst = basedir + "/hard_config.h"
+        if os.path.lexists(dst): os.unlink(dst)
+        os.symlink(confdir + "/config/hard_config.h", dst)
+        subprocess.call(["make",
+            "-C", basedir
+            ])
 
         # 4. compile distributed boot executable
-        dst = confdir + "config/boot_config.h"
-        if not os.path.exists(dst):
-            os.symlink(os.getcwd() + "/soft/config/boot_config.h", dst)
+        dst = confdir + "/config/boot_config.h"
+        if os.path.lexists(dst): os.unlink(dst)
+        os.symlink(basedir + "/soft/config/boot_config.h", dst)
         subprocess.call(["make",
-            "-C", "soft",
+            "-C", basedir + "/soft",
             "CONFDIR=" + confdir
             ])
@@ -59,7 +64,7 @@
         os.environ["DISTRIBUTED_BOOT"] = "1"
         os.environ["SOCLIB_TTY"] = "FILES"
-        with open(confdir + "log", "w") as log_file:
-            subprocess.call(["./simul.x",
-                "-SOFT"   , "soft/build/soft.elf",
+        with open(confdir + "/log", "w") as log_file:
+            subprocess.call([basedir + "/simul.x",
+                "-SOFT"   , basedir + "/soft/build/soft.elf",
                 "-DISK"   , "/dev/null",
                 "-NCYCLES", "10000000"],
@@ -69,5 +74,5 @@
 
         # 6. move simulation terminal output into the target config dir
-        os.rename("term0", confdir + "term")
+        os.rename("term0", confdir + "/term")
 
         # end for each config
