From c621dc3e01c425de7da6ad82fc275e764d64e5f5 Mon Sep 17 00:00:00 2001 From: Alexander Bulekov Date: Wed, 19 Feb 2020 23:11:13 -0500 Subject: fuzz: add target/fuzz makefile rules Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Message-id: 20200220041118.23264-18-alxndr@bu.edu Signed-off-by: Stefan Hajnoczi --- Makefile.target | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile.target') diff --git a/Makefile.target b/Makefile.target index 6f4dd72022..2d43dc586a 100644 --- a/Makefile.target +++ b/Makefile.target @@ -228,6 +228,22 @@ ifdef CONFIG_TRACE_SYSTEMTAP rm -f *.stp endif +ifdef CONFIG_FUZZ +include $(SRC_PATH)/tests/qtest/fuzz/Makefile.include +include $(SRC_PATH)/tests/qtest/Makefile.include + +fuzz: fuzz-vars +fuzz-vars: QEMU_CFLAGS := $(FUZZ_CFLAGS) $(QEMU_CFLAGS) +fuzz-vars: QEMU_LDFLAGS := $(FUZZ_LDFLAGS) $(QEMU_LDFLAGS) +fuzz-vars: $(QEMU_PROG_FUZZ) +dummy := $(call unnest-vars,, fuzz-obj-y) + + +$(QEMU_PROG_FUZZ): config-devices.mak $(all-obj-y) $(COMMON_LDADDS) $(fuzz-obj-y) + $(call LINK, $(filter-out %.mak, $^)) + +endif + install: all ifneq ($(PROGS),) $(call install-prog,$(PROGS),$(DESTDIR)$(bindir)) -- cgit v1.2.3