include settings.mk

C_FILES=parser.c math/math.c main.c
OBJS=$(C_FILES:.c=.o)
BIN=mean




$(BIN): $(OBJS) Makefile
	$(CC) $(OBJS) -o $@

clean:
	rm -fr $(OBJS) $(BIN) *~ latex html
	cd test && make clean

check-leaks: $(BIN)
	valgrind --leak-check=full ./$(BIN) 2 4 6
	valgrind --leak-check=full ./$(BIN) `seq 1 1000`
	valgrind --leak-check=full ./$(BIN) `seq 1 100000`


check: $(OBJS)
	cd test && make check

