Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 57 lines (48 sloc) 960 Bytes
#!/bin/sh
# libucuda or kcuda
target='libucuda'
# use Runtime API or not
runtime='1'
enablecubin='1'
# parse the given options.
for option
do
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$option" in
--target=*)
target="$optarg" ;;
--disable-runtime)
runtime='0' ;;
--with-ptx)
enablecubin='0' ;;
esac
done
if [ $target = 'libucuda' ] ; then
cp -f ../libucuda/* .
cp -rf ../driver/* .
cp -rf ../runtime/ .
cp -f ../cudump/* .
cp -f ../../util/* .
elif [ $target = 'kcuda' ] ; then
cp -f ../kcuda/* .
cp -rf ../driver/* .
cp -f ../../util/* .
# we don't support Runtime API in kernel
runtime='0'
else
echo "Error: invalid target '$target'"
fi
# create API.mk
cat > API.mk << EOF
#
# Copyright (C) Shinpei Kato
# All Rights Reserved
#
# This is automatically generated by configure script.
#
CUDA_RUNTIME_API=$runtime
ENABLE_CUBIN_MODULE=$enablecubin
EOF