summaryrefslogtreecommitdiffstats
path: root/utils/bin2c/main.cpp
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2020-03-01 22:14:00 -0700
committerGitHub <noreply@github.com>2020-03-01 22:14:00 -0700
commit4ac791b225dc148cda5b0fe519ceb438da79e0bd (patch)
tree95d77b97ac0a85577a08341622aa1b1bc731b645 /utils/bin2c/main.cpp
parent4b06c31568b72192a51a8a61fd5045b588540042 (diff)
downloadbcm5719-ortega-4ac791b225dc148cda5b0fe519ceb438da79e0bd.tar.gz
bcm5719-ortega-4ac791b225dc148cda5b0fe519ceb438da79e0bd.zip
build: Add version information to output files. (#52)
Diffstat (limited to 'utils/bin2c/main.cpp')
-rw-r--r--utils/bin2c/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/bin2c/main.cpp b/utils/bin2c/main.cpp
index c494421..a8da108 100644
--- a/utils/bin2c/main.cpp
+++ b/utils/bin2c/main.cpp
@@ -10,7 +10,7 @@
///
////////////////////////////////////////////////////////////////////////////////
///
-/// @copyright Copyright (c) 2019, Evan Lojewski
+/// @copyright Copyright (c) 2019-2020, Evan Lojewski
/// @cond
///
/// All rights reserved.
@@ -47,6 +47,10 @@
#include <cstring>
#include <fstream>
#include <iomanip>
+#include <types.h>
+
+#define VERSION_STRING STRINGIFY(VERSION_MAJOR) "." STRINGIFY(VERSION_MINOR) "." STRINGIFY(VERSION_PATCH)
+
using namespace std;
using optparse::OptionParser;
@@ -83,7 +87,9 @@ int main(int argc, char const *argv[])
{
ofstream outfile;
ifstream infile;
- OptionParser parser = OptionParser().description("Binary to C Header utility");
+ OptionParser parser = OptionParser().description("Binary to C Header utility v" VERSION_STRING);
+
+ parser.version(VERSION_STRING);
parser.add_option("-i", "--input")
.dest("input")
OpenPOWER on IntegriCloud