1a8e1175bSopenharmony_ciMBEDTLS_TEST_PATH:=../../tests 2a8e1175bSopenharmony_ci 3a8e1175bSopenharmony_ciMBEDTLS_PATH := ../.. 4a8e1175bSopenharmony_ciinclude ../../scripts/common.make 5a8e1175bSopenharmony_ci 6a8e1175bSopenharmony_ciDEP=${MBEDLIBS} 7a8e1175bSopenharmony_ci 8a8e1175bSopenharmony_ciifdef FUZZINGENGINE 9a8e1175bSopenharmony_ciLOCAL_LDFLAGS += -lFuzzingEngine 10a8e1175bSopenharmony_ciendif 11a8e1175bSopenharmony_ci 12a8e1175bSopenharmony_ci# A test application is built for each suites/test_suite_*.data file. 13a8e1175bSopenharmony_ci# Application name is same as .data file's base name and can be 14a8e1175bSopenharmony_ci# constructed by stripping path 'suites/' and extension .data. 15a8e1175bSopenharmony_ciAPPS = $(basename $(wildcard fuzz_*.c)) 16a8e1175bSopenharmony_ci 17a8e1175bSopenharmony_ci# Construct executable name by adding OS specific suffix $(EXEXT). 18a8e1175bSopenharmony_ciBINARIES := $(addsuffix $(EXEXT),$(APPS)) 19a8e1175bSopenharmony_ci 20a8e1175bSopenharmony_ci.SILENT: 21a8e1175bSopenharmony_ci 22a8e1175bSopenharmony_ci.PHONY: all check test clean 23a8e1175bSopenharmony_ci 24a8e1175bSopenharmony_ciall: $(BINARIES) 25a8e1175bSopenharmony_ci 26a8e1175bSopenharmony_ciC_FILES := $(addsuffix .c,$(APPS)) 27a8e1175bSopenharmony_ci 28a8e1175bSopenharmony_ci%.o: %.c 29a8e1175bSopenharmony_ci $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $< -o $@ 30a8e1175bSopenharmony_ci 31a8e1175bSopenharmony_ci 32a8e1175bSopenharmony_ciifdef FUZZINGENGINE 33a8e1175bSopenharmony_ci$(BINARIES): %$(EXEXT): %.o common.o $(DEP) 34a8e1175bSopenharmony_ci echo " $(CC) common.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@" 35a8e1175bSopenharmony_ci $(CXX) common.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 36a8e1175bSopenharmony_cielse 37a8e1175bSopenharmony_ci$(BINARIES): %$(EXEXT): %.o common.o onefile.o $(DEP) 38a8e1175bSopenharmony_ci echo " $(CC) common.o onefile.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@" 39a8e1175bSopenharmony_ci $(CC) common.o onefile.o $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 40a8e1175bSopenharmony_ciendif 41a8e1175bSopenharmony_ci 42a8e1175bSopenharmony_ciclean: 43a8e1175bSopenharmony_ciifndef WINDOWS 44a8e1175bSopenharmony_ci rm -rf $(BINARIES) *.o 45a8e1175bSopenharmony_cielse 46a8e1175bSopenharmony_ci if exist *.o del /Q /F *.o 47a8e1175bSopenharmony_ci if exist *.exe del /Q /F *.exe 48a8e1175bSopenharmony_ciendif 49