## Process this file with automake to generate Makefile.in.

## Source files generated by the iv2h.sh utility (converts .iv model
## files to C/C++ header files).

BUILT_SOURCES = \
	translate1Dragger.h \
	translate2Dragger.h \
	centerballDragger.h \
	tabPlaneDragger.h \
	tabBoxDragger.h \
	dragPointDragger.h \
	pointLightDragger.h \
	directionalLightDragger.h \
	spotLightDragger.h \
	handleBoxDragger.h \
	jackDragger.h \
	trackballDragger.h \
	scaleUniformDragger.h \
	scale2UniformDragger.h \
	scale1Dragger.h \
	scale2Dragger.h \
	rotateCylindricalDragger.h \
	rotateSphericalDragger.h \
	rotateDiscDragger.h \
	transformerDragger.h \
	transformBoxDragger.h

DISTCLEANFILES = \
	$(BUILT_SOURCES) \
	iv2h.sh

if MAC_FRAMEWORK
draggerdefdatadir = $(MAC_FRAMEWORK_PREFIX)/$(MAC_FRAMEWORK_NAME).framework/Versions/$(MAC_FRAMEWORK_VERSION)/Resources/draggerDefaults
else
draggerdefdatadir = $(datadir)/Coin/draggerDefaults
endif

dist_draggerdefdata_DATA = \
	translate1Dragger.iv \
	translate2Dragger.iv \
	centerballDragger.iv \
	tabPlaneDragger.iv \
	tabBoxDragger.iv \
	dragPointDragger.iv \
	pointLightDragger.iv \
	directionalLightDragger.iv \
	spotLightDragger.iv \
	handleBoxDragger.iv \
	jackDragger.iv \
	trackballDragger.iv \
	scaleUniformDragger.iv \
	scale2UniformDragger.iv \
	scale1Dragger.iv \
	scale2Dragger.iv \
	rotateCylindricalDragger.iv \
	rotateSphericalDragger.iv \
	rotateDiscDragger.iv \
	transformerDragger.iv \
	transformBoxDragger.iv

EXTRA_DIST = \
	iv2h.sh.in

# This is necessary to include so the headers are actually built.
all-local: $(BUILT_SOURCES)

# **************************************************************************

# I experienced some problems with script permission, so I changed the rules
# around to generate the script and explicitly set the permission first.
# 20030217 larsa
iv2h.sh: $(srcdir)/iv2h.sh.in
	@( cd $(top_builddir); ./config.status --file=data/draggerDefaults/iv2h.sh )
	@chmod 755 iv2h.sh

# if iv2h fails, we don't want the empty file lying around - 20030217 larsa
translate1Dragger.h: $(srcdir)/translate1Dragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/translate1Dragger.iv > $@; then :; else rm -f $@; exit 1; fi

translate2Dragger.h: $(srcdir)/translate2Dragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/translate2Dragger.iv > $@; then :; else rm -f $@; exit 1; fi

centerballDragger.h: $(srcdir)/centerballDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/centerballDragger.iv > $@; then :; else rm -f $@; exit 1; fi

tabPlaneDragger.h: $(srcdir)/tabPlaneDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/tabPlaneDragger.iv > $@; then :; else rm -f $@; exit 1; fi

tabBoxDragger.h: $(srcdir)/tabBoxDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/tabBoxDragger.iv > $@; then :; else rm -f $@; exit 1; fi

dragPointDragger.h: $(srcdir)/dragPointDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/dragPointDragger.iv > $@; then :; else rm -f $@; exit 1; fi

pointLightDragger.h: $(srcdir)/pointLightDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/pointLightDragger.iv > $@; then :; else rm -f $@; exit 1; fi

directionalLightDragger.h: $(srcdir)/directionalLightDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/directionalLightDragger.iv > $@; then :; else rm -f $@; exit 1; fi

spotLightDragger.h: $(srcdir)/spotLightDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/spotLightDragger.iv > $@; then :; else rm -f $@; exit 1; fi

handleBoxDragger.h: $(srcdir)/handleBoxDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/handleBoxDragger.iv > $@; then :; else rm -f $@; exit 1; fi

jackDragger.h: $(srcdir)/jackDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/jackDragger.iv > $@; then :; else rm -f $@; exit 1; fi

trackballDragger.h: $(srcdir)/trackballDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/trackballDragger.iv > $@; then :; else rm -f $@; exit 1; fi

scaleUniformDragger.h: $(srcdir)/scaleUniformDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/scaleUniformDragger.iv > $@; then :; else rm -f $@; exit 1; fi

scale2UniformDragger.h: $(srcdir)/scale2UniformDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/scale2UniformDragger.iv > $@; then :; else rm -f $@; exit 1; fi

scale1Dragger.h: $(srcdir)/scale1Dragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/scale1Dragger.iv > $@; then :; else rm -f $@; exit 1; fi

scale2Dragger.h: $(srcdir)/scale2Dragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/scale2Dragger.iv > $@; then :; else rm -f $@; exit 1; fi

rotateCylindricalDragger.h: $(srcdir)/rotateCylindricalDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/rotateCylindricalDragger.iv > $@; then :; else rm -f $@; exit 1; fi

rotateSphericalDragger.h: $(srcdir)/rotateSphericalDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/rotateSphericalDragger.iv > $@; then :; else rm -f $@; exit 1; fi

rotateDiscDragger.h: $(srcdir)/rotateDiscDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/rotateDiscDragger.iv > $@; then :; else rm -f $@; exit 1; fi

transformerDragger.h: $(srcdir)/transformerDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/transformerDragger.iv > $@; then :; else rm -f $@; exit 1; fi

transformBoxDragger.h: $(srcdir)/transformBoxDragger.iv iv2h.sh
	if ./iv2h.sh $(srcdir)/transformBoxDragger.iv > $@; then :; else rm -f $@; exit 1; fi

# **************************************************************************

install-dist_draggerdefdataDATA: $(dist_draggerdefdata_DATA)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(draggerdefdatadir)
	@list='$(dist_draggerdefdata_DATA)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  if cmp -s "$$d$$p" "$(DESTDIR)$(draggerdefdatadir)/$$f"; then :; else \
	    echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(draggerdefdatadir)/$$f"; \
	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(draggerdefdatadir)/$$f"; \
	  fi \
	done

