2024-01-05 18:11:32 +00:00
|
|
|
MBEDTLS_TEST_PATH:=../../tests
|
2019-06-04 17:37:52 +00:00
|
|
|
|
2024-01-05 18:11:32 +00:00
|
|
|
MBEDTLS_PATH := ../..
|
|
|
|
include ../../scripts/common.make
|
2019-06-04 17:37:52 +00:00
|
|
|
|
2024-01-05 18:11:32 +00:00
|
|
|
DEP=${MBEDLIBS}
|
2019-06-04 17:37:52 +00:00
|
|
|
|
|
|
|
ifdef FUZZINGENGINE
|
|
|
|
LOCAL_LDFLAGS += -lFuzzingEngine
|
|
|
|
endif
|
|
|
|
|
|
|
|
# A test application is built for each suites/test_suite_*.data file.
|
|
|
|
# Application name is same as .data file's base name and can be
|
|
|
|
# constructed by stripping path 'suites/' and extension .data.
|
|
|
|
APPS = $(basename $(wildcard fuzz_*.c))
|
|
|
|
|
|
|
|
# Construct executable name by adding OS specific suffix $(EXEXT).
|
|
|
|
BINARIES := $(addsuffix $(EXEXT),$(APPS))
|
|
|
|
|
|
|
|
.SILENT:
|
|
|
|
|
|
|
|
.PHONY: all check test clean
|
|
|
|
|
|
|
|
all: $(BINARIES)
|
|
|
|
|
|
|
|
C_FILES := $(addsuffix .c,$(APPS))
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
|
|
|
|
ifdef FUZZINGENGINE
|
|
|
|
$(BINARIES): %$(EXEXT): %.o common.o $(DEP)
|
|
|
|
echo " $(CC) common.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@"
|
|
|
|
$(CXX) common.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
else
|
|
|
|
$(BINARIES): %$(EXEXT): %.o common.o onefile.o $(DEP)
|
|
|
|
echo " $(CC) common.o onefile.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@"
|
|
|
|
$(CC) common.o onefile.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
|
|
|
ifndef WINDOWS
|
|
|
|
rm -rf $(BINARIES) *.o
|
|
|
|
else
|
2019-08-30 13:51:55 +00:00
|
|
|
if exist *.o del /Q /F *.o
|
|
|
|
if exist *.exe del /Q /F *.exe
|
2019-06-04 17:37:52 +00:00
|
|
|
endif
|