#
# Make executable files for testing BNCpack
#

include ../bncmake.inc

all: mpfr_gexpr test_linear test_efunc test_lu test_cg test_eig test_newton test_integral test_poly test_complex test_dka test_jacobi test_eps test_qr test_gtestmat test_mpq test_lanczos test_krylov test_diff test_interpol test_algebraic

.c.o: ../bnc.h
	$(CC) -c $(INCLUDES) $<

mpfr_gexpr: mpfr_gexpr.o
	$(CC) -ompfr_gexpr $(INCLUDES) mpfr_gexpr.o $(LIBS)

test_linear: test_linear.o $(LIBBNC)
	$(CC) -otest_linear $(INCLUDES) test_linear.o $(LIBS)

test_efunc: test_efunc.o $(LIBBNC)
	$(CC) -otest_efunc $(INCLUDES) test_efunc.o $(LIBS)

test_lu: test_lu.o $(LIBBNC)
	$(CC) -otest_lu $(INCLUDES) test_lu.o $(LIBS)

test_cg: test_cg.o $(LIBBNC)
	$(CC) -otest_cg $(INCLUDES) test_cg.o $(LIBS)

test_eig: test_eig.o $(LIBBNC)
	$(CC) -otest_eig $(INCLUDES) test_eig.o $(LIBS)

test_newton: test_newton.o $(LIBBNC)
	$(CC) -otest_newton $(INCLUDES) test_newton.o $(LIBS)

test_integral: test_integral.o $(LIBBNC)
	$(CC) -otest_integral $(INCLUDES) test_integral.o $(LIBS)

test_poly: test_poly.o $(LIBBNC)
	$(CC) -otest_poly $(INCLUDES) test_poly.o $(LIBS)

test_complex: test_complex.o $(LIBBNC)
	$(CC) -otest_complex $(INCLUDES) test_complex.o $(LIBS)

test_dka: test_dka.o $(LIBBNC)
	$(CC) -otest_dka $(INCLUDES) test_dka.o $(LIBS)

test_jacobi: test_jacobi.o $(LIBBNC)
	$(CC) -otest_jacobi $(INCLUDES) test_jacobi.o $(LIBS)

test_eps: test_eps.o $(LIBBNC)
	$(CC) -otest_eps $(INCLUDES) test_eps.o $(LIBS)

test_qr: test_qr.o $(LIBBNC)
	$(CC) -otest_qr $(INCLUDES) test_qr.o $(LIBS)

test_gtestmat: test_gtestmat.o $(LIBBNC)
	$(CC) -otest_gtestmat $(INCLUDES) test_gtestmat.o $(LIBS)

test_mpq: test_mpq.o $(LIBBNC)
	$(CC) -otest_mpq $(INCLUDES) test_mpq.o $(LIBS)

test_lanczos: test_lanczos.o $(LIBBNC)
	$(CC) -otest_lanczos $(INCLUDES) test_lanczos.o $(LIBS)

test_krylov: test_krylov.o $(LIBBNC)
	$(CC) -otest_krylov $(INCLUDES) test_krylov.o $(LIBS)

test_diff: test_diff.o $(LIBBNC)
	$(CC) -otest_diff $(INCLUDES) test_diff.o $(LIBS)

test_interpol: test_interpol.o $(LIBBNC)
	$(CC) -otest_interpol $(INCLUDES) test_interpol.o $(LIBS)

test_algebraic: test_algebraic.o $(LIBBNC)
	$(CC) -otest_algebraic $(INCLUDES) test_algebraic.o $(LIBS)

clean:
	-rm *.o
	-rm *.exe
