1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #!/bin/bash
- ROOT_DIR=$PWD
- [ -n "$MIC_HOST" ] || MIC_HOST=x86_64-k1om-linux
- [ -n "$MIC_CC_PATH" ] || MIC_CC_PATH=/usr/linux-k1om-4.7/bin/
- [ -n "$COI_DIR" ] || COI_DIR=/opt/intel/mic/coi
- DEFAULT_PREFIX=/usr/local
- export PATH=${MIC_CC_PATH}${PATH:+:${PATH}}
- echo "This file was created by StarPU super-configure 0.0.1." > ./super-config.log
- echo "" >> ./super-config.log
- echo " $ $0 $*" >> ./super-config.log
- for arch in mic host
- do
- # We call the configure script from a build directory further in the
- # arborescence
- command="${ROOT_DIR}/configure --enable-mic --with-coi-dir=$COI_DIR"
- prefix_found=no
- if test x$arch = xmic ; then
- command="$command --without-hwloc --with-coi-lib-dir=$COI_DIR/device-linux-release/lib --host=$MIC_HOST"
- else
- command="$command --with-coi-lib-dir=$COI_DIR/host-linux-release/lib"
- fi
- for arg in $*
- do
- if [ ${arg:0:9} = '--prefix=' ]
- then
- prefix_found=yes
- prefix="${arg:9}"
- command="$command ${arg}/${arch}"
- else
- command="$command $arg"
- fi
- done
- # If the user didn't specify a directory where to install the library
- # we apply the default one
- if test x$prefix_found = xno ; then
- command="$command --prefix=${DEFAULT_PREFIX}/$arch"
- prefix=${DEFAULT_PREFIX}
- fi
- # If the build directory doesn't exist yet, create it
- if [ ! -d "${ROOT_DIR}/build_${arch}" ] ; then
- mkdir "build_${arch}"
- fi
- cd "build_${arch}"
- if test x$arch = xmic ; then
- LDFLAGS=-export-dynamic $command
- else
- $command
- fi
- if [ "$?" != 0 ]
- then
- exit $?
- fi
- cd "${ROOT_DIR}"
- done
- cat > Makefile << EOF
- all:
- \$(MAKE) -C build_host
- \$(MAKE) -C build_mic
- clean:
- \$(MAKE) -C build_host clean
- \$(MAKE) -C build_mic clean
- distclean: clean
- rm -f Makefile
- check:
- \$(MAKE) -C build_host check
- \$(MAKE) -C build_mic check
- install:
- \$(MAKE) -C build_host install
- \$(MAKE) -C build_mic install
- ln -sf "${prefix}/mic/lib/pkgconfig/starpu-1.2.pc" "${prefix}/mic/lib/pkgconfig/starpu-1.2-mic.pc"
- EOF
|