CFLAGS = -Werror -Wall -Wextra -Wpedantic -std=c89 -ggdb3 -O1 -L.. -I..
LDLIBS = -lpthread -lparapat
OUTPUT_OPTION := -MMD -MP $(OUTPUT_OPTION)
TRGT = farm-tests pipeline-tests fib

LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(PWD)/..

.PHONY: default test clean

default: test

test: test.time

%-tests: ../libparapat.so

test.time: $(TRGT)
	for x in $(TRGT) ; do ./$$x ; done
	touch test.time

clean:
	$(RM) *.d *.o $(TRGT)

-include $(wildcard *.d)
