CFLAGS = -std=c99 -D_GNU_SOURCE -Wall -pedantic -Werror -Wfloat-equal \ -Wundef -Wcast-align -Wwrite-strings -Waggregate-return \ -Wswitch-default -Wconversion -Wno-error=sign-conversion \ -Wunreachable-code -Wno-aggregate-return -Wimplicit-fallthrough LDFLAGS = -lm -latomic TARG = bin/lattice_scheme_generator bin/analyze bin/simulation CC = gcc INCS = common.h std.h analyze.h inputs.h ifeq (${DEBUG},1) CFLAGS+= -fsanitize=undefined -g3 -DDEBUG endif ifeq (${ASAN},1) CFLAGS+= -fsanitize=address endif ifeq (${TSAN},1) CFLAGS+= -fsanitize=thread endif .PHONY: all clean memcheck thesis all: $(TARG) bin/%: %.c $(INCS) ${CC} $(CFLAGS) -o $@ $< $(LDFLAGS) tests: tests/tests.c tests/sut.h $(INCS) analyze.h $(MAKE) -C tests all thesis: $(MAKE) -C thesis all check: tests $(MAKE) -C tests check cppcheck: cppcheck --enable=all --template='{file}:{line}:{severity}:{message}' --quiet simulation.c analyze.c lattice_scheme_generator.c $(INCS) inputs.h memcheck: bin/simulation bin/analyze bin/lattice_scheme_generator # valgrind --leak-check=full --log-fd=9 ./bin/lattice_scheme_generator -l 100 102 9>&1 1>/dev/null 2>/dev/null valgrind --leak-check=full --show-leak-kinds=all ./bin/simulation -c lundy-mees -v 1e-3 -T 3 /tmp/test-simulation # valgrind --leak-check=full --show-leak-kinds=all ./bin/analyze -e simulation-3x3-bigger-enforce2d clean: rm -f $(TARG) $(MAKE) -C tests clean