Files
exercism/c/gigasecond/makefile
T

26 lines
537 B
Makefile
Raw Normal View History

2019-03-07 00:01:15 +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_gigasecond.c src/gigasecond.c src/gigasecond.h
@echo Compiling $@
@$(CC) $(CFLAGS) src/gigasecond.c test/vendor/unity.c test/test_gigasecond.c -o tests.out