# --builddir $CINTSYSDIR option added to makecint everywhere; D. Barna
# CINTSYSDIR should be set to the actual build directory (done by the upmost Makefile)

if [ "$CINTSYSDIR" = "" ] ; then
  echo CINTSYSDIR should be set to the actual build directory during the compilation of cint
  exit 1
fi

INC='-I/usr/X11R6/include'
#LIB='-L/usr/X11R6/lib -lGL -lGLU -lglut -lXmu -lX11 -lXi'
LIB='-L/usr/X11R6/lib -lGL -lGLU -lGLw -lXmu -lX11 -lXi'

mv ../../include/GL ../../include/GLx

makecint --builddir $CINTSYSDIR -mk Makefile -dl gl.dll $INC -h TOP.h -l $LIB 
# if above does't work, use following line instead
# makecint --builddir $CINTSYSDIR -p -mk Makefile -dl gl.dll $INC -h TOP.h -l $LIB 
make clean
make 

mv ../../include/GLx ../../include/GL

mv gl.dll $CINTSYSDIR/include/GL/gl.dll
make clean
rm Makefile
