super-configure 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/sh
  2. ROOT_DIR=$PWD
  3. MIC_HOST=x86_64-k1om-linux
  4. MIC_CC_PATH=/usr/linux-k1om-4.7/bin/
  5. DEFAULT_PREFIX=/usr/local
  6. export PATH=${MIC_CC_PATH}${PATH:+:${PATH}}
  7. echo "This file was created by StarPU super-configure 0.0.1." > ./super-config.log
  8. echo "" >> ./super-config.log
  9. echo " $ $0 $*" >> ./super-config.log
  10. for arch in mic host
  11. do
  12. # We call the configure script from a build directory further in the
  13. # arborescence
  14. command="${ROOT_DIR}/configure --enable-mic --with-coi-dir=/opt/intel/mic/coi"
  15. prefix_found=no
  16. if test x$arch = xmic ; then
  17. command="$command --without-hwloc --with-coi-lib-dir=/opt/intel/mic/coi/device-linux-release/lib --host=$MIC_HOST"
  18. else
  19. command="$command --with-coi-lib-dir=/opt/intel/mic/coi/host-linux-release/lib"
  20. fi
  21. for arg in $*
  22. do
  23. if [ ${arg:0:9} = '--prefix=' ]
  24. then
  25. prefix_found=yes
  26. prefix="${arg:9}"
  27. command="$command ${arg}/${arch}"
  28. else
  29. command="$command $arg"
  30. fi
  31. done
  32. # If the user didn't specify a directory where to install the library
  33. # we apply the default one
  34. if test x$prefix_found = xno ; then
  35. command="$command --prefix=${DEFAULT_PREFIX}/$arch"
  36. prefix=${DEFAULT_PREFIX}
  37. fi
  38. # If the build directory doesn't exist yet, create it
  39. if [ ! -d "${ROOT_DIR}/build_${arch}" ] ; then
  40. mkdir "build_${arch}"
  41. fi
  42. cd "build_${arch}"
  43. if test x$arch = xmic ; then
  44. LDFLAGS=-export-dynamic $command
  45. else
  46. $command
  47. fi
  48. make -j
  49. if test x$arch = xmic ; then
  50. make check > /dev/null 2&>1
  51. fi
  52. make install
  53. cd "${ROOT_DIR}"
  54. done
  55. if [ ! -f "${prefix}/mic/lib/pkgconfig/starpu-1.0-mic.pc" ]
  56. then
  57. ln -s "${prefix}/mic/lib/pkgconfig/starpu-1.0.pc" "${prefix}/mic/lib/pkgconfig/starpu-1.0-mic.pc"
  58. fi