# VRML/PROGS/toy/Makefile
############################################################################

# use same configuration parameters as in parent directory
include ../../Config.common
include ../../Config.site

POOLSDIR = ../../POOLS
INCLUDIR = ../../include
LIBDIR = ../../lib
BINDIR = ../../bin

# additional libraries needed by this program, shall be declared in
# a variable in the Config.common/Config.site file (see also
# FILTERS/toy/Makefile). There are no such libraries in this 
# particular case.
# TOY_LIBS = 

############################################################################
# No need to change anything below here
############################################################################
# the source files in this directory
CXXSOURCES = main.C
SOURCES = $(CXXSOURCES) $(CSOURCES)
OBJECTS = ${CXXSOURCES:.C=.o} ${CSOURCES:.c=.o}

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

#default target: compile
all: toy

# generate source file dependencies
depend:
	$(MAKEDEPEND) $(MKDEPFLAGS) $(SOURCES) > deps

toy: $(OBJECTS)
	$(CXX) $(LDFLAGS) -o toy $(OBJECTS) \
		-L$(LIBDIR) -lxrml -ltoy \
		-L$(POOLSDIR) -lpools \
		$(TOY_LIBS) \
		-lm
	ln -sf `pwd`/toy $(BINDIR)

cleanhere: cleangen
	-${RM} toy

clean: cleanhere

distclean: cleanhere

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