1SRCS = \ 2 diff_atomize_text.c \ 3 diff_main.c \ 4 diff_myers.c \ 5 diff_patience.c \ 6 diff_output.c \ 7 diff_output_plain.c \ 8 diff_output_unidiff.c \ 9 diff_output_edscript.c \ 10 $(END) 11 12# Compat sources 13VPATH= $(CURDIR)/../compat 14SRCS+= getprogname_linux.c reallocarray.c recallocarray.c merge.c \ 15 strlcat.c 16CFLAGS+= -I$(CURDIR)/../compat/include 17 18OBJS = $(SRCS:.c=.o) 19 20libdiff.a: $(OBJS) 21 ar rcs $@ $^ 22 23CFLAGS += -fsanitize=address -fsanitize=undefined -g -O3 24CFLAGS += -Wstrict-prototypes -Wunused-variable -Wuninitialized 25 26%.o: %.c ./*.h ../include/*.h 27 gcc $(CFLAGS) -I../include -o $@ -c $< 28 29.PHONY: clean 30clean: 31 -rm $(OBJS) 32 -rm libdiff.a 33