aboutsummaryrefslogtreecommitdiff
path: root/fuzz/Makefile
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-05-30 08:08:53 +0200
committerMarc André Tanner <mat@brain-dump.org>2020-05-30 08:08:53 +0200
commitf18cce8f92483a1930de23ad0899aa1ef5ed7a0c (patch)
treed047370ce1cf4e150bacfaa5c4f00fce36490210 /fuzz/Makefile
parent38cc374f2acc3783c07db54012201a76b5d8fec3 (diff)
downloadvis-f18cce8f92483a1930de23ad0899aa1ef5ed7a0c.tar.gz
vis-f18cce8f92483a1930de23ad0899aa1ef5ed7a0c.tar.xz
test/fuzz: simplify Makefile
Diffstat (limited to 'fuzz/Makefile')
-rw-r--r--fuzz/Makefile6
1 files changed, 4 insertions, 2 deletions
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 $@