2020-10-11 03:58:57 -04:00
|
|
|
FUZZ_RULES := $(lastword $(MAKEFILE_LIST))
|
|
|
|
include $(dir $(FUZZ_RULES))../../src/build.rules
|
|
|
|
|
2019-06-07 16:57:02 -04:00
|
|
|
FUZZ_CFLAGS =
|
|
|
|
|
|
|
|
ifdef LIBFUZZER
|
|
|
|
CC ?= clang
|
|
|
|
#FUZZ_FLAGS ?= -fsanitize=fuzzer,address,signed-integer-overflow,unsigned-integer-overflow
|
|
|
|
FUZZ_FLAGS ?= -fsanitize=fuzzer,address
|
|
|
|
ifndef CFLAGS
|
|
|
|
FUZZ_CFLAGS += $(FUZZ_FLAGS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
FUZZ_CFLAGS += -DCONFIG_NO_RANDOM_POOL -DTEST_FUZZ
|
|
|
|
export FUZZ_CFLAGS
|
|
|
|
CFLAGS ?= -MMD -O2 -Wall -g
|
|
|
|
CFLAGS += $(FUZZ_CFLAGS)
|
2019-06-01 07:53:24 -04:00
|
|
|
ifdef LIBFUZZER
|
|
|
|
CFLAGS += -DTEST_LIBFUZZER
|
2019-06-07 16:57:02 -04:00
|
|
|
LDFLAGS += $(FUZZ_FLAGS)
|
2019-06-01 07:53:24 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
WPAS_SRC=../../../wpa_supplicant
|
|
|
|
SRC=../../../src
|
|
|
|
|
|
|
|
CFLAGS += -I$(SRC) -I$(SRC)/utils -I$(WPAS_SRC)
|
|
|
|
OBJS += ../fuzzer-common.o
|
|
|
|
|
2020-10-11 03:58:58 -04:00
|
|
|
# for the lib builds
|
|
|
|
export TEST_FUZZ=y
|