2 if [ $SYSTEM = Linux ] ; then
7 if [ -e $prefix/lib ] ; then
10 echo "Creating directory $prefix/lib";
14 if [ -e $prefix/include/gtnets ] ; then
17 echo "Creating directory $prefix/include/gtnets";
18 mkdir -p $prefix/include/gtnets;
25 echo "Install to prefix = $prefix";
27 echo "Downloading GTNetS from SVN SimGrid's repository";
28 svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/ --quiet
30 echo "Uncompressing package";
31 unzip gtnets-current.zip > /dev/null
32 tar zxvf gtnets-current-patch.tgz > /dev/null
34 cat ../00*.patch | patch -p1 > /dev/null
36 ARCH_32=`uname -m | cut -d'_' -f2`
38 if [ x$ARCH_32 = x64 ] ; then #only if 64 bit processor family
39 cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1 > /dev/null
42 ln -sf Makefile.linux Makefile
43 echo "Creating dependencies";
44 make -j 3 depend > /dev/null
45 echo "Compiling GTNetS debug libs";
46 make -j 3 debug > /dev/null 2>&1
47 echo "Compiling GTNetS optimal libs";
48 make -j 3 opt > /dev/null 2>&1
53 echo "Copying files to $prefix/lib";
54 cp -fr ./GTNetS/gtnets-current/*.so $prefix/lib/
55 ln -sf $prefix/lib/libgtsim-opt.so $prefix/lib/libgtnets.so
57 echo "Copying files to $prefix/include/gtnets";
58 cp -fr ./GTNetS/gtnets-current/SRC/*.h $prefix/include/gtnets
61 echo "Done with gtnets installation";