Files

26 lines
522 B
Makefile
Raw Permalink Normal View History

2019-02-23 15:53:44 +00:00
CFLAGS = -std=c99
CFLAGS += -g
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -pedantic
CFLAGS += -Werror
VFLAGS = --quiet
VFLAGS += --tool=memcheck
VFLAGS += --leak-check=full
VFLAGS += --error-exitcode=1
test: tests.out
@./tests.out
memcheck: tests.out
@valgrind $(VFLAGS) ./tests.out
@echo "Memory check passed"
clean:
rm -rf *.o *.out *.out.dSYM
tests.out: test/test_isogram.c src/isogram.c src/isogram.h
@echo Compiling $@
@$(CC) $(CFLAGS) src/isogram.c test/vendor/unity.c test/test_isogram.c -o tests.out