#******************************************************************************
#
#       Copyright:      2005-2010 Paul Obermeier (obermeier@tcl3d.org)
#
#                       See the file "Tcl3D_License.txt" for information on
#                       usage and redistribution of this file, and for a
#                       DISCLAIMER OF ALL WARRANTIES.
#
#       Module:         Tcl3D
#       Filename:       Makefile
#
#       Author:         Paul Obermeier
#
#       Description:    Master Makefile for the Tcl3D package.
#                       The syntax is based on GNU make.
#
#******************************************************************************

.PHONY: all install clean distclean

# Do NOT change order of subdirectories.
SUBDIRS = tcl3dOgl tcl3dGauges \
	  tcl3dCg tcl3dSDL tcl3dFTGL tcl3dGl2ps tcl3dOde \
	  tcl3dOsg

all: $(patsubst %,_all_%,$(SUBDIRS))

$(patsubst %,_all_%,$(SUBDIRS)):
	$(MAKE) -C $(patsubst _all_%,%,$@) all

install: all $(patsubst %,_install_%,$(SUBDIRS))

$(patsubst %,_install_%,$(SUBDIRS)):
	$(MAKE) -C $(patsubst _install_%,%,$@) install

clean: $(patsubst %,_clean_%,$(SUBDIRS))

$(patsubst %,_clean_%,$(SUBDIRS)):
	$(MAKE) -C $(patsubst _clean_%,%,$@) clean

distclean: clean $(patsubst %,_distclean_%,$(SUBDIRS))

$(patsubst %,_distclean_%,$(SUBDIRS)):
	$(MAKE) -C $(patsubst _distclean_%,%,$@) distclean
