# VRML/NODES/Makefile
############################################################################

# use same configuration parameters as in parent directory
include ../../Config.common
include ../../Config.site
INCLUDIR = ../../include
POOLSDIR = ../../POOLS

############################################################################
# No need to change anything below here
############################################################################
# the source files in this directory
PUBSOURCES = Anchor.C Appearance.C AudioClip.C Background.C Billboard.C Box.C \
	Collision.C Color.C ColorInterpolator.C Cone.C Coordinate.C \
	CoordinateInterpolator.C Cylinder.C CylinderSensor.C \
	DirectionalLight.C ElevationGrid.C Extrusion.C Fog.C FontStyle.C   \
	Group.C ImageTexture.C IndexedFaceSet.C IndexedLineSet.C Inline.C  \
	LOD.C Material.C MovieTexture.C NavigationInfo.C Normal.C \
	NormalInterpolator.C OrientationInterpolator.C PixelTexture.C \
	PlaneSensor.C PointLight.C PointSet.C PositionInterpolator.C \
	ProximitySensor.C ScalarInterpolator.C Script.C Shape.C Sound.C \
	Sphere.C SphereSensor.C SpotLight.C Switch.C Text.C \
	TextureCoordinate.C TextureTransform.C TimeSensor.C TouchSensor.C \
	Transform.C Viewpoint.C VisibilitySensor.C WorldInfo.C \
	Geometry.C Texture.C Children.C Grouping.C Transforming.C SoundSource.C \
	LightSource.C Sensor.C EnvironmentalSensor.C PointingDeviceSensor.C \
	DragSensor.C Interpolator.C TimeDependent.C Bindable.C
PRIVSOURCES = ${PUBSOURCES:.C=P.C}
SOURCES = ${PUBSOURCES} ${PRIVSOURCES}
OBJECTS = ${SOURCES:.C=.o}

THISDIRFLAGS = -I$(INCLUDIR) -I$(POOLSDIR) $(MKLIBFLAGS)

NODEGENDIR = ../../NODEGEN

#default target: compile
all: $(OBJECTS)

# generate source file dependencies
link_includes:
	-ln -sf `pwd`/*.[hH] $(INCLUDIR)

depend:
	$(MAKEDEPEND) $(MKDEPFLAGS) $(SOURCES) > deps

$(NODEGENDIR)/nodegen:
	$(MAKE) -C $(NODEGENDIR) nodegen

private_sources: $(NODEGENDIR)/nodegen
	$(NODEGENDIR)/nodegen $(NODEGENDIR)/standard.nodes private all
	-$(RM) AppearanceBase* PhBTexture*
	@echo "!!! NOTE !!! TimeSensorP.C needs editing!! See instructions in TimeSensor.H."

headers: $(NODEGENDIR)/nodegen
	$(NODEGENDIR)/nodegen $(NODEGENDIR)/standard.nodes header all
	-$(RM) AppearanceBase* PhBTexture*
	@echo "!!! NOTE !!! Transforming.H and TextureTransform.H need some editing!!"

# make a clean source tree again
cleanhere: cleangen
	-$(RM) *.bak *.utinc *.utmem

clean: cleanhere

distclean: cleanhere

###############################################################################
# dependencies --- automatically generated with make depend !!
###############################################################################
-include deps
