CFLAGS?= -std=c11 -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 -I.. LDFLAGS?= -lm -latomic TARG = tests CC = gcc INCS = ../common.h ../std.h ../analyze.h sut.h expected.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 all: $(TARG) $(TARG): $(TARG).c $(INCS) $(CC) $(CFLAGS) $(LDFLAGS) -I.. -o $@ $< check: $(TARG) ./$(TARG) clean: rm -f $(TARG)