#!/usr/bin/env bash

UNAME=`uname -s`
FILE_SEP='/'; if [[ "$UNAME" = CYGWIN* ]]; then FILE_SEP='\\'; fi
PATH_SEP=':'; if [[ "$UNAME" = CYGWIN* ]]; then PATH_SEP=';'; fi

prog=$(readlink "$0" 2>&1)
[ $? -eq 127 -o "$prog" = "" ] && prog="$0"
export X10_DIST="$(cd "$(dirname "$prog")/.." && pwd)"
if [[ "$UNAME" = CYGWIN* ]]; then X10_DIST="$(cygpath -aw "$X10_DIST")"; fi

export DEXT="x10cuda.ExtensionInfo"

exec "${X10_DIST}/bin/x10c" "$@" -define __CPP__
