5 if [ -e $prefix/lib ] ; then
8 echo "Creating directory $prefix/lib";
12 if [ -e $prefix/include/gtnets ] ; then
15 echo "Creating directory $prefix/include/gtnets";
16 mkdir -p $prefix/include/gtnets;
23 echo "Install to prefix = $prefix";
25 echo "Downloading GTNetS from SVN SimGrid's repository";
26 svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/ --quiet
28 echo "Uncompressing package";
29 unzip gtnets-current.zip > /dev/null
30 tar zxvf gtnets-current-patch.tgz > /dev/null
32 cat ../00*.patch | patch -p1 > /dev/null
34 ARCH_32=`uname -m | cut -d'_' -f2`
36 if [ x$ARCH_32 = x64 ] ; then #only if 64 bit processor family
37 cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1 > /dev/null
40 ln -sf Makefile.linux Makefile
41 echo "Creating dependencies";
42 make -j 3 depend > /dev/null
43 echo "Compiling GTNetS debug libs";
44 make -j 3 debug > /dev/null 2>&1
45 echo "Compiling GTNetS optimal libs";
46 make -j 3 opt > /dev/null 2>&1
51 echo "Copying files to $prefix/lib";
52 cp -fr ./GTNetS/gtnets-current/*.so $prefix/lib/
53 ln -sf $prefix/lib/libgtsim-opt.so $prefix/lib/libgtnets.so
55 echo "Copying files to $prefix/include/gtnets";
56 cp -fr ./GTNetS/gtnets-current/SRC/*.h $prefix/include/gtnets
59 echo "Done with gtnets installation";