include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules

CFLAGS = ${PETSC_CC_INCLUDES} -I. -I..
CPPFLAGS = ${PETSC_CC_INCLUDES} -I. -I..

all: main_tao_1

main_tao_1: main_tao_1.o pf_jacobian.o example1.o example1_steadystate.o example1_first_derivatives.o example1_residuals.o
	    ${CLINKER} -o main_tao_1 main_tao_1.o example1.o example1_steadystate.o example1_residuals.o example1_first_derivatives.o ${PETSC_LIB} -lstdc++ -lm
     
snes_1: snes_1.o  example1.o example1_steadystate.o example1_first_derivatives.o example1_residuals.o
	    ${CLINKER} -o snes_1 snes_1.o example1.o example1_steadystate.o example1_residuals.o example1_first_derivatives.o ${PETSC_LIB} -lstdc++ -lm
     
main_tao_1.o: main_tao_1.cc main_tao.h ../dynare_cpp_driver.hh
snes_1.o: snes_1.cc main_tao.h ../dynare_cpp_driver.hh
pf_jacobian.o: pf_jacobian.cc main_tao.h
example1.o: example1.cc ../dynare_cpp_driver.hh
example1_steadystate.o: example1_steadystate.cc
example1_residuals.o: example1_residuals.c
example1_first_derivatives.o: example1_first_derivatives.c
example1.cc: example1.mod
	     /home/michel/dynare/git/master/matlab/preprocessor64/dynare_m example1.mod output=first language=C++
example1_residuals.c: example1.mod
	     /home/michel/dynare/git/master/matlab/preprocessor64/dynare_m example1.mod output=first language=C++
