#
# Make benchmark programs with BNCpack
#

include ../bncmake.inc

all: basebench linearbench linearbench_dec matmulbench matmulbench2 matvecmulbench

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

basebench: basebench.o $(LIBBNC)
	$(CC) -obasebench $(INCLUDES) basebench.o $(LIBS)

linearbench: linearbench.o $(LIBBNC)
	$(CC) -olinearbench $(INCLUDES) linearbench.o $(LIBS)

linearbench_dec: linearbench.c $(LIBBNC)
	$(CC) -c -olinearbench_dec.o -DUSE_DECIMAL $(INCLUDES) linearbench.c
	$(CC) -olinearbench_dec $(INCLUDES) linearbench_dec.o $(LIBS)

matvecmulbench: matvecmulbench.o $(LIBBNC)
	$(CC) -omatvecmulbench $(INCLUDES) matvecmulbench.o $(LIBS)

matmulbench: matmulbench.o $(LIBBNC)
	$(CC) -omatmulbench $(INCLUDES) matmulbench.o $(LIBS)

matmulbench2: matmulbench2.o $(LIBBNC)
	$(CC) -omatmulbench2 $(INCLUDES) matmulbench2.o $(LIBS)

clean:
	-rm *.o
