##================================================================
## Makefile to build the EQUINOX-3D plugins
##
## AUTHOR:  Gabor Nagy
## DATE:    2024-Jun-26 00:54:29
##
## Copyright (C) 1996-2026 By Gabor Nagy. All rights reserved.
##================================================================

include		../make.defines
include		make.defines

SRC_FILES =	*.[ch] Animation/*.[ch] CAM/*.[ch] Deform/*.[ch] Examples/*.[ch] Globe/*.[ch] HW/*.[ch] Mechanical/*.[ch] Med/*.[ch] Nature/*.[ch] Physics/*.[ch] Primitives/*.[ch] Rendering/*.[ch] Peripherals/*.[ch] Robotics/*.[ch] Shaders/*.[ch] Sol/*.[ch] Surface/*.[ch]

OBJ_FILES =	$(OBJ_DIR)/*.o\
		$(OBJ_DIR)/Animation/*.o\
		$(OBJ_DIR)/Physics/*.o\
		$(OBJ_DIR)/Primitives/*.o\
		$(OBJ_DIR)/Rendering/*.o\
		$(OBJ_DIR)/Surface/*.o

OBJ_DIRS =	$(OBJ_DIR)\
		$(OBJ_DIR)/Animation\
		$(OBJ_DIR)/CAM\
		$(OBJ_DIR)/Deform\
		$(OBJ_DIR)/Lights\
		$(OBJ_DIR)/Nature\
		$(OBJ_DIR)/Physics\
		$(OBJ_DIR)/Primitives\
		$(OBJ_DIR)/Rendering\
		$(OBJ_DIR)/Surface


DSO_DIRS =	$(DSO_DIR)\
		$(DSO_DIR)/Animation\
		$(DSO_DIR)/CAM\
		$(DSO_DIR)/Deform\
		$(DSO_DIR)/Lights\
		$(DSO_DIR)/Nature\
		$(DSO_DIR)/Physics\
		$(DSO_DIR)/Primitives\
		$(DSO_DIR)/Rendering\
		$(DSO_DIR)/Surface


TARGETS	= $(DSO_DIR)/Boolean.so\
		$(DSO_DIR)/Cleanup.so\
		$(DSO_DIR)/Clone.so\
		$(DSO_DIR)/Info.so\
		$(DSO_DIR)/Camera.so\
		$(DSO_DIR)/Display.so\
		$(DSO_DIR)/Files.so\
		$(DSO_DIR)/Geometries.so\
		$(DSO_DIR)/Hierarchies.so\
		$(DSO_DIR)/PolyGroups.so\
		$(DSO_DIR)/Select.so\
		$(DSO_DIR)/Tesselate.so\
		$(DSO_DIR)/Transforms.so


# Un-commenting this will override the active Plugin list, so only use this if you mean to do that!
#TARGETS +=	$(DSO_DIR)/Plugins.list


#------------------------------
# Animation
#------------------------------
TARGETS	     +=	$(DSO_DIR)/Animation/Path.so\
		$(DSO_DIR)/Animation/Skeleton.so

#TARGETS	     +=	$(DSO_DIR)/Deform/AlongSpline.so

TARGETS	     +=	$(DSO_DIR)/Lights/Area.so

#TARGETS	     +=	$(DSO_DIR)/Nature/Grass.so


#------------------------------
# Primitives
#------------------------------
TARGETS	     +=	$(DSO_DIR)/Primitives/2D.so\
		$(DSO_DIR)/Primitives/Box.so\
		$(DSO_DIR)/Primitives/Cylinder.so\
		$(DSO_DIR)/Primitives/Grid.so\
		$(DSO_DIR)/Primitives/Polyhedra.so\
		$(DSO_DIR)/Primitives/Sphere.so\
		$(DSO_DIR)/Primitives/Torus.so\
		$(DSO_DIR)/Primitives/Terrain.so\
		$(DSO_DIR)/Primitives/Vector.so\
		$(DSO_DIR)/Surface/Revolve.so\
		$(DSO_DIR)/Surface/Skin.so


include		Chemistry/make.targets
include		Examples/make.targets


#------------------------------
# Physics
#------------------------------
#TARGETS	+=	$(DSO_DIR)/Physics/Waves.so

ifneq ($(ODE_DIR),)
#TARGETS +=	$(DSO_DIR)/Physics/RigidBodyODE.so
endif

ifneq ($(Novodex_LIB_DIR),)
#TARGETS +=	$(DSO_DIR)/Physics/RigidBodyNx.so
endif

ifneq ($(BULLET_DIR),)
#TARGETS +=	$(DSO_DIR)/Physics/RigidBodyBullet.so
endif



#------------------------------
# Rendering
#------------------------------
#TARGETS	+=	$(DSO_DIR)/Rendering/Main.so

## On MacOSX, we can build the Cg renderer
## On Linux, we can build GLSL and Cg
##
#ifneq ("$(Cg_DIR)", "")
 ifneq ($(OSNAME),IRIX)
  ifeq ("$(shell uname)", "Darwin")
   CgINC     =	-I$(Cg_DIR)/include
  endif

#  TARGETS +=	$(DSO_DIR)/Rendering/Cg.so
  ifneq ($(OSNAME),MacOSX)
#   TARGETS +=	$(DSO_DIR)/Rendering/GLSL.so
  endif
 endif

#endif

include		make.rules
include 	Chemistry/make.rules
include 	Examples/make.rules
