summaryrefslogtreecommitdiffstats
path: root/src/core/version.c
diff options
context:
space:
mode:
authorMichael Brown2012-11-02 15:46:39 +0100
committerMichael Brown2012-11-02 15:46:39 +0100
commit4867085c0cd334004e8d67dff7bd53996f23ade6 (patch)
tree31f92c7844273c3b495c105a4c24d98dc54917ac /src/core/version.c
parent[build] Inhibit .eh_frame on newer gcc versions (diff)
downloadipxe-4867085c0cd334004e8d67dff7bd53996f23ade6.tar.gz
ipxe-4867085c0cd334004e8d67dff7bd53996f23ade6.tar.xz
ipxe-4867085c0cd334004e8d67dff7bd53996f23ade6.zip
[build] Include version number within only a single object file
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/version.c')
-rw-r--r--src/core/version.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/core/version.c b/src/core/version.c
new file mode 100644
index 00000000..1aa22d8e
--- /dev/null
+++ b/src/core/version.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+/** @file
+ *
+ * Version number
+ *
+ */
+
+#include <ipxe/features.h>
+#include <ipxe/version.h>
+
+/** Version number feature */
+FEATURE_VERSION ( VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
+
+/** Product major version */
+const int product_major_version = VERSION_MAJOR;
+
+/** Product minor version */
+const int product_minor_version = VERSION_MINOR;
+
+/** Product version string */
+const char *product_version = VERSION;