SubDir TOP plugins video canvas xwindow ;

if $(X11.AVAILABLE) = "yes"
{
  local XWIN_XALERT = ;
  local XWIN_EXTERN = ;

  if $(XAW.AVAILABLE) = "yes"
  {
    XWIN_XALERT = [ Wildcard xalert_xaw : *.cpp *.h *.c ] ;
    XWIN_EXTERN = XAW ;
  }
  else
  {
    XWIN_XALERT = [ Wildcard xalert_null : *.cpp *.h ] ;
  }

  Description xwin : "X Window Plugin" ;
  Plugin xwin : [ Wildcard *.cpp *.h ] $(XWIN_XALERT) ;
  LinkWith xwin : crystalspace ;
  CompileGroups xwin : canvases softcanvas openglcanvas ;
  if $(XFREE86VM.AVAILABLE) = "yes"
  {
    CFlags xwin : [ FDefines XFREE86VM ] ;
    ExternalLibs xwin : $(XWIN_EXTERN) XFREE86VM ;
  }
  else
  {
    ExternalLibs xwin : $(XWIN_EXTERN) X11 ;
  }
}
