# Makefile for eval
# Last changed 2005-11-22

# Required libraries:
#  - Boost 1.33.0 <www.boost.org>
#  - Xerces 2.7.0 <http://xml.apache.org/xerces-c>
# 
# Other versions might work, these are the ones
# we used.
#
# Libraries might have to be compiled with the
# same compiler version as the program itself.
# 

### Change these values to match your settings ###
BOOST = ${HOME}/packages/boost_1_33_0
XERCES = ${HOME}/packages/xerces-c-src_2_7_0

LIBX = -lxerces-c
BOOSTINC = -I${BOOST}
REGEX = ${BOOST}/libs/regex/build/gcc/libboost_regex-gcc-d-1_32.a
XERCESINC = -I${XERCES}/include
XERCESLIB = -L${XERCES}/lib
XERCESLIBRT = -R${XERCES}/lib

PRG = ../eval

CPP	 = g++
CPPFLAGS = -Wall -g

OBJS = databank.o evinit.o evutil.o execute.o functor.o insrc.o internal.o main.o outxml.o process.o types.o xmlconf.o myfunc.o

PARSEROBJS = parser/parser.tab.o \
		parser/scanner.o \
		parser/alloc.o \
		parser/control.o \
		parser/parse.o
PARSER = parser.tab.o scanner.o alloc.o control.o parse.o

### Rules

.PHONY: all clean depend parser parserclean

all: ${PRG}

${PRG}: ${OBJS} parser
	${CPP} ${CPPFLAGS} ${XERCESLIB} ${XERCESLIBRT} ${LIBX} -o $@ ${OBJS} ${PARSEROBJS} ${REGEX}

parser:
	make -C $@ ${PARSER}

%.o: %.cpp
	${CPP} ${CPPFLAGS} ${BOOSTINC} ${XERCESINC} -c -o $@ $*.cpp

parserclean:
	make -C parser clean

clean: parserclean
	@rm -f *~ *.o ${PRG}

depend:
	makedepend *.cpp

# DO NOT DELETE

databank.o: databank.hpp types.hpp evexp.hpp insrc.hpp evutil.hpp outxml.hpp
evinit.o: evinit.hpp internal.hpp types.hpp databank.hpp evexp.hpp evutil.hpp
evinit.o: process.hpp execute.hpp parser/node.hpp parser/error.hpp
evinit.o: parser/node.hpp functor.hpp parser/parse.hpp parser/error.hpp
evinit.o: parser/control.hpp parser/alloc.hpp parser/strpool.hpp
evinit.o: parser/parse.hpp parser/type.hpp xmlconf.hpp mydomparser.hpp
evutil.o: evutil.hpp
execute.o: execute.hpp types.hpp evexp.hpp parser/node.hpp parser/error.hpp
execute.o: parser/node.hpp
functor.o: functor.hpp evexp.hpp execute.hpp types.hpp parser/node.hpp
functor.o: parser/error.hpp parser/node.hpp process.hpp parser/parse.hpp
functor.o: parser/error.hpp parser/control.hpp parser/alloc.hpp
functor.o: parser/strpool.hpp parser/parse.hpp parser/type.hpp
insrc.o: insrc.hpp evutil.hpp types.hpp evexp.hpp
internal.o: internal.hpp types.hpp databank.hpp insrc.hpp evutil.hpp
internal.o: outxml.hpp
main.o: main.hpp evexp.hpp evinit.hpp parseargs.hpp internal.hpp types.hpp
main.o: parser/error.hpp parser/node.hpp
myfunc.o: process.hpp execute.hpp types.hpp evexp.hpp parser/node.hpp
myfunc.o: parser/error.hpp parser/node.hpp functor.hpp parser/parse.hpp
myfunc.o: parser/error.hpp parser/control.hpp parser/alloc.hpp
myfunc.o: parser/strpool.hpp parser/parse.hpp parser/type.hpp databank.hpp
outxml.o: outxml.hpp evutil.hpp evexp.hpp
process.o: process.hpp execute.hpp types.hpp evexp.hpp parser/node.hpp
process.o: parser/error.hpp parser/node.hpp functor.hpp parser/parse.hpp
process.o: parser/error.hpp parser/control.hpp parser/alloc.hpp
process.o: parser/strpool.hpp parser/parse.hpp parser/type.hpp
types.o: types.hpp
xmlconf.o: xmlconf.hpp parser/parse.hpp parser/error.hpp parser/node.hpp
xmlconf.o: parser/control.hpp parser/alloc.hpp parser/strpool.hpp
xmlconf.o: parser/parse.hpp parser/type.hpp mydomparser.hpp types.hpp
xmlconf.o: evutil.hpp process.hpp execute.hpp evexp.hpp parser/node.hpp
xmlconf.o: parser/error.hpp functor.hpp
