:
 
./makeCC
if(test $? -ne 0) then
   exit 1
fi

echo char \* rootDir=\"`pwd`\"\; > c_source/sqme_aux/rootDir.h 
  
cd c_source
for dir in getmem chep_crt service2 polynom  num  plot symb tab model sqme_aux
do 
  cd $dir
  echo "C compilation. Source directory: $dir" 
  ../c_compile `cat SOURCES`
  if(test $? -ne 0) then
    echo  ERROR  in C-code compilation 
    echo  Nothing workable is created  
    exit 1
  fi 
  ./export
  if(test  $? -ne 0) then
         echo  ERROR  in C-code  linking or archiving. 
         echo  Nothing workable is created
     exit 1
  fi 
  cd ..
done

   
echo Code was compiled and linked successfully.
echo CalcHEP can be started. 

