SubDir TOP Demos ;

SubInclude TOP Demos OpenGL ;

if $(GLUT.AVAILABLE) = "yes"
{
  # All demo apps have a lot in common, so use this rule to simply things
  rule BulletDemo
  {
    Application $(<) : $(>) : noinstall console nomanifest ;
    LinkWith $(<) :  bulletopenglsupport bulletdynamics bulletcollision bulletmath ;
    CFlags $(<) : 
	  [ FIncludes $(TOP)/Demos/OpenGL ] 
    ;
    MsvcIncDirs $(<) : 
	"../../Demos/OpenGL" 
	"../../src" ;
  }

  #some demos need extra functionality, Collada / ConvexDecomposition etc.
  rule ExtraDemo
  {
    Application $(<) : $(>) : noinstall console nomanifest ;
    LinkWith $(<) :   colladadom libxml bulletopenglsupport convexdecomposition bulletdynamics bulletcollision  bulletmath ;
    CFlags $(<) :
          [ FIncludes $(TOP)/Demos/OpenGL ]
       	  			[ FIncludes $(TOP)/Extras/ConvexDecomposition ]
 	  			[ FIncludes $(TOP)/Extras/COLLADA_DOM/include ]
 	  			[ FIncludes $(TOP)/Extras/COLLADA_DOM/include/1.4 ]
	  			[ FIncludes $(TOP)/Extras/LibXML ]
          [ FIncludes $(TOP)/Extras/LibXML/include ]



    ;
    MsvcIncDirs $(<) :
        "../../Demos/OpenGL"
      	"../../Extras/ConvexDecomposition" 
	"../../Extras/COLLADA_DOM/include"
 	"../../Extras/COLLADA_DOM/include/1.4"
	"../../Extras/LibXML"
        "../../Extras/LibXML/include"	;
  }



}
else
{
  rule BulletDemo
  {
  }
}

 rule BulletBasicDemo
  {
    Application $(<) : $(>) : noinstall console nomanifest ;
    LinkWith $(<) :  bulletcollision  bulletmath ;
    CFlags $(<) :
          [ FIncludes $(TOP)/src ]
           ;
    MsvcIncDirs $(<) :
        "../../src" ;
  }

SubInclude TOP Demos CcdPhysicsDemo ;
SubInclude TOP Demos UserCollisionAlgorithm ;
#SubInclude TOP Demos ForkLiftDemo ;
SubInclude TOP Demos BspDemo ;
SubInclude TOP Demos ConvexDecompositionDemo ;
SubInclude TOP Demos ColladaDemo ;
SubInclude TOP Demos BspDemo ;
#SubInclude TOP Demos VehicleDemo ;
SubInclude TOP Demos CollisionDemo ;
SubInclude TOP Demos CollisionInterfaceDemo ;
SubInclude TOP Demos ConcaveDemo ;
SubInclude TOP Demos ConstraintDemo ;
SubInclude TOP Demos ContinuousConvexCollision ;
SubInclude TOP Demos GjkConvexCastDemo ;
SubInclude TOP Demos Raytracer ;
SubInclude TOP Demos SimplexDemo ;
