From 5b716798135dbc85e535d6e4fec994ebf605767d Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sat, 23 Apr 2022 23:07:36 +0000 Subject: [PATCH] make it possible to build dfuzzer with meson inspired by https://github.com/matusmarhefka/dfuzzer/pull/24#issuecomment-1107522921 With this patch applied dfuzzer can be built with clang with ``` CC=clang meson build ninja -C ./build -v ``` --- meson.build | 23 +++++++++++++++++++++++ src/meson.build | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 meson.build create mode 100644 src/meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..99bc601 --- /dev/null +++ b/meson.build @@ -0,0 +1,23 @@ +project('dfuzzer', 'c', + version : '1.4', + default_options: [ + 'c_std=gnu11', + 'prefix=/usr', + 'warning_level=2', + ], +) + +libgio = dependency('gio-2.0', required : true) +libffi = dependency('libffi', required : true) + +subdir('src') + +executable( + 'dfuzzer', + dfuzzer_sources, + dependencies : [libgio, libffi], + install : true +) + +install_data('src/dfuzzer.conf', install_dir : get_option('sysconfdir')) +install_man('man/dfuzzer.1') diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..46c661a --- /dev/null +++ b/src/meson.build @@ -0,0 +1,10 @@ +dfuzzer_sources = files( + 'dfuzzer.c', + 'dfuzzer.h', + 'fuzz.c', + 'fuzz.h', + 'introspection.c', + 'introspection.h', + 'rand.c', + 'rand.h', +)