make/meson: Generate a `version.h'
Using a header file allows us to keep the version string out of the
compiler command line. This should heavily increase direct hits with
ccache. Specifying the compiler argument for a single source file is
rather clumsy with Meson, hence the more pompous header file.
Change-Id: If6c4e33e4944d2b264252dbcd2fd69ecf7bd8905
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/355
Reviewed-by: Felix Singer <felixsinger@posteo.net>
diff --git a/flashprog.c b/flashprog.c
index 80e53b9..07025d9 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -33,6 +33,7 @@
#include "programmer.h"
#include "hwaccess_physmap.h"
#include "chipdrivers.h"
+#include "version.h"
const char flashprog_version[] = FLASHPROG_VERSION;
const char *chip_to_probe = NULL;