aboutsummaryrefslogtreecommitdiff
path: root/Makefile.target
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2020-02-19 23:11:13 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2020-02-22 08:26:48 +0000
commitc621dc3e01c425de7da6ad82fc275e764d64e5f5 (patch)
tree4b9239a28134fda5cfa3cd047a01927cb40dd620 /Makefile.target
parent275ab39d86974aab8bbce14b1a0c488653cc72d2 (diff)
downloadqemu-c621dc3e01c425de7da6ad82fc275e764d64e5f5.zip
qemu-c621dc3e01c425de7da6ad82fc275e764d64e5f5.tar.gz
qemu-c621dc3e01c425de7da6ad82fc275e764d64e5f5.tar.bz2
fuzz: add target/fuzz makefile rules
Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20200220041118.23264-18-alxndr@bu.edu Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'Makefile.target')
-rw-r--r--Makefile.target16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.target b/Makefile.target
index 6f4dd72..2d43dc5 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))