From f18cce8f92483a1930de23ad0899aa1ef5ed7a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 30 May 2020 08:08:53 +0200 Subject: test/fuzz: simplify Makefile --- fuzz/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fuzz') diff --git a/fuzz/Makefile b/fuzz/Makefile index 6f5dc90..dd1c376 100644 --- a/fuzz/Makefile +++ b/fuzz/Makefile @@ -4,13 +4,15 @@ ALL = text-fuzzer text-libfuzzer buffer-fuzzer CC = afl-gcc CFLAGS += -I. -I../.. -DBUFFER_SIZE=4 -DBLOCK_SIZE=4 +TEXT_SRC = ../../text.c ../../text-util.c ../../text-motions.c ../../text-objects.c ../../text-regex.c + test: $(ALL) -text-fuzzer: text-fuzzer.c fuzzer.h ../../text.c ../../text-util.c ../../text-motions.c ../../text-objects.c ../../text-regex.c +text-fuzzer: text-fuzzer.c fuzzer.h $(TEXT_SRC) @echo Compiling $@ binary @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_LIBC} ${CFLAGS_EXTRA} ${filter %.c, $^} ${LDFLAGS} -o $@ -text-libfuzzer: text-fuzzer.c fuzzer.h ../../text.c ../../text-util.c ../../text-motions.c ../../text-objects.c ../../text-regex.c +text-libfuzzer: text-fuzzer.c fuzzer.h $(TEXT_SRC) @echo Compiling $@ binary @${CC} ${CFLAGS} ${CFLAGS_STD} ${CFLAGS_LIBC} ${CFLAGS_EXTRA} -DLIBFUZZER ${filter %.c, $^} -fsanitize=fuzzer,address,undefined ${LDFLAGS} -o $@ -- cgit v1.2.3