1FUZZ_RULES := $(lastword $(MAKEFILE_LIST))
2include $(dir $(FUZZ_RULES))../../src/build.rules
3
4FUZZ_CFLAGS =
5
6ifdef LIBFUZZER
7CC ?= clang
8#FUZZ_FLAGS ?= -fsanitize=fuzzer,address,signed-integer-overflow,unsigned-integer-overflow
9FUZZ_FLAGS ?= -fsanitize=fuzzer,address
10ifndef CFLAGS
11FUZZ_CFLAGS += $(FUZZ_FLAGS)
12endif
13endif
14
15FUZZ_CFLAGS += -DCONFIG_NO_RANDOM_POOL -DTEST_FUZZ
16export FUZZ_CFLAGS
17CFLAGS ?= -MMD -O2 -Wall -g
18CFLAGS += $(FUZZ_CFLAGS)
19ifdef LIBFUZZER
20CFLAGS += -DTEST_LIBFUZZER
21LDFLAGS += $(FUZZ_FLAGS)
22endif
23
24WPAS_SRC=../../../wpa_supplicant
25SRC=../../../src
26
27CFLAGS += -I$(SRC) -I$(SRC)/utils -I$(WPAS_SRC)
28OBJS += ../fuzzer-common.o
29
30# for the lib builds
31export TEST_FUZZ=y
32