# VRML/PhBRML/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 = \
	AppearanceBase.C \
	PhB3DTexture.C \
	PhB3DTextureTransform.C \
	PhB3DTexturedSurface.C \
	PhBAppearance.C \
	PhBAtmosphere.C \
	PhBBackground.C \
	PhBBlackBodySpectrum.C \
	PhBDiffuseEmitter.C \
	PhBDiffuseReflector.C \
	PhBDiffuseRefractor.C \
	PhBDistortion.C \
	PhBEDF.C \
	PhBEmitter.C \
	PhBHomogeneousMedium.C \
	PhBHomogeneousSurface.C \
	PhBHeterogeneousSurface.C \
	PhBInterpolatedMedium.C \
	PhBInterpolatedSpectrum.C \
	PhBInterpolatedSurface.C \
	PhBIsotropicPhaseFunction.C \
	PhBLxySpectrum.C \
	PhBMedium.C \
	PhBMixedSpectrum.C \
	PhBMonochromaticSpectrum.C \
	PhBPerfectSpecularReflector.C \
	PhBPerfectSpecularRefractor.C \
	PhBPhF.C \
	PhBPhaseFunction.C \
	PhBPhongEmitter.C \
	PhBPhongReflector.C \
	PhBPhongRefractor.C \
	PhBWardReflector.C \
	PhBSchlickReflector.C \
	PhBLafortuneReflector.C \
	PhBAshikminReflector.C \
	PhBNeumannReflector.C \
	PhBProcedural3DTexture.C \
	PhBProceduralBackground.C \
	PhBProceduralEmitter.C \
	PhBProceduralPhaseFunction.C \
	PhBProceduralScatterer.C \
	PhBProceduralSpectrum.C \
	PhBProceduralTexture.C \
	PhBProceduralTextureProjection.C \
	PhBSphereTextureProjection.C \
	PhBBoxTextureProjection.C \
	PhBCylinderTextureProjection.C \
	PhBConeTextureProjection.C \
	PhBSDF.C \
	PhBSimpleBSDF.C \
	PhBFresnelBSDF.C \
	PhBSampledIsotropicEmitter.C \
	PhBSampledSpectrum.C \
	PhBScatterer.C \
	PhBSpectrum.C \
	PhBSurface.C \
	PhBSurfaceDistortion.C \
	PhBTabulatedSpectrum.C \
	PhBTexture.C \
	PhBImageTexture.C \
	PhBTextureEmitter.C \
	PhBTextureProjection.C \
	PhBTexturedBackground.C \
	PhBHomogeneousBackground.C \
	PhBBackgroundLight.C \
	PhBTexturedMedium.C \
	PhBTexturedSurface.C \
	PhBVolumeDistortion.C \
	PhBXYZSpectrum.C \
	PhBRGBSpectrum.C \
	PhBMonitorCalibration.C \
	PhBNoiseTexture.C \
	PhBBackgroundProjection.C \
	PhBLandscapePhotoBackground.C \
	PhB3DCheckerTexture.C \
	PhB3DSpiralTexture.C \
	PhB3DNoiseTexture.C \
	PhBBumpMap.C \
	PhBNormalMap.C \
	PhBBrushMap.C \
	PhBShadingFrameDistortion.C \
	PhBImageTextureBase.C \
	PhBToggleTexture.C \
	PhBHenyeyGreensteinPhaseFunction.C \
	PhBSchlickPhaseFunction.C \
	PhBPixelTexture.C \
	PhBTextureFilter.C \
	PhBBilinearInterpolation.C
PRIVSOURCES = ${PUBSOURCES:.C=P.C}
CXXSOURCES = ${PUBSOURCES} ${PRIVSOURCES} utils.C cie.C PerlinNoise.C PerlinNoiseP.C ReadImage.C 
CSOURCES =
SOURCES = $(CXXSOURCES) $(CSOURCES)

OBJECTS = ${CXXSOURCES:.C=.o} ${CSOURCES:.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)/phbrml.nodes private all
	-$(RM) Bindable* Children* Transform* TextureTransform*

headers: $(NODEGENDIR)/nodegen
	$(NODEGENDIR)/nodegen $(NODEGENDIR)/phbrml.nodes header all
	-$(RM) Bindable* Children* Transform* TextureTransform*
	@echo "PhB3DTextureTransform needs 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
