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