Index: soft/giet_vm/giet_python/genmap
===================================================================
--- soft/giet_vm/giet_python/genmap	(revision 371)
+++ soft/giet_vm/giet_python/genmap	(revision 401)
@@ -32,10 +32,5 @@
 
 from optparse import OptionParser
-
 from mapping import *
-
-from transpose import *
-from sort import *
-from convol import *
 
 import sys
@@ -75,4 +70,7 @@
                    help = 'define pathname for the map.bin & vsegs.ld file ' )
 
+parser.add_option( '--hard', type = 'string', dest = 'hard_path',
+                   help = 'define pathname for the hard_config.h file ' )
+
 parser.add_option( '--xml', type = 'string', dest = 'xml_path', 
                    help = 'define pathname for the map.xml file' )
@@ -107,4 +105,5 @@
 almos_path    = options.almos_path  # path for arch.bib file
 giet_path     = options.giet_path   # path for map.bin & vsegs.ld files
+hard_path     = options.hard_path   # path for the hard_config.h file
 
 arch_path     = options.arch_path   # path to selected architecture
@@ -138,14 +137,17 @@
 ######################################################################################
 
-if ( map_transpose ): 
-    transpose( mapping )
+if ( map_transpose ):
+    app = __import__( 'transpose' )
+    app.transpose( mapping )
     print '[genmap] application "transpose" loaded'
 
 if ( map_sort ):      
-    sort( mapping )
+    app = __import__( 'sort' )
+    app.sort( mapping )
     print '[genmap] application "sort" loaded'
 
 if ( map_convol ):      
-    convol( mapping )
+    app = __import__( 'convol' )
+    app.convol( mapping )
     print '[genmap] application "convol" loaded'
 
@@ -205,2 +207,13 @@
     print '[genmap] %s generated for giet_vm' % pathname
 
+######################################################################################
+#   Generate hard_config.h file if required.
+######################################################################################
+
+if ( hard_path != None ):
+
+    pathname = hard_path + '/hard_config.h'
+    f = open ( pathname, 'w' )
+    f.write( mapping.hard_config() )
+    print '[genmap] %s generated for %s' % (pathname, arch_path)
+
