commit cc5f4ee87bcb16d81774bfa1a89ccc53ea0213e2 from: Stefan Sperling date: Sun Sep 20 21:02:18 2020 UTC rename linux_Makefile to GNUmakefile; GNU make picks this up automatically commit - 440d36388f04f175fd7c97bd2d87ad60f9cb8675 commit + cc5f4ee87bcb16d81774bfa1a89ccc53ea0213e2 blob - 2ff357ceee0eed252b191258de3fea36fa4ae92b blob + 4e99e6e3c2e246866ba13d435969f3757f271291 --- README +++ README @@ -20,10 +20,7 @@ The source code itself is not based on the code found written from scratch with the knowledge gained. Compile: - OpenBSD: - make -C diff - Linux: - make -f linux_Makefile -C diff + make -C diff Test: make -C test/ blob - /dev/null blob + 4a731caaebd2a420a2569b29e1e157c5a2376fc5 (mode 644) --- /dev/null +++ diff/GNUmakefile @@ -0,0 +1,13 @@ +CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 + +diff: diff.c ../lib/libdiff.a + gcc $(CFLAGS) -I../include -o $@ $^ + + +../lib/libdiff.a: ../lib/*.[hc] ../include/diff/*.h + $(MAKE) -C ../lib + +.PHONY: clean +clean: + rm diff + $(MAKE) -C ../lib clean blob - 62c7103d70ac32f292cc05f62c782305dd8798f6 (mode 644) blob + /dev/null --- diff/linux_Makefile +++ /dev/null @@ -1,13 +0,0 @@ -CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 - -diff: diff.c ../lib/libdiff.a - gcc $(CFLAGS) -I../include -o $@ $^ - - -../lib/libdiff.a: ../lib/*.[hc] ../include/diff/*.h - $(MAKE) -f linux_Makefile -C ../lib - -.PHONY: clean -clean: - rm diff - $(MAKE) -f linux_Makefile -C ../lib clean blob - /dev/null blob + a6ff8bd1ed65c0db6c0feaf7866523a9d9f52948 (mode 644) --- /dev/null +++ lib/GNUmakefile @@ -0,0 +1,24 @@ +srcs = \ + diff_atomize_text.c \ + diff_main.c \ + diff_myers.c \ + diff_patience.c \ + diff_output.c \ + diff_output_plain.c \ + diff_output_unidiff.c \ + $(END) + +objs = $(srcs:.c=.o) + +libdiff.a: $(objs) + ar rcs $@ $^ + +CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 + +%.o: %.c ./*.h ../include/diff/*.h + gcc $(CFLAGS) -I../include -o $@ -c $< + +.PHONY: clean +clean: + -rm $(objs) + -rm libdiff.a blob - a6ff8bd1ed65c0db6c0feaf7866523a9d9f52948 (mode 644) blob + /dev/null --- lib/linux_Makefile +++ /dev/null @@ -1,24 +0,0 @@ -srcs = \ - diff_atomize_text.c \ - diff_main.c \ - diff_myers.c \ - diff_patience.c \ - diff_output.c \ - diff_output_plain.c \ - diff_output_unidiff.c \ - $(END) - -objs = $(srcs:.c=.o) - -libdiff.a: $(objs) - ar rcs $@ $^ - -CFLAGS = -fsanitize=address -fsanitize=undefined -g -O3 - -%.o: %.c ./*.h ../include/diff/*.h - gcc $(CFLAGS) -I../include -o $@ -c $< - -.PHONY: clean -clean: - -rm $(objs) - -rm libdiff.a