mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
d438b4a3ce
src/*/Makefile needs to allow additional CFLAGS values to be provided from the calling Makefiles so that the clang command line arguments to enable sanitizers consistently. In addition, it can be useful to be able to provide CC, CFLAGS, and LDFLAGS from external setup while still requesing LIBFUZZER=y build. Allow that by not overriding these variables if they are already set. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
32 lines
343 B
Plaintext
32 lines
343 B
Plaintext
ifndef CC
|
|
CC=gcc
|
|
endif
|
|
|
|
ifndef CFLAGS
|
|
CFLAGS = -MMD -O2 -Wall -g
|
|
endif
|
|
|
|
ifdef TEST_FUZZ
|
|
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
|
CFLAGS += -DTEST_FUZZ
|
|
endif
|
|
|
|
CFLAGS += $(FUZZ_CFLAGS)
|
|
CFLAGS += -I.. -I../utils
|
|
|
|
|
|
Q=@
|
|
E=echo
|
|
ifeq ($(V), 1)
|
|
Q=
|
|
E=true
|
|
endif
|
|
ifeq ($(QUIET), 1)
|
|
Q=@
|
|
E=true
|
|
endif
|
|
|
|
%.o: %.c
|
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
|
@$(E) " CC " $<
|