<NME> makeHook.sh
<BEF> #!/bin/sh

if [ ! -f ~arch ]; then
  echo '#include <stdio.h>
    int main(){printf("%d", sizeof(long));return 0;}' | gcc -x c -
  SIZEOF_LONG=$(./a.out)
  rm -f a.out
  case $SIZEOF_LONG in
    8)
      echo 'int main() {
#ifdef __x86_64__
return 0;
#endif
return 1;}' | cc -x c -
  esac
fi

make clean
make ARCH=$(cat ~arch)
strip -S libsha3.a
    4)
      echo 32BI > arch
    ;;
  esac
fi

rm -f SnP-interface.h
ln -s $(cat arch)/SnP-interface.h SnP-interface.h

make clean
make CVMFS_CASE_C_FLAGS="$CVMFS_BASE_C_FLAGS" ARCH=$(cat arch)
strip -S libsha3.a

cp -v *.h $EXTERNALS_INSTALL_LOCATION/include/
cp -v libsha3.a $EXTERNALS_INSTALL_LOCATION/lib/

<MSG> fix build system for sha3

<DFF> @@ -2,7 +2,7 @@
 
 if [ ! -f ~arch ]; then
   echo '#include <stdio.h>
-    int main(){printf("%d", sizeof(long));return 0;}' | gcc -x c -
+    int main(){printf("%d", sizeof(long));return 0;}' | cc -x c -
   SIZEOF_LONG=$(./a.out)
   rm -f a.out
   case $SIZEOF_LONG in
@@ -15,6 +15,9 @@ if [ ! -f ~arch ]; then
   esac
 fi
 
+rm -f SnP-interface.h
+ln -s $(cat ~arch)/SnP-interface.h SnP-interface.h
+
 make clean
 make ARCH=$(cat ~arch)
 strip -S libsha3.a

{'addition_count': 4, 'commit_subject': 'fix build system for sha3', 'deletion_count': 1, 'file_extension': '.sh', 'lang': 'sh', 'license': 'bsd-3-clause', 'repo_name': 'cvmfs/cvmfs'}