aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/fuzz/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzz/Makefile')
-rw-r--r--src/fuzz/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fuzz/Makefile b/src/fuzz/Makefile
index cb9db3b..eaa0eca 100644
--- a/src/fuzz/Makefile
+++ b/src/fuzz/Makefile
@@ -2,7 +2,9 @@
#
# Copyright (C) 2018-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
-all: config uapi stringlist cmd
+FUZZERS := config uapi stringlist cmd set setconf
+
+all: $(FUZZERS)
CFLAGS ?= -O3 -march=native -g
CFLAGS += -fsanitize=fuzzer -fsanitize=address -std=gnu11 -idirafter ../uapi -D_GNU_SOURCE
@@ -20,7 +22,13 @@ stringlist: stringlist.c ../ipc.c ../curve25519.c ../encoding.c
cmd: cmd.c $(wildcard ../*.c)
$(CC) $(CFLAGS) -D'RUNSTATEDIR="/var/empty"' -D'main(a,b)=wg_main(a,b)' -o $@ $^ -lmnl
+set: set.c ../set.c ../ipc.c ../encoding.c ../mnlg.c ../curve25519.c ../config.c
+ $(CC) $(CFLAGS) -o $@ $< -lmnl
+
+setconf: setconf.c ../setconf.c ../ipc.c ../encoding.c ../mnlg.c ../curve25519.c ../config.c
+ $(CC) $(CFLAGS) -o $@ $< -lmnl
+
clean:
- rm -f config uapi stringlist cmd
+ $(RM) $(FUZZERS)
.PHONY: all clean